From 1328a0a226960038a5509a35afda36eb35368989 Mon Sep 17 00:00:00 2001 From: Danny Wahl Date: Tue, 4 Jun 2024 16:18:52 -0600 Subject: [PATCH] Deploy v4.0.0+1717539510 --- assets/RenderTopNavBar-BKjAQtrP.js | 32 ++ assets/error-pmzUJ_SX.js | 1 + assets/favicon-DheGqUGe.ico | Bin 15086 -> 0 bytes assets/index-3znfDf88.js | 5 + assets/index-BIsQGgQp.js | 1 + assets/index-Bg_tX0Zf.js | 314 ------------------ assets/index-DT1C1ZDw.js | 87 +++++ ...{index-CJ_Q_-5o.css => index-DXft5ptw.css} | 2 +- assets/links-BgPQ3f7b.js | 2 + assets/markdownBrand-LsH9OAbQ.js | 9 + assets/mdtoui-CrW6q7x2.js | 59 ++++ assets/mdui-CVidgDKD.js | 121 +++++++ assets/redirectTo-_VcDkk4z.js | 2 + assets/releases-28YzCjnP.js | 16 + index.html | 8 +- 15 files changed, 340 insertions(+), 319 deletions(-) create mode 100644 assets/RenderTopNavBar-BKjAQtrP.js create mode 100644 assets/error-pmzUJ_SX.js delete mode 100644 assets/favicon-DheGqUGe.ico create mode 100644 assets/index-3znfDf88.js create mode 100644 assets/index-BIsQGgQp.js delete mode 100644 assets/index-Bg_tX0Zf.js create mode 100644 assets/index-DT1C1ZDw.js rename assets/{index-CJ_Q_-5o.css => index-DXft5ptw.css} (97%) create mode 100644 assets/links-BgPQ3f7b.js create mode 100644 assets/markdownBrand-LsH9OAbQ.js create mode 100644 assets/mdtoui-CrW6q7x2.js create mode 100644 assets/mdui-CVidgDKD.js create mode 100644 assets/redirectTo-_VcDkk4z.js create mode 100644 assets/releases-28YzCjnP.js diff --git a/assets/RenderTopNavBar-BKjAQtrP.js b/assets/RenderTopNavBar-BKjAQtrP.js new file mode 100644 index 00000000..ce2a51f5 --- /dev/null +++ b/assets/RenderTopNavBar-BKjAQtrP.js @@ -0,0 +1,32 @@ +import{R as v,m as tn,B as M,C as Z,D as Ie,E as ve,F as Zt,v as R,r as y,G as Ur,H as Zs,I as Qs,P as s,w as E,h as H,x as ye,d as h,i as oe,s as Gr,k as N,t as ut,l as Js,n as qr,T as ee,V as W,o as j,J as Xr,K as An,M as ea,j as O,e as ai,N as ta,O as na}from"./index-DT1C1ZDw.js";function z(i,e={}){return typeof i=="function"?i.prototype&&i.prototype.isReactComponent?v.createElement(i,e):i(e):i}function Qt(i){if(Array.isArray(i)){const e=i.slice(0);for(let t=0;t{if(e==null)return!1;const n=ia(i,e);return n.length===1||t===n[0]}).reduce((e,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?t:function(...o){e.apply(this,o),t.apply(this,o)}},null)}function ia(i,e){const t=[];return i.forEach((n,o)=>{n===e&&t.push(o)}),t}const Kr=(i,e)=>(e.has(i)?e.set(i,e.get(i)+1):e.set(i,0),`${i}_${e.get(i)}`);function Yr(i){const e=`${i}`,t=e.match(/[\d.\-\+]*\s*(.*)/);return[parseFloat(e),t&&t.length>0?t[1]:""]}function oa(i){if(!i||typeof i=="number")return i;const e=Yr(i),t=tn(e,2),n=t[0],o=t[1];return o==="ms"?n:o==="s"?n*1e3:n}function fe(i,e,t,n){const o=i===window||i===document?i:M(i);return o==null||o.addEventListener(e,t,n),{remove(){o==null||o.removeEventListener(e,t,n)}}}function ra(i,e){const t=i&&M(i),n=e&&M(e);return!t||!n?!1:!(t instanceof Window)&&!(n instanceof Window)?t.contains(n):Zr(t,n)}function Zr(i,e){let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const zt=Z?ra:Zr;function V(i){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!Z)return e;const t=i&&M(i);if(!t)return e;if(t===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const n=i===document?document:Ie(t),o=n&&n.documentElement;if(!o||!zt(o,t))return e;const r=t.getBoundingClientRect();let a;for(a in e)e[a]=r[a];if(n!==document&&n.defaultView){const l=n.defaultView.frameElement;if(l){const d=V(l);e.top+=d.top,e.bottom+=d.top,e.left+=d.left,e.right+=d.left}}return{top:e.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:e.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),width:(e.width==null?t.offsetWidth:e.width)||0,height:(e.height==null?t.offsetHeight:e.height)||0,right:n.body.clientWidth-e.width-e.left,bottom:n.body.clientHeight-e.height-e.top}}const Le=function(){let i;if(Z&&window.requestAnimationFrame&&window.cancelAnimationFrame)i=e=>{const t=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(t)}};else{let e=new Date().getTime();i=t=>{const n=new Date().getTime(),o=Math.max(0,16-(n-e)),r=setTimeout(t,o);return e=n,{cancel:()=>clearTimeout(r)}}}return i}();function sa(i,e){const t=M(i),n=[];let o=V(t)||{},r=!1;function a(){if(!r){const l=V(t)||{};(l.top!==o.top||l.left!==o.left||l.right!==o.right||l.bottom!==o.bottom||l.width!==o.width||l.height!==o.height)&&typeof e=="function"&&e(l),o=l,n.push(Le(a))}}return a(),{remove(){r=!0,n.forEach(l=>l.cancel())}}}function aa(i){return!!(i.tagName.includes("-")&&customElements.get(i.tagName.toLowerCase()))}function Ft(i){const e=(i||document).activeElement;return e&&aa(e)?e.shadowRoot.activeElement:e}function pt(i){const e=i&&M(i),t=Ft();return!!e&&(t===e||zt(e,t))}const li=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function Kn(i,e,t){const n=i&&M(i);if(!n||typeof n.querySelectorAll!="function")return[];let o=Array.from(n.querySelectorAll(li));return t&&n.matches(li)&&(o=[...o,n]),o.filter(r=>typeof e=="function"?e(r)&&di(r):di(r))}function la(i){return ve(i).display==="none"}function da(i){var e,t;const n=["fixed","absolute"];return!!(n.includes((e=i.style.position)===null||e===void 0?void 0:e.toLowerCase())||n.includes((t=ve(i).getPropertyValue("position"))===null||t===void 0?void 0:t.toLowerCase()))}function ca(i){let e=i;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(la(e))return!1;if(da(e))break;e=e.parentNode}return!0}function di(i){return!i.disabled&&ca(i)}function Yn(i,e){return Kn(i,t=>!ua(t.getAttribute("tabindex")),e)}function ua(i){return!isNaN(i)&&i<0}const pa={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function ci(i){const e=M(i);if(!e)return pa;const t={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return t.add=n=>e.classList.add(n),t.remove=n=>e.classList.remove(n),t.contains=n=>e.classList.contains(n),t}const ui=new WeakMap;function pi(i,e=!1){var t;if(!Z)return 16;const n=i||((t=Ie(i))===null||t===void 0?void 0:t.documentElement),o=ui.get(n);if(!e&&o)return o;const r=parseInt(ve(n).getPropertyValue("font-size"));return ui.set(n,r),r}function ha(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){let n=t;for(;(n=n.parentNode)&&n&&n.nodeType===1&&n.tagName!=="BODY";){const o=ve(n),r=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("-moz-transform")||o.getPropertyValue("-ms-transform")||o.getPropertyValue("-o-transform")||o.getPropertyValue("transform")||"none",a=r==="none"||r==="matrix(1, 0, 0, 1, 0, 0)";(o.position!=="static"||!a)&&e.push(n)}e.push(Ie(t).body)}return e}function Qr(i){const e=[];if(!Z)return e;const t=i&&M(i);if(t){const o=(ve(t)||{}).position;if(o==="fixed")return[t.ownerDocument];let r=t;for(;r&&r.nodeType===1&&(r=r.parentNode);){let l;try{l=ve(r)}catch{}if(typeof l>"u"||l===null)return e.push(r),e;const d=l,c=d.overflow,u=d.overflowX,p=d.overflowY;/(auto|scroll|overlay)/.test(c+p+u)&&(o!=="absolute"||["relative","absolute","fixed"].indexOf(l.position)>=0)&&e.push(r)}const a=t.ownerDocument;a&&(e.push(a.body),a!==document&&e.push(a.defaultView))}return e}function hi(i,e){const t=e.currentTarget,n=e.relatedTarget;(!n||n!==t&&!zt(t,n))&&i(e)}function Jt(i){const e=i&&M(i);return e?Ft()===e:!1}function Fn(i,e=!0){const t=i&&M(i);if(t===window||t===document||t===document.body)return!0;const n=t.parentNode;if(t.nodeType===3)return Fn(n,e);const o=t?ve(t):{};if(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")return!1;if(o.overflow==="hidden"&&o.position==="absolute"&&o.clip!=="auto"){const r=o.clip.substring(5).slice(0,-1).split(", ");let a=!0;if(r.forEach(l=>{l!=="0px"&&(a=!1)}),a)return!1}return e&&n?Fn(n):!0}function fa(i,e){const t=M(e)||document;if(Z){const n=Zt(t);return n&&n.matchMedia(i)}return null}function Y(i,e){if(!i||typeof i=="number")return i;const t=Yr(i),n=tn(t,2),o=n[0],r=n[1];if(r==="rem")return o*pi();if(r==="em"){const a=Z?document.body:null;return o*pi(e||a)}else return o}const ga=Object.prototype.hasOwnProperty;function Sn(i,e){if(fi(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;const t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(let o=0;o{d.indexOf("on")===0&&(typeof e[d]=="function"||typeof i.props[d]=="function")&&(l[d]=L(i.props[d],e[d]))}),o==null||n==null?v.cloneElement(i,l,...t):(R(r,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${o}`),v.cloneElement(i,{...l,ref(d){a?n(d):n.current=d,o(d)}},...t))}function dt(i,e={}){const t=y.Children.count(i);return t===0?null:typeof i=="string"&&i.length>0||t>1?v.createElement("span",e,i):J(Array.isArray(i)?i[0]:i,e)}const ma=()=>i=>i;function gi(i){return typeof i=="string"?i:i.displayName||i.name}function Jr({props:i={},interactionTypes:e=["disabled","readonly"]}={}){const t=i.interaction,n=i.disabled,o=i.readOnly;return t||(e.includes("disabled")&&n?"disabled":e.includes("readonly")&&o?"readonly":"enabled")}function U(i,e=[]){return i&&i.type?e.map(n=>gi(n)).indexOf(gi(i.type))>=0:!1}const re=Ur(i=>{const e=y.forwardRef((t,n)=>{const o=i.componentId||i.displayName||i.name,r=y.useContext(Qs),a=(l=o)=>Kr(l,r);return t.deterministicId&&R(!1,`Manually passing the "deterministicId" property is not allowed on the ${o} component. +`,t.deterministicId),v.createElement(i,Object.assign({ref:n,deterministicId:a},t))});return Zs(e,i),e.propTypes=i.propTypes,e.defaultProps=i.defaultProps,e.allowedProps=i.allowedProps,e.originalType=i.originalType||i,e});function mi(i){return function(e,t,n,o="",r=""){const a=e[t];return a===null||typeof a>"u"?new Error(`The prop \`${t}\` is marked as required in \`${n}\`, but its value is \`${a}\``):i(e,t,n,o,r)}}const G={oneOf(i){function e(t,n,o){const r=v.Children.toArray(t[n]),a=i.map(l=>l&&Ne(l));for(let l=0;l{const c=Ne(d);return r[c]=0,c});for(let d=0;d{r[d]>1&&l.push(`${r[d]} children of type ${d}`),r[d]===0&&l.push(`0 children of type ${d}`)}),l.length>0?new Error(`Expected exactly one of each ${a.join(", ")} in ${n} but found:${l.join(` +`)}`):null}},enforceOrder(...i){function e(r,a){for(let l=0;ln(r,l)).join(` + +`)}function n(r,a){const l=a.map(d=>d?Ne(d):"??").map(d=>` <${d} />`).join(` +`);return`<${r}> +${l} +`}function o(r,a,l){const d=v.Children.toArray(r[a]).map(c=>{if(c&&c.type)return Ne(c.type);if(c)return null});for(let c=0;cp?Ne(p):"??");if(e(d,u))return null}return new Error(`Expected children of ${l} in one of the following formats: + ${t(l,i)} + + + Instead of: + ${n(l,d)}`)}return o.isRequired=mi(o),o}},Ne=i=>typeof i=="string"?i:i.displayName||i.name;function va(i,e,t){if(i.as==="input"){if(e==="children"&&i.children||i.value==null)return new Error(`Prop \`value\` and not \`children\` must be supplied if \`${t} as="input"\``)}else{if(e==="value"&&i.value!=null)return new Error(`Prop \`children\` and not \`value\` must be supplied unless \`${t} as="input"\``);if(!i.children)return new Error(`Prop \`children\` should be supplied unless \`${t} as="input"\`.`)}return null}function ba(i,e="onChange",t="defaultValue"){return function(n,o,r){const a=i(n,o,r,"prop",o,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return a||(n[o]&&typeof n[e]!="function"?new Error([`You provided a '${o}' prop without an '${e}' handler on '${r}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${t}'. Otherwise, set '${e}'.`].join("")):null)}}const ya=!!(typeof window<"u"&&window.document&&window.document.createElement),ne=ya?s.oneOfType([s.element,s.instanceOf(Element)]):s.element,wa=()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",top:0,insetInlineStart:0,overflow:"hidden",clip:"rect(0 0 0 0)",border:0}}),_a={as:s.elementType,children:s.node,elementRef:s.func},Sa=["as","children","elementRef"],Ca=["children","styles"];var vi,bi,Fe;let Zn=(vi=E(wa,null),vi(bi=(Fe=class es extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,n=e.styles,o=H(e,Ca),r=ye(es,o);return h(r,Object.assign({},oe(o),{css:n==null?void 0:n.screenReaderContent,ref:this.handleRef}),t)}},Fe.displayName="ScreenReaderContent",Fe.componentId="ScreenReaderContent",Fe.propTypes=_a,Fe.allowedProps=Sa,Fe.defaultProps={as:"span",children:null},Fe))||bi);var zn={exports:{}};(function(i,e){function t(d){if(d&&typeof d=="object"){var c=d.which||d.keyCode||d.charCode;c&&(d=c)}if(typeof d=="number")return a[d];var u=String(d),p=n[u.toLowerCase()];if(p)return p;var p=o[u.toLowerCase()];if(p)return p;if(u.length===1)return u.charCodeAt(0)}t.isEventKey=function(c,u){if(c&&typeof c=="object"){var p=c.which||c.keyCode||c.charCode;if(p==null)return!1;if(typeof u=="string"){var f=n[u.toLowerCase()];if(f)return f===p;var f=o[u.toLowerCase()];if(f)return f===p}else if(typeof u=="number")return u===p;return!1}},e=i.exports=t;var n=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! + * Programatically add the following + */for(r=97;r<123;r++)n[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)n[r-48]=r;for(r=1;r<13;r++)n["f"+r]=r+111;for(r=0;r<10;r++)n["numpad "+r]=r+96;var a=e.names=e.title={};for(r in n)a[n[r]]=r;for(var l in o)n[l]=o[l]})(zn,zn.exports);var Ia=zn.exports;const ge=Gr(Ia);let Wn=!0;try{var Dn,Ln;Wn=!((Dn=process)!==null&&Dn!==void 0&&(Ln=Dn.env)!==null&&Ln!==void 0&&Ln.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(i){if(i instanceof ReferenceError)Wn=!1;else throw i}const T=Wn?()=>i=>i:Ur(i=>{const t={attribute:"data-cid",value:i.displayName||i.name},n=`[${t.attribute}~="${t.value}"]`;class o extends i{constructor(...a){super(...a),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(a,l,d){super.componentDidUpdate&&super.componentDidUpdate(a,l,d),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let a;if(!this._testableUnmounted){try{a=this.DOMNode||M(this)}catch{}if(a){const l=a.getAttribute(t.attribute),d=typeof l=="string"?l.split(/\s+/):[];d.includes(t.value)||d.push(t.value),a.setAttribute(t.attribute,d.join(" "))}}})}}return o.selector=n,o}),ts="getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ",xa=ts.length-1;function ka(i="",e=12){return`u${$a(e-1)}`}function Oa(i){const e=[];for(;0{o.forEach(r=>{const a=Array.from(r.addedNodes),l=Array.from(r.removedNodes);this.hideNodes(a.filter(yi)),l.filter(yi).forEach(d=>{d.tagName.toLowerCase()!=="iframe"&&this.restoreNode(d),this.parseIframeBodies(d).forEach(u=>{this.restoreNode(u)})})})};const n=typeof t.liveRegion=="function"?t.liveRegion():t.liveRegion;this._liveRegion=Array.isArray(n)?n:[n],this._contextElement=e,this._options=t}updateElement(e){this._contextElement=e}muteNode(e){e&&e.tagName.toLowerCase()!=="script"&&(["role","aria-label","aria-hidden"].forEach(t=>{const n=e.getAttribute(t);n!==null&&(this._attributes.push([e,t,n]),e.removeAttribute(t))}),this._observer.observe(e,{childList:!0}))}hideNodes(e){e.forEach(t=>{var n;const o=typeof t.getAttribute=="function"&&((n=t.getAttribute("aria-live"))===null||n===void 0?void 0:n.toLowerCase());t&&t.nodeType===1&&t.tagName.toLowerCase()!=="script"&&o!=="assertive"&&o!=="polite"&&this._parents.indexOf(t)===-1&&this._nodes.indexOf(t)===-1&&this._liveRegion.indexOf(t)===-1&&!this._contextElement.contains(t)&&(t.tagName.toLowerCase()!=="iframe"&&this.hideNode(t),this.parseIframeBodies(t).forEach(a=>{this.hideNode(a)}))})}hideNode(e){e.getAttribute("aria-hidden")!=="true"&&(e.setAttribute("aria-hidden","true"),this._nodes.push(e))}restoreNode(e){const t=this._nodes.indexOf(e);t>=0&&(e.removeAttribute("aria-hidden"),this._nodes.splice(t,1))}parseIframeBodies(e){if(!e)return[];let t=[];return e.tagName.toLowerCase()==="iframe"?t.push(e):e.getElementsByTagName&&(t=Array.from(e.getElementsByTagName("iframe"))),t.map(n=>{let o=null;try{o=n.contentDocument.body}catch(r){R(!1,`[ui-a11y] could not find a document for iframe: ${r} ${n}`)}return o}).filter(n=>n!==null)}activate(){if(!this._options.shouldContainFocus)return;this._observer=new MutationObserver(this.handleDOMMutation);let e=this._contextElement;for(;e&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()!=="body";){const t=e.parentElement;t&&(this._parents.push(t),this.muteNode(t),this.hideNodes(Array.prototype.slice.call(t.childNodes))),e=e.parentNode}}deactivate(){this._observer&&(this._observer.disconnect(),this._observer=null),this._nodes.forEach(e=>{e.removeAttribute("aria-hidden")}),this._nodes=[],this._attributes.forEach(e=>{e[0].setAttribute(e[1],e[2]||"")}),this._attributes=[],this._parents=[]}}function Ba(i,e,t){const n=M(i),o=Yn(n);if(!o.length){e.preventDefault();return}if(pt(i)){const d=Ft();d&&o.indexOf(d)===-1&&o.push(d)}const r=o[e.shiftKey?0:o.length-1];if(!(Jt(r)||Jt(n)||!pt(i)))return;e.preventDefault(),o[e.shiftKey?o.length-1:0].focus()}class Ea{constructor(e,t){this._options=void 0,this._focusLaterElement=null,this._needToFocus=!1,this._listeners=[],this._raf=[],this._active=!1,this._wasDocumentClick=void 0,this._contextElement=void 0,this.handleKeyDown=n=>{n.keyCode===ge.codes.tab&&Ba(this._contextElement,n)},this.handleClick=()=>{this._wasDocumentClick=!0},this.handleWindowBlur=()=>{if(this._wasDocumentClick){this._wasDocumentClick=!1;return}this._needToFocus=!0},this.handleFocus=()=>{if(this._needToFocus){if(this._needToFocus=!1,!this._contextElement)return;this._raf.push(Le(()=>{pt(this._contextElement)||this.focusDefaultElement()}))}},this.handleFirstTabbableKeyDown=n=>{if(n.keyCode===ge.codes.tab&&n.shiftKey){var o,r;(o=(r=this._options).onBlur)===null||o===void 0||o.call(r,n)}},this.handleLastTabbableKeyDown=n=>{if(n.keyCode===ge.codes.tab&&!n.shiftKey){var o,r;(o=(r=this._options).onBlur)===null||o===void 0||o.call(r,n)}},this._contextElement=M(e),this._options=t||{shouldContainFocus:!0,shouldReturnFocus:!0,defaultFocusElement:null},this._options.shouldReturnFocus&&(this._focusLaterElement=Ft(this.doc))}get focused(){return pt(this._contextElement)}get shouldContainFocus(){const e=this._options.shouldContainFocus;return e===!0||Array.isArray(e)&&e.includes("keyboard")}get focusable(){return Kn(this._contextElement,()=>!0,!0)||[]}get tabbable(){return Yn(this._contextElement)||[]}get firstTabbable(){return this.tabbable[0]}get lastTabbable(){return this.tabbable.pop()}get firstFocusable(){return this.focusable[0]}get lastFocusable(){return this.focusable.pop()}get doc(){return Ie(this._contextElement)}get win(){return Zt(this._contextElement)}get defaultFocusElement(){const e=this._options.defaultFocusElement,t=M(typeof e=="function"?e():e);return t&&this._contextElement&&this._contextElement.contains(t)?t:this.firstTabbable?this.firstTabbable:this._contextElement&&this.focusable.includes(this._contextElement)?this._contextElement:null}updateElement(e){this._contextElement=M(e)}focusDefaultElement(){if(this.defaultFocusElement){const e=this.defaultFocusElement,t=e.closest("[data-position-content]");t?this.tryFocusOnPositionedElement(t,e):e.focus()}else this.shouldContainFocus&&(Ft(this.doc)&&Ft(this.doc).blur(),N(!0,"\n [KeyboardFocusRegion] No `defaultFocusElement` was provided and\n `shouldContainFocus` was set to `true` or `keyboard`. Focus has\n been moved to the document body instead."))}tryFocusOnPositionedElement(e,t,n=3){if(n<=0)return;const o=e.getBoundingClientRect(),r=document.documentElement.getBoundingClientRect();o.top>r.bottom||o.rightr.right?this._raf.push(Le(()=>{this.tryFocusOnPositionedElement(e,t,n-1)})):t.focus()}focus(){this.focused||this._raf.push(Le(()=>{this.focusDefaultElement()}))}blur(){if(this._options.shouldReturnFocus&&this._focusLaterElement){try{this._focusLaterElement.focus()}catch(e){N(!1,` + [KeyboardFocusRegion] You tried to return focus to ${this._focusLaterElement} + but it is not in the DOM anymore: ${e} + `)}this._focusLaterElement=null}}activate(){const e=this.defaultFocusElement,t=this.shouldContainFocus;this._active||(e||t)&&(t?this._listeners.push(fe(this.doc,"keydown",this.handleKeyDown)):(this._listeners.push(fe(this.firstTabbable||e,"keydown",this.handleFirstTabbableKeyDown)),this._listeners.push(fe(this.lastTabbable||e,"keydown",this.handleLastTabbableKeyDown))),this._listeners.push(fe(this.doc,"click",this.handleClick,!0)),this._listeners.push(fe(this.win,"blur",this.handleWindowBlur,!1)),this._listeners.push(fe(this.doc,"focus",this.handleFocus,!0)),this._active=!0)}deactivate(){this._active&&(this._listeners.forEach(e=>{e.remove()}),this._listeners=[],this._raf.forEach(e=>e.cancel()),this._raf=[],this._active=!1)}}class ns{constructor(e,t){this._contextElement=null,this._options=void 0,this._screenReaderFocusRegion=void 0,this._keyboardFocusRegion=void 0,this._id=void 0,this._listeners=[],this._active=!1,this._documentClickTarget=null,this._contextContainsTarget=!1,this.handleDismiss=(n,o)=>{var r,a;(r=(a=this._options).onDismiss)===null||r===void 0||r.call(a,n,o)},this.captureDocumentMousedown=n=>{this._documentClickTarget=n.target,this._contextContainsTarget=zt(this._contextElement,this._documentClickTarget)},this.handleDocumentClick=n=>{this._options.shouldCloseOnDocumentClick&&n.button===0&&n.detail>0&&!this._contextContainsTarget&&this.handleDismiss(n,!0)},this.handleFrameClick=(n,o)=>{zt(this._contextElement,o)||this.handleDismiss(n,!0)},this.handleKeyUp=n=>{if(this._options.shouldCloseOnEscape&&n.keyCode===ge.codes.esc&&!n.defaultPrevented){var o;const r=(o=Ie(this._contextElement))===null||o===void 0?void 0:o.activeElement;(r==null?void 0:r.tagName)==="INPUT"&&r.type==="file"?r.blur():this.handleDismiss(n)}},this._options=t||{shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0},this._contextElement=e,this._screenReaderFocusRegion=new Ra(e,t),this._keyboardFocusRegion=new Ea(e,t),this._id=ka()}updateElement(e,t){this._contextElement=e,t&&(this._options=t),this._keyboardFocusRegion&&this._keyboardFocusRegion.updateElement(e),this._screenReaderFocusRegion&&this._screenReaderFocusRegion.updateElement(e)}get id(){return this._id}get focused(){return this._active}get keyboardFocusable(){return(Yn(this._contextElement)||[]).length>0}activate(){if(!this._active){const e=Ie(this._contextElement);this._keyboardFocusRegion.activate(),this._screenReaderFocusRegion.activate(),this._options.shouldCloseOnDocumentClick&&(this._listeners.push(fe(e,"mousedown",this.captureDocumentMousedown)),this._listeners.push(fe(e,"click",this.handleDocumentClick)),Array.from(e.getElementsByTagName("iframe")).forEach(t=>{const n=t.contentDocument;n&&this._listeners.push(fe(n,"mouseup",o=>{this.handleFrameClick(o,t)}))})),this._options.shouldCloseOnEscape&&this._listeners.push(fe(e,"keyup",this.handleKeyUp)),this._active=!0}}deactivate({keyboard:e=!0}={}){this._active&&(this._listeners.forEach(t=>{t.remove()}),this._listeners=[],e&&this._keyboardFocusRegion.deactivate(),this._screenReaderFocusRegion.deactivate(),this._active=!1)}focus(){N(this._active,"[FocusRegion] Cannot call '.focus()' on a region that is not currently active."),this._keyboardFocusRegion.focus()}blur(){N(!this._active,"[FocusRegion] Cannot call '.blur()' on a region that is currently active."),this._keyboardFocusRegion.blur()}}var be;let xe=[];class Q{}be=Q;Q.focusRegion=(i,e={})=>{let t;if(typeof e=="string"?t=be.getEntry(i,e):t=be.addEntry(i,e),t&&t.region&&typeof t.region.focus=="function")return t.region.focus(),t.region;N(!1,`[FocusRegionManager] Could not focus region with element: ${i}`)};Q.activateRegion=(i,e)=>be.addEntry(i,e).region;Q.getActiveEntry=()=>xe.find(({region:i})=>i.focused);Q.findEntry=(i,e)=>{let t;return e?t=xe.findIndex(n=>n.id===e):t=xe.findIndex(n=>n.element===i),t};Q.getEntry=(i,e)=>xe[be.findEntry(i,e)];Q.addEntry=(i,e={})=>{const t=new ns(i,e),n=be.getActiveEntry(),o=t.keyboardFocusable;xe.forEach(({region:a})=>{if(a){const l=a.focused&&!o?{keyboard:!1}:void 0;a.deactivate(l)}}),t.activate(),e.shouldFocusOnOpen&&t.focus();const r={id:t.id,element:i,region:t,children:[],parent:n};return xe.push(r),n&&n.children.push(r),r};Q.removeEntry=(i,e)=>{const t=be.findEntry(i,e),n=xe[t];return t>-1&&xe.splice(t,1),n};Q.isFocused=(i,e)=>{const t=be.getActiveEntry();return e?t&&t.region&&t.id===e:t&&t.region&&t.element===i};Q.clearEntries=()=>{xe=[]};Q.blurRegion=(i,e)=>{const t=be.removeEntry(i,e);if(t){const n=t.children,o=t.region,r=t.parent;o&&o.deactivate(),n&&n.forEach(({id:a,element:l})=>{const d=be.removeEntry(l,a);d&&d.region&&d.region.deactivate()}),r&&r.region&&r.region.activate(),o&&o.blur()}};function is(i){let e=!1;return v.Children.forEach(i,t=>{t&&!U(t,[Zn])&&(e=!0)}),e}function kn(i,e=0,t={}){let n,o,r,a,l=0,d=[];if(typeof i!="function")throw new TypeError("Expected a function");const c=!!t.leading,u="maxWait"in t,p="trailing"in t?!!t.trailing:!0,f=u?Math.max(+!t.maxWait||0,e):0;function g(w){const X=n,se=o;return n=void 0,o=void 0,l=w,r=i.apply(se,X),r}function m(w){return l=w,d.push(setTimeout(C,e)),c?g(w):r}function b(w){const X=w-a,se=w-l,wt=e-X;return u?Math.min(wt,f-se):wt}function S(w){if(typeof a>"u")return!0;const X=w-a,se=w-l;return X>=e||X<0||u&&se>=f}function C(){const w=Date.now();S(w)?I(w):d.push(setTimeout(C,b(w)))}function I(w){return B(),p&&n?g(w):(n=o=void 0,r)}function x(){B(),l=0,n=a=o=void 0}function k(){return d.length===0?r:I(Date.now())}function B(){d.forEach(w=>clearTimeout(w)),d=[]}function P(...w){const X=Date.now(),se=S(X);if(n=w,o=this,a=X,se){if(d.length===0)return m(a);if(u)return d.push(setTimeout(C,e)),g(a)}return d.length===0&&d.push(setTimeout(C,e)),r}return P.cancel=x,P.flush=k,P}const Pa={open:s.bool,onOpen:s.func,onClose:s.func,mountNode:s.oneOfType([ne,s.func]),insertAt:s.oneOf(["bottom","top"]),children:s.node,elementRef:s.func,dir:s.oneOf(Object.values(ut.DIRECTION))},Ta=["open","onOpen","onClose","mountNode","insertAt","children","elementRef","dir"],Ma=["open","insertAt","onOpen","onClose","mountNode","children","elementRef","dir"];var wi,_i,_t;let os=(wi=ut(),wi(_i=(_t=class extends y.Component{constructor(e){super(e),this.DOMNode=null,this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,this.DOMNode=t,typeof n=="function"&&n(t)},Z&&(this.state={mountNode:this.findMountNode(e)})}componentDidMount(){Z&&this.props.open&&v.Children.count(this.props.children)>0&&this.forceUpdate(()=>{this.props.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode)})}componentDidUpdate(e){if(!Z)return;const t=this.findMountNode(this.props);t!==this.state.mountNode&&this.setState({mountNode:t}),this.props.open&&!e.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode),!this.props.open&&e.open&&typeof this.props.onClose=="function"&&this.props.onClose()}componentWillUnmount(){Z&&(this.removeNode(),this.props.open&&typeof this.props.onClose=="function"&&this.props.onClose())}removeNode(){this.DOMNode&&this.DOMNode.parentNode&&typeof this.DOMNode.parentNode.removeChild=="function"&&(this.DOMNode.parentNode.removeChild(this.DOMNode),this.handleRef(null))}insertNode(){const e=this.props;e.open;const t=e.insertAt;e.onOpen,e.onClose,e.mountNode,e.children,e.elementRef;const n=e.dir,o=H(e,Ma);if(!this.DOMNode){const r=document.createElement("span"),a={...oe(o),dir:n};Object.keys(a).forEach(l=>{r.setAttribute(l,a[l])}),this.handleRef(r)}return this.DOMNode&&this.DOMNode.parentNode!==this.state.mountNode&&(t==="bottom"?this.state.mountNode.appendChild(this.DOMNode):this.state.mountNode.insertBefore(this.DOMNode,this.state.mountNode.firstChild)),this.DOMNode}findMountNode(e){let t;return typeof e.mountNode=="function"?t=e.mountNode():e.mountNode&&(t=e.mountNode),(!t||!t.nodeName)&&(t=document.body),t}get node(){return this.DOMNode}render(){const e=this.props,t=e.children,n=e.open;return!Z&&n?t:n&&v.Children.count(t)>0?Js.createPortal(t,this.insertNode()):null}},_t.displayName="Portal",_t.propTypes=Pa,_t.allowedProps=Ta,_t.defaultProps={open:!1,insertAt:"bottom",onOpen:()=>{},onClose:()=>{},mountNode:null,children:null,elementRef:()=>{}},_t))||_i);const Aa=(i,e)=>({position:{label:"position",display:e.containerDisplay},zIndex:i.zIndex}),Da=i=>{const e=i.stacking;return{...{zIndex:e==null?void 0:e.topmost}}},La=["top","bottom","start","end","top start","top center","top end","top stretch","bottom start","bottom center","bottom end","bottom stretch","start top","start center","start bottom","start stretch","end top","end center","end bottom","end stretch","center start","center end","offscreen"],te={placement:s.oneOf(La),mountNode:s.oneOfType([ne,s.func]),constrain:s.oneOfType([ne,s.func,s.oneOf(["window","scroll-parent","parent","none"])])},rs={center:"center",start:"end",end:"start",top:"bottom",bottom:"top",stretch:"stretch",offscreen:"offscreen"},Na={renderTarget:s.oneOfType([s.node,s.func]),target:s.oneOfType([ne,s.func]),placement:te.placement,mountNode:te.mountNode,insertAt:s.oneOf(["bottom","top"]),constrain:te.constrain,offsetX:s.oneOfType([s.string,s.number]),offsetY:s.oneOfType([s.string,s.number]),id:s.string,shouldTrackPosition:s.bool,shouldPositionOverTarget:s.bool,onPositionChanged:s.func,onPositioned:s.func,children:s.node,containerDisplay:s.oneOf(["inline-block","block"]),elementRef:s.func},Fa=["renderTarget","target","placement","mountNode","insertAt","constrain","offsetX","offsetY","id","shouldTrackPosition","shouldPositionOverTarget","onPositionChanged","onPositioned","children","containerDisplay","elementRef"];function ss(i,e,t){const n=Array.isArray(i)?i:i.split(" "),o=tn(n,2),r=o[0],a=o[1],l=e(r,a).filter(d=>d);return t?l.join(t):l}function as(i,e){return ss(i,(t,n)=>[rs[t],n],e)}function za(i,e,t={}){if(!i||t.placement==="offscreen"){const o=!t.container&&i;return{placement:t.placement,style:{left:"-9999em",overflow:"hidden",position:"absolute",top:0,display:o?"none":null}}}const n=new Wa(i,e,t);return{placement:n.placement,style:n.style}}class Si{constructor(e,t,n={top:0,left:0}){this.node=void 0,this.placement=void 0,this.rect=void 0,this._offset=void 0,this.node=M(e),typeof t=="string"?this.placement=ls(t):Array.isArray(t)?this.placement=t:this.placement=["bottom","center"],this.rect=V(this.node),this._offset=Ci(n,this.size,this.node)}get width(){return this.rect.width}get height(){return this.rect.height}get size(){return{width:this.width,height:this.height}}get position(){return{top:this.rect.top,left:this.rect.left}}get hasVerticalPlacement(){return["top","bottom"].indexOf(this.placement[0])>=0}get hasHorizontalPlacement(){return["start","end"].indexOf(this.placement[0])>=0}get shouldStretchVertically(){return this.placement[1]==="stretch"&&this.hasVerticalPlacement}get shouldStretchHorizontally(){return this.placement[1]==="stretch"&&this.hasHorizontalPlacement}get mirroredPlacement(){return as(this.placement)}calculateOffset(e){const t={top:0,start:0,center:"50%",bottom:"100%",end:"100%",stretch:0};let n=tn(e,2),o=n[0],r=n[1];if(["start","end"].indexOf(o)>=0){var a=[r,o];o=a[0],r=a[1]}let l=0,d=0;return typeof t[o]<"u"&&(l=t[o]),typeof t[r]<"u"&&(d=t[r]),yn([Ci({top:l,left:d},this.size,this.node),Ha(this._offset,this.placement)])}get scrollParentsOffset(){const e=Qr(this.node);let t=0,n=0;for(let o=1;o1?0:V(t==null?void 0:t.documentElement).top,o=0,r=0;for(let a=1;ap.bottom?u-p.bottom:0,left:lp.right?d-p.right:0}}constrainTo(e){if(!e)return;const t=this.overflow(e),n={top:t.top>0,bottom:t.bottom>0,left:t.left>0,right:t.right>0};this.element.hasVerticalPlacement?(this.element.placement[1]!=="stretch"&&(n.left&&n.right?(this.element.placement[1]="center",this.target.placement[1]="center"):n.left?(this.element.placement[1]="start",this.target.placement[1]="start"):n.right&&(this.element.placement[1]="end",this.target.placement[1]="end")),n.top&&n.bottom?t.bottomt.top&&(this.element.placement[0]="top",this.target.placement[0]="bottom"):n.top?(this.element.placement[0]="bottom",this.target.placement[0]="top"):n.bottom&&(this.element.placement[0]="top",this.target.placement[0]="bottom")):this.element.hasHorizontalPlacement&&(n.top&&n.bottom?(this.element.placement[1]="center",this.target.placement[1]="center"):n.top?(this.element.placement[1]="top",this.target.placement[1]="top"):n.bottom&&(this.element.placement[1]="bottom",this.target.placement[1]="bottom"),n.left&&n.right?t.left>t.right?(this.element.placement[0]="end",this.target.placement[0]="start"):t.left({top:e.top+t.top,left:e.left+t.left}),{top:0,left:0})}function Ha(i,e){let t=i.top,n=i.left;return typeof n=="string"&&(n=parseFloat(n)),typeof t=="string"&&(t=parseFloat(t)),e[0]==="bottom"&&(t=0-t),e[0]==="end"&&(n=0-n),{top:t,left:n}}function Ci(i,e,t){let n=i.left,o=i.top;return typeof n=="string"&&n.indexOf("%")!==-1&&(n=parseFloat(n)/100*e.width),typeof o=="string"&&o.indexOf("%")!==-1&&(o=parseFloat(o)/100*e.height),{top:o,left:n}}function Va(i){let e=tn(i,2),t=e[0],n=e[1];if(t==="center"||t==="stretch"){var o=[n,t];t=o[0],n=o[1]}return[t,n]}function ls(i){let e=i.split(" ");return e.length===1&&(e=[i,"center"]),Va(e)}function ja(i){return i.join(" ")}var Ii,xi,ki,St,he;let Oi=(Ii=re(),xi=E(Aa,Da),ki=T(),Ii(St=xi(St=ki(St=(he=class Lt extends y.Component{constructor(e){super(e),this.ref=null,this._id=void 0,this._timeouts=[],this._listener=null,this._content=void 0,this._target=void 0,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handlePortalOpen=()=>{this.position(),this.props.shouldTrackPosition&&this.startTracking(),this._timeouts.push(setTimeout(()=>{this.state.positioned&&typeof this.props.onPositioned=="function"&&this.props.onPositioned({top:this.state.style.top,left:this.state.style.left,placement:this.state.placement})},0))},this.position=()=>{this.setState({positioned:!0,...this.calculatePosition(this.props)})},this.state={positioned:!1,...this.calculatePosition(e)},this.position=kn(this.position,0,{leading:!1,trailing:!0}),this._id=this.props.id||e.deterministicId()}shouldComponentUpdate(e,t,n){return!qr(this.state,t)||!Sn(this.props,e)||!Sn(this.context,n)}componentDidMount(){var e,t;this.toggleLocatorAttributes(!0),(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(e,t){var n,o;this.position(),this.toggleLocatorAttributes(!0),this.props.shouldTrackPosition!==e.shouldTrackPosition&&(this.props.shouldTrackPosition?this.startTracking():this.stopTracking());const r=this.state,a=r.style,l=r.placement;a&&t.style&&(l!==t.placement||a.top!==t.style.top||a.left!==t.style.left)&&typeof this.props.onPositionChanged=="function"&&this.props.onPositionChanged({top:a.top,left:a.left,placement:l}),(n=(o=this.props).makeStyles)===null||n===void 0||n.call(o)}componentWillUnmount(){this.position.cancel(),this.stopTracking(),this._timeouts.forEach(e=>clearTimeout(e)),this.toggleLocatorAttributes(!1)}toggleLocatorAttributes(e){this.toggleLocatorAttribute(M(this._content),Lt.contentLocatorAttribute,e),this.toggleLocatorAttribute(M(this._target),Lt.targetLocatorAttribute,e)}toggleLocatorAttribute(e,t,n){e&&e.hasAttribute&&(n&&!e.hasAttribute(t)&&e.setAttribute(t,this._id),!n&&e.hasAttribute(t)&&e.removeAttribute(t))}calculatePosition(e){return za(this._content,this._target,{placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,constrain:e.constrain,container:e.mountNode,over:e.shouldPositionOverTarget})}startTracking(){this._listener=this._listener||sa(this._target,this.position)}stopTracking(){this._listener&&(this._listener.remove(),this._listener=null)}renderContent(){let e=dt(this.props.children);if(e){var t;e=J(e,{ref:n=>{this._content=n},style:{boxSizing:"border-box",zIndex:(t=this.props.styles)===null||t===void 0?void 0:t.zIndex,...e.props.style,...this.state.style},...e.props.className&&{className:e.props.className},[Lt.contentLocatorAttribute]:this._id}),e=h(os,{open:!0,onOpen:this.handlePortalOpen,mountNode:this.props.mountNode,insertAt:this.props.insertAt},e)}return e}renderTarget(){const e=z(this.props.renderTarget);return e?J(e,{ref:t=>{this._target=t},[Lt.targetLocatorAttribute]:this._id}):(this.props.target&&(this._target=z(this.props.target)),null)}render(){var e;const t={[Lt.locatorAttribute]:this._id};return h("span",Object.assign({},t,{css:(e=this.props.styles)===null||e===void 0?void 0:e.position,ref:this.handleRef}),this.renderTarget(),this.renderContent())}},he.displayName="Position",he.componentId="Position",he.allowedProps=Fa,he.propTypes=Na,he.defaultProps={placement:"bottom center",mountNode:null,insertAt:"bottom",constrain:"window",offsetX:0,offsetY:0,shouldTrackPosition:!0,shouldPositionOverTarget:!1,children:null},he.locatorAttribute="data-position",he.targetLocatorAttribute="data-position-target",he.contentLocatorAttribute="data-position-content",he))||St)||St)||St);function Hn(i,e){return ss(i,(t,n)=>[t,n].map(o=>o==="start"||o==="end"?rs[o]:o),e)}const ds=["end center","end top","end bottom","center end","end"],cs=["start center","start top","start bottom","center start","start"],us=["bottom","bottom end","bottom start","bottom center"],Ua=["top","top start","top end","top center"],Ga=(i,e)=>ds.includes(i)?{paddingInlineStart:e==null?void 0:e.arrowSize,paddingInlineEnd:"0"}:cs.includes(i)?{paddingInlineEnd:e==null?void 0:e.arrowSize,paddingInlineStart:"0"}:us.includes(i)?{paddingTop:e==null?void 0:e.arrowSize}:Ua.includes(i)?{paddingBottom:e==null?void 0:e.arrowSize}:{position:"absolute",left:"-999em"},qa=(i,e)=>{const t=["top","bottom","top center","bottom center"],n=["top start","bottom start"],o=["top end","bottom end"],r=["start top","end top"],a=["start bottom","end bottom"];return t.includes(i)?{insetInlineStart:"50%"}:n.includes(i)?{insetInlineStart:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:o.includes(i)?{insetInlineStart:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:r.includes(i)?{top:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:a.includes(i)?{top:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:{}},Xa=(i,e,t)=>{const n=as(i," "),o=e==="inverse";return ds.includes(n)?{main:{top:"50%",insetInlineStart:"100%",insetInlineEnd:"auto",marginTop:`calc(-1 * (${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth}))`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderInlineStartColor:o?t==null?void 0:t.arrowBorderColorInverse:t==null?void 0:t.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:t==null?void 0:t.arrowSize},__after:{insetInlineEnd:t==null?void 0:t.arrowBorderWidth,insetInlineStart:"auto",marginTop:`calc(-1 * ${t==null?void 0:t.arrowSize})`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:t==null?void 0:t.arrowSize,borderInlineStartColor:o?t==null?void 0:t.arrowBackgroundColorInverse:t==null?void 0:t.arrowBackgroundColor}}:cs.includes(n)?{main:{top:"50%",insetInlineEnd:"100%",insetInlineStart:"auto",marginTop:`calc(-1 * (${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth}))`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderInlineEndColor:o?t==null?void 0:t.arrowBorderColorInverse:t==null?void 0:t.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:t==null?void 0:t.arrowSize},__after:{insetInlineStart:t==null?void 0:t.arrowBorderWidth,insetInlineEnd:"auto",marginTop:`calc(-1 * ${t==null?void 0:t.arrowSize})`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:t==null?void 0:t.arrowSize,borderInlineEndColor:o?t==null?void 0:t.arrowBackgroundColorInverse:t==null?void 0:t.arrowBackgroundColor}}:us.includes(n)?{main:{top:"100%",marginInlineStart:`calc(-1 * (${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth}))`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{bottom:t==null?void 0:t.arrowBorderWidth,marginInlineStart:`calc(-1 * ${t==null?void 0:t.arrowSize})`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderTopColor:o?t==null?void 0:t.arrowBackgroundColorInverse:t==null?void 0:t.arrowBackgroundColor}}:{main:{bottom:"100%",marginInlineStart:`calc(-1 * (${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth}))`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{top:t==null?void 0:t.arrowBorderWidth,marginInlineStart:`calc(-1 * ${t==null?void 0:t.arrowSize})`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderBottomColor:o?t==null?void 0:t.arrowBackgroundColorInverse:t==null?void 0:t.arrowBackgroundColor}}},Ka=(i,e)=>{const t=e.placement,n=e.background,o={content:'""',height:"0",width:"0",position:"absolute",display:"block",boxSizing:"border-box",pointerEvents:"none",borderStyle:"solid"},r={default:i==null?void 0:i.arrowBorderColor,inverse:i==null?void 0:i.arrowBorderColorInverse},a=Xa(t,n,i);return{contextView:{label:"contextView",boxSizing:"border-box",minHeight:`calc(${i==null?void 0:i.arrowSize} * 2)`,...Ga(t,i)},contextView__content:{label:"contextView__content",position:"relative"},contextView__arrow:{label:"contextView__arrow",...o,display:"block",borderWidth:`calc(${i==null?void 0:i.arrowSize} + ${i==null?void 0:i.arrowBorderWidth})`,borderColor:r[n],...a.main,...qa(t,i),"&::after":{borderWidth:i==null?void 0:i.arrowSize,borderColor:r[n],...a.__after,...o}},arrowSize:i.arrowSize,arrowBorderWidth:i.arrowBorderWidth}},Ya=i=>{var e,t,n,o;return{...{arrowSize:"0.5rem",arrowBorderWidth:i==null||(e=i.borders)===null||e===void 0?void 0:e.widthSmall,arrowBackgroundColor:i==null||(t=i.colors)===null||t===void 0?void 0:t.white,arrowBorderColor:i==null||(n=i.colors)===null||n===void 0?void 0:n.tiara,arrowBackgroundColorInverse:i==null||(o=i.colors)===null||o===void 0?void 0:o.licorice,arrowBorderColorInverse:"transparent"}}},Za={as:s.elementType,elementRef:s.func,margin:ee.spacing,padding:ee.spacing,height:s.oneOfType([s.string,s.number]),width:s.oneOfType([s.string,s.number]),maxHeight:s.oneOfType([s.string,s.number]),maxWidth:s.oneOfType([s.string,s.number]),minHeight:s.oneOfType([s.string,s.number]),minWidth:s.oneOfType([s.string,s.number]),children:s.node,textAlign:s.oneOf(["start","center","end"]),shadow:ee.shadow,stacking:ee.stacking,background:s.oneOf(["default","inverse"]),placement:te.placement,debug:s.bool},Qa=["as","elementRef","margin","padding","height","width","maxHeight","maxWidth","minHeight","minWidth","children","textAlign","shadow","stacking","background","placement","debug"];var $i,Ri,ze;let Ja=($i=E(Ka,Ya),$i(Ri=(ze=class ps extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.as,n=e.background,o=e.children,r=e.debug,a=e.height,l=e.width,d=e.maxHeight,c=e.maxWidth,u=e.minHeight,p=e.minWidth,f=e.margin,g=e.padding,m=e.shadow,b=e.stacking,S=e.style,C=e.textAlign,I=e.styles;return h(W,Object.assign({},j(this.props,ps.allowedProps),{css:I==null?void 0:I.contextView,style:S,borderWidth:"none",display:"inline-block",as:t,withVisualDebug:r,elementRef:this.handleRef,margin:f,stacking:b}),h(W,{css:I==null?void 0:I.contextView__content,display:"block",borderRadius:"medium",borderWidth:"small",borderColor:n==="default"?"primary":"transparent",background:n==="default"?"primary":"primary-inverse",withVisualDebug:r,height:a,width:l,maxHeight:d,maxWidth:c,minHeight:u,minWidth:p,padding:g,shadow:m,textAlign:C},h("span",{css:I==null?void 0:I.contextView__arrow}),o))}},ze.displayName="ContextView",ze.componentId="ContextView",ze.allowedProps=Qa,ze.propTypes=Za,ze.defaultProps={as:"span",elementRef:()=>{},debug:!1,width:"auto",height:"auto",children:null,textAlign:"start",background:"default",shadow:"resting",placement:"center end"},ze))||Ri);const el=(i,e,t)=>{const n=e.size,o=e.color,r=e.textAlign,a=e.shape,l=e.withBackground,d=e.withBorder,c=e.isCondensed,u=t.isDisabled,p=t.hasOnlyIconVisible,f={circle:{borderRadius:"50%"},rectangle:{}},g={small:{content:{fontSize:i.smallFontSize,paddingLeft:i.smallPaddingHorizontal,paddingRight:i.smallPaddingHorizontal,...p&&{paddingLeft:0,paddingRight:0,height:i.smallHeight,width:i.smallHeight}},children:{paddingTop:i.smallPaddingTop,paddingBottom:i.smallPaddingBottom},iconSVG:{fontSize:c?i.smallFontSize:i.iconSizeSmall}},medium:{content:{fontSize:i.mediumFontSize,paddingLeft:i.mediumPaddingHorizontal,paddingRight:i.mediumPaddingHorizontal,...p&&{paddingLeft:0,paddingRight:0,height:i.mediumHeight,width:i.mediumHeight}},children:{paddingTop:i.mediumPaddingTop,paddingBottom:i.mediumPaddingBottom},iconSVG:{fontSize:c?i.mediumFontSize:i.iconSizeMedium}},large:{content:{fontSize:i.largeFontSize,paddingLeft:i.largePaddingHorizontal,paddingRight:i.largePaddingHorizontal,...p&&{paddingLeft:0,paddingRight:0,height:i.largeHeight,width:i.largeHeight}},children:{paddingTop:i.largePaddingTop,paddingBottom:i.largePaddingBottom},iconSVG:{fontSize:c?i.largeFontSize:i.iconSizeLarge}}},m={primary:l?{default:{color:i.primaryColor,background:i.primaryBackground,borderColor:i.primaryBorderColor},active:{background:i.primaryActiveBackground,boxShadow:i.primaryActiveBoxShadow},hover:{background:i.primaryHoverBackground}}:{default:{color:i.primaryGhostColor,borderColor:i.primaryGhostBorderColor,background:i.primaryGhostBackground},active:{background:i.primaryGhostActiveBackground,boxShadow:i.primaryGhostActiveBoxShadow},hover:{background:i.primaryGhostHoverBackground}},secondary:l?{default:{color:i.secondaryColor,background:i.secondaryBackground,borderColor:i.secondaryBorderColor},active:{background:i.secondaryActiveBackground,boxShadow:i.secondaryActiveBoxShadow},hover:{background:i.secondaryHoverBackground}}:{default:{color:i.secondaryGhostColor,borderColor:i.secondaryGhostBorderColor,background:i.secondaryGhostBackground},active:{background:i.secondaryGhostActiveBackground,boxShadow:i.secondaryGhostActiveBoxShadow},hover:{background:i.secondaryGhostHoverBackground}},"primary-inverse":l?{default:{color:i.primaryInverseColor,background:i.primaryInverseBackground,borderColor:i.primaryInverseBorderColor},active:{background:i.primaryInverseActiveBackground,boxShadow:i.primaryInverseActiveBoxShadow},hover:{background:i.primaryInverseHoverBackground}}:{default:{color:i.primaryInverseGhostColor,borderColor:i.primaryInverseGhostBorderColor,background:i.primaryInverseGhostBackground},active:{background:i.primaryInverseGhostActiveBackground,boxShadow:i.primaryInverseGhostActiveBoxShadow},hover:{background:i.primaryInverseGhostHoverBackground}},success:l?{default:{color:i.successColor,background:i.successBackground,borderColor:i.successBorderColor},active:{background:i.successActiveBackground,boxShadow:i.successActiveBoxShadow},hover:{background:i.successHoverBackground}}:{default:{color:i.successGhostColor,borderColor:i.successGhostBorderColor,background:i.successGhostBackground},active:{background:i.successGhostActiveBackground,boxShadow:i.successGhostActiveBoxShadow},hover:{background:i.successGhostHoverBackground}},danger:l?{default:{color:i.dangerColor,background:i.dangerBackground,borderColor:i.dangerBorderColor},active:{background:i.dangerActiveBackground,boxShadow:i.dangerActiveBoxShadow},hover:{background:i.dangerHoverBackground}}:{default:{color:i.dangerGhostColor,borderColor:i.dangerGhostBorderColor,background:i.dangerGhostBackground},active:{background:i.dangerGhostActiveBackground,boxShadow:i.dangerGhostActiveBoxShadow},hover:{background:i.dangerGhostHoverBackground}}};return{baseButton:{label:"baseButton",appearance:"none",textDecoration:"none",touchAction:"manipulation","&::-moz-focus-inner":{border:"0"},"*":{pointerEvents:"none"},"&:focus":{textDecoration:"none"},"&:active > [class$=-baseButton__content]":m[o].active,"&:hover > [class$=-baseButton__content]":m[o].hover},content:{label:"baseButton__content",boxSizing:"border-box",width:"100%",display:"block",direction:"inherit",userSelect:"none",transition:"background 0.2s, transform 0.2s",transform:i.transform,fontFamily:i.fontFamily,fontWeight:i.fontWeight,textTransform:i.textTransform,letterSpacing:i.letterSpacing,borderStyle:i.borderStyle,borderWidth:i.borderWidth,borderRadius:i.borderRadius,lineHeight:i.lineHeight,textAlign:r,"&:hover":{transform:i.hoverTransform},...g[n].content,...m[o].default,...f[a],...c&&{paddingLeft:0,paddingRight:0},...u&&{opacity:.5},...p&&{lineHeight:1},...!d&&{borderStyle:"none"}},children:{label:"baseButton__children",display:"block",...g[n].children,...c&&{paddingTop:0,paddingBottom:0}},iconSVG:{label:"baseButton__iconSVG",display:"flex",alignItems:"center",...g[n].iconSVG},childrenLayout:{label:"baseButton__childrenLayout",display:"flex",height:"100%",width:"100%",justifyContent:p||r==="center"?"center":"flex-start",boxSizing:"border-box",alignItems:"center",flexDirection:"row",maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconOnly:{label:"baseButton__iconOnly",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconWrapper:{label:"baseButton__iconWrapper",boxSizing:"border-box",minWidth:"0.0625rem",paddingInlineEnd:c?i.iconTextGapCondensed:i.iconTextGap,flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},childrenWrapper:{label:"baseButton__childrenWrapper",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:1,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"}}};function Cn(i){"@babel/helpers - typeof";return Cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cn(i)}var tl=/^\s+/,nl=/\s+$/;function _(i,e){if(i=i||"",e=e||{},i instanceof _)return i;if(!(this instanceof _))return new _(i,e);var t=il(i);this._originalInput=i,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}_.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,o,r,a,l;return t=e.r/255,n=e.g/255,o=e.b/255,t<=.03928?r=t/12.92:r=Math.pow((t+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*r+.7152*a+.0722*l},setAlpha:function(e){return this._a=hs(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ei(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ei(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),o=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=Bi(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Bi(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),o=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return Pi(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return al(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(D(this._r,255)*100)+"%",g:Math.round(D(this._g,255)*100)+"%",b:Math.round(D(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(D(this._r,255)*100)+"%, "+Math.round(D(this._g,255)*100)+"%, "+Math.round(D(this._b,255)*100)+"%)":"rgba("+Math.round(D(this._r,255)*100)+"%, "+Math.round(D(this._g,255)*100)+"%, "+Math.round(D(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:yl[Pi(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ti(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=_(e);n="#"+Ti(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0,r=!t&&o&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return r?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return _(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(ul,arguments)},brighten:function(){return this._applyModification(pl,arguments)},darken:function(){return this._applyModification(hl,arguments)},desaturate:function(){return this._applyModification(ll,arguments)},saturate:function(){return this._applyModification(dl,arguments)},greyscale:function(){return this._applyModification(cl,arguments)},spin:function(){return this._applyModification(fl,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(vl,arguments)},complement:function(){return this._applyCombination(gl,arguments)},monochromatic:function(){return this._applyCombination(bl,arguments)},splitcomplement:function(){return this._applyCombination(ml,arguments)},triad:function(){return this._applyCombination(Mi,[3])},tetrad:function(){return this._applyCombination(Mi,[4])}};_.fromRatio=function(i,e){if(Cn(i)=="object"){var t={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?t[n]=i[n]:t[n]=Yt(i[n]));i=t}return _(i,e)};function il(i){var e={r:0,g:0,b:0},t=1,n=null,o=null,r=null,a=!1,l=!1;return typeof i=="string"&&(i=Cl(i)),Cn(i)=="object"&&(we(i.r)&&we(i.g)&&we(i.b)?(e=ol(i.r,i.g,i.b),a=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):we(i.h)&&we(i.s)&&we(i.v)?(n=Yt(i.s),o=Yt(i.v),e=sl(i.h,n,o),a=!0,l="hsv"):we(i.h)&&we(i.s)&&we(i.l)&&(n=Yt(i.s),r=Yt(i.l),e=rl(i.h,n,r),a=!0,l="hsl"),i.hasOwnProperty("a")&&(t=i.a)),t=hs(t),{ok:a,format:i.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function ol(i,e,t){return{r:D(i,255)*255,g:D(e,255)*255,b:D(t,255)*255}}function Bi(i,e,t){i=D(i,255),e=D(e,255),t=D(t,255);var n=Math.max(i,e,t),o=Math.min(i,e,t),r,a,l=(n+o)/2;if(n==o)r=a=0;else{var d=n-o;switch(a=l>.5?d/(2-n-o):d/(n+o),n){case i:r=(e-t)/d+(e1&&(p-=1),p<1/6?c+(u-c)*6*p:p<1/2?u:p<2/3?c+(u-c)*(2/3-p)*6:c}if(e===0)n=o=r=t;else{var l=t<.5?t*(1+e):t+e-t*e,d=2*t-l;n=a(d,l,i+1/3),o=a(d,l,i),r=a(d,l,i-1/3)}return{r:n*255,g:o*255,b:r*255}}function Ei(i,e,t){i=D(i,255),e=D(e,255),t=D(t,255);var n=Math.max(i,e,t),o=Math.min(i,e,t),r,a,l=n,d=n-o;if(a=n===0?0:d/n,n==o)r=0;else{switch(n){case i:r=(e-t)/d+(e>1)+720)%360;--e;)n.h=(n.h+o)%360,r.push(_(n));return r}function bl(i,e){e=e||6;for(var t=_(i).toHsv(),n=t.h,o=t.s,r=t.v,a=[],l=1/e;e--;)a.push(_({h:n,s:o,v:r})),r=(r+l)%1;return a}_.mix=function(i,e,t){t=t===0?0:t||50;var n=_(i).toRgb(),o=_(e).toRgb(),r=t/100,a={r:(o.r-n.r)*r+n.r,g:(o.g-n.g)*r+n.g,b:(o.b-n.b)*r+n.b,a:(o.a-n.a)*r+n.a};return _(a)};_.readability=function(i,e){var t=_(i),n=_(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};_.isReadable=function(i,e,t){var n=_.readability(i,e),o,r;switch(r=!1,o=Il(t),o.level+o.size){case"AAsmall":case"AAAlarge":r=n>=4.5;break;case"AAlarge":r=n>=3;break;case"AAAsmall":r=n>=7;break}return r};_.mostReadable=function(i,e,t){var n=null,o=0,r,a,l,d;t=t||{},a=t.includeFallbackColors,l=t.level,d=t.size;for(var c=0;co&&(o=r,n=_(e[c]));return _.isReadable(i,n,{level:l,size:d})||!a?n:(t.includeFallbackColors=!1,_.mostReadable(i,["#fff","#000"],t))};var Vn=_.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},yl=_.hexNames=wl(Vn);function wl(i){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function hs(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function D(i,e){_l(i)&&(i="100%");var t=Sl(i);return i=Math.min(e,Math.max(0,parseFloat(i))),t&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function On(i){return Math.min(1,Math.max(0,i))}function ie(i){return parseInt(i,16)}function _l(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function Sl(i){return typeof i=="string"&&i.indexOf("%")!=-1}function ce(i){return i.length==1?"0"+i:""+i}function Yt(i){return i<=1&&(i=i*100+"%"),i}function fs(i){return Math.round(parseFloat(i)*255).toString(16)}function Ai(i){return ie(i)/255}var le=function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",o="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function we(i){return!!le.CSS_UNIT.exec(i)}function Cl(i){i=i.replace(tl,"").replace(nl,"").toLowerCase();var e=!1;if(Vn[i])i=Vn[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=le.rgb.exec(i))?{r:t[1],g:t[2],b:t[3]}:(t=le.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=le.hsl.exec(i))?{h:t[1],s:t[2],l:t[3]}:(t=le.hsla.exec(i))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=le.hsv.exec(i))?{h:t[1],s:t[2],v:t[3]}:(t=le.hsva.exec(i))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=le.hex8.exec(i))?{r:ie(t[1]),g:ie(t[2]),b:ie(t[3]),a:Ai(t[4]),format:e?"name":"hex8"}:(t=le.hex6.exec(i))?{r:ie(t[1]),g:ie(t[2]),b:ie(t[3]),format:e?"name":"hex"}:(t=le.hex4.exec(i))?{r:ie(t[1]+""+t[1]),g:ie(t[2]+""+t[2]),b:ie(t[3]+""+t[3]),a:Ai(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=le.hex3.exec(i))?{r:ie(t[1]+""+t[1]),g:ie(t[2]+""+t[2]),b:ie(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function Il(i){var e,t;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),t=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}function en(i,e){return _(i).setAlpha(e/100).toRgbString()}function Ce(i,e){return _(i).darken(e).toRgbString()}const jn="inset 0 0 0.1875rem 0.0625rem",Ct=({style:i,textColor:e,ghostTextColor:t,backgroundColor:n,borderColor:o,ghostBorderColor:r=o})=>({[`${i}Color`]:e,[`${i}BorderColor`]:Ce(o,10),[`${i}Background`]:n,[`${i}HoverBackground`]:Ce(n,10),[`${i}ActiveBackground`]:Ce(n,10),[`${i}ActiveBoxShadow`]:`${jn} ${Ce(o,20)}`,[`${i}GhostColor`]:t,[`${i}GhostBorderColor`]:r,[`${i}GhostBackground`]:"transparent",[`${i}GhostHoverBackground`]:en(t,10),[`${i}GhostActiveBackground`]:"transparent",[`${i}GhostActiveBoxShadow`]:`${jn} ${en(r,28)}`}),xl=i=>{const e=i.borders,t=i.colors,n=i.forms,o=i.spacing,r=i.typography,a=i.key,l={canvas:{...Ct({style:"primary",backgroundColor:i["ic-brand-button--primary-bgd"],borderColor:i["ic-brand-button--primary-bgd"],textColor:i["ic-brand-button--primary-text"],ghostTextColor:i["ic-brand-button--primary-bgd"]}),primaryGhostHoverBackground:en(i["ic-brand-button--primary-bgd"],10)},"canvas-high-contrast":{secondaryBorderColor:t==null?void 0:t.borderMedium,primaryInverseBorderColor:t==null?void 0:t.borderMedium},instructure:{borderRadius:"999em",smallPaddingTop:"0.5rem",smallPaddingBottom:"0.4375rem",mediumPaddingTop:"0.75rem",mediumPaddingBottom:"0.75rem",largePaddingTop:"1rem",largePaddingBottom:"1rem",largeFontSize:"1.125rem"}};return{...{transform:"none",hoverTransform:"none",fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,textTransform:"none",letterSpacing:"normal",borderRadius:e==null?void 0:e.radiusMedium,borderStyle:e==null?void 0:e.style,borderWidth:e==null?void 0:e.widthSmall,smallHeight:n==null?void 0:n.inputHeightSmall,smallFontSize:r==null?void 0:r.fontSizeSmall,smallPaddingHorizontal:o==null?void 0:o.xSmall,smallPaddingTop:"0.375rem",smallPaddingBottom:"0.3125rem",mediumHeight:n==null?void 0:n.inputHeightMedium,mediumFontSize:r==null?void 0:r.fontSizeMedium,mediumPaddingHorizontal:o==null?void 0:o.small,mediumPaddingTop:"0.5625rem",mediumPaddingBottom:"0.5625rem",largeHeight:n==null?void 0:n.inputHeightLarge,largeFontSize:r==null?void 0:r.fontSizeLarge,largePaddingHorizontal:o==null?void 0:o.medium,largePaddingTop:"0.6875rem",largePaddingBottom:"0.6875rem",lineHeight:r==null?void 0:r.lineHeightFit,iconSizeSmall:"1rem",iconSizeMedium:"1.25rem",iconSizeLarge:"1.625rem",iconTextGap:o.xSmall,iconTextGapCondensed:o.xxSmall,...Ct({style:"primary",backgroundColor:t==null?void 0:t.backgroundBrand,borderColor:t==null?void 0:t.borderBrand,textColor:t==null?void 0:t.textLightest,ghostTextColor:t==null?void 0:t.textBrand}),...Ct({style:"secondary",backgroundColor:t==null?void 0:t.backgroundLight,borderColor:t==null?void 0:t.borderLight,ghostBorderColor:t==null?void 0:t.borderDarkest,textColor:t==null?void 0:t.textDarkest,ghostTextColor:t==null?void 0:t.textDarkest}),...Ct({style:"success",backgroundColor:t==null?void 0:t.backgroundSuccess,borderColor:t==null?void 0:t.borderSuccess,textColor:t==null?void 0:t.textLightest,ghostTextColor:t==null?void 0:t.textSuccess}),...Ct({style:"danger",backgroundColor:t==null?void 0:t.backgroundDanger,borderColor:t==null?void 0:t.borderDanger,textColor:t==null?void 0:t.textLightest,ghostTextColor:t==null?void 0:t.textDanger}),...Ct({style:"primaryInverse",backgroundColor:t==null?void 0:t.backgroundLightest,borderColor:t==null?void 0:t.borderLightest,textColor:t==null?void 0:t.textDarkest,ghostTextColor:t==null?void 0:t.textLightest}),primaryInverseBorderColor:Ce(t==null?void 0:t.borderLight,10),primaryInverseHoverBackground:Ce(t==null?void 0:t.backgroundLightest,5),primaryInverseActiveBackground:t==null?void 0:t.backgroundLightest,primaryInverseActiveBoxShadow:`${jn} ${Ce(t==null?void 0:t.borderLightest,25)}`,successGhostHoverBackground:en(t==null?void 0:t.textSuccess,1)},...l[a]}},kl={children:s.node,type:s.oneOf(["button","submit","reset"]),size:s.oneOf(["small","medium","large"]),elementRef:s.func,as:s.elementType,interaction:s.oneOf(["enabled","disabled","readonly"]),color:s.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:s.oneOf(["info","inverse"]),display:s.oneOf(["inline-block","block"]),textAlign:s.oneOf(["start","center"]),shape:s.oneOf(["rectangle","circle"]),withBackground:s.bool,withBorder:s.bool,isCondensed:s.bool,margin:ee.spacing,cursor:s.string,href:s.string,onClick:s.func,onKeyDown:s.func,renderIcon:s.oneOfType([s.node,s.func]),tabIndex:s.number},Ol=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","isCondensed","margin","onClick","onKeyDown","renderIcon","shape","size","tabIndex","textAlign","type","withBackground","withBorder"],$l=["type","size","elementRef","as","href","color","focusColor","textAlign","shape","display","withBackground","withBorder","isCondensed","margin","cursor","onClick","renderIcon","tabIndex","styles","makeStyles"];var Di,Li,rn,We;let Rl=(Di=E(el,xl),Li=T(),Di(rn=Li(rn=(We=class gs extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleElementRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleClick=t=>{const n=this.props.onClick;if(this.interaction!=="enabled"){t.preventDefault(),t.stopPropagation();return}typeof n=="function"&&n(t)},this.handleKeyDown=t=>{const n=this.props,o=n.onClick,r=n.onKeyDown,a=n.href,l=this.interaction;typeof r=="function"&&r(t);const d=ge.codes,c=d.space,u=d.enter;this.elementType!=="button"&&[c,u].includes(t.keyCode)&&(t.preventDefault(),t.stopPropagation(),typeof o=="function"&&l==="enabled"&&o(t),a&&this.ref&&this.ref.click())}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled,hasOnlyIconVisible:this.hasOnlyIconVisible}}get hasOnlyIconVisible(){const e=this.props,t=e.children;return!!(e.renderIcon&&!is(t))}get elementType(){return ye(gs,this.props)}get interaction(){return Jr({props:this.props})}get isDisabled(){return this.interaction==="disabled"}get isReadOnly(){return this.interaction==="readonly"}get isEnabled(){return this.interaction==="enabled"}get focusColor(){const e=this.props,t=e.color,n=e.focusColor,o=e.withBackground;return n||(t==="primary-inverse"&&o?"info":t.includes("inverse")?"inverse":"info")}get focused(){return Jt(this.ref)}focus(){this.ref&&this.ref.focus()}renderChildren(){const e=this.props,t=e.renderIcon,n=e.children,o=e.styles,r=h("span",{css:o==null?void 0:o.children},n);if(!t)return r;const a=this.hasOnlyIconVisible,l=h("span",{css:o==null?void 0:o.iconSVG},z(t)),d=a?h("span",{css:o==null?void 0:o.iconOnly},l,n):[h("span",{key:"icon",css:o==null?void 0:o.iconWrapper},l),h("span",{key:"children",css:o==null?void 0:o.childrenWrapper},r)];return h("span",{css:o==null?void 0:o.childrenLayout},d)}render(){const e=this.props,t=e.type;e.size,e.elementRef;const n=e.as,o=e.href;e.color,e.focusColor,e.textAlign;const r=e.shape,a=e.display;e.withBackground,e.withBorder,e.isCondensed;const l=e.margin,d=e.cursor,c=e.onClick;e.renderIcon;const u=e.tabIndex,p=e.styles;e.makeStyles;const f=H(e,$l),g=this.isDisabled,m=this.isEnabled,b=this.isReadOnly;return h(W,Object.assign({},oe(f),{as:this.elementType,focusColor:this.focusColor,position:"relative",display:a,width:a==="block"?"100%":"auto",borderRadius:r==="circle"?"circle":"medium",background:"transparent",padding:"none",borderWidth:"none",margin:l,cursor:g?"not-allowed":d,href:o,type:o?void 0:t,elementRef:this.handleElementRef,onClick:this.handleClick,onKeyDown:this.handleKeyDown,role:c&&n!=="button"?"button":void 0,tabIndex:c&&n?u||0:u,disabled:g||b,css:m?p==null?void 0:p.baseButton:null}),h("span",{css:p==null?void 0:p.content},this.renderChildren()))}},We.displayName="BaseButton",We.componentId="BaseButton",We.propTypes=kl,We.allowedProps=Ol,We.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",display:"inline-block",textAlign:"start",withBackground:!0,withBorder:!0,isCondensed:!1,margin:"0",cursor:"pointer"},We))||rn)||rn);const Bl=(i,e)=>{const t=e.inline,n=e.color,o={inherit:{color:"inherit"},primary:{color:i.primaryColor},secondary:{color:i.secondaryColor},"primary-inverse":{color:i.primaryInverseColor},"secondary-inverse":{color:i.secondaryInverseColor},success:{color:i.successColor},brand:{color:i.brandColor},warning:{color:i.warningColor},error:{color:i.errorColor},alert:{color:i.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:t?"inline-block":"block",overflow:"visible",...o[n]}}},El=i=>{const e=i.colors,t=i.key,n={canvas:{primaryColor:i["ic-brand-font-color-dark"],brandColor:i["ic-brand-primary"]}};return{...{primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,warningColor:e==null?void 0:e.textWarning,brandColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,alertColor:e==null?void 0:e.textAlert,successColor:e==null?void 0:e.textSuccess},...n[t]}},Pl={children:s.node,src:s.string,title:s.string,description:s.string,focusable:s.bool,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number]),inline:s.bool,color:s.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:s.func},Tl=["children","src","title","description","focusable","width","height","inline","color","elementRef"],Ml=["style","title","description","focusable","children","src","styles"];var Ni,Fi,zi,It,ke;let ms=(Ni=re(),Fi=E(Bl,El),zi=T(),Ni(It=Fi(It=zi(It=(ke=class Un extends y.Component{constructor(e){super(e),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.titleId=e.deterministicId("InlineSVG-title"),this.descId=e.deterministicId("InlineSVG-desc")}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const e=this.props.title;return e?h("title",{id:this.titleId},e):null}renderDesc(e){return e?h("desc",{id:this.descId},e):null}get labelledBy(){const e=[];return this.props.title&&e.push(this.titleId),this.props.description&&e.push(this.descId),e.length>0?e.join(" "):void 0}renderContent(){if(this.props.src){const e=Un.prepareSrc(this.props.src);return h("g",{role:"presentation",dangerouslySetInnerHTML:{__html:e}})}else return h("g",{role:"presentation"},this.props.children)}render(){const e=this.props,t=e.style,n=e.title,o=e.description,r=e.focusable;e.children;const a=e.src,l=e.styles,d=H(e,Ml),c=this.props.width==="auto"?void 0:this.props.width,u=this.props.height==="auto"?void 0:this.props.height;return h("svg",Object.assign({},Al(a),j(this.props,Un.allowedProps,["inline"]),{style:{...t,width:c,height:u},width:c,height:u,"aria-hidden":n?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:r?"true":"false",css:l==null?void 0:l.inlineSVG,className:d.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(o),this.renderContent())}},ke.displayName="InlineSVG",ke.componentId="InlineSVG",ke.allowedProps=Tl,ke.propTypes=Pl,ke.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},ke.prepareSrc=i=>{const t=/]*>((.|[\n\r])*)<\/svg>/.exec(i);return t?t[1]:i},ke))||It)||It)||It);function Al(i){const e={},t=/]*)\s*>/,n=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof i=="string"){const o=t.exec(i),r=o?o[1]:"",a=["xmlns","xmlns:xlink","version"];let l=n.exec(r);for(;l!=null;)a.indexOf(l[1])===-1&&(e[l[1]]=l[2]||(l[3]?l[3]:l[4]?l[4]:l[5])||l[1]),l=n.exec(r)}return e}const Dl=(i,e)=>{const t=e.rotate,n=e.size,o=e.bidirectional,r={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},a={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},l={"x-small":{fontSize:i.sizeXSmall},small:{fontSize:i.sizeSmall},medium:{fontSize:i.sizeMedium},large:{fontSize:i.sizeLarge},"x-large":{fontSize:i.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...r[t],...n&&l[n],...o&&{'[dir="rtl"] &':a[t]}}}},Ll=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),Nl={...ms.propTypes,rotate:s.oneOf(["0","90","180","270"]),size:s.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:s.bool},Fl=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],zl=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],Wl=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var Wi,Hi,sn,He;let $=(Wi=E(Dl,Ll),Hi=T(),Wi(sn=Hi(sn=(He=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.rotate,n=e.className,o=e.themeOverride;e.size,e.bidirectional,e.makeStyles;const r=e.styles,a=H(e,zl),l=o;l.sizeXSmall,l.sizeSmall,l.sizeMedium,l.sizeLarge,l.sizeXLarge;const d=H(l,Wl);return h(ms,Object.assign({},a,{themeOverride:d,rotate:t,css:r==null?void 0:r.svgIcon,className:n,elementRef:this.handleRef}))}},He.displayName="SVGIcon",He.componentId="SVGIcon",He.allowedProps=Fl,He.propTypes=Nl,He.defaultProps={rotate:"0",bidirectional:!1},He))||sn)||sn);var Vi;class Wt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),Vi||(Vi=v.createElement("path",{d:"m1394.006 0 92.299 92.168-867.636 867.767 867.636 867.636-92.299 92.429-959.935-960.065z",fillRule:"evenodd"})))}}Wt.glyphName="arrow-open-start";Wt.variant="Line";Wt.displayName="IconArrowOpenStartLine";Wt.propTypes={...$.propTypes};Wt.allowedProps=[...$.allowedProps];var ji;class Ht extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconDiscussion",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),ji||(ji=v.createElement("path",{d:"M677.647 16v338.936h112.941V129.054h1016.47V919.53h-225.994v259.765L1321.412 919.53h-79.172V467.878H0v1016.47h338.71v418.9l417.996-418.9h485.534v-451.877h32.753l419.125 419.124v-419.124H1920V16H677.647ZM338.79 919.563h564.706v-112.94H338.79v112.94Zm0 225.883h338.936v-113.054H338.79v113.054Zm-225.85-564.74h1016.47v790.701H710.4L451.652 1631.06v-259.652h-338.71V580.706Z",fillRule:"evenodd"})))}}Ht.glyphName="discussion";Ht.variant="Line";Ht.displayName="IconDiscussionLine";Ht.propTypes={...$.propTypes};Ht.allowedProps=[...$.allowedProps];var Ui;class gt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconHamburger",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ui||(Ui=v.createElement("path",{d:"M1920 1468.412v112.94H0v-112.94h1920Zm0-564.706v112.941H0V903.706h1920ZM1920 339v112.941H0V339h1920Z",fillRule:"evenodd"})))}}gt.glyphName="hamburger";gt.variant="Line";gt.displayName="IconHamburgerLine";gt.propTypes={...$.propTypes};gt.allowedProps=[...$.allowedProps];var Gi;class Vt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconHeart",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Gi||(Gi=v.createElement("path",{d:"m1692.48 910.647-732.762 687.36-731.182-685.779c-154.616-156.875-154.616-412.122 0-568.997 74.542-75.558 173.704-117.233 279.304-117.233h.113c105.487 0 204.65 41.675 279.078 117.233l.113.113c74.767 75.783 116.103 176.865 116.103 284.385h112.941c0-107.52 41.224-208.602 116.104-284.498 74.428-75.558 173.59-117.233 279.19-117.233h.113c105.487 0 204.763 41.675 279.19 117.233 154.617 156.875 154.617 412.122 1.695 567.416m78.833-646.701c-95.887-97.355-223.737-150.89-359.718-150.89h-.113c-136.094 0-263.83 53.535-359.604 150.777-37.61 38.061-68.443 80.979-92.16 127.398-23.718-46.42-54.664-89.337-92.16-127.285-95.774-97.355-223.51-150.89-359.605-150.89h-.113c-135.981 0-263.83 53.535-359.83 150.89-197.648 200.696-197.648 526.983 1.694 729.035l810.014 759.868L1771.313 991.4c197.647-200.47 197.647-526.758 0-727.454",fillRule:"evenodd"})))}}Vt.glyphName="heart";Vt.variant="Line";Vt.displayName="IconHeartLine";Vt.propTypes={...$.propTypes};Vt.allowedProps=[...$.allowedProps];var qi;class jt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconMore",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),qi||(qi=v.createElement("path",{d:"M960 1468.235c93.448 0 169.412 75.965 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.447 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.447-75.964 169.412-169.412 169.412-93.448 0-169.412-75.965-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Z",fillRule:"evenodd"})))}}jt.glyphName="more";jt.variant="Line";jt.displayName="IconMoreLine";jt.propTypes={...$.propTypes};jt.allowedProps=[...$.allowedProps];var Xi;class Ut extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconQuestion",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Xi||(Xi=v.createElement("path",{d:"M960 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059M960 0C430.645 0 0 430.645 0 960s430.645 960 960 960 960-430.645 960-960S1489.355 0 960 0m.056 1355.181 56.471.113h-56.47v-.113ZM752.64 409.65c83.69-64.715 191.661-86.4 296.696-59.294 114.862 29.703 208.264 123.106 237.968 237.967 23.378 90.466 10.729 183.303-35.464 261.459-45.515 77.026-121.186 133.948-207.586 156.084-13.779 3.502-27.783 14.796-27.783 31.85v91.708H903.529v-91.708c0-66.07 46.306-124.123 112.716-141.29 57.6-14.682 107.971-52.63 138.353-104.018 30.833-52.292 39.19-114.749 23.378-175.85-19.651-75.67-81.204-137.223-156.875-156.875-70.927-18.184-143.548-3.953-199.341 39.303-55.68 43.144-87.642 108.311-87.642 178.673H621.176c0-105.6 47.888-203.294 131.464-268.01Zm207.416 832.704c-62.343 0-112.94 50.71-112.94 112.941 0 62.23 50.597 112.941 112.94 112.941 62.231 0 112.942-50.71 112.942-112.94 0-62.231-50.71-112.942-112.942-112.942Z",fillRule:"evenodd"})))}}Ut.glyphName="question";Ut.variant="Line";Ut.displayName="IconQuestionLine";Ut.propTypes={...$.propTypes};Ut.allowedProps=[...$.allowedProps];var Ki;class ht extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ki||(Ki=v.createElement("path",{d:"M954.64 826.418 426.667 298.445 298.445 426.667 826.418 954.64l-527.973 527.973 128.222 128.222 527.973-527.973 527.973 527.973 128.222-128.222-527.973-527.973 527.973-527.973-128.222-128.222z"})))}}ht.glyphName="x";ht.variant="Line";ht.displayName="IconXLine";ht.propTypes={...$.propTypes};ht.allowedProps=[...$.allowedProps];var Yi;class mt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Yi||(Yi=v.createElement("path",{d:"m.08 568.063 176.13-176.13 783.988 783.864 783.74-783.864 176.129 176.13-959.87 960.118z",fillRule:"evenodd"})))}}mt.glyphName="arrow-open-down";mt.variant="Solid";mt.displayName="IconArrowOpenDownSolid";mt.propTypes={...$.propTypes};mt.allowedProps=[...$.allowedProps];var Zi;class vt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconArrowOpenEnd",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),Zi||(Zi=v.createElement("path",{d:"M568.13.012 392 176.142l783.864 783.989L392 1743.87 568.13 1920l960.118-959.87z",fillRule:"evenodd"})))}}vt.glyphName="arrow-open-end";vt.variant="Solid";vt.displayName="IconArrowOpenEndSolid";vt.propTypes={...$.propTypes};vt.allowedProps=[...$.allowedProps];var Qi;class Gt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),Qi||(Qi=v.createElement("path",{d:"m1352.005.012 176.13 176.13-783.864 783.989 783.864 783.74L1352.005 1920 391.887 960.13z",fillRule:"evenodd"})))}}Gt.glyphName="arrow-open-start";Gt.variant="Solid";Gt.displayName="IconArrowOpenStartSolid";Gt.propTypes={...$.propTypes};Gt.allowedProps=[...$.allowedProps];var Ji;class bt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Ji||(Ji=v.createElement("path",{d:"m.08 1351.937 176.13 176.13 783.988-783.864 783.74 783.864 176.129-176.13-959.87-960.118z",fillRule:"evenodd"})))}}bt.glyphName="arrow-open-up";bt.variant="Solid";bt.displayName="IconArrowOpenUpSolid";bt.propTypes={...$.propTypes};bt.allowedProps=[...$.allowedProps];var eo;class qt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),eo||(eo=v.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}qt.glyphName="check";qt.variant="Solid";qt.displayName="IconCheckSolid";qt.propTypes={...$.propTypes};qt.allowedProps=[...$.allowedProps];var to;class Xt extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}render(){return v.createElement($,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),to||(to=v.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.966 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.966 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}Xt.glyphName="instructure-logo";Xt.variant="Solid";Xt.displayName="IconInstructureLogoSolid";Xt.propTypes={...$.propTypes};Xt.allowedProps=[...$.allowedProps];const Hl={children:s.node,as:s.elementType,display:s.oneOf(["auto","block","inline-block"]),label:s.string,open:s.bool,onBlur:s.func,onDismiss:s.func,defaultFocusElement:s.oneOfType([s.element,s.func]),contentElement:s.oneOfType([s.element,s.func]),liveRegion:s.oneOfType([ne,s.arrayOf(ne),s.func]),shouldContainFocus:s.oneOfType([s.bool,s.oneOf(["keyboard","screenreader"])]),shouldReturnFocus:s.bool,shouldCloseOnDocumentClick:s.bool,shouldCloseOnEscape:s.bool,shouldFocusOnOpen:s.bool,elementRef:s.func},Vl=["children","as","display","label","open","onBlur","onDismiss","defaultFocusElement","contentElement","liveRegion","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusOnOpen","elementRef"],jl=["open","contentElement"],Ul=["open","contentElement"];class ue extends y.Component{constructor(...e){super(...e),this._raf=[],this._focusRegion=null,this.ref=null,this.getRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}get _root(){return this.ref}componentDidUpdate(e){const t=this.props,n=t.open;t.contentElement;const o=H(t,jl);n&&!e.open?this.open():!n&&e.open&&this.close(),this._focusRegion&&this._focusRegion.updateElement(this.contentElement,o)}componentDidMount(){this.props.open&&this.open()}componentWillUnmount(){this.props.open&&this.close(),this._raf.forEach(e=>e.cancel()),this._raf=[]}open(){const e=this.props;e.open,e.contentElement;const t=H(e,Ul);this._raf.push(Le(()=>{this._focusRegion=Q.activateRegion(this.contentElement,{...t})}))}close(){const e=this._focusRegion,t=this.contentElement;e&&Q.blurRegion(t,e.id)}focus(){if(!this.props.open||!this.contentElement){N(!1,"[Dialog] Can't focus a Dialog that isn't open.");return}this._focusRegion&&Q.focusRegion(this.contentElement,this._focusRegion.id)}blur(){if(!this.props.open||!this.contentElement){N(!1,"[Dialog] Can't blur a Dialog that isn't open.");return}this.close()}get contentElement(){let e=M(this.props.contentElement);return e||(e=M(this.ref)),e}get focused(){return this.contentElement&&this._focusRegion&&Q.isFocused(this.contentElement,this._focusRegion.id)}render(){const e=ye(ue,this.props),t=this.props.role||(this.props.label?"dialog":void 0);return this.props.open?v.createElement(e,Object.assign({},j(this.props,ue.allowedProps),{role:t,"aria-label":this.props.label,className:this.props.className,ref:this.getRef}),this.props.children):null}}ue.displayName="Dialog";ue.componentId="Dialog";ue.propTypes=Hl;ue.allowedProps=Vl;ue.defaultProps={open:!1,shouldFocusOnOpen:!0,shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0};const Gl={isShowingContent:s.bool,defaultIsShowingContent:s.bool,on:s.oneOfType([s.oneOf(["click","hover","focus"]),s.arrayOf(s.oneOf(["click","hover","focus"]))]),withArrow:s.bool,color:s.oneOf(["primary","primary-inverse"]),placement:te.placement,shadow:ee.shadow,stacking:ee.stacking,contentRef:s.func,defaultFocusElement:s.oneOfType([s.element,s.func]),screenReaderLabel:s.string,offsetX:s.oneOfType([s.string,s.number]),offsetY:s.oneOfType([s.string,s.number]),constrain:te.constrain,positionTarget:s.oneOfType([ne,s.func]),positionContainerDisplay:s.oneOf(["inline-block","block"]),mountNode:te.mountNode,insertAt:s.oneOf(["bottom","top"]),liveRegion:s.oneOfType([ne,s.arrayOf(ne),s.func]),id:s.string,shouldAlignArrow:s.bool,shouldTrackPosition:s.bool,shouldRenderOffscreen:s.bool,shouldContainFocus:s.bool,shouldReturnFocus:s.bool,shouldCloseOnDocumentClick:s.bool,shouldCloseOnEscape:s.bool,shouldFocusContentOnTriggerBlur:s.bool,onShowContent:s.func,onHideContent:s.func,onPositioned:s.func,onPositionChanged:s.func,onClick:s.func,onFocus:s.func,onBlur:s.func,onKeyDown:s.func,onKeyUp:s.func,onMouseOver:s.func,onMouseOut:s.func,renderTrigger:s.oneOfType([s.node,s.func]),children:s.oneOfType([s.node,s.func]),elementRef:s.func},ql=["isShowingContent","defaultIsShowingContent","on","withArrow","color","placement","shadow","stacking","contentRef","defaultFocusElement","screenReaderLabel","offsetX","offsetY","constrain","positionTarget","positionContainerDisplay","mountNode","insertAt","liveRegion","id","shouldAlignArrow","shouldTrackPosition","shouldRenderOffscreen","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusContentOnTriggerBlur","onShowContent","onHideContent","onPositioned","onPositionChanged","onClick","onFocus","onBlur","onKeyDown","onKeyUp","onMouseOver","onMouseOut","renderTrigger","children","elementRef"];var no,io,oo,xt,Ve;let Qn=(no=re(),io=ut(),oo=T(),no(xt=io(xt=oo(xt=(Ve=class extends y.Component{constructor(e){super(e),this._handleMouseOver=void 0,this._handleMouseOut=void 0,this._id=void 0,this._raf=[],this._trigger=null,this._view=null,this._dialog=null,this._contentElement=null,this._focusRegion=void 0,this._renderTrigger=void 0,this._renderTriggerProp=void 0,this.mouseOutTimeout=void 0,this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.show=t=>{var n,o;typeof this.props.isShowingContent>"u"&&this.setState({isShowingContent:!0}),(n=(o=this.props).onShowContent)===null||n===void 0||n.call(o,t)},this.hide=(t,n=!1)=>{const o=this.props,r=o.onHideContent,a=o.isShowingContent;typeof a>"u"?this.setState(({isShowingContent:l})=>(l&&(r==null||r(t,{documentClick:n})),{isShowingContent:!1})):a&&(r==null||r(t,{documentClick:n}))},this.toggle=t=>{this.shown?this.hide(t):this.show(t)},this.handleDialogDismiss=(t,n)=>{if(!this.props.shouldReturnFocus&&this.props.shouldFocusContentOnTriggerBlur){const o=M(this._trigger);o&&typeof o.focus=="function"&&o.focus()}this.hide(t,n)},this.handleDialogBlur=t=>{t.keyCode===ge.codes.tab&&t.shiftKey&&this.props.shouldFocusContentOnTriggerBlur||this.hide(t)},this.handleTriggerKeyDown=t=>{this.props.shouldFocusContentOnTriggerBlur&&t.keyCode===ge.codes.tab&&!t.shiftKey&&(t.preventDefault(),this._raf.push(Le(()=>{this._dialog&&this._dialog.focus()})))},this.handleTriggerKeyUp=t=>{t.keyCode===ge.codes.esc&&this.shown&&this.isTooltip&&(t.preventDefault(),this.hide(t))},this.handleTriggerBlur=t=>{const n=this.props.on;n&&n.indexOf("focus")>-1&&this._raf.push(Le(()=>{pt(this._view)||this.hide(t)}))},this.handlePositioned=t=>{var n,o;const r=t.placement;this.setState({placement:r,...this.computeOffsets(r)}),(n=(o=this.props).onPositioned)===null||n===void 0||n.call(o,t)},this.handlePositionChanged=t=>{var n,o;const r=t.placement;this.setState({placement:r,...this.computeOffsets(r)}),(n=(o=this.props).onPositionChanged)===null||n===void 0||n.call(o,t)},this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=z(this.props.renderTrigger),this.state={placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,isShowingContent:typeof e.isShowingContent>"u"?e.defaultIsShowingContent:void 0},this._id=this.props.id||e.deterministicId(),this._raf=[],this._handleMouseOver=hi.bind(null,t=>{this.show(t),clearTimeout(this.mouseOutTimeout)}),this._handleMouseOut=hi.bind(null,t=>{this.mouseOutTimeout=setTimeout(()=>{this.hide(t)},1)})}get isTooltip(){return this.props.shouldRenderOffscreen&&!this.props.shouldReturnFocus&&!this.props.shouldContainFocus&&!this.props.shouldFocusContentOnTriggerBlur}componentDidMount(){this.isTooltip&&(this._focusRegion=new ns(this._contentElement,{shouldCloseOnEscape:!1,shouldCloseOnDocumentClick:!1,onDismiss:this.hide}),this.shown&&this._focusRegion.activate())}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this._raf=[],this._focusRegion&&(this._focusRegion.deactivate(),this._focusRegion.blur())}shouldComponentUpdate(e,t){return!Sn(this.props,e)||!Sn(this.state,t)}componentDidUpdate(e,t){this._focusRegion&&this.isTooltip&&((!e.isShowingContent&&this.props.isShowingContent||!t.isShowingContent&&this.state.isShowingContent)&&(this._focusRegion.activate(),this._focusRegion.focus()),(e.isShowingContent&&!this.props.isShowingContent||t.isShowingContent&&!this.state.isShowingContent)&&this._focusRegion.deactivate()),(this.props.offsetX!==e.offsetX||this.props.offsetY!==e.offsetY||this.props.placement!==e.placement||this.props.shouldAlignArrow!==e.shouldAlignArrow||this.props.withArrow!==e.withArrow)&&this.setState({...this.computeOffsets(this.placement)})}computeOffsets(e){let t=this.props,n=t.offsetX,o=t.offsetY;if(this.props.shouldAlignArrow&&this._view){const r=ls(e)[1],a=this._view.props.styles,l=a.arrowSize,d=l===void 0?0:l,c=a.arrowBorderWidth,u=c===void 0?0:c,p=(Y(d)+Y(u))*2;r==="start"?n=p:r==="end"?n=-p:r==="top"?o=p:r==="bottom"&&(o=-p)}return{offsetX:n,offsetY:o}}get placement(){let e=this.props.placement;return this.props.dir===ut.DIRECTION.rtl&&(e=Hn(e," ")),!this.shown&&this.props.shouldRenderOffscreen?"offscreen":e}get positionProps(){return{offsetX:this.state.offsetX,offsetY:this.state.offsetY,shouldTrackPosition:this.props.shouldTrackPosition&&this.shown,insertAt:this.props.insertAt,placement:this.placement,constrain:this.props.constrain,onPositioned:this.handlePositioned,onPositionChanged:this.handlePositionChanged,target:this.props.positionTarget,containerDisplay:this.props.positionContainerDisplay,mountNode:this.props.mountNode,id:this._id}}get shown(){return typeof this.props.isShowingContent>"u"?this.state.isShowingContent:this.props.isShowingContent}get defaultFocusElement(){return this.props.defaultFocusElement}renderTrigger(){this._renderTriggerProp!=this.props.renderTrigger&&(this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=z(this.props.renderTrigger));let e=this._renderTrigger;if(e){const t=this.props,n=t.on,o=t.shouldContainFocus;let r,a,l,d,c;n&&n.indexOf("click")>-1&&(r=u=>{this.toggle(u)}),n&&n.indexOf("hover")>-1&&(N(n!=="hover",'[Popover] Specifying only the `"hover"` trigger limits the visibility of the Popover to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the Popover content as well.'),d=this._handleMouseOver,l=this._handleMouseOut),n&&n.indexOf("focus")>-1&&(a=u=>{this.show(u)}),o?(c=this.shown?"true":"false","aria-expanded"in this.props&&(c=this.props["aria-expanded"])):c=void 0,e=J(e,{ref:u=>{this._trigger=u},"aria-expanded":c,"data-popover-trigger":!0,onKeyDown:L(this.handleTriggerKeyDown,this.props.onKeyDown),onKeyUp:L(this.handleTriggerKeyUp,this.props.onKeyUp),onClick:L(r,this.props.onClick),onBlur:L(this.handleTriggerBlur,this.props.onBlur),onFocus:L(a,this.props.onFocus),onMouseOut:L(l,this.props.onMouseOut),onMouseOver:L(d,this.props.onMouseOver)})}return e}renderContent(){let e=z(this.props.children);if(this.shown&&!this.isTooltip&&(e=v.createElement(ue,{open:this.shown,label:this.props.screenReaderLabel,ref:t=>this._dialog=t,display:"block",onBlur:this.handleDialogBlur,onDismiss:this.handleDialogDismiss,liveRegion:this.props.liveRegion,defaultFocusElement:this.props.defaultFocusElement,shouldContainFocus:this.props.shouldContainFocus,shouldReturnFocus:this.props.shouldReturnFocus,shouldFocusOnOpen:!this.props.shouldFocusContentOnTriggerBlur,shouldCloseOnDocumentClick:this.props.shouldCloseOnDocumentClick,shouldCloseOnEscape:this.props.shouldCloseOnEscape},e)),this.shown||this.props.shouldRenderOffscreen){const t=this.props.color;let n={ref:r=>this._view=r,elementRef:r=>{var a,l;this._contentElement=r,(a=(l=this.props).contentRef)===null||a===void 0||a.call(l,r)},background:t,stacking:this.props.stacking,shadow:this.props.shadow,display:"block"};this.isTooltip&&(n={...n,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut});const o=this.state.placement;return this.props.withArrow?(n={...n,background:t==="primary"?"default":"inverse",placement:this.props.dir===ut.DIRECTION.rtl?Hn(o," "):o},v.createElement(Ja,n,e)):(n={...n,borderWidth:"small",borderRadius:"medium",...t==="primary-inverse"&&{borderColor:"transparent"}},v.createElement(W,n,e))}else return null}render(){const e=this.positionProps;return this.props.positionTarget?v.createElement("span",{ref:this.handleRef},this.renderTrigger(),v.createElement(Oi,e,this.renderContent())):v.createElement(Oi,Object.assign({},e,{renderTarget:this.renderTrigger(),elementRef:this.handleRef}),this.renderContent())}},Ve.displayName="Popover",Ve.componentId="Popover",Ve.allowedProps=ql,Ve.propTypes=Gl,Ve.defaultProps={defaultIsShowingContent:!1,placement:"bottom center",stacking:"topmost",shadow:"resting",offsetX:0,offsetY:0,color:"primary",on:["hover","focus"],withArrow:!0,constrain:"window",insertAt:"bottom",shouldAlignArrow:!1,shouldTrackPosition:!0,shouldRenderOffscreen:!1,shouldContainFocus:!1,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,shouldFocusContentOnTriggerBlur:!1,shouldCloseOnEscape:!0},Ve))||xt)||xt)||xt);const Xl=i=>({tooltip:{label:"tooltip",fontFamily:i.fontFamily,fontWeight:i.fontWeight,boxSizing:"border-box",display:"block",fontSize:i.fontSize,padding:i.padding}}),Kl=i=>{const e=i.typography,t=i.spacing;return{...{fontFamily:e==null?void 0:e.fontFamily,fontWeight:e==null?void 0:e.fontWeightNormal,fontSize:e==null?void 0:e.fontSizeSmall,padding:t==null?void 0:t.small}}},Yl={elementRef:s.func,children:s.oneOfType([s.node,s.func]).isRequired,renderTip:s.oneOfType([s.node,s.func]).isRequired,isShowingContent:s.bool,defaultIsShowingContent:s.bool,as:s.elementType,on:s.oneOfType([s.oneOf(["click","hover","focus"]),s.arrayOf(s.oneOf(["click","hover","focus"]))]),color:s.oneOf(["primary","primary-inverse"]),placement:te.placement,mountNode:te.mountNode,constrain:te.constrain,offsetX:s.oneOfType([s.string,s.number]),offsetY:s.oneOfType([s.string,s.number]),positionTarget:s.oneOfType([ne,s.func]),onShowContent:s.func,onHideContent:s.func},Zl=["elementRef","children","renderTip","isShowingContent","defaultIsShowingContent","as","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent"],Ql=["renderTip","isShowingContent","defaultIsShowingContent","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent","styles"];var ro,so,ao,kt,je;let Jl=(ro=re(),so=E(Xl,Kl),ao=T(),ro(kt=so(kt=ao(kt=(je=class Gn extends y.Component{constructor(e){super(e),this._id=void 0,this.ref=null,this.handleRef=t=>{this.ref=t,typeof this.props.elementRef=="function"&&this.props.elementRef(t)},this.handleFocus=()=>{this.setState({hasFocus:!0})},this.handleBlur=()=>{this.setState({hasFocus:!1})},this._id=e.deterministicId(),this.state={hasFocus:!1}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderTrigger(){const e=this.props,t=e.children,n=e.as,o=this.state.hasFocus,r={"aria-describedby":this._id};if(n){const a=ye(Gn,this.props),l=j(this.props,Gn.allowedProps);return h(a,Object.assign({},l,r),t)}else return typeof t=="function"?t({focused:o,getTriggerProps:a=>({...r,...a})}):dt(t,r)}render(){const e=this.props,t=e.renderTip,n=e.isShowingContent,o=e.defaultIsShowingContent,r=e.on,a=e.color,l=e.placement,d=e.mountNode,c=e.constrain,u=e.offsetX,p=e.offsetY,f=e.positionTarget,g=e.onShowContent,m=e.onHideContent,b=e.styles,S=H(e,Ql);return h(Qn,Object.assign({},oe(S),{isShowingContent:n,defaultIsShowingContent:o,on:r,shouldRenderOffscreen:!0,shouldReturnFocus:!1,placement:l,color:a==="primary"?"primary-inverse":"primary",mountNode:d,constrain:c,shadow:"none",offsetX:u,offsetY:p,positionTarget:f,renderTrigger:()=>this.renderTrigger(),onShowContent:g,onHideContent:m,onFocus:this.handleFocus,onBlur:this.handleBlur,elementRef:this.handleRef,shouldCloseOnDocumentClick:!1}),h("span",{id:this._id,css:b==null?void 0:b.tooltip,role:"tooltip"},z(t)))}},je.displayName="Tooltip",je.componentId="Tooltip",je.allowedProps=Zl,je.propTypes=Yl,je.defaultProps={defaultIsShowingContent:!1,color:"primary",placement:"top",constrain:"window",offsetX:0,offsetY:0},je))||kt)||kt)||kt);const ed=i=>({transitioning:`transition--${i}-transitioning`,exited:`transition--${i}-exited`,exiting:`transition--${i}-exiting`,entered:`transition--${i}-entered`,entering:`transition--${i}-entering`}),td=(i,e)=>{const t=e.type,n=`opacity ${i.duration} ${i.timing}, transform ${i.duration} ${i.timing}`,o={".transition--fade-transitioning":{transition:n},".transition--fade-exiting,\n .transition--fade-exited":{opacity:.01},".transition--fade-entering,\n .transition--fade-entered":{opacity:1}},r={".transition--scale-transitioning":{transition:n},".transition--scale-exiting,\n .transition--scale-exited":{transform:"scale(0.01) translate3d(0, 0, 0)",opacity:.01},".transition--scale-entering,\n .transition--scale-entered":{transform:"scale(1) translate3d(0, 0, 0)",opacity:1}},a={".transition--slide-right-transitioning,\n .transition--slide-left-transitioning,\n .transition--slide-up-transitioning,\n .transition--slide-down-transitioning":{transition:n},".transition--slide-right-exited,\n .transition--slide-left-exited,\n .transition--slide-up-exited,\n .transition--slide-down-exited":{opacity:.01},".transition--slide-right-exiting,\n .transition--slide-right-exited":{transform:"translate3d(100%, 0, 0)"},".transition--slide-left-exiting,\n .transition--slide-left-exited":{transform:"translate3d(-100%, 0, 0)"},".transition--slide-up-exiting,\n .transition--slide-up-exited":{transform:"translate3d(0, -100%, 0)"},".transition--slide-down-exiting,\n .transition--slide-down-exited":{transform:"translate3d(0, 100%, 0)"},".transition--slide-left-entering,\n .transition--slide-right-entering,\n .transition--slide-up-entering,\n .transition--slide-down-entering,\n .transition--slide-left-entered,\n .transition--slide-right-entered,\n .transition--slide-up-entered,\n .transition--slide-down-entered":{transform:"translate3d(0, 0, 0)",opacity:1}};return{duration:i.duration,classNames:ed(t),globalStyles:{...o,...r,...a}}},nd=i=>{const e=i.transitions;return{...{duration:e==null?void 0:e.duration,timing:e==null?void 0:e.timing}}},vs={in:s.bool,unmountOnExit:s.bool,transitionOnMount:s.bool,transitionEnter:s.bool,transitionExit:s.bool,onTransition:s.func,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func,children:s.node,elementRef:s.func},id={...vs,enterDelay:s.number,exitDelay:s.number,transitionClassName:s.string.isRequired,exitedClassName:s.string.isRequired,exitingClassName:s.string.isRequired,enteredClassName:s.string.isRequired,enteringClassName:s.string.isRequired,className:s.string},od=["in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","enterDelay","exitDelay","transitionClassName","exitedClassName","exitingClassName","enteredClassName","enteringClassName","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","className","elementRef"],F={EXITED:-2,EXITING:-1,ENTERING:1,ENTERED:2};class ft extends v.Component{constructor(...e){super(...e),this._timeouts=[],this._unmounted=!1,this.state={transitioning:!1},this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.startTransition=(t,n)=>{const o=this.props,r=o.transitionEnter,a=o.transitionExit;t?this.enter(r&&n?F.EXITED:null):this.exit(a&&n?F.ENTERED:null)},this.transition=(t,n,o,r=0)=>{if(this._unmounted)return;const a=this.props.onTransition,l=ci(this.ref),d=this.getTransitionClassName(t),c=this.getTransitionClassName(n),u=this.props.transitionClassName;n&&r&&this.transitionEnabled(t)?u&&l.add(u):u&&l.remove(u),c&&l.remove(c),d&&l.add(d),t&&n&&typeof a=="function"&&a(t,n),this._timeouts.push(setTimeout(()=>{this._unmounted||typeof o=="function"&&o()},r))},this.enter=t=>{if(this.state.transitioning||this._unmounted)return;const n=this.props;typeof n.onEnter=="function"&&n.onEnter(),n.transitionEnter?this.setState({transitioning:!0},()=>{const o=()=>{typeof n.onEntering=="function"&&n.onEntering(),this.transition(F.ENTERED,F.ENTERING,()=>{this.setState({transitioning:!1},()=>{typeof n.onEntered=="function"&&n.onEntered()})})};t?this.transition(t,null,()=>{this.transition(F.ENTERING,t,o,n.enterDelay)}):o()}):this.setState({transitioning:!1},()=>{this.transition(F.ENTERED,F.EXITED),typeof n.onEntered=="function"&&n.onEntered()})},this.exit=t=>{if(this.state.transitioning)return;const n=this.props;typeof n.onExit=="function"&&n.onExit(),n.transitionExit?this.setState({transitioning:!0},()=>{const o=()=>{typeof n.onExiting=="function"&&n.onExiting(),this.transition(F.EXITED,F.EXITING,()=>{this.setState({transitioning:!1},()=>{typeof n.onExited=="function"&&n.onExited()})})};t?this.transition(t,null,()=>{this.transition(F.EXITING,t,o,n.exitDelay)}):o()}):this.setState({transitioning:!1},()=>{this.transition(F.EXITED,F.ENTERED),typeof n.onExited=="function"&&n.onExited()})}}componentDidMount(){this.startTransition(this.props.in,this.props.transitionOnMount),this._unmounted=!1}getSnapshotBeforeUpdate(e,t){return this.props.in!==e.in&&t.transitioning?!0:null}componentDidUpdate(e,t,n){n&&this.clearTransition(e.transitionClassName),this.props.transitionClassName!==e.transitionClassName&&this.clearTransition(e.transitionClassName),e.in!==this.props.in&&(t.transitioning?(this.clearTransition(e.transitionClassName),clearTimeout(this._timeouts.pop()),this.setState({transitioning:!1},()=>this.startTransition(this.props.in,!0))):this.startTransition(this.props.in,!0))}componentWillUnmount(){this._timeouts.forEach(e=>{clearTimeout(e)}),this._unmounted=!0}clearTransition(e){this._unmounted||this.setState({transitioning:!1},()=>{if(this._unmounted)return;const t=ci(this.ref);Object.values(F).forEach(n=>{const o=this.getTransitionClassName(n);o&&t.remove(o)}),t.remove(e)})}transitionEnabled(e){const t=this.props;switch(e){case F.EXITED:case F.EXITING:return t.transitionExit;case F.ENTERED:case F.ENTERING:return t.transitionEnter;default:return!1}}getTransitionClassName(e){const t=this.props;switch(e){case F.EXITED:return t.exitedClassName;case F.ENTERING:return t.enteringClassName;case F.ENTERED:return t.enteredClassName;case F.EXITING:return t.exitingClassName;default:return}}renderChildren(){return this.props.children?J(dt(this.props.children),{"aria-hidden":this.props.in?void 0:!0,ref:e=>{const t=M(e)||null;this.handleRef(t)}}):null}render(){return!this.props.in&&this.props.unmountOnExit&&!this.state.transitioning?null:this.renderChildren()}}ft.displayName="BaseTransition";ft.propTypes=id;ft.allowedProps=od;ft.defaultProps={in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0,enterDelay:300,exitDelay:300};ft.states=F;const rd=["fade","scale","slide-down","slide-up","slide-left","slide-right"],sd=s.oneOf(rd),ad={type:sd,...vs},ld=["type","children","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","elementRef"],dd=["type","children","styles"];var lo,co,an,Oe;let cd=(lo=E(td,nd),co=T(),lo(an=co(an=(Oe=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleExited=()=>{typeof this.props.onExited=="function"&&this.props.onExited(this.props.type)},this.handleEntered=()=>{typeof this.props.onEntered=="function"&&this.props.onEntered(this.props.type)},this.renderTransitionHelper=()=>{const t=this.props.styles;return h(Xr,{styles:t==null?void 0:t.globalStyles})}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props;e.type;const t=e.children,n=e.styles,o=H(e,dd),r=oa(n.duration);return h(v.Fragment,null,this.renderTransitionHelper(),h(ft,Object.assign({},o,{enterDelay:r,exitDelay:r,transitionClassName:n.classNames.transitioning,exitedClassName:n.classNames.exited,exitingClassName:n.classNames.exiting,enteredClassName:n.classNames.entered,enteringClassName:n.classNames.entering,onEntered:this.handleEntered,onExited:this.handleExited,elementRef:this.handleRef}),t))}},Oe.displayName="Transition",Oe.componentId="Transition",Oe.allowedProps=ld,Oe.propTypes=ad,Oe.defaultProps={type:"fade",in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},Oe.states=ft.states,Oe))||an)||an);const ud=(i,e,t)=>{const n=e.size,o=e.color,r=e.hasInverseColor,a=e.shape,l=e.src,d=e.showBorder,c=t.loaded,u={auto:{fontSize:"inherit",borderWidth:i.borderWidthSmall},"xx-small":{fontSize:"0.5rem",borderWidth:i.borderWidthSmall},"x-small":{fontSize:"0.75rem",borderWidth:i.borderWidthSmall},small:{fontSize:"1rem",borderWidth:i.borderWidthSmall},medium:{fontSize:"1.25rem",borderWidth:i.borderWidthMedium},large:{fontSize:"1.5rem",borderWidth:i.borderWidthMedium},"x-large":{fontSize:"1.75rem",borderWidth:i.borderWidthMedium},"xx-large":{fontSize:"2rem",borderWidth:i.borderWidthMedium}},p={circle:{width:"2.5em",position:"relative",borderRadius:"100%",overflow:"hidden"},rectangle:{width:"3em"}},f={default:i.color,shamrock:i.colorShamrock,barney:i.colorBarney,crimson:i.colorCrimson,fire:i.colorFire,licorice:i.colorLicorice,ash:i.colorAsh},g=r?f[o]:i.background,m=r?i.background:f[o];return{avatar:{label:"avatar",height:"2.5em",boxSizing:"border-box",backgroundColor:g,backgroundPosition:"center",backgroundSize:"cover",backgroundClip:"content-box",backgroundRepeat:"no-repeat",overflow:"hidden",lineHeight:0,textAlign:"center",borderStyle:"solid",borderColor:i.borderColor,...u[n],...p[a],...c?{backgroundImage:`url('${l}')`,...d!=="always"&&{border:0},boxShadow:`inset 0 0 ${i.boxShadowBlur} 0 ${i.boxShadowColor}`}:{backgroundImage:void 0,...r&&{border:0,padding:u[n].borderWidth,backgroundClip:"border-box"}},...d==="never"&&{border:0}},initials:{label:"avatar__initials",color:m,lineHeight:"2.375em",fontFamily:i.fontFamily,fontWeight:i.fontWeight,letterSpacing:"0.0313em"},loadImage:{label:"avatar__loadImage",display:"none"},iconSVG:{label:"avatar__iconSVG",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",svg:{fill:m,height:"1em",width:"1em"}}}},pd=i=>{const e=i.colors,t=i.borders,n=i.typography,o=e.brand,r=e.shamrock,a=e.barney,l=e.crimson,d=e.fire,c=e.licorice,u=e.ash;return{...{background:e==null?void 0:e.backgroundLightest,borderWidthSmall:t==null?void 0:t.widthSmall,borderWidthMedium:t==null?void 0:t.widthMedium,borderColor:e==null?void 0:e.borderMedium,boxShadowColor:en(e==null?void 0:e.backgroundDarkest,12),boxShadowBlur:"1rem",fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightBold,color:o,colorShamrock:r,colorBarney:a,colorCrimson:l,colorFire:d,colorLicorice:c,colorAsh:u}}},hd={name:s.string.isRequired,src:s.string,alt:s.string,size:s.oneOf(["auto","xx-small","x-small","small","medium","large","x-large","xx-large"]),color:s.oneOf(["default","shamrock","barney","crimson","fire","licorice","ash"]),hasInverseColor:s.bool,showBorder:s.oneOf(["auto","always","never"]),shape:s.oneOf(["circle","rectangle"]),margin:ee.spacing,display:s.oneOf(["inline-block","block"]),onImageLoaded:s.func,as:s.elementType,elementRef:s.func,renderIcon:s.oneOfType([s.node,s.func])},fd=["name","src","alt","size","color","hasInverseColor","shape","margin","display","onImageLoaded","as","elementRef","renderIcon","showBorder"],gd=["onImageLoaded","styles"];var uo,po,ln,Ue;let bs=(uo=E(ud,pd),po=T(),uo(ln=po(ln=(Ue=class extends y.Component{constructor(...e){super(...e),this.state={loaded:!1},this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleImageLoaded=t=>{this.setState({loaded:!0}),this.props.onImageLoaded(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.state)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.state),this.state.loaded&&!this.props.src&&this.setState({loaded:!1})}makeInitialsFromName(){let e=this.props.name;if(!(!e||typeof e!="string")&&(e=e.trim(),e.length!==0))if(e.match(/\s+/)){const t=e.split(/\s+/);return(t[0][0]+t[t.length-1][0]).toUpperCase()}else return e[0].toUpperCase()}renderInitials(){var e;return h("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.initials,"aria-hidden":"true"},this.makeInitialsFromName())}renderContent(){const e=this.props,t=e.renderIcon,n=e.styles;return t?h("span",{css:n==null?void 0:n.iconSVG},z(t)):this.renderInitials()}render(){var e;const t=this.props;t.onImageLoaded;const n=t.styles,o=H(t,gd);return h(W,Object.assign({},oe(o),{"aria-label":this.props.alt?this.props.alt:void 0,role:this.props.alt?"img":void 0,as:this.props.as,elementRef:this.handleRef,margin:this.props.margin,css:n==null?void 0:n.avatar,display:this.props.display}),h("img",{src:this.props.src,css:(e=this.props.styles)===null||e===void 0?void 0:e.loadImage,alt:this.props.alt,onLoad:this.handleImageLoaded,"aria-hidden":"true"}),!this.state.loaded&&this.renderContent())}},Ue.displayName="Avatar",Ue.componentId="Avatar",Ue.propTypes=hd,Ue.allowedProps=fd,Ue.defaultProps={size:"medium",color:"default",hasInverseColor:!1,showBorder:"auto",shape:"circle",display:"inline-block",onImageLoaded:i=>{}},Ue))||ln)||ln);const md=(i,e)=>{const t=e.level,n=e.color,o=e.border,r={h1:{fontFamily:i.h1FontFamily,fontSize:i.h1FontSize,fontWeight:i.h1FontWeight},h2:{fontFamily:i.h2FontFamily,fontSize:i.h2FontSize,fontWeight:i.h2FontWeight},h3:{fontFamily:i.h3FontFamily,fontSize:i.h3FontSize,fontWeight:i.h3FontWeight},h4:{fontFamily:i.h4FontFamily,fontSize:i.h4FontSize,fontWeight:i.h4FontWeight},h5:{fontFamily:i.h5FontFamily,fontSize:i.h5FontSize,fontWeight:i.h5FontWeight},reset:{margin:0,fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"}},a={inherit:{color:"inherit"},primary:{color:i.primaryColor},secondary:{color:i.secondaryColor},"primary-inverse":{color:i.primaryInverseColor},"secondary-inverse":{color:i.secondaryInverseColor}},l={top:{paddingTop:i.borderPadding,borderTop:`${i.borderWidth} ${i.borderStyle} ${i.borderColor}`},bottom:{paddingBottom:i.borderPadding,borderBottom:`${i.borderWidth} ${i.borderStyle} ${i.borderColor}`},none:{}},d={outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:"-0.375rem 0 0 0",color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block","&:focus":{outline:"none"}};return{heading:{label:"heading",lineHeight:i.lineHeight,margin:0,"&:is(input)[type]":d,"&:-webkit-any(input)[type]":d,...r[t],...a[n],...l[o]}}},vd=i=>{const e=i.typography,t=i.colors,n=i.spacing,o=i.borders,r=i.key,a={canvas:{primaryColor:i["ic-brand-font-color-dark"]},instructure:{h1FontFamily:e==null?void 0:e.fontFamilyHeading,h2FontFamily:e==null?void 0:e.fontFamilyHeading,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontSize:"2.125rem",h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontSize:e==null?void 0:e.fontSizeLarge,h5FontWeight:e==null?void 0:e.fontWeightBold,h5FontSize:e==null?void 0:e.fontSizeMedium}};return{...{lineHeight:e==null?void 0:e.lineHeightCondensed,h1FontSize:e==null?void 0:e.fontSizeXXLarge,h1FontWeight:e==null?void 0:e.fontWeightBold,h1FontFamily:e==null?void 0:e.fontFamily,h2FontSize:e==null?void 0:e.fontSizeXLarge,h2FontWeight:e==null?void 0:e.fontWeightNormal,h2FontFamily:e==null?void 0:e.fontFamily,h3FontSize:e==null?void 0:e.fontSizeLarge,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontFamily:e==null?void 0:e.fontFamily,h4FontSize:e==null?void 0:e.fontSizeMedium,h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontFamily:e==null?void 0:e.fontFamily,h5FontSize:e==null?void 0:e.fontSizeSmall,h5FontWeight:e==null?void 0:e.fontWeightNormal,h5FontFamily:e==null?void 0:e.fontFamily,primaryInverseColor:t==null?void 0:t.textLightest,primaryColor:t==null?void 0:t.textDarkest,secondaryColor:t==null?void 0:t.textDark,secondaryInverseColor:t==null?void 0:t.textLight,borderPadding:n==null?void 0:n.xxxSmall,borderColor:t==null?void 0:t.borderMedium,borderWidth:o==null?void 0:o.widthSmall,borderStyle:o==null?void 0:o.style},...a[r]}},bd={border:s.oneOf(["none","top","bottom"]),children:va,color:s.oneOf(["primary","secondary","primary-inverse","secondary-inverse","inherit"]),level:s.oneOf(["h1","h2","h3","h4","h5","reset"]),as:s.elementType,margin:ee.spacing,elementRef:s.func},yd=["border","children","color","level","as","margin","elementRef"],wd=["border","children","color","level","margin","elementRef","makeStyles"];var ho,fo,dn,Ge;let _d=(ho=E(md,vd),fo=T(),ho(dn=fo(dn=(Ge=class ys extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){var e;const t=this.props;t.border;const n=t.children;t.color;const o=t.level,r=t.margin;t.elementRef,t.makeStyles;const a=H(t,wd),l=ye(ys,this.props,()=>o==="reset"?"span":o);return h(W,Object.assign({},oe(a),{css:(e=this.props.styles)===null||e===void 0?void 0:e.heading,as:l,elementRef:this.handleRef,margin:r}),n)}},Ge.displayName="Heading",Ge.componentId="Heading",Ge.propTypes=bd,Ge.allowedProps=yd,Ge.defaultProps={children:null,border:"none",color:"inherit",level:"h2"},Ge))||dn)||dn);const Sd=i=>({truncateText:{label:"truncateText",display:"block",overflow:"hidden",wordWrap:"break-word",whiteSpace:"normal",fontFamily:i.fontFamily},auto:{label:"truncateText__auto",height:"100%"},spacer:{label:"truncateText__spacer",visibility:"hidden",maxHeight:"0",display:"block"},lineHeight:i.lineHeight}),Cd=i=>{const e=i.typography;return{...{fontFamily:e==null?void 0:e.fontFamily,lineHeight:e==null?void 0:e.lineHeight}}};/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var Id=/["'&<>]/,xd=kd;function kd(i){var e=""+i,t=Id.exec(e);if(!t)return e;var n,o="",r=0,a=0;for(r=t.index;rd.toUpperCase())),t.letterSpacing!=="normal"&&(a=r.length*parseInt(t.letterSpacing)),l=o.measureText(r).width+a,l}function wn(i,e,t=!0,n=!0,o=!1){let r=i;const a=r.charAt(0),l=r.slice(-1);return t&&e.indexOf(a)!==-1&&(r=r.slice(1)),n&&e.indexOf(l)!==-1&&(r=r.slice(0,-1)),o&&(r=wn(r,e,t,n,!1)),r}function ws(i,e,t=!1){const n=e.truncate,o=e.ignore,r=e.ellipsis;let a=Qt(i),l=-1,d=-1;const c=()=>{for(let u=0;u=0&&(f=a[g],!(f.length>0));)g--;if(f){const m=String(f.slice(-1));o.indexOf(m)!==-1&&(a[g].length-=1)}}}if(c(),u=a[l],u){const p=u[d+1];if(p&&o.indexOf(p)!==-1&&a[l].splice(d+1,1),!p){let f=null,g=l+1;for(;g0));)g++;if(f){const m=String(f[0]);o.indexOf(m)!==-1&&a[g].shift()}}}}else{c();const u=a[l];if(u){const p=u[d-1];if(p&&o.indexOf(p.slice(-1))!==-1&&(p.length===1?a[l].splice(d-1,1):a[l][d-1]=p.slice(0,-1)),!p){let f=null,g=l-1;for(;g>=0&&(f=a[g],!(f.length>0));)g--;if(f){const m=String(f.slice(-1)).slice(-1);if(o.indexOf(m)!==-1){const b=f.length-1;a[g][b]=f[b].slice(0,-1)}}}}}return t&&(a=ws(a,e,!1)),a}function Bd(i,e){const t=new Ed(i,e);if(t)return t.truncate()}class Ed{constructor(e,t={}){this._options=void 0,this._stage=void 0,this._parent=void 0,this._nodeMap=void 0,this._defaultStringData=void 0,this._nodeDataIndexes=void 0,this._maxHeight=void 0,this._maxWidth=void 0,this._maxLines=void 0;const n=e!=null&&e.parentElement?e==null?void 0:e.parentElement:void 0;if(this._options={parent:t.parent||n,maxLines:t.maxLines||1,position:t.position||"end",truncate:t.truncate||"character",ellipsis:t.ellipsis||"…",ignore:t.ignore||[" ",".",","],lineHeight:t.lineHeight||1.2,shouldTruncateWhenInvisible:!!t.shouldTruncateWhenInvisible},!e){N(!1,"[Truncator] No element to truncate.");return}if(this._stage=e,t.parent)this._parent=this._options.parent;else{const o=this._stage.parentElement?this._stage.parentElement:void 0;this._parent=this._options.maxLines==="auto"?o:this._stage}this.setup()}setup(){if(!this._stage)return;const e=this._options,t=e.maxLines,n=e.truncate,o=e.lineHeight,r=ve(this._parent),a=r.lineHeight==="normal"?o*parseFloat(r.fontSize):parseFloat(r.lineHeight),l=this._stage.firstChild.children?this._stage.firstChild:this._stage,d=[],c=[];this._nodeMap=this.getNodeMap(l);for(let u=0;uu.node),this._parent),this._maxLines=t==="auto"?Math.round(this._maxHeight/a):t}getNodeMap(e){const t=this._options,n=t.shouldTruncateWhenInvisible,o=t.truncate,r=Array.from(e.childNodes),a=[];return r.forEach(l=>{if(l.nodeType===1||l.nodeType===3){const d=n?!0:Fn(l,!1),c=l.textContent+" ";a.push({node:l,data:o==="word"?d?c.match(/.*?[\.\s\/]+?/g):[""]:d?l.textContent.split(""):[]})}}),a}getNodeIndexes(e){const t=[];for(let n=0;n${a}`}else o.node.nodeType===3&&(t+=a)}return t}checkFit(e){const t=this.domString(e),n=this._options.maxLines==="auto"?this._stage:this._parent;let o=!0;return this._stage.innerHTML=t,V(n).height-this._maxHeight>.5&&(o=!1),o}truncate(){const e=this._options,t=e.ellipsis,n=e.ignore,r=e.position==="middle";let a=!1,l="",d=null;if(!this._stage)return;const c=(m,b,S,C,I=null)=>{let x=m,k=b,B=I;for(;x<=k;){const P=Math.floor((x+k)/2);S(P,C)?(k=P-1,B=P):x=P+1}return B},u=(m,b,S,C)=>{let I=!1;const x=Qt(b);switch(m){case 0:break;case S.length:I=!0;for(let k=0;kS[w]),P=Array(2);P[0]=k[0]+1,P[1]=S.length-m-P[0];for(let w=0;w<=B[0];w++)switch(!0){case w=B[1];w--)switch(!0){case w>B[1]:P[1]-=b[w].length;break;case w===B[1]:B[1]>B[0]&&(x[w]=b[w].slice(-P[1])),B[1]===B[0]&&(x[w]=x[w].concat(b[w].slice(-P[1])));break}for(let w=B[0]+1;wB:x[w]=[];break}}break}return{truncated:I,truncatedArray:x}},p=(m,b)=>{const S=u(m,this._defaultStringData,this._nodeDataIndexes,b),C=S.truncatedArray;return this.checkFit(C)},f=c(0,this._nodeDataIndexes.length,p,r,this._nodeDataIndexes.length);var g=u(f,this._defaultStringData,this._nodeDataIndexes,r);a=g.truncated,d=g.truncatedArray,d=ws(d,this._options,!0);for(let m=0;m{this.ref&&this.setState(this.initialState)},this.state=this.initialState}get _ref(){return this.ref}get initialState(){return{isTruncated:!1,needsSecondRender:!0,truncatedElement:void 0,truncatedText:void 0}}componentDidMount(){const e=this.props,t=e.children,n=e.makeStyles;if(n==null||n(),t){var o;this.checkChildren();const r=dt(t);this._text=r||void 0,this.truncate(),this._debounced=kn(this.update,this.props.debounce,{leading:!0,trailing:!0}),this._prevWidth=(o=V(this.ref))===null||o===void 0?void 0:o.width,this._resizeListener=new ResizeObserver(a=>{requestAnimationFrame(()=>{for(const l of a){const d=l.contentRect.width;this._prevWidth!==d&&(this._prevWidth=d,this.props.debounce===0?this.update():this._debounced())}})}),this._resizeListener.observe(this.ref)}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debounced&&this._debounced.cancel()}componentDidUpdate(e){const t=this.props,n=t.children,o=t.onUpdate,r=t.makeStyles;r==null||r();const a=this.state,l=a.isTruncated,d=a.needsSecondRender,c=a.truncatedText;if(n){if(e!==this.props){if(e.children!==this.props.children){this.checkChildren();const u=dt(n);this._text=u||void 0}this.setState(this.initialState);return}!d&&(l||this._wasTruncated)?(o==null||o(l,c),this._wasTruncated=l):this.truncate()}}checkChildren(){N(!(()=>{let e=!1;const t=dt(this.props.children);return v.Children.forEach(t.props.children,n=>{n.props&&v.Children.forEach(n.props.children,o=>{o.props&&(e=!0)})}),e})(),"[TruncateText] Some children are too deep in the node tree and will not render.")}truncate(){if(this.state.needsSecondRender)if(Z){var e;const o=Bd(this._stage,{...this.props,parent:this.ref?this.ref:void 0,lineHeight:(e=this.props.styles)===null||e===void 0?void 0:e.lineHeight});if(o){const r=this.renderChildren(o.isTruncated,o.data,o.constraints.width);this.setState({needsSecondRender:!1,isTruncated:o.isTruncated,truncatedElement:r,truncatedText:o.text})}}else{var t,n;const o=(t=this.ref)!==null&&t!==void 0&&t.textContent?(n=this.ref)===null||n===void 0?void 0:n.textContent:void 0;this.setState({needsSecondRender:!1,isTruncated:!1,truncatedElement:this._text,truncatedText:o})}}renderChildren(e,t,n){var o;if(!e)return this._text;const r=[];for(let l=0;ll);return this._text.props?J(this._text,this._text.props,a):a}render(){var e;const t=this.state.truncatedElement,n=this.props.children;return h("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.truncateText,ref:o=>{this.ref=o}},n&&(t?null:h("span",{ref:o=>{this._stage=o}},dt(n))),t)}},qe.displayName="TruncateText",qe.componentId="TruncateText",qe.allowedProps=Td,qe.propTypes=Pd,qe.defaultProps={maxLines:1,ellipsis:"…",truncate:"character",position:"end",ignore:[" ",".",","],debounce:0},qe))||Ot)||Ot)||Ot);const Ad=(i,e,t)=>{const n=e.isWithinText,o=e.renderIcon,r=e.iconPlacement,a=e.color,l=t.containsTruncateText,d=t.hasVisibleChildren,c=a==="link-inverse",u={boxSizing:"border-box",fontFamily:i.fontFamily,fontWeight:i.fontWeight,transition:"outline-color 0.2s",verticalAlign:"baseline",outlineColor:"transparent",outlineWidth:i.focusOutlineWidth,outlineStyle:i.focusOutlineStyle,borderRadius:i.focusOutlineBorderRadius,outlineOffset:"0.25rem",...o&&l&&d&&{alignItems:"center"},"&:focus":{outlineColor:i.focusOutlineColor},"&[aria-disabled]":{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"},"&::-moz-focus-inner":{border:0}},p={...u,cursor:"pointer",color:i.color,textDecoration:n?i.textDecorationWithinText:i.textDecorationOutsideText,"&:focus":{color:i.color,outlineColor:i.focusOutlineColor},"&:hover, &:active":{color:i.hoverColor,textDecoration:n?i.hoverTextDecorationWithinText:i.hoverTextDecorationOutsideText}},f={appearance:"none",userSelect:"text",background:"none",border:"none",cursor:"pointer",fontSize:"1em",margin:0,padding:0,textAlign:"inherit"},g={color:i.colorInverse,"&:focus":{outlineColor:i.focusInverseIconOutlineColor},"&:hover, &:focus, &:active":{color:i.colorInverse}};return{link:{label:"link",...u,"&:is(a), &:is(button)":p,"&:-webkit-any(a), &:-webkit-any(button)":p,"&:is(button)":f,"&:-webkit-any(button)":f,...c&&{...g,"&:is(a):link, &:is(a):visited, &:is(button)":g,"&:-webkit-any(a):link, &:-webkit-any(a):visited, &:-webkit-any(button)":g}},icon:{label:"icon",...o&&{fontSize:i.iconSize,boxSizing:"border-box",paddingInlineStart:r==="start"?0:i.iconPlusTextMargin,paddingInlineEnd:r==="start"?i.iconPlusTextMargin:0}}}},Dd=i=>{const e=i.colors,t=i.borders,n=i.typography,o=i.spacing,r=i.key,a={canvas:{color:i["ic-link-color"],focusOutlineColor:i["ic-brand-primary"],hoverColor:Ce(i["ic-link-color"],10)},"canvas-high-contrast":{textDecorationOutsideText:"underline",hoverTextDecorationOutsideText:"none"}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textLink,textDecorationWithinText:"underline",hoverTextDecorationWithinText:"none",textDecorationOutsideText:"none",hoverTextDecorationOutsideText:"underline",focusOutlineWidth:t==null?void 0:t.widthMedium,focusOutlineColor:e==null?void 0:e.borderBrand,focusOutlineStyle:t==null?void 0:t.style,focusOutlineBorderRadius:t==null?void 0:t.radiusSmall,hoverColor:Ce(e==null?void 0:e.textLink,10),colorInverse:e==null?void 0:e.textLight,focusInverseOutlineColor:e==null?void 0:e.borderLightest,focusInverseIconOutlineColor:e==null?void 0:e.borderLightest,iconSize:"1.125em",iconPlusTextMargin:o==null?void 0:o.xxSmall},...a[r]}},Ld={children:s.node.isRequired,href:s.string,color:s.oneOf(["link","link-inverse"]),elementRef:s.func,as:s.elementType,role:s.string,forceButtonRole:s.bool,interaction:s.oneOf(["enabled","disabled"]),margin:ee.spacing,renderIcon:s.oneOfType([s.func,s.node]),iconPlacement:s.oneOf(["start","end"]),display:s.oneOf(["auto","block","inline-block","flex","inline-flex"]),isWithinText:s.bool,onBlur:s.func,onClick:s.func,onFocus:s.func,onMouseEnter:s.func},Nd=["children","href","color","elementRef","as","role","forceButtonRole","interaction","margin","renderIcon","iconPlacement","display","isWithinText","onBlur","onClick","onFocus","onMouseEnter"],Fd=["children","onClick","onMouseEnter","color","href","margin","renderIcon","iconPlacement","isWithinText"];var bo,yo,cn,Xe;let ct=(bo=E(Ad,Dd),yo=T(),bo(cn=yo(cn=(Xe=class _s extends y.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this.makeStyleProps=()=>({containsTruncateText:this.containsTruncateText,hasVisibleChildren:this.hasVisibleChildren}),this.handleElementRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleClick=t=>{const n=this.props.onClick;this.interaction==="disabled"?(t.preventDefault(),t.stopPropagation()):typeof n=="function"&&n(t)},this.handleFocus=t=>{this.setState({hasFocus:!0}),typeof this.props.onFocus=="function"&&this.props.onFocus(t)},this.handleBlur=t=>{this.setState({hasFocus:!1}),typeof this.props.onBlur=="function"&&this.props.onBlur(t)}}get _link(){return this.ref}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStyleProps())}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStyleProps())}get containsTruncateText(){let e=!1;return v.Children.forEach(this.props.children,t=>{t&&U(t,["TruncateText"])&&(e=!0)}),R(!e||this.props.display===void 0,"[Link] Using the display property with TruncateText may cause layout issues."),e}get display(){if(this.props.display)return this.props.display;const e=this.containsTruncateText;return this.props.renderIcon?e?"inline-flex":"inline-block":e?"block":"auto"}get interaction(){return Jr({props:this.props,interactionTypes:["disabled"]})}get element(){return ye(_s,this.props)}get focused(){return Jt(this.ref)}get focusable(){return Kn(this.ref)}get hasVisibleChildren(){return is(this.props.children)}get role(){const e=this.props,t=e.role,n=e.forceButtonRole,o=e.onClick;return n&&o&&this.element!=="button"?"button":t}focus(){this.ref&&this.ref.focus()}renderIcon(){var e;return R(this.props.display===void 0,"[Link] Using the display property with an icon may cause layout issues."),h("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},z(this.props.renderIcon))}render(){var e;const t=this.props,n=t.children;t.onClick;const o=t.onMouseEnter;t.color;const r=t.href,a=t.margin,l=t.renderIcon,d=t.iconPlacement;t.isWithinText;const c=H(t,Fd),p=this.interaction==="disabled",f=this.element==="button"||this.element==="input"?"button":void 0,g=this.role==="button"&&!p?0:void 0;return h(W,Object.assign({},oe(c),{elementRef:this.handleElementRef,as:this.element,display:this.display,margin:a,href:r,onMouseEnter:o,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":p?"true":void 0,role:this.role,type:f,tabIndex:g,css:(e=this.props.styles)===null||e===void 0?void 0:e.link}),l&&d==="start"&&this.renderIcon(),n,l&&d==="end"&&this.renderIcon())}},Xe.displayName="Link",Xe.componentId="Link",Xe.propTypes=Ld,Xe.allowedProps=Nd,Xe.defaultProps={interaction:void 0,color:"link",iconPlacement:"start",isWithinText:!0,forceButtonRole:!0},Xe))||cn)||cn);const zd={children:s.node.isRequired,href:s.string,onClick:s.func,onMouseEnter:s.func,size:s.oneOf(["small","medium","large"]),renderIcon:s.oneOfType([s.node,s.func]),iconPlacement:s.oneOf(["start","end"])},Wd=["children","href","iconPlacement","onClick","onMouseEnter","renderIcon","size"];var wo,_o,Ke;let Ss=(wo=T(),wo(_o=(Ke=class Cs extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}render(){const e=this.props,t=e.children,n=e.href,o=e.renderIcon,r=e.iconPlacement,a=e.onClick,l=e.onMouseEnter,d=j(this.props,Cs.allowedProps);return v.createElement(ct,Object.assign({},d,{href:n,renderIcon:o,iconPlacement:r,onClick:a,onMouseEnter:l,isWithinText:!1,elementRef:this.handleRef}),v.createElement(Md,null,t))}},Ke.displayName="BreadcrumbLink",Ke.componentId="Breadcrumb.Link",Ke.propTypes=zd,Ke.allowedProps=Wd,Ke.defaultProps={},Ke))||_o);const Hd=(i,e)=>{const t=e.size,n={small:{fontSize:i.smallFontSize,paddingInlineEnd:`calc(${i.smallSeparatorFontSize} * 2)`,paddingInlineStart:0},medium:{fontSize:i.mediumFontSize,paddingInlineEnd:`calc(${i.mediumSeparatorFontSize} * 2)`,paddingInlineStart:0},large:{fontSize:i.largeFontSize,paddingInlineEnd:`calc(${i.largeSeparatorFontSize} * 2)`,paddingInlineStart:0}},o={small:{fontSize:i.smallSeparatorFontSize,insetInlineEnd:`calc(${i.smallSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${i.smallSeparatorFontSize} / 2))`},medium:{fontSize:i.mediumSeparatorFontSize,insetInlineEnd:`calc(${i.mediumSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${i.mediumSeparatorFontSize} / 2))`},large:{fontSize:i.largeSeparatorFontSize,insetInlineEnd:`calc(${i.largeSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${i.largeSeparatorFontSize} / 2))`}};return{breadcrumb:{label:"breadcrumb",fontFamily:i.fontFamily,margin:0,padding:0,listStyleType:"none",overflow:"visible",display:"flex",alignItems:"center"},crumb:{label:"breadcrumb__crumb",boxSizing:"border-box",position:"relative",...n[t],"&:last-child":{paddingInlineEnd:0}},separator:{label:"breadcrumb__separator",boxSizing:"border-box",position:"absolute",top:"50%",color:i.separatorColor,...o[t]}}},Vd=i=>{const e=i.colors,t=i.typography;return{...{fontFamily:t==null?void 0:t.fontFamily,separatorColor:e==null?void 0:e.borderDark,smallSeparatorFontSize:"0.5rem",smallFontSize:t==null?void 0:t.fontSizeSmall,mediumSeparatorFontSize:"0.75rem",mediumFontSize:t==null?void 0:t.fontSizeMedium,largeSeparatorFontSize:"1rem",largeFontSize:t==null?void 0:t.fontSizeLarge}}},jd={children:G.oneOf([Ss]),label:s.string.isRequired,size:s.oneOf(["small","medium","large"]),margin:ee.spacing},Ud=["children","label","margin","size"];var So,Co,un,$e;let Gd=(So=E(Hd,Vd),Co=T(),So(un=Co(un=($e=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderChildren(){const e=this.props,t=e.styles,n=e.children,o=v.Children.count(n),r={maxWidth:`${Math.floor(100/o)}%`};return v.Children.map(n,(a,l)=>h("li",{css:t==null?void 0:t.crumb,style:r},a,l{const t=e.size,n=e.wrap,o=e.weight,r=e.fontStyle,a=e.transform,l=e.lineHeight,d=e.letterSpacing,c=e.color,u={primary:{color:i.primaryColor},secondary:{color:i.secondaryColor},"primary-inverse":{color:i.primaryInverseColor},"secondary-inverse":{color:i.secondaryInverseColor},success:{color:i.successColor},brand:{color:i.brandColor},danger:{color:i.dangerColor},alert:{color:i.alertColor}},p={overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},f={normal:{fontWeight:i.fontWeightNormal},light:{fontWeight:i.fontWeightLight},bold:{fontWeight:i.fontWeightBold}},g={"x-small":i.fontSizeXSmall,small:i.fontSizeSmall,medium:i.fontSizeMedium,large:i.fontSizeLarge,"x-large":i.fontSizeXLarge,"xx-large":i.fontSizeXXLarge},m={default:{lineHeight:i.lineHeight},fit:{lineHeight:i.lineHeightFit},condensed:{lineHeight:i.lineHeightCondensed},double:{lineHeight:i.lineHeightDouble}},b={normal:i.letterSpacingNormal,condensed:i.letterSpacingCondensed,expanded:i.letterSpacingExpanded},S={"&:focus":{outline:"none"},...c?u[c]:{},...n==="break-word"?p:{},...o?f[o]:{},...r?{fontStyle:r}:{},fontSize:g[t],...l?m[l]:{},letterSpacing:b[d],...a?{textTransform:a}:{}},C={...S,outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:0,color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block"};return{text:{label:"text",fontFamily:i.fontFamily,...S,"&:is(input)[type]":C,"&:-webkit-any(input)[type]":C,"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.4em"},sub:{bottom:"-0.4em"},"pre, code":{all:"initial",fontFamily:i.fontFamilyMonospace},"i, em":{fontStyle:"italic"},"b, strong":{fontWeight:i.fontWeightBold},p:{display:"block",padding:0,margin:i.paragraphMargin}}}},Xd=i=>{const e=i.colors,t=i.typography,n=i.spacing,o=i.key,r={canvas:{primaryColor:i["ic-brand-font-color-dark"],brandColor:i["ic-brand-primary"]}};return{...{...t,primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,brandColor:e==null?void 0:e.textBrand,dangerColor:e==null?void 0:e.textDanger,successColor:e==null?void 0:e.textSuccess,alertColor:e==null?void 0:e.textAlert,warningColor:e==null?void 0:e.textWarning,paragraphMargin:`${n.medium} 0`},...r[o]}},Kd={as:s.elementType,children:s.node,color:s.oneOf(["primary","secondary","brand","success","danger","alert","primary-inverse","secondary-inverse"]),elementRef:s.func,fontStyle:s.oneOf(["italic","normal"]),letterSpacing:s.oneOf(["normal","condensed","expanded"]),lineHeight:s.oneOf(["default","fit","condensed","double"]),size:s.oneOf(["x-small","small","medium","large","x-large","xx-large"]),transform:s.oneOf(["none","capitalize","uppercase","lowercase"]),weight:s.oneOf(["normal","light","bold"]),wrap:s.oneOf(["normal","break-word"])},Yd=["as","children","color","elementRef","fontStyle","letterSpacing","lineHeight","size","transform","weight","wrap"];var Io,xo,Ye;let lt=(Io=E(qd,Xd),Io(xo=(Ye=class Is extends y.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){var e;const t=this.props.children,n=ye(Is,this.props);return h(n,Object.assign({},oe(this.props),{css:(e=this.props.styles)===null||e===void 0?void 0:e.text,ref:this.props.elementRef}),t)}},Ye.displayName="Text",Ye.componentId="Text",Ye.allowedProps=Yd,Ye.propTypes=Kd,Ye.defaultProps={as:"span",wrap:"normal",size:"medium",letterSpacing:"normal",children:null},Ye))||xo);const Zd=i=>({options:{label:"options",boxSizing:"border-box",wordWrap:"break-word"},list:{label:"options__list",listStyleType:"none",position:"relative"},label:{label:"options__label",color:i.labelColor,cursor:"default",display:"block",fontWeight:i.labelFontWeight,padding:i.nestedLabelPadding}}),xs=i=>{const e=i.colors,t=i.typography,n=i.spacing;return{...{labelFontWeight:t==null?void 0:t.fontWeightBold,background:e==null?void 0:e.backgroundLightest,labelColor:e==null?void 0:e.textDarkest,labelPadding:`${n==null?void 0:n.xSmall} 0`,nestedLabelPadding:`${n==null?void 0:n.xSmall} ${n==null?void 0:n.small}`}}},Qd=(i,e)=>{const t=e.variant,n=e.children,o=e.renderBeforeLabel,r=e.renderAfterLabel,a=e.beforeLabelContentVAlign,l=e.afterLabelContentVAlign,d=U(n,["Options"]),c={highlighted:{background:i.highlightedBackground,color:i.highlightedLabelColor},selected:{background:i.selectedBackground,color:i.highlightedLabelColor},disabled:{cursor:"not-allowed",opacity:.5},"highlighted-disabled":{background:i.highlightedBackground,color:i.highlightedLabelColor,cursor:"not-allowed",opacity:.5},default:{}},u=g=>{const m=g==="before"?a:l,b=g==="before"?i.beforeLabelContentVOffset:i.afterLabelContentVOffset;return{start:{alignItems:"flex-start",paddingBlockStart:b},center:{alignItems:"center",paddingBlockStart:b,paddingBlockEnd:b},end:{alignItems:"flex-end",paddingBlockEnd:b}}[m]},p={textDecoration:"none",color:"currentColor"},f="background 200ms";return{item:{label:"optionItem",background:i.background,color:i.color,cursor:"pointer",display:"block",fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,lineHeight:i.lineHeight,outline:"none",position:"relative",transition:f,userSelect:"none",...c[t],...d&&{cursor:"default"},"[class*=-optionItem] &":{...!o&&{"[class$=-optionItem__container]":{paddingInlineStart:i.nestedPadding},"[class$=-optionItem__content--before]":{insetInlineStart:i.nestedPadding}}}},container:{label:"optionItem__container",display:"block",outline:"none",padding:i.padding,...d&&{padding:"0"},...o&&{paddingInlineEnd:i.iconPadding,paddingInlineStart:`calc(${i.iconPadding} * 2 + 1em)`},...r&&{paddingInlineEnd:`calc(${i.iconPadding} * 2 + 1em)`,paddingInlineStart:i.iconPadding},...o&&r&&{paddingInlineEnd:`calc(${i.iconPadding} * 2 + 1em)`,paddingInlineStart:`calc(${i.iconPadding} * 2 + 1em)`},"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":p},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":p}},content:{label:"optionItem__content",display:"flex",height:"100%",boxSizing:"border-box",pointerEvents:"none",position:"absolute",top:"0"},contentBefore:{label:"optionItem__content--before",insetInlineEnd:"auto",insetInlineStart:i.iconPadding,...u("before")},contentAfter:{label:"optionItem__content--after",insetInlineEnd:i.iconPadding,insetInlineStart:"auto",...u("after")},description:{label:"optionItem__description",display:"block",transition:f,paddingBlockStart:i.descriptionPaddingStart,fontWeight:i.descriptionFontWeight,fontSize:i.descriptionFontSize,lineHeight:i.descriptionLineHeight,color:i.descriptionColor,...c[t],background:"none"}}},ks=i=>{const e=i.colors,t=i.typography,n=i.spacing,o=i.key,r={canvas:{color:i["ic-brand-font-color-dark"],highlightedBackground:i["ic-brand-primary"]}};return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,lineHeight:t==null?void 0:t.lineHeightCondensed,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,highlightedLabelColor:e==null?void 0:e.textLightest,highlightedBackground:e==null?void 0:e.backgroundBrand,selectedLabelColor:e==null?void 0:e.textLightest,selectedBackground:e==null?void 0:e.backgroundDark,padding:`${n==null?void 0:n.xSmall} ${n==null?void 0:n.small}`,iconPadding:n==null?void 0:n.small,nestedPadding:n==null?void 0:n.small,beforeLabelContentVOffset:"0.625rem",afterLabelContentVOffset:"0.625rem",descriptionFontSize:t.fontSizeSmall,descriptionFontWeight:t.fontWeightNormal,descriptionLineHeight:t.lineHeight,descriptionPaddingStart:"0.25em",descriptionColor:e.textDark},...r[o]}},Jd={as:s.elementType,variant:s.oneOf(["default","highlighted","selected","disabled","highlighted-disabled"]),role:s.string,renderBeforeLabel:s.oneOfType([s.node,s.func]),renderAfterLabel:s.oneOfType([s.node,s.func]),beforeLabelContentVAlign:s.oneOf(["start","center","end"]),afterLabelContentVAlign:s.oneOf(["start","center","end"]),description:s.oneOfType([s.node,s.func]),descriptionRole:s.string,href:s.string,voiceoverRoleBugWorkaround:s.bool,elementRef:s.func,children:s.oneOfType([s.node,s.func])},ec=["as","variant","role","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","voiceoverRoleBugWorkaround","href","elementRef","children"];var ko,Oo,$o,$t,Ze;let Ro=(ko=re(),Oo=E(Qd,ks),$o=T(),ko($t=Oo($t=$o($t=(Ze=class qn extends y.Component{constructor(e){super(e),this.ref=null,this._descriptionId=void 0,this._descriptionId=e.deterministicId("OptionsItem-description")}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderContent(e,t){const n=this.props,o=n.styles,r=n.variant,a=n.as,l=n.role,d=n.children;return h("span",{css:[o==null?void 0:o.content,t],role:"presentation","aria-hidden":"true"},z(e,{variant:r,as:a,role:l,children:d}))}render(){const e=this.props,t=e.as,n=e.href,o=e.role,r=e.styles,a=e.description,l=e.descriptionRole,d=e.renderBeforeLabel,c=e.renderAfterLabel,u=e.elementRef,p=e.children,f=e.voiceoverRoleBugWorkaround,g=ye(qn,this.props,()=>t),m=n?"a":"span",b=j(this.props,qn.allowedProps),S=z(p),C=z(a),I=this.props["aria-describedby"]||(C?this._descriptionId:void 0);return h(g,{role:f?o:"none",css:r==null?void 0:r.item,ref:x=>{this.ref=x,typeof u=="function"&&u(x)},"aria-describedby":f?I:void 0},h(m,Object.assign({},b,{css:r==null?void 0:r.container,role:n||f?void 0:o,href:n,"aria-describedby":f?void 0:I}),S,C&&h("span",{css:r==null?void 0:r.description,role:l,id:this._descriptionId},C)),d&&this.renderContent(d,r==null?void 0:r.contentBefore),c&&this.renderContent(c,r==null?void 0:r.contentAfter))}},Ze.displayName="Item",Ze.componentId="Options.Item",Ze.allowedProps=ec,Ze.propTypes=Jd,Ze.defaultProps={as:"span",variant:"default",role:"listitem",voiceoverRoleBugWorkaround:!1,beforeLabelContentVAlign:"center",afterLabelContentVAlign:"center"},Ze))||$t)||$t)||$t);const tc=i=>({separator:{label:"separator",height:i.height,margin:i.margin,overflow:"hidden",background:i.background}}),Os=i=>{const e=i.borders,t=i.colors,n=i.spacing;return{...{background:t==null?void 0:t.backgroundMedium,height:e==null?void 0:e.widthSmall,margin:`0 ${n==null?void 0:n.small}`}}},nc={as:s.elementType},ic=["as"],oc=["as","styles"];var Bo,Eo,Qe;let rc=(Bo=E(tc,Os),Bo(Eo=(Qe=class $s extends y.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.as,n=e.styles,o=H(e,oc),r=ye($s,this.props,()=>t);return h(r,{role:"none"},h("div",Object.assign({},j(o,["styles","makeStyles","themeOverride"]),{css:n==null?void 0:n.separator,role:"presentation"})))}},Qe.displayName="Separator",Qe.componentId="Options.Separator",Qe.allowedProps=ic,Qe.propTypes=nc,Qe.defaultProps={as:"span"},Qe))||Eo);const sc={as:s.elementType,role:s.string,elementRef:s.func,renderLabel:s.oneOfType([s.node,s.func]),children:G.oneOf(["Options","Item","Separator"])},ac=["as","role","elementRef","renderLabel","children"];var Po,To,Mo,Rt,_e;let Je=(Po=re(),To=E(Zd,xs),Mo=T(),Po(Rt=To(Rt=Mo(Rt=(_e=class Xn extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t},this._labelId=this.props.deterministicId("Options-label")}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}get childAs(){const e=this.props.as;if(e==="ul"||e==="ol")return"li"}renderLabel(){const e=this.props,t=e.renderLabel,n=e.styles;return h("span",{id:this._labelId,role:"presentation","aria-hidden":"true",css:n==null?void 0:n.label},z(t))}renderSubList(e){const t=this.props.styles;return h(Ro,{as:this.childAs,role:"presentation",css:t==null?void 0:t.label},e)}renderChildren(){const e=this.props.children;return y.Children.map(e,t=>{if(U(t,["Options"]))return this.renderSubList(t);if(U(t,["Item","Separator"]))return J(t,{as:this.childAs||t.props.as})})}get ariaLabelledby(){if(this.props.renderLabel)return this._labelId;if(this.props["aria-labelledby"])return this.props["aria-labelledby"]}render(){const e=W.omitViewProps(j(this.props,Xn.allowedProps),Xn),t=this.props,n=t.as,o=t.role,r=t.renderLabel,a=t.elementRef,l=t.styles;return h("div",{css:l==null?void 0:l.options,role:"presentation",ref:this.handleRef},r&&this.renderLabel(),h(W,Object.assign({},e,{elementRef:a,css:l==null?void 0:l.list,as:n,role:o,display:"block",margin:"none",padding:"none",background:"primary","aria-labelledby":this.ariaLabelledby}),this.renderChildren()))}},_e.displayName="Options",_e.componentId="Options",_e.allowedProps=ac,_e.propTypes=sc,_e.defaultProps={as:"span",role:"list",elementRef:()=>{},renderLabel:null,children:null},_e.Item=Ro,_e.Separator=rc,_e))||Rt)||Rt)||Rt);const lc={id:s.string,highlightedOptionId:s.string,selectedOptionId:s.oneOfType([s.string,s.array]),isShowingOptions:s.bool,onRequestShowOptions:s.func,onRequestHideOptions:s.func,onRequestHighlightOption:s.func,onRequestHighlightFirstOption:s.func,onRequestHighlightLastOption:s.func,onRequestSelectOption:s.func,children:s.func,render:s.func},dc=["id","highlightedOptionId","selectedOptionId","isShowingOptions","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestHighlightFirstOption","onRequestHighlightLastOption","onRequestSelectOption","children","render"];var Ao,Do,Bt;let cc=(Ao=re(),Ao(Do=(Bt=class extends y.Component{constructor(...e){super(...e),this._id=this.props.id||this.props.deterministicId(),this._listId=`${this._id}-list`,this._descriptionId=`${this._id}-description`,this._trigger=null,this.isSelectedOption=t=>{const n=this.props.selectedOptionId;return Array.isArray(n)?n.indexOf(t)>-1:n===t},this.handleOpenClose=t=>{const n=this.props,o=n.isShowingOptions,r=n.onRequestShowOptions,a=n.onRequestHideOptions;t.preventDefault(),o?a==null||a(t):(Jt(this._trigger)||this._trigger.focus(),r==null||r(t))},this.handleKeyDown=t=>{const n=this.props,o=n.isShowingOptions,r=n.highlightedOptionId,a=n.onRequestHighlightOption,l=n.onRequestHighlightFirstOption,d=n.onRequestHighlightLastOption,c=n.onRequestSelectOption;switch(ge.names[t.keyCode]){case"space":o||this.handleOpenClose(t);break;case"enter":r&&(t.preventDefault(),c==null||c(t,{id:r}));break;case"down":t.preventDefault(),o?a==null||a(t,{direction:1}):this.handleOpenClose(t);break;case"up":t.preventDefault(),o?a==null||a(t,{direction:-1}):this.handleOpenClose(t);break;case"home":o&&(t.preventDefault(),l==null||l(t));break;case"end":o&&(t.preventDefault(),d==null||d(t));break}},this.handleKeyUp=t=>{const n=this.props.isShowingOptions;ge.names[t.keyCode]==="esc"&&n&&this.handleOpenClose(t)}}render(){const e=this.props,t=e.isShowingOptions,n=e.highlightedOptionId,o=e.onRequestHighlightOption,r=e.onRequestSelectOption,a=e.children,l=e.render,d=l===void 0?a:l;return typeof d=="function"?d({getRootProps:({onMouseDown:c,...u}={})=>({onMouseDown:L(p=>{p.target!==this._trigger&&t&&p.preventDefault()},c),...u}),getLabelProps:c=>({htmlFor:this._id,...c}),getTriggerProps:({ref:c,onKeyDown:u,onKeyUp:p,onClick:f,...g}={})=>({id:this._id,ref:L(c,m=>this._trigger=m),"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":t?this._listId:void 0,"aria-controls":t?this._listId:void 0,"aria-describedby":this._descriptionId,"aria-activedescendant":t?n:void 0,onKeyDown:L(this.handleKeyDown,u),onKeyUp:L(this.handleKeyUp,p),onClick:L(this.handleOpenClose,f),...g}),getInputProps:({readOnly:c,...u}={})=>({role:"combobox","aria-autocomplete":c?"none":"both",autoComplete:"off",readOnly:c,...u}),getListProps:({onMouseDown:c,onClick:u,...p}={})=>({id:this._listId,role:"listbox",onMouseDown:L(f=>{f.preventDefault()},c),onClick:L(f=>{f.stopPropagation(),f.nativeEvent.stopImmediatePropagation()},u),...p}),getOptionProps:({id:c,onMouseOver:u,onClick:p,...f}={})=>(N(!!c,"[Selectable] Must provide id for each option via `getOptionProps`."),{id:c,role:"option","aria-selected":this.isSelectedOption(c)?"true":"false",onClick:L(g=>{r==null||r(g,{id:c})},p),onMouseOver:L(g=>{o==null||o(g,{id:c})},u),...f}),getDisabledOptionProps:c=>({"aria-disabled":"true",...c}),getDescriptionProps:c=>({id:this._descriptionId,...c})}):null}},Bt.displayName="Selectable",Bt.allowedProps=dc,Bt.propTypes=lc,Bt.defaultProps={isShowingOptions:!1},Bt))||Do);const uc={id:s.string.isRequired,as:s.elementType},pc=["id","as"];var Lo,No,et;let Nt=(Lo=E(null,Os),Lo(No=(et=class extends y.Component{render(){return null}},et.displayName="DrilldownSeparator",et.componentId="Drilldown.Separator",et.propTypes=uc,et.allowedProps=pc,et.defaultProps={},et))||No);const hc={id:s.string.isRequired,children:s.oneOfType([s.node,s.func]),subPageId:s.string,disabled:s.bool,selected:s.bool,value:s.oneOfType([s.number,s.string]),href:s.string,as:s.elementType,role:s.string,renderLabelInfo:s.oneOfType([s.node,s.func]),renderBeforeLabel:s.oneOfType([s.node,s.func]),renderAfterLabel:s.oneOfType([s.node,s.func]),beforeLabelContentVAlign:s.oneOf(["start","center","end"]),afterLabelContentVAlign:s.oneOf(["start","center","end"]),description:s.oneOfType([s.node,s.func]),descriptionRole:s.string,onOptionClick:s.func,defaultSelected:s.bool,elementRef:s.func,shouldCloseOnClick:s.oneOf(["auto","always","never"])},fc=["id","children","subPageId","disabled","selected","value","href","as","role","renderLabelInfo","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","onOptionClick","defaultSelected","elementRef","shouldCloseOnClick"];var Fo,zo,tt;let de=(Fo=E(null,ks),Fo(zo=(tt=class extends y.Component{render(){return null}},tt.displayName="DrilldownOption",tt.componentId="Drilldown.Option",tt.propTypes=hc,tt.allowedProps=fc,tt.defaultProps={disabled:!1,beforeLabelContentVAlign:"start",afterLabelContentVAlign:"start",as:"li",role:"menuitem",shouldCloseOnClick:"auto"},tt))||zo);const gc={id:s.string.isRequired,children:G.oneOf([de,Nt]),renderGroupTitle:s.oneOfType([s.node,s.func]),withoutSeparators:s.bool,disabled:s.bool,role:s.string,as:s.elementType,elementRef:s.func,selectableType:s.oneOf(["single","multiple"]),defaultSelected:s.array,onSelect:s.func},mc=["id","children","renderGroupTitle","withoutSeparators","disabled","role","as","elementRef","selectableType","defaultSelected","onSelect"];var Wo,Ho,nt;let _n=(Wo=E(null,xs),Wo(Ho=(nt=class extends y.Component{render(){return null}},nt.displayName="DrilldownGroup",nt.componentId="Drilldown.Group",nt.propTypes=gc,nt.allowedProps=mc,nt.defaultProps={disabled:!1,withoutSeparators:!1,role:"group"},nt))||Ho);const vc={id:s.string.isRequired,children:G.oneOf([de,Nt,_n]),renderTitle:s.oneOfType([s.node,s.func]),renderActionLabel:s.oneOfType([s.node,s.func]),renderBackButtonLabel:s.oneOfType([s.node,s.func]),onHeaderActionClicked:s.func,onBackButtonClicked:s.func,withoutHeaderSeparator:s.bool,disabled:s.bool},bc=["id","children","renderTitle","renderActionLabel","renderBackButtonLabel","onHeaderActionClicked","onBackButtonClicked","withoutHeaderSeparator","disabled"];class yt extends y.Component{render(){return null}}yt.displayName="DrilldownPage";yt.componentId="Drilldown.Page";yt.propTypes=vc;yt.allowedProps=bc;yt.defaultProps={renderBackButtonLabel:"Back",disabled:!1,withoutHeaderSeparator:!1};const yc=(i,e,t)=>({drilldown:{label:"drilldown",overflow:"visible",...t.hasHighlightedOption&&{"&:focus::before":{display:"none"}}},container:{label:"drilldown__container"},headerBack:{label:"drilldown__headerBack",minHeight:"1.25em"},headerTitle:{label:"drilldown__headerTitle",fontWeight:i.headerTitleFontWeight},optionContainer:{label:"drilldown__optionContainer",alignItems:"center",display:"flex",height:"100%"},optionLabelInfo:{label:"drilldown__optionLabelInfo",display:"flex",flexShrink:0,height:"100%",alignItems:"center",paddingInlineStart:i.labelInfoPadding},optionContent:{label:"drilldown__optionContent",flexGrow:1},headerActionColor:i.headerActionColor}),wc=i=>{const e=i.colors,t=i.typography,n=i.spacing;return{...{headerTitleFontWeight:t.fontWeightBold,headerActionColor:e.textLink,labelInfoPadding:n==null?void 0:n.small}}},_c={rootPageId:s.string.isRequired,children:G.oneOf([yt]),id:s.string,label:s.string,disabled:s.bool,rotateFocus:s.bool,as:s.elementType,role:s.string,elementRef:s.func,drilldownRef:s.func,overflowX:s.oneOf(["auto","hidden","visible"]),overflowY:s.oneOf(["auto","hidden","visible"]),height:s.oneOfType([s.string,s.number]),width:s.oneOfType([s.string,s.number]),minHeight:s.oneOfType([s.string,s.number]),minWidth:s.oneOfType([s.string,s.number]),maxHeight:s.oneOfType([s.string,s.number]),maxWidth:s.oneOfType([s.string,s.number]),trigger:s.node,placement:te.placement,defaultShow:s.bool,show:ba(s.bool,"onToggle","defaultShow"),onToggle:s.func,onSelect:s.func,onDismiss:s.func,onFocus:s.func,onMouseOver:s.func,popoverRef:s.func,mountNode:te.mountNode,positionTarget:te.mountNode,positionContainerDisplay:s.oneOf(["inline-block","block"]),constrain:te.constrain,shouldHideOnSelect:s.bool,shouldContainFocus:s.bool,shouldReturnFocus:s.bool,withArrow:s.bool,offsetX:s.oneOfType([s.string,s.number]),offsetY:s.oneOfType([s.string,s.number])},Sc=["rootPageId","children","id","label","disabled","rotateFocus","as","role","overflowX","overflowY","height","width","minHeight","minWidth","maxHeight","maxWidth","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","elementRef","drilldownRef","popoverRef","mountNode","positionTarget","positionContainerDisplay","constrain","shouldHideOnSelect","shouldContainFocus","shouldReturnFocus","withArrow","offsetX","offsetY"],Cc=["groupProps"],Ic=["groupProps"],xc=["id","themeOverride"];var Vo,jo,Uo,Et,ae,Go,qo,Xo,Ko;let q=(Vo=re(),jo=E(yc,wc),Uo=T(),Vo(Et=jo(Et=Uo(Et=(ae=class extends y.Component{constructor(e){super(e),this._drilldownRef=null,this._popover=null,this._trigger=null,this._containerElement=null,this._id=void 0,this._triggerId=void 0,this._headerBackId=void 0,this._headerTitleId=void 0,this._headerTitleLabelId=void 0,this._headerActionId=void 0,this._pageHistory=void 0,this._activeOptionsMap={},this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleDrilldownRef=t=>{const n=this.props.drilldownRef;this._drilldownRef=t,typeof n=="function"&&n(t),this.props.trigger||this.handleRef(t)},this.show=t=>{this._popover&&(this._popover.show(t),this.setState({isShowingPopover:!0}))},this.hide=t=>{this._popover&&(this._popover.hide(t),this.setState({isShowingPopover:!1}),this.reset())},this.handleOptionHighlight=(t,{id:n,direction:o})=>{const r=this.props.rotateFocus,a=this.state.highlightedOptionId;let l=this.getPageChildById(n)?n:void 0;if(!l){if(!a)l=this.activeOptionIds[0];else if(o){const d=this.activeOptionIds.indexOf(a),c=d+o;if(l=d>-1?this.activeOptionIds[c]:void 0,r){const u=this.activeOptionIds.length-1;c<0&&(l=this.activeOptionIds[u]),c>u&&(l=this.activeOptionIds[0])}}}l&&this.setState({highlightedOptionId:l},()=>{this.focusOption(l)})},this.goToPage=t=>{var n;if(!t){R(!1,"Cannot go to page because there was no page id provided.");return}if(typeof t!="string"){R(!1,`Cannot go to page because parameter newPageId has to be string (valid page id). Current newPageId is "${typeof t}".`);return}if(!((n=this.pageMap)!==null&&n!==void 0&&n[t])){R(!1,`Cannot go to page because page with id: "${t}" doesn't exist.`);return}const o=this._pageHistory[this._pageHistory.length-1],r=this._pageHistory.indexOf(t);return r<0?this._pageHistory.push(t):this._pageHistory.splice(r+1,this._pageHistory.length-1),this.setState({activePageId:t,highlightedOptionId:void 0}),{prevPageId:o,newPageId:t}},this.goToPreviousPage=()=>{if(!this.previousPage){R(!1,`There is no previous page to go to. The current page history is: [${this._pageHistory.join(", ")}].`);return}const t=this.goToPage(this.previousPage.id),n=t.newPageId,o=t.prevPageId;return{newPageId:n,prevPageId:o}},this.handleBackButtonClick=()=>{const t=this.currentPage,n=t.onBackButtonClicked,o=this.goToPreviousPage(),r=o.newPageId,a=o.prevPageId;typeof n=="function"&&n(r,a)},this.handleOptionSelect=(t,{id:n})=>{const o=this.getPageChildById(n);if(t.persist(),!n||!o||o.props.disabled||t.target.getAttribute("disabled")||t.target.getAttribute("aria-disabled")){t.preventDefault(),t.stopPropagation();return}const r=this.props,a=r.shouldHideOnSelect,l=r.onSelect,d=o.groupProps,c=H(o,Cc),u=c.props,p=u.subPageId,f=u.href,g=u.value,m=u.onOptionClick;if(typeof m=="function"&&m(t,{optionId:n,drilldown:this,...this.exposedNavigationProps}),p&&this.goToPage(p),t.type==="keydown"&&f){var b;const S=(b=this._drilldownRef)===null||b===void 0?void 0:b.querySelector(`#${n}`);S.tagName.toLowerCase()==="a"&&S!==null&&S!==void 0&&S.href&&S.click()}d!=null&&d.selectableType?this.handleGroupOptionSelected(t,o):typeof l=="function"&&l(t,{value:g,isSelected:!0,selectedOption:c,drilldown:this}),a&&!p&&n!==this._headerBackId&&this.hide(t)},this.handleKeyDown=t=>{const n=t.target.id,o=this.getPageChildById(n);if([" ","space","Space"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),o&&this.handleOptionSelect(t,{id:n})),t.key==="ArrowRight"&&o!=null&&o.props.subPageId&&this.handleOptionSelect(t,{id:n}),t.key==="ArrowLeft"){var r;this._pageHistory.length>1&&this.handleBackButtonClick(),this.isOnRootPage&&(r=this._popover)!==null&&r!==void 0&&r.shown&&this._popover.hide(t)}},this.handleToggle=(t,n)=>{const o=this.props.onToggle;this.setState({isShowingPopover:n}),typeof o=="function"&&o(t,{shown:n,drilldown:this,...this.exposedNavigationProps})},this.state={isShowingPopover:e.trigger?!!e.show:!1,activePageId:e.rootPageId,highlightedOptionId:void 0,lastSelectedId:void 0,selectedGroupOptionsMap:this.setDefaultSelected()},this._pageHistory=[e.rootPageId],this._id=e.id||e.deterministicId(),this._triggerId=e.deterministicId("Drilldown-Trigger"),this._headerBackId=e.deterministicId("DrilldownHeader-Back"),this._headerTitleId=e.deterministicId("DrilldownHeader-Title"),this._headerTitleLabelId=e.deterministicId("DrilldownHeader-Title-Label"),this._headerActionId=e.deterministicId("DrilldownHeader-Action")}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(e,t){var n,o;(n=(o=this.props).makeStyles)===null||n===void 0||n.call(o,this.makeStylesVariables),t.activePageId!==this.state.activePageId&&setTimeout(()=>{this.focused()||this.focus()},0),this.currentPage||(this.previousPage?this.goToPreviousPage():this.goToPage(this.props.rootPageId)),this.state.highlightedOptionId&&!this.getPageChildById(this.state.highlightedOptionId)&&this.setState({highlightedOptionId:void 0})}get makeStylesVariables(){return{hasHighlightedOption:!!this.state.highlightedOptionId}}get activeOptionIds(){return Object.keys(this._activeOptionsMap)}get activeOptions(){return Object.values(this._activeOptionsMap)}get pages(){const e=this.props.children;return v.Children.toArray(e||[])}get pageMap(){if(!this.props.children)return;const t={};return this.pages.forEach(n=>{const o=n.props,r=o.children;t[o.id]={...o,children:v.Children.toArray(r||[])}}),t}get isOnRootPage(){return this.state.activePageId===this.props.rootPageId}get currentPage(){return this.getPageById(this.state.activePageId)}get previousPage(){const e=this._pageHistory[this._pageHistory.length-2];return this.getPageById(e)}get exposedNavigationProps(){const e=this.goToPage,t=this.goToPreviousPage;return{pageHistory:[...this._pageHistory],goToPage:e,goToPreviousPage:t}}get currentPageAriaLabel(){var e;if(this.props["aria-labelledby"])return this.props["aria-labelledby"];if((e=this.currentPage)!==null&&e!==void 0&&e.renderTitle)return this._headerTitleLabelId;if(this.isOnRootPage&&this.props.trigger)return this._triggerId}getChildrenArray(e){return e?Array.isArray(e)?e:[e]:[]}getPageById(e){return this.pageMap&&e?this.pageMap[e]:void 0}getPageChildById(e){return e?this._activeOptionsMap[e]:void 0}setDefaultSelected(){const e={};return this.pages.forEach(t=>{const n=t.props.children;this.getChildrenArray(n).forEach(o=>{if(U(o,[_n])){var r;const a=o.props,l=a.id,d=a.selectableType,c=a.defaultSelected,u=c===void 0?[]:c,p=a.children;if(!d)return;if(d&&!e[l]&&(e[l]=new Map),d==="single"&&u.length>1){N(!1,`Radio type selectable groups can have only one item selected! Group with id "${l}" cannot select multiple items: [${u.join(", ")}]!`);return}e[l]=new Map,(r=this.getChildrenArray(p))===null||r===void 0||r.forEach(f=>{if(U(f,[de])){const g=f.props,m=g.id,b=g.value,S=g.defaultSelected;if(S===!1)return;const C=typeof b<"u"&&u.filter(I=>typeof I<"u").includes(b);(S||C)&&e[l].set(m,b)}})}})}),e}get selectedGroupOptionIdsArray(){return Object.values(this.state.selectedGroupOptionsMap).map(e=>Array.from(e.keys())).flat()}get headerChildren(){const e=this.currentPage,t=this.props,n=t.styles,o=t.deterministicId,r=[];if(!e)return r;const a=e.children,l=e.renderBackButtonLabel,d=e.renderTitle,c=e.renderActionLabel,u=e.onHeaderActionClicked,p=e.withoutHeaderSeparator;if(this.previousPage){const f=z(this.previousPage.renderTitle),g=z(l,f);r.push(h(de,{id:this._headerBackId,onOptionClick:this.handleBackButtonClick},h("div",{css:n==null?void 0:n.headerBack,role:"presentation"},g)))}if(d){const f=z(d);f&&r.push(h(de,{id:this._headerTitleId,role:"presentation","aria-hidden":"true"},h("div",{css:n==null?void 0:n.headerTitle,id:this._headerTitleLabelId},f)))}if(c){const f=z(c);f&&r.push(h(de,{id:this._headerActionId,themeOverride:{color:n==null?void 0:n.headerActionColor},onOptionClick:g=>{typeof u=="function"&&u(g)}},f))}return r.length>0&&a.length>0&&!p&&r.push(h(Nt,{id:o("DrilldownHeader-Separator")})),r}get shown(){return this.props.trigger?this.state.isShowingPopover:!0}containsDuplicateChild(e){let t=!1;const n=new Map;for(const o of e)if(!n.has(o.props.id))n.set(o.props.id,!0);else return R(!1,`Duplicate id: "${o.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`),t=!0;return t}reset(){this._activeOptionsMap={},this.setState({highlightedOptionId:void 0})}focus(){if(this.shown){var e,t;N(!!((e=this._drilldownRef)!==null&&e!==void 0&&e.focus),"[Drilldown] Could not focus the drilldown."),(t=this._drilldownRef)===null||t===void 0||t.focus()}else{var n;N(!!((n=this._trigger)!==null&&n!==void 0&&n.focus),"[Drilldown] Could not focus the trigger."),this._trigger.focus()}}focused(){return this.shown?pt(this._drilldownRef):pt(this._trigger)}focusOption(e){const t=this._containerElement,n=t==null?void 0:t.querySelector(`[id="${e}"]`);n==null||n.focus()}handleGroupOptionSelected(e,t){this.setState(n=>{var o;const r=t.props,a=r.id,l=r.value,d=t.groupProps,c=d.id,u=d.selectableType;let p=new Map(n.selectedGroupOptionsMap[c]);return u==="multiple"&&(!((o=n.selectedGroupOptionsMap[c])===null||o===void 0)&&o.has(a))?p.delete(a):u==="multiple"?p.set(a,l):u==="single"&&(p=new Map,p.set(a,l)),{...n,selectedGroupOptionsMap:{...n.selectedGroupOptionsMap,[c]:p}}},()=>{const n=t.props.value,o=t.groupProps,r=o.id,a=o.onSelect,l=this.props.onSelect;t.groupProps;const d=H(t,Ic),c=[...this.state.selectedGroupOptionsMap[r].values()];typeof a=="function"&&a(e,{value:c,isSelected:c.includes(n),selectedOption:d,drilldown:this}),typeof l=="function"&&l(e,{value:c,isSelected:c.includes(n),selectedOption:d,drilldown:this})})}renderList(e,t){const n=this.currentPage,o=this.headerChildren;if(!n||this.containsDuplicateChild(n.children))return null;const r=[...o,...n.children];let a=!1;return r.map((l,d)=>{if(U(l,[_n])){const c=d===0,u=d===r.length-1,p=a,f=!l.props.withoutSeparators&&!c&&!p,g=!l.props.withoutSeparators&&!u;return a=g,this.renderGroup(l,e,t,f,g)}else return U(l,[Nt])?a?null:(a=!0,this.renderSeparator(l)):U(l,[de])?(a=!1,this.renderOption(l,e,t)):null})}renderSeparator(e){const t=e.props,n=t.id,o=t.themeOverride,r=H(t,xc);return h(Je.Separator,Object.assign({},r,{id:n,key:n,role:"separator",themeOverride:o}))}renderOption(e,t,n,o){var r,a,l,d,c;const u=this.props.styles;let p=!1;const f=e.props,g=f.id,m=f.children,b=f.href,S=f.as,C=f.role,I=f.subPageId,x=f.disabled,k=f.renderLabelInfo,B=f.renderBeforeLabel,P=f.renderAfterLabel,w=f.beforeLabelContentVAlign,X=f.afterLabelContentVAlign,se=f.description,wt=f.descriptionRole,$n=f.elementRef,Rn=f.themeOverride;if(!g)return R(!1,"Drilldown.Option without id won't be rendered. It is needed to internally track the options."),null;let A={...j(e.props,[...de.allowedProps,...Je.Item.allowedProps]),...t({id:g,...C&&!["gridcell","option","row","tab","columnheader","rowheader","treeitem"].includes(C)&&{"aria-selected":void 0}}),themeOverride:Rn,renderBeforeLabel:B,renderAfterLabel:P,beforeLabelContentVAlign:w,afterLabelContentVAlign:X,description:se,descriptionRole:wt,as:S,role:C,elementRef:$n,variant:"default",tabIndex:-1};const Bn={groupProps:o},on=g!==this._headerBackId&&(this.props.disabled||((r=this.currentPage)===null||r===void 0?void 0:r.disabled)||(o==null?void 0:o.disabled)||x);on&&(A.variant="disabled",A={...A,...n()}),g!==this._headerTitleId&&(this._activeOptionsMap[g]={...e,...Bn});const En=C!==de.defaultProps.role?C:void 0;I&&(A.renderAfterLabel=Go||(Go=h(vt,null)),A["aria-haspopup"]=!0,A.role=En||"button",R(!P,`The prop "renderAfterLabel" is reserved on item with id: "${g}". When it has "subPageId" provided, a navigation arrow will render after the label.`)),g===this._headerBackId&&(A.renderBeforeLabel=qo||(qo=h(Gt,null)));const ii=typeof e.props.selected=="boolean";if((o!=null&&o.selectableType||ii)&&o){if(ii)p=!!e.props.selected;else{var Pn;p=!!(!((Pn=this.state.selectedGroupOptionsMap[o.id])===null||Pn===void 0)&&Pn.has(g))}A["aria-checked"]=p,A.renderBeforeLabel=h(qt,{style:{opacity:p?1:0}}),R(!B,`The prop "renderBeforeLabel" is reserved on item with id: "${g}". When this option is a selectable member of a Drilldown.Group, selection indicator will render before the label.`),o.selectableType==="single"&&(A.role=En||"menuitemradio"),o.selectableType==="multiple"&&(A.role=En||"menuitemcheckbox")}g===this.state.highlightedOptionId&&(A.variant="highlighted",on&&(A.variant="highlighted-disabled")),b&&(I?R(!1,`Drilldown.Option with id "${g}" has subPageId, so it will ignore the "href" property.`):o!=null&&o.selectableType?R(!1,`Drilldown.Option with id "${g}" is in a selectable group, so it will ignore the "href" property.`):A.href=b);const oi=z(m,{id:g,variant:A.variant,isSelected:p});if(!oi)return R(!1,`There are no "children" prop provided for option with id: "${g}", so it won't be rendered.`),null;const Tn={variant:A.variant,vAlign:X,as:S,role:A.role,isSelected:p};typeof A.renderBeforeLabel=="function"&&!((a=A.renderBeforeLabel)!==null&&a!==void 0&&(l=a.prototype)!==null&&l!==void 0&&l.isReactComponent)&&(A.renderBeforeLabel=A.renderBeforeLabel.bind(null,Tn)),typeof A.renderAfterLabel=="function"&&!((d=A.renderAfterLabel)!==null&&d!==void 0&&(c=d.prototype)!==null&&c!==void 0&&c.isReactComponent)&&(A.renderAfterLabel=A.renderAfterLabel.bind(null,Tn));const Mn=k&&z(k,Tn),Xs={start:"flex-start",center:"center",end:"flex-end"},ri=`${g}__label`,si=`${g}__info`,Ks=e.props["aria-labelledby"]||ri,Ys=e.props["aria-describedby"]||(Mn?si:void 0);return h(Je.Item,Object.assign({},A,{key:g,"aria-labelledby":Ks,"aria-describedby":Ys}),h("div",{css:u==null?void 0:u.optionContainer,role:"none"},h("span",{css:u==null?void 0:u.optionContent,role:"none",id:ri},oi),Mn?h("span",{css:u==null?void 0:u.optionLabelInfo,role:"presentation",style:{alignSelf:Xs[X]}},h("span",{id:si},Mn)):null))}renderGroup(e,t,n,o,r){const a=e.props,l=a.id,d=a.children,c=a.renderGroupTitle,u=a.themeOverride,p=a.role,f=a.as,g=a.elementRef;if(!d)return null;const m=[];return o&&m.push(Xo||(Xo=h(Je.Separator,null))),m.push(h(Je,{id:l,key:l,role:p,as:f||this.props.as,renderLabel:c,elementRef:g,themeOverride:u},this.getChildrenArray(d).map(b=>U(b,[Nt])?this.renderSeparator(b):U(b,[de])?this.renderOption(b,t,n,e.props):null))),r&&m.push(Ko||(Ko=h(Je.Separator,null))),m}renderPage(){const e=this.props,t=e.styles,n=e.overflowY,o=e.overflowX,r=e.height,a=e.width,l=e.minHeight,d=e.minWidth,c=e.maxHeight,u=e.maxWidth,p=e.role,f=e.as,g=e.label;return this.currentPage?h(cc,{isShowingOptions:this.shown,highlightedOptionId:this.state.highlightedOptionId,selectedOptionId:this.selectedGroupOptionIdsArray,onRequestShowOptions:this.show,onRequestHideOptions:this.hide,onRequestSelectOption:this.handleOptionSelect,onRequestHighlightOption:this.handleOptionHighlight,onRequestHighlightFirstOption:m=>{const b=this.activeOptionIds[0];this.handleOptionHighlight(m,{id:b})},onRequestHighlightLastOption:m=>{const b=this.activeOptionIds[this.activeOptionIds.length-1];this.handleOptionHighlight(m,{id:b})}},({getTriggerProps:m,getListProps:b,getOptionProps:S,getDisabledOptionProps:C})=>h(W,Object.assign({as:"div",elementRef:this.handleDrilldownRef,tabIndex:0,css:t==null?void 0:t.drilldown,position:"relative",borderRadius:"small",width:a,minWidth:u,maxWidth:u,role:p,"aria-label":g,"aria-labelledby":this.currentPageAriaLabel},m({id:this._id,"aria-haspopup":!1,"aria-expanded":void 0,onKeyDown:this.handleKeyDown,onBlur:I=>{const x=I.currentTarget,k=I.relatedTarget,B=zt(x,k);(!k||k===this._drilldownRef||k!==x&&!B)&&this.setState({highlightedOptionId:void 0})},onMouseLeave:()=>{this.setState({highlightedOptionId:void 0})}})),h(W,{as:"div",overflowY:n,overflowX:o,height:r,width:a,minHeight:l,minWidth:d,maxHeight:c,maxWidth:u,css:t==null?void 0:t.container,borderRadius:"small",role:"presentation",elementRef:I=>{this._containerElement=I}},h(Je,Object.assign({},b(),{role:"presentation",as:f}),this.renderList(S,C))))):null}render(){this._activeOptionsMap={};const e=this.props,t=e.show,n=e.defaultShow,o=e.placement,r=e.withArrow,a=e.shouldContainFocus,l=e.shouldReturnFocus,d=e.trigger,c=e.mountNode,u=e.constrain,p=e.positionTarget,f=e.positionContainerDisplay,g=e.popoverRef,m=e.disabled,b=e.onDismiss,S=e.onFocus,C=e.onMouseOver,I=e.offsetX,x=e.offsetY;return d?h(Qn,{isShowingContent:t,defaultIsShowingContent:n,shouldCloseOnDocumentClick:!0,onHideContent:(k,{documentClick:B})=>{typeof b=="function"&&b(k,B),this.reset(),this.handleToggle(k,!1)},onShowContent:k=>this.handleToggle(k,!0),mountNode:c,placement:o,withArrow:r,positionTarget:p,positionContainerDisplay:f,constrain:u,shouldContainFocus:a,shouldReturnFocus:l,id:this._id,on:["click"],onFocus:S,onMouseOver:C,offsetX:I,offsetY:x,elementRef:k=>{this.handleRef(k)},ref:k=>{this._popover=k,typeof g=="function"&&g(k)},renderTrigger:J(d,{ref:k=>{this._trigger=k},"aria-haspopup":this.props.role,id:this._triggerId,disabled:!!(d.props.disabled||m),"aria-disabled":d.props.disabled||m?"true":void 0})},this.renderPage()):this.renderPage()}},ae.displayName="Drilldown",ae.componentId="Drilldown",ae.propTypes=_c,ae.allowedProps=Sc,ae.defaultProps={disabled:!1,rotateFocus:!0,as:"ul",role:"menu",overflowX:"auto",overflowY:"auto",placement:"bottom center",defaultShow:!1,shouldHideOnSelect:!0,shouldContainFocus:!1,shouldReturnFocus:!0,withArrow:!0,offsetX:0,offsetY:0},ae.Group=_n,ae.Option=de,ae.Page=yt,ae.Separator=Nt,ae))||Et)||Et)||Et);const kc=(i,e)=>{const t=e.size,n=e.delimiter,o=e.spacing,r=n!=="none",a=o!=="none";N(!(r&&a),"[InlineList] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const l={small:{fontSize:i.fontSizeSmall},medium:{fontSize:i.fontSizeMedium},large:{fontSize:i.fontSizeLarge}},d={"xxx-small":{marginInlineStart:i.spacingXXXSmall,marginInlineEnd:i.spacingXXXSmall},"xx-small":{marginInlineStart:i.spacingXXSmall,marginInlineEnd:i.spacingXXSmall},"x-small":{marginInlineStart:i.spacingXSmall,marginInlineEnd:i.spacingXSmall},small:{marginInlineStart:i.spacingSmall,marginInlineEnd:i.spacingSmall},medium:{marginInlineStart:i.spacingMedium,marginInlineEnd:i.spacingMedium},large:{marginInlineStart:i.spacingLarge,marginInlineEnd:i.spacingLarge},"x-large":{marginInlineStart:i.spacingXLarge,marginInlineEnd:i.spacingXLarge},"xx-large":{marginInlineStart:i.spacingXXLarge,marginInlineEnd:i.spacingXXLarge},none:{}},c={none:{marginInlineStart:i.noneSpacing,marginInlineEnd:i.noneSpacing},pipe:{marginInlineStart:i.pipeSpacing,marginInlineEnd:i.pipeSpacing,"&::after":{content:'"\\007C"'}},slash:{marginInlineStart:i.slashSpacing,marginInlineEnd:i.slashSpacing,"&::after":{content:'"\\002F"'}},arrow:{marginInlineStart:i.arrowSpacing,marginInlineEnd:i.arrowSpacing,"&::after":{content:'"\\003E"'}}};return{inlineListItem:{label:"inlineListItem",fontWeight:i.fontWeight,fontFamily:i.fontFamily,verticalAlign:"middle",boxSizing:"border-box",lineHeight:i.lineHeight,color:i.color,...a&&!r&&d[o],...l[t],"&:first-of-type":{marginInlineStart:0},"&:last-of-type":{marginInlineEnd:0}},delimiter:{label:"inlineListItem__delimiter",...c[n],"[class$=-inlineListItem]:last-of-type > &:last-child::after":{content:"none"}}}},Oc=i=>{const e=i.colors,t=i.spacing,n=i.typography,o=i.key,r={canvas:{color:i["ic-brand-font-color-dark"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,fontSizeSmall:n==null?void 0:n.fontSizeSmall,fontSizeMedium:n==null?void 0:n.fontSizeMedium,fontSizeLarge:n==null?void 0:n.fontSizeLarge,color:e==null?void 0:e.textDark,lineHeight:n==null?void 0:n.lineHeightCondensed,noneSpacing:t==null?void 0:t.xSmall,pipeSpacing:t==null?void 0:t.xSmall,slashSpacing:t==null?void 0:t.xSmall,arrowSpacing:t==null?void 0:t.xSmall,marginBottomDefault:t==null?void 0:t.xxxSmall,spacingXXXSmall:t==null?void 0:t.xxxSmall,spacingXXSmall:t==null?void 0:t.xxSmall,spacingXSmall:t==null?void 0:t.xSmall,spacingSmall:t==null?void 0:t.small,spacingMedium:t==null?void 0:t.medium,spacingLarge:t==null?void 0:t.large,spacingXLarge:t==null?void 0:t.xLarge,spacingXXLarge:t==null?void 0:t.xxLarge},...r[o]}},$c={children:s.oneOfType([s.node,s.func]).isRequired,delimiter:s.oneOf(["none","pipe","slash","arrow"]),size:s.oneOf(["small","medium","large"]),margin:ee.spacing,padding:ee.spacing,spacing:s.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:s.func},Rc=["children","delimiter","size","margin","padding","spacing","elementRef"],Bc=["delimiter","size","margin","padding","elementRef","children","spacing","styles"];var Yo,Zo,pn,it;let Rs=(Yo=E(kc,Oc),Zo=T(),Yo(pn=Zo(pn=(it=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props;e.delimiter,e.size;const t=e.margin,n=e.padding;e.elementRef;const o=e.children;e.spacing;const r=e.styles,a=H(e,Bc);return h(W,Object.assign({},oe(a),{css:r==null?void 0:r.inlineListItem,as:"li",margin:t,padding:n,display:"inline-block",maxWidth:"100%",elementRef:this.handleRef}),o,h("span",{css:r==null?void 0:r.delimiter,"aria-hidden":"true"}))}},it.displayName="InlineListItem",it.componentId="InlineList.Item",it.propTypes=$c,it.allowedProps=Rc,it.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},it))||pn)||pn);const Ec={children:G.oneOf([Rs]),as:s.oneOf(["ul","ol"]),margin:ee.spacing,size:s.oneOf(["small","medium","large"]),delimiter:s.oneOf(["none","pipe","slash","arrow"]),itemSpacing:s.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:s.func},Pc=["children","as","margin","size","delimiter","itemSpacing","elementRef"],Tc=["as","margin","elementRef"];var Qo,Jo,ot;let Kt=(Qo=T(),Qo(Jo=(ot=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}renderChildren(){return y.Children.map(this.props.children,e=>{if(e)return J(e,{delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,t=e.as,n=e.margin;e.elementRef;const o=H(e,Tc);return v.createElement(W,Object.assign({},oe(o),{as:t,margin:n,padding:"0",elementRef:this.handleRef,display:"block"}),this.renderChildren())}},ot.displayName="InlineList",ot.propTypes=Ec,ot.allowedProps=Pc,ot.defaultProps={itemSpacing:"none",as:"ul",margin:"none",delimiter:"none",size:"medium"},ot.Item=Rs,ot))||Jo);const Mc=(i,e)=>{const t=e.itemSpacing,n=e.fixMenuTriggerWidth;return{truncateList:{label:"truncateList",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},listItem:{label:"truncateList__listItem",...{minWidth:"0.0625rem",flexShrink:0,flexGrow:0},"& + &":{paddingInlineStart:t}},menuTrigger:{label:"truncateList__menuTrigger",maxWidth:"100%",...n&&{width:n},paddingInlineStart:t,"&:first-of-type":{paddingInlineStart:0}}}},Ac={children:s.node,visibleItemsCount:s.number,onUpdate:s.func,renderHiddenItemMenu:s.func,itemSpacing:s.string,fixMenuTriggerWidth:s.string,debounce:s.number,elementRef:s.func},er=["children","renderHiddenItemMenu","visibleItemsCount","itemSpacing","fixMenuTriggerWidth","debounce","onUpdate","elementRef"];var tr,nr,hn,rt;let Bs=(tr=E(Mc,null),nr=T(),tr(hn=nr(hn=(rt=class extends y.Component{constructor(e){super(e),this.ref=null,this._menuTriggerRef=null,this._debouncedHandleResize=void 0,this._resizeListener=void 0,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.measureItems=()=>{const t=this.props,n=t.fixMenuTriggerWidth,o=t.itemSpacing,r=Y(o),a=Y(n||this.state.menuTriggerWidth);let l=0;if(this.ref){const d=V(this.ref),c=d.width,u=ve(this.ref),p=u.paddingInlineStart,f=u.paddingInlineEnd,g=c-Y(p)-Y(f),m=Array.from(this.ref.getElementsByTagName("li")).map(S=>V(S).width);let b=0;for(let S=0;S{this.setState({isMeasuring:!0},()=>{const t=this.measureItems(),n=t.visibleItemsCount;typeof this.props.onUpdate=="function"&&this.props.onUpdate({visibleItemsCount:n}),this.setState({isMeasuring:!1})})},this.state={isMeasuring:!1,menuTriggerWidth:void 0}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t);const n=V(this.ref),o=n.width;this._debouncedHandleResize=kn(this.handleResize,this.props.debounce,{leading:!0,trailing:!0}),this._resizeListener=new ResizeObserver(a=>{for(const d of a){const c=d.contentRect.width;if(o!==c){var l;(l=this._debouncedHandleResize)===null||l===void 0||l.call(this)}}});const r=this.props.fixMenuTriggerWidth?Y(this.props.fixMenuTriggerWidth):this.calcMenuTriggerWidth();this.setState({menuTriggerWidth:r},()=>{var a,l;(a=this._resizeListener)===null||a===void 0||a.observe(this.ref),(l=this._debouncedHandleResize)===null||l===void 0||l.call(this)})}componentDidUpdate(e,t){var n,o;if((n=(o=this.props).makeStyles)===null||n===void 0||n.call(o),e.fixMenuTriggerWidth!==this.props.fixMenuTriggerWidth||e.itemSpacing!==this.props.itemSpacing){var r;(r=this._debouncedHandleResize)===null||r===void 0||r.call(this)}if(this.ref&&t.isMeasuring&&t.isMeasuring!==this.state.isMeasuring){const a=this.calcMenuTriggerWidth();a&&this.state.menuTriggerWidth!==a&&this.setState({menuTriggerWidth:a},()=>{var l;(l=this._debouncedHandleResize)===null||l===void 0||l.call(this)})}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debouncedHandleResize&&this._debouncedHandleResize.cancel()}get childrenArray(){return y.Children.toArray(this.props.children)}get visibleChildren(){const e=this.props.visibleItemsCount,t=this.state,n=t.isMeasuring;if(typeof t.menuTriggerWidth>"u")return[];const r=typeof e>"u"?this.childrenArray:this.childrenArray.splice(0,e);return n?this.childrenArray:r}get hiddenChildren(){return this.state.isMeasuring?[]:this.childrenArray.splice(this.visibleChildren.length,this.childrenArray.length)}calcMenuTriggerWidth(){const e=this.props.fixMenuTriggerWidth;if(!this._menuTriggerRef)return 0;if(e)return Y(e);const t=this._menuTriggerRef.children;let n=0;return Array.from(t).forEach(o=>{n+=V(o).width}),n}render(){const e=this.props,t=e.styles,n=e.className,o=e.style,r=e.renderHiddenItemMenu,a=this.visibleChildren,l=this.hiddenChildren;return h("ul",Object.assign({ref:this.handleRef},j(this.props,er),{className:n,style:o,css:t==null?void 0:t.truncateList}),a.map((d,c)=>h("li",{key:c,css:t==null?void 0:t.listItem},d)),typeof r=="function"&&l&&l.length>0&&h("li",{key:"menuTrigger",css:[t==null?void 0:t.listItem,t==null?void 0:t.menuTrigger],ref:d=>{this._menuTriggerRef=d}},r(l)))}},rt.displayName="TruncateList",rt.componentId="TruncateList",rt.propTypes=Ac,rt.allowedProps=er,rt.defaultProps={itemSpacing:"0",debounce:300},rt))||hn)||hn);function Dc(i,e){const t={};return Object.keys(i).forEach(n=>{const o=i[n],r=o.minWidth,a=o.maxWidth,l=o.minHeight,d=o.maxHeight;t[n]={minWidth:r&&Y(r,e)||0,maxWidth:a&&Y(a,e)||1/0,minHeight:l&&Y(l,e)||0,maxHeight:d&&Y(d,e)||1/0}}),function({width:n,height:o}){const r={};return Object.entries(t).forEach(([a,l])=>{const d=l.minWidth,c=l.maxWidth,u=l.minHeight,p=l.maxHeight;r[a]=d<=n&&n<=c&&u<=o&&o<=p}),r}}const Lc=(i,e,t)=>{const n=typeof e=="function"?e():e,o=V(n),r=o.width,a=o.height;let l=[];const d=p=>{const f=Es(i,n,l,p);f&&(l=f,t(l))},c=kn(d,100,{leading:!1,trailing:!0}),u=new ResizeObserver(p=>{for(const f of p){const g=f.contentRect,m=g.width,b=g.height;r!==m&&c({width:m,height:b})}});return u.observe(n),d({width:r,height:a}),{remove(){u&&u.disconnect(),c&&c.cancel()}}};function Es(i,e,t=[],n){const o=M(e);let r=n||V(o),a=r.width,l=r.height;a=Math.floor(a),l=Math.floor(l);const d=Dc(i,o)({width:a,height:l}),c=Object.keys(d).filter(u=>d[u]).map(u=>u);return t.length!==c.length||t.filter(u=>c.indexOf(u)===-1).length>0?c:null}function Ps(i,e){const t=Object.keys(i);if(t.length>4)throw new Error("Expected maximum 4 keys in query object.");let n="";const o="and";for(const r of t){const a=["minHeight","maxHeight","minWidth","maxWidth"];if(a.indexOf(r)===-1)throw new Error(`Invalid key \`${r}\` in query object. Valid keys should consist of one of the following: ${a.join(", ")} (case sensitive)`);const l=i[r];if(typeof l!="string"&&typeof l!="number")throw new Error("The value of the query object must be a string or number.");if(!l)throw new Error("No value supplied for query object");n+=`(${Nc(r)}: ${Y(l,e)}px) ${o} `}return n.slice(0,-o.length-2)}function Nc(i){const e=i.toLowerCase();return e.slice(0,3)+"-"+e.slice(3)}const Fc=(i,e,t,n=fa)=>{const o=typeof e=="function"?e():e,r=d=>{const c=Object.keys(d).filter(u=>d[u].matches).map(u=>u);t(c)},a={},l=()=>{r(a)};return Object.keys(i).forEach(d=>{const c=n(Ps(i[d],o),o);c&&(c.addListener(l),a[d]=c)}),r(a),{remove(){a&&Object.keys(a).forEach(d=>{a[d].removeListener(l)})}}},zc={validQuery(i,e,t){try{return Ps(i[e]),null}catch(n){return new Error(`Invalid query prop supplied to \`${t}\`. ${n.message}`)}}},Wc={match:s.oneOf(["element","media"]),query:s.objectOf(zc.validQuery).isRequired,props:s.objectOf(s.object),render:s.func,children:s.func,display:s.oneOf(["inline","block","inline-block","flex","inline-flex"]),elementRef:s.func},Hc=["match","query","props","render","children","display","elementRef"];class nn extends y.Component{constructor(...e){super(...e),this.ref=null,this._matchListener=null,this.state={matches:[],hasRendered:!1},this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.updateMatches=(t,n)=>{this.setState({matches:t},()=>{typeof n=="function"&&n()})}}componentDidMount(){if(N(!!(this.props.render||this.props.children),"[Responsive] must have either a `render` prop or `children` prop."),this.props.match==="element"){const e=Es(this.props.query,this)||[];this.setState({matches:e,hasRendered:!0})}else this.setState({hasRendered:!0});this._matchListener=this.addMatchListener(this.props.query,this.updateMatches)}componentWillUnmount(){this.removeMatchListener()}componentDidUpdate(e){const t=this.props,n=t.match,o=t.query;(n!==e.match||!qr(o,e.query))&&(this.removeMatchListener(),this._matchListener=this.addMatchListener(o,this.updateMatches,n))}addMatchListener(e,t,n=this.props.match){return(n==="element"?Lc:Fc)(e,()=>M(this),t)}removeMatchListener(){this._matchListener&&this._matchListener.remove()}mergeProps(e,t){if(!t)return null;const n={};return e.forEach(o=>{const r=t[o];Object.keys(r).forEach(a=>{const l=n[a];R(!(a in n),[`[Responsive] The prop \`${a}\` is defined at 2 or more breakpoints`,`which are currently applied at the same time. Its current value, \`${l}\`,`,`will be overwritten as \`${r[a]}\`.`].join(" ")),n[a]=r[a]})}),n}render(){const e=this.state,t=e.matches,n=e.hasRendered,o=this.props,r=o.props,a=o.render,l=o.children,d=o.display;let c;return n&&(c=l||a),v.createElement("div",{ref:this.handleRef,style:{display:d}},c&&c(this.mergeProps(t,r),t))}}nn.displayName="Responsive";nn.allowedProps=Hc;nn.propTypes=Wc;nn.defaultProps={children:null,match:"element",props:null};const pe=y.createContext({layout:"desktop",inverseColor:!1}),Vc=(i,e,t)=>{const n=e.status,o=e.variant,r=e.renderSubmenu,a=e.renderAvatar,l=e.customPopoverConfig,d=t.layout,c=t.inverseColor,u=d==="smallViewport",p=a?!1:n==="active"&&o==="default",f=r||l,g=`calc(${i.itemInlinePadding} - ${i.activeItemIndicatorSpacing})`;return{topNavBarItem:{label:"topNavBarItem",padding:`0 calc(${i.itemSpacing} / 2)`,height:"100%",display:"flex",justifyContent:"center",alignItems:f?"stretch":"center"},container:{label:"topNavBarItem__container",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...p&&{"&::after":{content:'""',position:"absolute",insetBlockEnd:0,insetInlineStart:g,insetInlineEnd:g,height:i.activeIndicatorWidth,background:c?i.activeIndicatorColorInverse:i.activeIndicatorColor,display:"block"}},"& a":{textDecoration:"none"}},content:{label:"topNavBarItem__content",fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,appearance:"none",border:0,outline:0,margin:0,textDecoration:"none",whiteSpace:"nowrap",display:"flex",justifyContent:"center",alignItems:"center",color:c?i.colorInverse:i.color,...p&&{fontWeight:i.activeItemFontWeight},"*":{pointerEvents:"none"}},avatarContainer:{label:"topNavBarItem__avatarContainer",display:"flex",alignItems:"center",paddingInlineEnd:`calc(${i.iconTextGap} * 1.5)`},submenuTriggerContainer:{label:"topNavBarItem__submenuTriggerContainer",height:"100%",display:"flex",alignItems:"center"},submenuIcon:{label:"topNavBarItem__submenuIcon",fontSize:"0.875em",display:"flex",alignItems:"center",paddingInlineStart:i.iconTextGap},focusOutlineOffset:u?"0.375rem":"0.625rem",itemInlinePadding:i.itemInlinePadding}},jc=i=>{const e=i.colors,t=i.spacing,n=i.typography,o=i.borders;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:"inherit",colorInverse:"inherit",itemInlinePadding:t==null?void 0:t.xSmall,itemSpacing:t==null?void 0:t.xSmall,iconTextGap:t==null?void 0:t.xSmall,activeItemFontWeight:n==null?void 0:n.fontWeightBold,activeItemIndicatorSpacing:"0.25rem",activeIndicatorWidth:o==null?void 0:o.widthMedium,activeIndicatorColor:e==null?void 0:e.textLightest,activeIndicatorColorInverse:e.textDarkest}}},Jn=s.oneOfType([s.string,s.shape({renderTip:s.oneOfType([s.node,s.func]).isRequired,color:s.oneOf(["primary","primary-inverse"]),placement:s.string,offsetX:s.oneOfType([s.string,s.number]),offsetY:s.oneOfType([s.string,s.number]),onShowContent:s.func,onHideContent:s.func})]),Uc={id:s.string.isRequired,as:s.elementType,children:s.node.isRequired,variant:s.oneOf(["default","button","icon","avatar"]),status:s.oneOf(["default","active","disabled"]),renderSubmenu:G.oneOf([q]),showSubmenuChevron:s.bool,customPopoverConfig:s.object,tooltip:Jn,renderAvatar:s.shape({avatarName:s.string.isRequired,avatarSrc:s.string,avatarAlt:s.string}),renderIcon:s.oneOfType([s.node,s.func]),href:s.string,onClick:s.func,onHiddenClick:s.func,onSubmenuToggle:s.func,onMouseOver:s.func,onMouseOut:s.func,onFocus:s.func,onBlur:s.func,onKeyDown:s.func,onKeyUp:s.func,elementRef:s.func,itemRef:s.func,shouldCloseOnClick:s.oneOf(["auto","always","never"])},ir=["id","as","children","variant","status","renderSubmenu","showSubmenuChevron","customPopoverConfig","tooltip","renderAvatar","renderIcon","href","onClick","onHiddenClick","onSubmenuToggle","onMouseOver","onMouseOut","onFocus","onBlur","onKeyDown","onKeyUp","elementRef","itemRef","shouldCloseOnClick"];var or,rr,sr,Pt,Re,ar,lr;const Ts=1e4,dr=Ts+1,Gc=Ts+2;let me=(or=re(),rr=E(Vc,jc),sr=T(),or(Pt=rr(Pt=sr(Pt=(Re=class extends y.Component{constructor(e){super(e),this.ref=null,this._itemRef=null,this._tooltipContentId=void 0,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.handleItemRef=t=>{const n=this.props.itemRef;this._itemRef=t,typeof n=="function"&&n(t)},this.handleKeyDown=t=>{if(t.key==="ArrowDown"&&(this.shouldRenderSubmenu&&!this.state.isSubmenuOpen||this.shouldRenderPopover&&!this.state.isPopoverOpen)){var n;t.preventDefault(),(n=this._itemRef)===null||n===void 0||n.click()}t.key==="Tab"&&this.state.isPopoverOpen&&!this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!1})},this.handleMenuToggle=(t,n)=>{this.setState({isSubmenuOpen:n.shown}),typeof this.props.onSubmenuToggle=="function"&&this.props.onSubmenuToggle(t,n)},this._tooltipContentId=e.deterministicId("TopNavBarItem-tooltip"),this.state={isSubmenuOpen:!1,isPopoverOpen:!1}}componentDidMount(){const e=this.props,t=e.makeStyles,n=e.customPopoverConfig;t==null||t(this.makeStylesVariables),n&&this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!!n.isShowingContent})}componentDidUpdate(){const e=this.props,t=e.makeStyles,n=e.customPopoverConfig;t==null||t(this.makeStylesVariables),n&&this.isCustomPopoverControlled&&n.isShowingContent!==this.state.isPopoverOpen&&this.setState({isPopoverOpen:!!n.isShowingContent})}get makeStylesVariables(){const e=this.context,t=e.layout,n=e.inverseColor;return{layout:t,inverseColor:n}}get shouldRenderSubmenu(){const e=this.props.renderSubmenu;return!!e&&U(e,[q])}get shouldRenderPopover(){const e=this.props,t=e.id,n=e.renderSubmenu,o=e.customPopoverConfig;return o?o.children?o&&n?(R(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${t}" will ignore the "customPopoverConfig" prop.`),!1):!0:(R(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${t}".`),!1):!1}get isCustomPopoverControlled(){const e=this.props.customPopoverConfig;return e&&typeof e.isShowingContent<"u"}get hasOpenPopover(){return this.state.isSubmenuOpen||this.state.isPopoverOpen}get isDefaultVariant(){return this.props.variant==="default"||this.props.variant==="forceIconWithLabel"}get isButtonVariant(){return this.props.variant==="button"}get isIconVariant(){return this.props.variant==="icon"}get isAvatarOnlyVariant(){return this.props.variant==="avatar"}get hasAvatar(){const e=this.props,t=e.id,n=e.renderIcon,o=e.renderAvatar,r=e.variant,a=!!o;return this.isAvatarOnlyVariant&&!a?(R(!1,`The "renderAvatar" config is required for the 'variant="avatar"' type components, but received none for the item with id "${t}".`),!1):a&&(n||r==="icon")?(R(!1,` components with icons cannot display avatars, so the "renderAvatar" config prop will be ignored for item with id "${t}".`),!1):a}get submenuIcon(){var e;return!(this.shouldRenderSubmenu||this.shouldRenderPopover)||!this.props.showSubmenuChevron?null:h("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.submenuIcon},this.shouldRenderSubmenu&&this.state.isSubmenuOpen||this.shouldRenderPopover&&this.state.isPopoverOpen?ar||(ar=h(bt,null)):lr||(lr=h(mt,null)))}get buttonThemeOverride(){const e=this.props.styles,t={};return(this.isDefaultVariant||this.hasAvatar)&&(t.mediumPaddingHorizontal=e==null?void 0:e.itemInlinePadding),this.hasAvatar&&(t.mediumPaddingTop="0.125rem",t.mediumPaddingBottom="0.125rem"),this.isAvatarOnlyVariant&&!this.submenuIcon&&(t.mediumPaddingHorizontal="0",t.mediumPaddingTop="0",t.mediumPaddingBottom="0"),Object.keys(t).length>0?t:void 0}get colorProps(){let e="primary-inverse",t="inverse";return this.context.inverseColor&&(e="secondary",t="info",this.isButtonVariant&&(e="primary")),{color:e,focusColor:t}}get ariaProps(){let e,t;return this.shouldRenderSubmenu&&(e="menu",t=this.state.isSubmenuOpen),this.shouldRenderPopover&&(e="true",t=this.state.isPopoverOpen),{"aria-haspopup":e,"aria-expanded":t}}get itemProps(){const e=this.props,t=e.id,n=e.as,o=e.variant,r=e.href,a=e.onClick,l=e.onMouseOver,d=e.onMouseOut,c=e.onFocus,u=e.onBlur,p=e.onKeyDown,f=e.onKeyUp,g=e.renderSubmenu,m=e.status,b=e.renderAvatar,S=e.renderIcon;let C=r,I=a,x=m;if(g&&(C&&(R(!1,`TopNavBar.Items with submenus are not allowed to have 'href' property, but received href "${C}" for item with the id: "${t}".`),C=void 0),I&&(R(!1,`TopNavBar.Items with submenus are not allowed to have 'onClick' property, but received onClick for item with the id: "${t}".Use the \`onSubmenuToggle\` prop instead. OnClick: ${I}`),I=void 0)),x==="active"&&!this.isDefaultVariant&&(R(!1,`Only \`variant="default"\` components can be set to active, but item with id "${t}" has variant: "${o}".`),x="default"),this.hasAvatar){if(!(b!=null&&b.avatarName))return N(!1,`The "avatarName" prop is required for for components with avatar, but the item with id "${t}" is missing it.`),null;x==="active"&&(R(!1,` components with avatar cannot have "active" status, so the "active" status on the item with id "${t}" will be ignored.`),x="default")}return this.isIconVariant&&!S?(N(!1,`The "renderIcon" prop is required for the \`variant="icon"\` type components, but the item with id "${t}" is missing it.`),null):{id:t,as:n,...this.colorProps,...this.ariaProps,size:"medium",withBorder:this.isButtonVariant,withBackground:this.isButtonVariant,interaction:x==="disabled"?"disabled":void 0,"aria-disabled":x==="disabled"?"true":void 0,shape:this.isAvatarOnlyVariant&&!this.submenuIcon?"circle":"rectangle",href:C,onClick:I,onMouseOver:l,onMouseOut:d,onFocus:c,onBlur:u,onKeyDown:L(p,this.handleKeyDown),onKeyUp:f,renderIcon:S,themeOverride:this.buttonThemeOverride,elementRef:k=>{this.handleItemRef(k)}}}renderContent(){var e;const t=this.props,n=t.children,o=t.styles,r=this.itemProps;if(!r)return null;let a=n;this.isAvatarOnlyVariant?a=this.renderAvatar():this.isIconVariant&&(a=h(Zn,null,a));const l=h(Rl,Object.assign({},r,oe(j(this.props,ir))),this.isIconVariant&&!this.submenuIcon?a:h("div",{css:o==null?void 0:o.content},this.hasAvatar&&!this.isAvatarOnlyVariant&&h("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.avatarContainer},this.renderAvatar()),a,this.submenuIcon));return h("div",{css:o==null?void 0:o.container},this.props.tooltip?this.wrapButtonInTooltip(l,n):l)}wrapButtonInTooltip(e,t){const n=this.props,o=n.tooltip,r=n.styles;if(!o)return e;let a={placement:"bottom",color:this.context.inverseColor?"primary":"primary-inverse"};typeof o=="string"?a.renderTip=o:a={...a,...o};const l=z(a.renderTip);if(!l)return e;const d=l===t;return h(An,{theme:{componentOverrides:{View:{stackingTopmost:Gc}}}},h(Jl,Object.assign({},a,{renderTip:d?l:h("div",{id:this._tooltipContentId},l),positionContainerDisplay:"block"}),h("div",{css:r==null?void 0:r.submenuTriggerContainer},d?e:J(e,{"aria-describedby":this._tooltipContentId}))))}renderAvatar(){if(!this.hasAvatar)return null;const e=this.props,t=e.id,n=e.children,r=e.renderAvatar,a=r.avatarName,l=r.avatarSrc,c=r.avatarAlt||(typeof n=="string"?n:void 0);return c||R(!1,`Please supply a label for the avatar with either the "renderAvatar.avatarAlt" or the "children" (as string) prop. It is needed for screen reader support, but missing on the item with the id: "${t}".`),a?h(bs,{name:a,src:l,alt:c,size:"small"}):null}renderDropdownMenu(){var e,t,n;const o=this.props,r=o.id,a=o.renderSubmenu,l=o.status,d=o.styles;return!a||!this.shouldRenderSubmenu?null:(typeof a.props.show<"u"&&R(!1,`TopNavBar.Item Drilldown submenus are controlled by the component. The "show" prop will be ignored on the submenu of the item with id: "${r}".`),a.props.trigger&&R(!1,`TopNavBar.Item submenus have the item itself as their trigger. The "trigger" prop will be ignored on the Drilldown submenu of item with id: "${r}".`),J(a,{trigger:h("div",{css:d==null?void 0:d.submenuTriggerContainer},this.renderContent()),show:this.state.isSubmenuOpen,onToggle:L((e=a.props)===null||e===void 0?void 0:e.onToggle,this.handleMenuToggle),positionContainerDisplay:"block",placement:"bottom start",withArrow:!1,minWidth:((t=a.props)===null||t===void 0?void 0:t.minWidth)||"18.5rem",maxHeight:((n=a.props)===null||n===void 0?void 0:n.maxHeight)||"calc(100vh - 10rem)",...l==="disabled"&&{disabled:!0,show:!1,onToggle:void 0}}))}renderPopover(){const e=this.props,t=e.id,n=e.customPopoverConfig,o=e.styles;if(!n||!this.shouldRenderPopover)return null;n.renderTrigger&&R(!1,`TopNavBar.Item popovers have the item itself as their trigger. The "renderTrigger" prop will be ignored on the popover of item with id: "${t}".`);const r={placement:"bottom start",withArrow:!0,shouldReturnFocus:!0,shouldContainFocus:!1,...n,positionContainerDisplay:"block",renderTrigger:h("div",{css:o==null?void 0:o.submenuTriggerContainer},this.renderContent()),onShowContent:L(n.onShowContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!0})}),onHideContent:L(n.onHideContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!1})}),isShowingContent:this.state.isPopoverOpen,"aria-expanded":void 0};return h(Qn,r,n.children)}render(){const e=this.props.styles;let t;return this.shouldRenderPopover?t=h(An,{theme:{componentOverrides:{View:{stackingTopmost:dr}}}},this.renderPopover()):this.shouldRenderSubmenu?t=h(An,{theme:{componentOverrides:{View:{stackingTopmost:dr}}}},this.renderDropdownMenu()):t=this.renderContent(),h("div",{ref:this.handleRef,css:e==null?void 0:e.topNavBarItem},t)}},Re.displayName="TopNavBarItem",Re.componentId="TopNavBar.Item",Re.propTypes=Uc,Re.allowedProps=ir,Re.defaultProps={status:"default",variant:"default",showSubmenuChevron:!0,shouldCloseOnClick:"auto"},Re.contextType=pe,Re))||Pt)||Pt)||Pt);const In=(i,e={})=>{const t=[],n=e.currentPageId,o=e.renderOptionContent,r=ea();return y.Children.forEach(i,a=>{if(!a||!U(a,[me]))return;const l=a.props,d=l.renderSubmenu,c=l.customPopoverConfig,u=l.id,p=l.children,f=l.status,g=l.variant,m=l.href,b=l.onClick,S=l.shouldCloseOnClick;let C=d,I=c,x,k;const B=[];C&&(U(C,[q])||(R(!1,`The "renderSubmenu" prop accepts only Drilldown components, but the item with id "${u}" received: "${d}".`),C=void 0),C&&(k=C.props.rootPageId,B.push(...y.Children.toArray(C.props.children)))),I&&(I.children||(R(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${u}".`),I=void 0),C&&(R(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${u}" will ignore the "customPopoverConfig" prop.`),I=void 0),I&&(x=Kr("TopNavBarItem__customPopoverOption",r),k=x,B.push(v.createElement(q.Page,{id:x,key:x},v.createElement(q.Option,{id:`${x}__option`},I.children)))));let P=a.props["aria-current"]||(u===n?"page":void 0);P&&(g!=="default"&&(R(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${u}" is "${g}" variant.`),P=void 0),f==="disabled"&&(R(!1,`Disabled items can not be set to current/active, but the item with id "${u}" is disabled.`),P=void 0)),t.push({item:a,submenuPages:B,optionData:{id:u,disabled:f==="disabled",href:m,onOptionClick:w=>{b==null||b(w)},children:typeof o=="function"?o(p,{...a.props,status:P==="page"?"active":a.props.status}):p,subPageId:k,"aria-current":P,shouldCloseOnClick:S}})}),t},ei=i=>i.map(t=>t.submenuPages).filter(t=>!!t).flat(),xn=i=>i.map(e=>{const t=e.optionData,o=e.item.props.onHiddenClick;return o&&(t.onOptionClick=o),v.createElement(q.Option,Object.assign({},t,{key:t.id,afterLabelContentVAlign:"center"}),t.children)}),qc=(i,e,t)=>{const n={display:"inline-block",padding:`0 ${i.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`};return{topNavBarActionItems:{label:"topNavBarActionItems",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",flex:"0 0",display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"flex-end",...t.layout==="smallViewport"&&{flex:"1 1",marginInlineStart:i.smallViewportActionItemContainerMargin,maxWidth:i.smallViewportActionItemContainerMaxWidth}},listItem:{label:"topNavBarActionItems__listItem",flex:"0 0"},dropdownMenuOption:{label:"topNavBarActionItems__dropdownMenuOption",...n},dropdownMenuOptionActive:{label:"topNavBarActionItems__dropdownMenuOptionActive",...n,fontWeight:i.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:i.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${i.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${i.smallViewportDropdownMenuActiveOptionIndicatorColor}`}}},Xc=i=>{const e=i.typography,t=i.spacing,n=i.borders;return{...{smallViewportActionItemContainerMargin:t==null?void 0:t.xxLarge,smallViewportActionItemContainerMaxWidth:"50%",smallViewportDropdownMenuActiveOptionFontWeight:e==null?void 0:e.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:n==null?void 0:n.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor"}}},Kc={children:G.oneOf([me]),listLabel:s.string,renderHiddenItemsMenuTriggerLabel:s.oneOfType([s.string,s.func]).isRequired,renderHiddenItemsMenuTriggerTooltip:s.oneOfType([Jn,s.func]),elementRef:s.func},Nn=["children","listLabel","renderHiddenItemsMenuTriggerLabel","renderHiddenItemsMenuTriggerTooltip","elementRef"];var cr,ur,pr,Tt,Be;let Ms=(cr=re(),ur=E(qc,Xc),pr=T(),cr(Tt=ur(Tt=pr(Tt=(Be=class extends y.Component{constructor(e){super(e),this.ref=null,this._hiddenActionItemsMenuId=void 0,this._hiddenActionItemsMenuTriggerId=void 0,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.renderOptionContent=(t,n)=>{const o=this.props.styles,r=n.status;return h("span",{css:r==="active"?o==null?void 0:o.dropdownMenuOptionActive:o==null?void 0:o.dropdownMenuOption},t)},this._hiddenActionItemsMenuId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenu"),this._hiddenActionItemsMenuTriggerId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenuTrigger"),this.state={key:0,visibleActionItemsCount:void 0}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(e){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n,this.makeStylesVariables),this.context.layout==="smallViewport"&&v.Children.count(e.children)!==v.Children.count(this.props.children)&&this.setState({key:this.state.key+1})}get makeStylesVariables(){return{layout:this.context.layout}}get childrenArray(){return v.Children.toArray(this.props.children).map(t=>{if(!(t!=null&&t.props))return null;const n=t.props,o=n.id,r=n.renderAvatar,a=n.renderIcon,l=n.variant;return r?(R(!1,`Items in are not allowed to have avatars, please remove it from item with the id "${o}".`),J(t,{renderAvatar:void 0,variant:"default"})):this.context.layout==="smallViewport"&&l!=="icon"?a?J(t,{variant:l==="forceIconWithLabel"?"default":"icon"}):(N(!1,`Items in are required to have the \`renderIcon\` prop, because only the icons are displayed due to the lack of space. Please add an icon to the item with the id "${o}".`),null):t})}renderHiddenActionItemsMenu(e){const t=this.props,n=t.renderHiddenItemsMenuTriggerLabel,o=t.renderHiddenItemsMenuTriggerTooltip,r=In(e,{renderOptionContent:this.renderOptionContent}),a=ei(r),l=xn(r),d=typeof n=="function"?n(e.length):n,c=typeof o=="function"?o(e.length):o;return h(me,{id:this._hiddenActionItemsMenuTriggerId,renderIcon:jt,variant:"icon",tooltip:c,showSubmenuChevron:!1,renderSubmenu:h(q,{rootPageId:this._hiddenActionItemsMenuId},[h(q.Page,{id:this._hiddenActionItemsMenuId,key:this._hiddenActionItemsMenuId},l),...a])},d)}renderTruncatedActionItemList(){const e=this.props,t=e.listLabel,n=e.styles;return h(Bs,Object.assign({},oe(j(this.props,Nn)),{key:this.state.key,elementRef:this.handleRef,css:n==null?void 0:n.topNavBarActionItems,visibleItemsCount:this.state.visibleActionItemsCount,onUpdate:({visibleItemsCount:o})=>{this.setState({visibleActionItemsCount:o})},renderHiddenItemMenu:o=>this.renderHiddenActionItemsMenu(o),"aria-label":t}),this.childrenArray)}render(){const e=this.props,t=e.listLabel,n=e.styles;return this.childrenArray.length?this.context.layout==="smallViewport"?this.renderTruncatedActionItemList():h("ul",Object.assign({},j(this.props,Nn),{ref:this.handleRef,css:n==null?void 0:n.topNavBarActionItems,"aria-label":t}),this.childrenArray.map(o=>h("li",{css:n==null?void 0:n.listItem,key:o.props.id},o))):null}},Be.displayName="TopNavBarActionItems",Be.componentId="TopNavBar.ActionItems",Be.propTypes=Kc,Be.allowedProps=Nn,Be.defaultProps={},Be.contextType=pe,Be))||Tt)||Tt)||Tt);const Yc=(i,e,t)=>{const n=e.iconBackground,o=t.layout==="desktop";return{topNavBarBrand:{label:"topNavBarBrand",display:"flex",alignItems:"stretch"},container:{label:"topNavBarBrand__container",display:"flex",justifyContent:"flex-start",alignItems:"stretch",border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},name:{label:"topNavBarBrand__name",display:"flex",alignItems:"center",height:i.logoHeight},iconContainer:{label:"topNavBarBrand__iconContainer",display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",padding:i.iconPadding,background:o?n:void 0},icon:{label:"topNavBarBrand__icon",display:"flex",justifyContent:"center",alignItems:"center"},focusOutlineInset:i.focusOutlineInset}},Zc=i=>{const e=i.spacing;return{...{logoHeight:"2.25rem",logoPadding:e.small,iconPadding:e.small,focusOutlineInset:"-0.25rem"}}},Qc={screenReaderLabel:s.string.isRequired,renderIcon:s.node,iconBackground:s.string,href:s.string,onClick:s.func,as:s.elementType,elementRef:s.func},hr=["screenReaderLabel","renderIcon","iconBackground","href","onClick","as","elementRef"];var fr,gr,fn,Ee;let As=(fr=E(Yc,Zc),gr=T(),fr(fn=gr(fn=(Ee=class Ds extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;"renderName"in this.props,"nameBackground"in this.props,(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}get makeStylesVariables(){return{layout:this.context.layout}}render(){const e=this.props,t=e.screenReaderLabel,n=e.renderIcon,o=e.href,r=e.onClick,a=e.styles,l=ye(Ds,this.props);return h("div",{ref:this.handleRef,css:a==null?void 0:a.topNavBarBrand},n&&h(W,Object.assign({},j(this.props,hr),{css:a==null?void 0:a.container,as:l,href:o,onClick:r,position:"relative",focusColor:this.context.inverseColor?"info":"inverse",focusPosition:"inset",borderRadius:"medium",themeOverride:{focusOutlineInset:a==null?void 0:a.focusOutlineInset}}),h(Zn,null,t),n&&this.context.layout!=="smallViewport"&&h("div",{css:a==null?void 0:a.iconContainer,role:"presentation","aria-hidden":"true"},n)))}},Ee.displayName="TopNavBarBrand",Ee.componentId="TopNavBar.Brand",Ee.propTypes=Qc,Ee.allowedProps=hr,Ee.defaultProps={},Ee.contextType=pe,Ee))||fn)||fn);const Ls=i=>{const e=i.colors,t=i.stacking,n=i.typography,o=i.spacing,r=i.borders;return{...{desktopFontSize:n==null?void 0:n.fontSizeMedium,desktopFontFamily:n==null?void 0:n.fontFamily,desktopFontWeight:n==null?void 0:n.fontWeightNormal,desktopBackground:e==null?void 0:e.backgroundBrandSecondary,desktopBackgroundInverse:e==null?void 0:e.backgroundLight,desktopBottomBorder:"none",desktopBottomBorderInverse:`${r==null?void 0:r.widthSmall} ${r==null?void 0:r.style} ${e==null?void 0:e.borderMedium}`,desktopHeight:"4rem",desktopZIndex:(t==null?void 0:t.topmost)+1,desktopInlinePadding:o.small,desktopBrandContainerInlineMargin:`0 ${o.medium}`,desktopMenuItemsContainerInlineMargin:`0 ${o.large}`,desktopActionItemsContainerInlineMargin:`${o.xSmall} 0`,desktopUserContainerInlineMargin:`${o.xSmall} 0`,desktopUserSeparatorGap:o==null?void 0:o.xSmall,desktopUserSeparatorHeight:"1.5rem",desktopUserSeparatorWidth:r==null?void 0:r.widthSmall,desktopUserSeparatorColor:e.borderMedium,desktopUserSeparatorColorInverse:e.borderMedium}}},Ns=i=>{const e=i.colors,t=i.stacking,n=i.typography,o=i.spacing,r=i.borders;return{...{smallViewportFontSize:n==null?void 0:n.fontSizeMedium,smallViewportFontFamily:n==null?void 0:n.fontFamily,smallViewportFontWeight:n==null?void 0:n.fontWeightNormal,smallViewportBackground:e==null?void 0:e.backgroundBrandSecondary,smallViewportBackgroundInverse:e==null?void 0:e.backgroundLight,smallViewportBottomBorder:"none",smallViewportBottomBorderInverse:`${r==null?void 0:r.widthSmall} ${r==null?void 0:r.style} ${e==null?void 0:e.borderMedium}`,smallViewportHeight:"3.5rem",smallViewportInlinePadding:"0.25rem",smallViewportZIndex:(t==null?void 0:t.topmost)+1,smallViewportTrayPosition:"fixed",smallViewportTrayFixTopPosition:void 0,smallViewportTrayZIndex:(t==null?void 0:t.topmost)+1,smallViewportDropdownMenuActiveOptionFontWeight:n==null?void 0:n.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:r==null?void 0:r.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor",smallViewportAlternativeTitleInlineMargin:o==null?void 0:o.xxSmall,smallViewportAlternativeTitleBlockMargin:"0"}}},Jc=i=>({...{...Ls(i),...Ns(i)}}),eu=(i,e)=>{const t=e.border,n=e.shadow,o=e.size,r=e.placement,a={borderWidth:0,borderColor:i.borderColor,borderStyle:i.borderStyle},l=n?{boxShadow:i.boxShadow}:{},d=r==="start"||r==="end"||r==="center"?{label:"tray__content",minHeight:"100vh"}:{},c={top:{insetInlineStart:0,insetInlineEnd:0,top:0},bottom:{insetInlineStart:0,insetInlineEnd:0,bottom:0},start:{top:0,bottom:0,insetInlineStart:0,insetInlineEnd:"auto"},end:{top:0,bottom:0,insetInlineEnd:0,insetInlineStart:"auto"},center:{left:0,right:0,top:0,bottom:0}},u=t?{start:{borderInlineEndWidth:i.borderWidth},end:{borderInlineStartWidth:i.borderWidth},top:{borderBottomWidth:i.borderWidth},bottom:{borderTopWidth:i.borderWidth},center:{}}:{},p={"x-small":i.xSmallWidth,small:i.smallWidth,regular:i.regularWidth,medium:i.mediumWidth,large:i.largeWidth},f=r==="start"||r==="end"?{width:p[o]}:{};return{tray:{label:"tray",backgroundColor:i.background,position:i.position,overflowY:"auto",overflowX:"hidden",boxSizing:"border-box",zIndex:i.zIndex,maxWidth:"100vw",maxHeight:"100vh",...l,...c[r],...t&&a,...t&&u[r],...f},content:{label:"tray__content",...d}}},tu=i=>{const e=i.colors,t=i.borders,n=i.shadows,o=i.breakpoints,r=i.stacking;return{...{background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,borderWidth:t==null?void 0:t.widthSmall,borderStyle:t==null?void 0:t.style,boxShadow:n==null?void 0:n.depth3,xSmallWidth:o==null?void 0:o.xSmall,smallWidth:"20em",regularWidth:o==null?void 0:o.small,mediumWidth:o==null?void 0:o.medium,largeWidth:o==null?void 0:o.large,zIndex:r==null?void 0:r.topmost,position:"fixed"}}},nu={label:s.string.isRequired,children:s.node,size:s.oneOf(["x-small","small","regular","medium","large"]),placement:s.oneOf(["top","bottom","start","end","center"]),open:s.bool,defaultFocusElement:s.oneOfType([s.element,s.func]),contentRef:s.func,shouldContainFocus:s.bool,shouldReturnFocus:s.bool,shouldCloseOnDocumentClick:s.bool,onOpen:s.func,onClose:s.func,onDismiss:s.func,mountNode:s.oneOfType([ne,s.func]),insertAt:s.oneOf(["bottom","top"]),liveRegion:s.oneOfType([ne,s.arrayOf(ne),s.func]),onTransition:s.func,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func,transitionOnMount:s.bool,transitionEnter:s.bool,transitionExit:s.bool,border:s.bool,shadow:s.bool},iu=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","transitionOnMount","transitionEnter","transitionExit","border","shadow"],ou=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onTransition","transitionOnMount","transitionEnter","transitionExit","border","shadow","role"];var mr,vr,br,Mt,st;let ru=(mr=E(eu,tu),vr=ut(),br=T(),mr(Mt=vr(Mt=br(Mt=(st=class Fs extends y.Component{constructor(e){var t;super(e),this.ref=null,this.dialogRef=null,this.state=void 0,this.handleTransitionComplete=n=>{this.setState({transitioning:!1})},this.handlePortalOpen=n=>{n&&(this.DOMNode=n)},this.state={transitioning:!1,open:(t=e.open)!==null&&t!==void 0?t:!1}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(e,t){var n,o;if(this.props.open!==e.open){if(!this.props.open){var r;(r=this.dialogRef)===null||r===void 0||r.close()}this.setState({transitioning:!0,open:this.props.open})}(n=(o=this.props).makeStyles)===null||n===void 0||n.call(o)}get placement(){const e=this.props,t=e.placement;return e.dir===ut.DIRECTION.rtl?Hn(t," "):t}get direction(){switch(this.placement){case"top":return"up";case"bottom":return"down";case"end":return"right";default:return"left"}}get transition(){return`slide-${this.direction}`}get DOMNode(){return this.ref}set DOMNode(e){this.ref=e||null}render(){var e,t;const n=this.props,o=n.label,r=n.children;n.size,n.placement;const a=n.open,l=n.defaultFocusElement,d=n.contentRef,c=n.shouldContainFocus,u=n.shouldReturnFocus,p=n.shouldCloseOnDocumentClick,f=n.onOpen,g=n.onClose,m=n.onDismiss,b=n.mountNode,S=n.insertAt,C=n.liveRegion,I=n.onEnter,x=n.onEntering,k=n.onEntered,B=n.onExit,P=n.onExiting,w=n.onExited,X=n.onTransition,se=n.transitionOnMount,wt=n.transitionEnter,$n=n.transitionExit;n.border,n.shadow;const Rn=n.role,A=H(n,ou),Bn=this.state.open||this.state.transitioning;return h(os,{open:Bn,onOpen:this.handlePortalOpen,insertAt:S,mountNode:b},h(cd,{in:a,type:this.transition,onTransition:X,onEnter:I,onEntering:x,onEntered:L(this.handleTransitionComplete,k,f),onExit:B,onExiting:P,onExited:L(this.handleTransitionComplete,w,g),transitionOnMount:se,transitionEnter:wt,transitionExit:$n},h("span",Object.assign({},j(A,Fs.allowedProps),{css:(e=this.props.styles)===null||e===void 0?void 0:e.tray,ref:d}),h(ue,{ref:on=>this.dialogRef=on,as:"div",label:o,defaultFocusElement:l,open:!0,shouldContainFocus:c,shouldReturnFocus:u,shouldCloseOnDocumentClick:p,shouldCloseOnEscape:!0,liveRegion:C,onDismiss:m,role:Rn},h("div",{css:(t=this.props.styles)===null||t===void 0?void 0:t.content},r)))))}},st.displayName="Tray",st.componentId="Tray",st.allowedProps=iu,st.propTypes=nu,st.defaultProps={defaultFocusElement:null,open:!1,insertAt:"bottom",shouldCloseOnDocumentClick:!1,shouldContainFocus:!0,shouldReturnFocus:!0,size:"small",placement:"start",transitionOnMount:!0,transitionEnter:!0,transitionExit:!0,shadow:!0,border:!1},st))||Mt)||Mt)||Mt);const su=(i,e,t)=>{const n=t.isDropdownMenuVisible,o=t.drilldownId,r=t.trayId,a=t.menuBottomPosition,l=t.inverseColor,d=i.smallViewportTrayFixTopPosition||`${a}px`,c={display:"inline-block",padding:`0 ${i.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`},u={fontSize:i.smallViewportFontSize,fontFamily:i.smallViewportFontFamily,fontWeight:i.smallViewportFontWeight,background:l?i.smallViewportBackgroundInverse:i.smallViewportBackground,borderBlockEnd:l?i.smallViewportBottomBorderInverse:i.smallViewportBottomBorder,height:i.smallViewportHeight,maxWidth:"100%",paddingBlock:0,paddingInline:i.smallViewportInlinePadding,position:"relative",zIndex:i.smallViewportZIndex,display:"flex",justifyContent:"space-between",alignItems:"stretch",overflow:"hidden"};return{topNavBarSmallViewportLayout:{label:"topNavBarSmallViewportLayout"},navbar:{label:"topNavBarSmallViewportLayout__navbar",...u},inPlaceDialogContainer:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainer",...u,alignItems:"center"},inPlaceDialogContainerContent:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerContent",flex:"1 1"},inPlaceDialogContainerButton:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerButton",flex:"0 0"},menuTriggerContainer:{label:"topNavBarSmallViewportLayout__menuTriggerContainer",display:"flex",alignItems:"stretch",justifyContent:"flex-start",flex:"1 1"},menuTrigger:{label:"topNavBarSmallViewportLayout__menuTrigger",display:"flex",alignItems:"center",justifyContent:"flex-start"},alternativeTitleContainer:{label:"topNavBarSmallViewportLayout__alternativeTitleContainer",marginBlock:i.smallViewportAlternativeTitleBlockMargin,marginInline:i.smallViewportAlternativeTitleInlineMargin},dropdownMenuOption:{label:"topNavBarSmallViewportLayout__dropdownMenuOption",...c},dropdownMenuOptionActive:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionActive",...c,fontWeight:i.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:i.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${i.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${i.smallViewportDropdownMenuActiveOptionIndicatorColor}`},dropdownMenuOptionWithAvatar:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionWithAvatar",...c,display:"flex",alignItems:"center"},brandContainer:{label:"topNavBarSmallViewportLayout__brandContainer",display:"flex",alignItems:"stretch"},trayContainer:{label:"topNavBarSmallViewportLayout__trayContainer",width:"100%",position:i.smallViewportTrayPosition,insetBlockStart:d,insetInlineStart:"0px",zIndex:i.smallViewportTrayZIndex,...n&&{height:`calc(100% - ${d})`}},globalStyles:{[`#${r}`]:{height:"100%"},[`#${o}`]:{height:"100%","&::before":{top:"4px",left:"4px",right:"4px",bottom:"4px",zIndex:1}}},navbarHeight:i.smallViewportHeight}},au=i=>{const e={display:"inline-block",padding:`0 ${i.desktopSubmenuActiveOptionIndicatorSpacing}`};return{topNavBarMenuItems:{label:"topNavBarMenuItems",flex:"1 1",display:"flex",flexDirection:"row",alignItems:"stretch",padding:"0 0.125rem"},submenuOption:{label:"topNavBarMenuItems__submenuOption",...e},submenuOptionActive:{label:"topNavBarMenuItems__submenuOptionActive",...e,fontWeight:i.desktopSubmenuActiveOptionFontWeight,paddingBlockEnd:i.desktopSubmenuActiveOptionIndicatorSpacing,borderBottom:`${i.desktopSubmenuActiveOptionIndicatorWidth} solid ${i.desktopSubmenuActiveOptionIndicatorColor}`},itemSpacing:i.desktopItemSpacing}},lu=i=>{const e=i.borders,t=i.typography;return{...{desktopItemSpacing:"1rem",desktopMaxWidth:"100%",desktopSubmenuActiveOptionFontWeight:t==null?void 0:t.fontWeightBold,desktopSubmenuActiveOptionIndicatorSpacing:"0.25rem",desktopSubmenuActiveOptionIndicatorWidth:e==null?void 0:e.widthMedium,desktopSubmenuActiveOptionIndicatorColor:"currentColor"}}},du={children:G.oneOf([me]),currentPageId:s.string,renderHiddenItemsMenuTriggerLabel:s.oneOfType([s.func,s.string]).isRequired,listLabel:s.string,elementRef:s.func},yr=["children","currentPageId","renderHiddenItemsMenuTriggerLabel","listLabel","elementRef"];var wr,_r,Sr,At,Pe,Cr;let zs=(wr=re(),_r=E(au,lu),Sr=T(),wr(At=_r(At=Sr(At=(Pe=class extends y.Component{constructor(e){super(e),this._hiddenMenuItemsMenuTriggerId=void 0,this._hiddenItemsMenuId=void 0,this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)},this.renderOptionContent=(t,n)=>{const o=this.props.styles;return h("span",{css:(n==null?void 0:n.status)==="active"?o==null?void 0:o.submenuOptionActive:o==null?void 0:o.submenuOption},t)},this._hiddenMenuItemsMenuTriggerId=e.deterministicId("TopNavBarMenuItems-hiddenMenuItemsMenuTrigger"),this._hiddenItemsMenuId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this.state={key:0,visibleItemsCount:void 0}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(e){var t,n;(t=(n=this.props).makeStyles)===null||t===void 0||t.call(n),v.Children.count(e.children)!==this.childrenArray.length&&this.setState({key:this.state.key+1})}get childrenArray(){return v.Children.toArray(this.props.children)}renderHiddenItemsMenu(e){const t=this.props,n=t.renderHiddenItemsMenuTriggerLabel,o=t.currentPageId;if(!e.length)return Cr||(Cr=h("span",null));const r=In(e,{renderOptionContent:this.renderOptionContent,currentPageId:o}),a=ei(r),l=xn(r),d=e.find(c=>c.props.status==="active");return h(me,{id:this._hiddenMenuItemsMenuTriggerId,status:d?"active":"default",renderSubmenu:h(q,{rootPageId:this._hiddenItemsMenuId},[h(q.Page,{id:this._hiddenItemsMenuId,key:this._hiddenItemsMenuId},l),...a])},n(e.length))}renderChildren(){const e=this.props.currentPageId;return this.childrenArray.map(t=>{if(!t)return;const n=t.props,o=n.id,r=n.status,a=n.variant,l=n.renderSubmenu,d=n.renderAvatar,c=e===o;return d?(N(!1,`Items in are not allowed to have avatars, but item with id: "${o}" has \`renderAvatar\` prop.`),null):c?a!=="default"?(R(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${o}" is "${a}" variant.`),t):r==="disabled"?(R(!1,`Disabled items can not be set to current/active, but the item with id "${o}" is disabled.`),t):J(t,{status:"active","aria-current":l?void 0:"page"}):t})}render(){const e=this.props,t=e.listLabel,n=e.styles;return!this.childrenArray.length||this.context.layout==="smallViewport"?null:h(Bs,Object.assign({},j(this.props,yr),{key:this.state.key,elementRef:this.handleRef,css:n==null?void 0:n.topNavBarMenuItems,visibleItemsCount:this.state.visibleItemsCount,onUpdate:({visibleItemsCount:o})=>{this.setState({visibleItemsCount:o})},renderHiddenItemMenu:o=>this.renderHiddenItemsMenu(o)},(n==null?void 0:n.itemSpacing)&&{itemSpacing:n.itemSpacing},{"aria-label":t}),this.renderChildren())}},Pe.displayName="TopNavBarMenuItems",Pe.componentId="TopNavBar.MenuItems",Pe.propTypes=du,Pe.allowedProps=yr,Pe.defaultProps={},Pe.contextType=pe,Pe))||At)||At)||At);const cu=()=>({topNavBarUser:{label:"topNavBarUser",flex:"0 0",display:"flex"}}),uu={children:G.oneOf([me]).isRequired,elementRef:s.func},Ir=["children","elementRef"];var xr,kr,gn,Te;let Ws=(xr=E(cu,null),kr=T(),xr(gn=kr(gn=(Te=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}get content(){const e=v.Children.toArray(this.props.children),t=["default","button","avatar"];return y.Children.map(e,n=>{const o=n.props,r=o.id,a=o.variant;return a&&!t.includes(a)?(N(!1,`Item with id "${r}" has "${a}" variant, but only the following variants are allowed in : ${t.join(", ")}.`),null):n})}render(){const e=this.props.styles;return!this.content||this.content.length===0||this.context.layout==="smallViewport"?null:h("div",Object.assign({},j(this.props,Ir),{ref:this.handleRef,css:e==null?void 0:e.topNavBarUser}),this.content)}},Te.displayName="TopNavBarUser",Te.componentId="TopNavBar.User",Te.propTypes=uu,Te.allowedProps=Ir,Te.defaultProps={},Te.contextType=pe,Te))||gn)||gn);const pu={onClick:s.func,elementRef:s.func,children:G.oneOf([Gd])},hu=["children","onClick","elementRef"],fu=(i,e)=>({topNavBarBreadcrumb:{label:"topNavBarBreadcrumb",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flexGrow:1,border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},iconContainer:{label:"topNavBarBreadcrumb__iconContainer",display:"flex",justifyContent:"center",alignItems:"center"},icon:{label:"topNavBarBreadcrumb__icon",display:"flex",justifyContent:"center",alignItems:"center"},breadcrumbContainer:{label:"topNavBarBreadcrumb__breadCrumbContainer",appearance:"none",textDecoration:"none",marginLeft:"0.75rem",flexGrow:1},linkContainer:{label:"topNavBarBreadcrumb__linkContainer",marginLeft:"0.5rem"}});var Or,$r,mn,at,Rr;let Hs=(Or=E(fu,null),$r=T(),Or(mn=$r(mn=(at=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{inverseColor:this.context.inverseColor})}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{inverseColor:this.context.inverseColor})}renderMenu(){var e;const t=this.props.onClick;return h("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},h(Se.Item,{id:"iconItem",variant:"icon",renderIcon:Rr||(Rr=h(gt,null)),onClick:t},"Hamburger menu"))}render(){const e=this.props,t=e.children,n=e.styles;this.context.inverseColor||N(!1,"[TopNavBarBreadcrumb] If the inverseColor prop is not set to true, TopNavBarBreadcrumb fails to render.");const r=v.Children.toArray(t)[0].props.children,a=v.Children.toArray(r)[v.Children.count(r)-2];return this.context.inverseColor&&(this.context.layout==="desktop"?h("div",{ref:this.handleRef,css:n==null?void 0:n.topNavBarBreadcrumb},h("div",{css:n==null?void 0:n.iconContainer},this.renderMenu()),h("div",{css:n==null?void 0:n.breadcrumbContainer},t)):h("div",{ref:this.handleRef,css:n==null?void 0:n.topNavBarBreadcrumb},h("div",{css:n==null?void 0:n.linkContainer},h(ct,{href:a.props.href,isWithinText:!1,renderIcon:Wt},a.props.children))))}},at.displayName="TopNavBarBreadcrumb",at.propTypes=pu,at.allowedProps=hu,at.defaultProps={},at.contextType=pe,at))||mn)||mn);const ti={renderBrand:G.oneOf([As]),renderMenuItems:G.oneOf([zs]),renderActionItems:G.oneOf([Ms]),renderUser:G.oneOf([Ws]),renderBreadcrumb:G.oneOf([Hs]),navLabel:s.string,elementRef:s.func},gu={hideActionsUserSeparator:s.bool},Vs={dropdownMenuToggleButtonLabel:s.string.isRequired,dropdownMenuToggleButtonTooltip:Jn,dropdownMenuLabel:s.string,alternativeTitle:s.node,renderInPlaceDialogConfig:s.shape({open:s.bool.isRequired,onClose:s.func.isRequired,closeButtonLabel:s.string.isRequired,content:s.oneOfType([s.node,s.func]),returnFocusElement:s.func,shouldContainFocus:s.bool,shouldCloseOnDocumentClick:s.bool,shouldCloseOnEscape:s.bool}),trayMountNode:s.oneOfType([ne,s.func]),onDropdownMenuToggle:s.func,onDropdownMenuSelect:s.func},mu={...ti,smallViewportConfig:s.shape(Vs).isRequired},ni=["renderBrand","renderMenuItems","renderActionItems","renderUser","renderBreadcrumb","navLabel","elementRef"],vu=["hideActionsUserSeparator"],bu=["dropdownMenuToggleButtonLabel","dropdownMenuToggleButtonTooltip","dropdownMenuLabel","alternativeTitle","renderInPlaceDialogConfig","trayMountNode","onDropdownMenuToggle","onDropdownMenuSelect"],yu=[...ni,"smallViewportConfig"],wu={...ti,...Vs},Br=[...ni,...bu];var Er,Pr,Tr,Dt,Me,Mr,Ar;let _u=(Er=re(),Pr=E(su,Ns),Tr=T(),Er(Dt=Pr(Dt=Tr(Dt=(Me=class extends y.Component{constructor(e){var t;super(e),this.ref=null,this._trayContainerId=void 0,this._trayId=void 0,this._drilldownId=void 0,this._menuTriggerId=void 0,this._menuId=void 0,this._inPlaceDialogId=void 0,this._inPlaceDialogCloseButtonId=void 0,this._separatorId=void 0,this._raf=[],this.handleRef=n=>{const o=this.props.elementRef;this.ref=n,typeof o=="function"&&o(n)},this.renderOptionContent=(n,o)=>{const r=this.props.styles,a=o.status,l=o.renderAvatar;let d=n,c=a==="active"?r==null?void 0:r.dropdownMenuOptionActive:r==null?void 0:r.dropdownMenuOption;if(l){const u=l.avatarName,p=l.avatarSrc,g=l.avatarAlt||(typeof n=="string"?n:void 0);c=r==null?void 0:r.dropdownMenuOptionWithAvatar,d=h(v.Fragment,null,h(bs,{name:u,src:p,alt:g,size:"small",margin:"0 small 0 0",role:"presentation","aria-hidden":"true"}),n)}return h("span",{css:c},d)},this._trayContainerId=e.deterministicId("TopNavBarSmallViewportLayout-trayContainer"),this._trayId=e.deterministicId("TopNavBarSmallViewportLayout-tray"),this._menuId=e.deterministicId("TopNavBarSmallViewportLayout-menu"),this._menuTriggerId=e.deterministicId("TopNavBarSmallViewportLayout-menuTrigger"),this._drilldownId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this._inPlaceDialogId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialog"),this._inPlaceDialogCloseButtonId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialogCloseButton"),this._separatorId=e.deterministicId("TopNavBarSmallViewportLayout-separator"),this.state={isDropdownMenuOpen:!1,isDropdownMenuVisible:!1,menuBottomPosition:Y(((t=e.styles)===null||t===void 0?void 0:t.navbarHeight)||0)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables),this.updateMenuBottomPosition()}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this.state.isDropdownMenuOpen&&this.toggleDropdownMenu()}get makeStylesVariables(){return{isDropdownMenuVisible:this.state.isDropdownMenuVisible,drilldownId:this._drilldownId,trayId:this._trayId,menuBottomPosition:this.state.menuBottomPosition,inverseColor:this.context.inverseColor}}hasBrandBlock(e){return!!e&&!!e.props.renderIcon}hasMenuItemsBlock(e){return!!e&&v.Children.count(e.props.children)>0}hasActionItemsBlock(e){return!!e&&v.Children.count(e.props.children)>0}hasUserBlock(e){return!!e&&v.Children.count(e.props.children)>0}get hasSubmenu(){return(this.dropdownMenuContent||[]).length>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&v.Children.count(e.props.children)>0}get isInPlaceDialogOpen(){var e;return(e=this.props.renderInPlaceDialogConfig)===null||e===void 0?void 0:e.open}get mappedUserOptions(){const e=this.props.renderUser;if(!this.hasUserBlock(e))return[];const t=v.Children.toArray(e.props.children);return In(t,{renderOptionContent:this.renderOptionContent})}get mappedMenuItemsOptions(){const e=this.props.renderMenuItems;if(!this.hasMenuItemsBlock(e))return[];const t=v.Children.toArray(e.props.children);return In(t,{renderOptionContent:this.renderOptionContent,currentPageId:e.props.currentPageId})}get extractDrilldownSubpages(){return ei([...this.mappedUserOptions,...this.mappedMenuItemsOptions])}updateMenuBottomPosition(){const e=V(this.ref);this.setState({menuBottomPosition:e.top+e.height})}toggleDropdownMenu(){const e=this.props.onDropdownMenuToggle,t=this.state.isDropdownMenuOpen;t||this.updateMenuBottomPosition(),typeof e=="function"&&e(!t),this.setState({isDropdownMenuOpen:!t})}renderMenuTrigger(){const e=this.props,t=e.dropdownMenuToggleButtonLabel,n=e.dropdownMenuToggleButtonTooltip,o=e.renderBrand,r=e.alternativeTitle,a=e.styles,l=this.state.isDropdownMenuOpen;let d;const c=[a==null?void 0:a.menuTrigger,...r?[a==null?void 0:a.alternativeTitleContainer]:[]];if(!this.hasSubmenu)d=null,r&&R(!1,"There are no menu items or user menu to display in the dropdown menu! The menu trigger and the alternative title will not display.");else{const u={id:this._menuTriggerId,onClick:()=>{this.toggleDropdownMenu()},tooltip:n,themeOverride:{itemSpacing:"0.375rem"},"aria-haspopup":"menu","aria-expanded":l},p={size:"x-small",style:{marginInlineEnd:"0.5em"}};d=h("div",{css:c},r?h(me,Object.assign({},u,{"aria-label":t}),l?h(bt,p):h(mt,p),r):h(me,Object.assign({},u,{variant:"icon",renderIcon:l?Mr||(Mr=h(ht,null)):Ar||(Ar=h(gt,null))}),t))}return h("div",{css:a==null?void 0:a.menuTriggerContainer},d,this.hasBrandBlock(o)&&!r&&h("div",{css:a==null?void 0:a.brandContainer},o))}get dropdownMenuContent(){const e=this.props,t=e.renderUser,n=e.renderMenuItems,o=this.hasMenuItemsBlock(n),r=this.hasUserBlock(t);let a=[];return r&&(a=xn(this.mappedUserOptions),o&&a.push(h(q.Separator,{id:this._separatorId,key:this._separatorId}))),o&&(a=[...a,...xn(this.mappedMenuItemsOptions)]),a.length?a:void 0}renderDropdownMenu(){const e=this.props,t=e.dropdownMenuLabel,n=e.onDropdownMenuSelect;return h(q,{id:this._drilldownId,rootPageId:this._menuId,label:t,height:"100%",width:"100%",onSelect:(o,r)=>{typeof n=="function"&&n(o,r),(r.selectedOption.props.shouldCloseOnClick==="auto"&&r.selectedOption.props.href||r.selectedOption.props.shouldCloseOnClick==="always")&&this.toggleDropdownMenu()}},[h(q.Page,{id:this._menuId,key:this._menuId},this.dropdownMenuContent),...this.extractDrilldownSubpages])}renderDropdownMenuTray(){const e=this.props.trayMountNode;return this.hasSubmenu?h(ru,{id:this._trayId,label:"",role:"none",open:this.state.isDropdownMenuOpen,transitionExit:!1,onDismiss:()=>{this.toggleDropdownMenu()},onKeyUp:t=>{t.key==="Escape"&&this.toggleDropdownMenu()},onEnter:()=>{this.setState({isDropdownMenuVisible:!0})},onExited:()=>{this.setState({isDropdownMenuVisible:!1})},shouldCloseOnDocumentClick:!0,placement:"top",shadow:!1,mountNode:e||document.getElementById(this._trayContainerId),defaultFocusElement:()=>document.getElementById(this._drilldownId),themeOverride:{position:"absolute"}},this.renderDropdownMenu()):null}renderInPlaceDialog(){const e=this.props,t=e.renderInPlaceDialogConfig,n=e.styles;if(!t)return null;const o=t.content,r=t.open,a=t.onClose,l=t.closeButtonLabel,d=t.shouldContainFocus,c=t.shouldCloseOnEscape,u=t.shouldCloseOnDocumentClick,p=t.returnFocusElement,f=()=>{typeof a=="function"&&a(),p&&this._raf.push(Le(()=>{var m;(m=p())===null||m===void 0||m.focus()}))};return h(ue,{display:"block",open:r,shouldContainFocus:d,shouldCloseOnEscape:c,shouldCloseOnDocumentClick:u,onDismiss:f},h("div",{id:this._inPlaceDialogId,css:n==null?void 0:n.inPlaceDialogContainer},h("div",{css:n==null?void 0:n.inPlaceDialogContainerContent},z(o,{closeInPlaceDialog:f})),h("div",{css:n==null?void 0:n.inPlaceDialogContainerButton},h(me,{id:this._inPlaceDialogCloseButtonId,renderIcon:ht,variant:"icon",onClick:f},l))))}render(){const e=this.props,t=e.trayMountNode,n=e.navLabel,o=e.renderActionItems,r=e.renderBreadcrumb,a=e.styles;return h("nav",Object.assign({},j(this.props,Br),{ref:this.handleRef,"aria-label":n}),h(Xr,{styles:a==null?void 0:a.globalStyles}),this.hasBreadcrumbBlock&&h("div",{css:a==null?void 0:a.navbar},r),!this.hasBreadcrumbBlock&&!this.isInPlaceDialogOpen&&h("div",{css:a==null?void 0:a.navbar},this.renderMenuTrigger(),this.hasActionItemsBlock(o)&&o),!this.hasBreadcrumbBlock&&this.renderInPlaceDialog(),!this.hasBreadcrumbBlock&&!t&&h("div",{css:a==null?void 0:a.trayContainer,id:this._trayContainerId}),!this.hasBreadcrumbBlock&&this.renderDropdownMenuTray())}},Me.displayName="TopNavBarSmallViewportLayout",Me.componentId="TopNavBar.SmallViewportLayout",Me.propTypes=wu,Me.allowedProps=Br,Me.defaultProps={},Me.contextType=pe,Me))||Dt)||Dt)||Dt);const Su=(i,e,t)=>{const n=t.inverseColor,o=t.hasBrandBlock,r=t.hasActionItemsBlock,a=t.hasUserBlock,l=r&&a;return{topNavBarDesktopLayout:{label:"topNavBarDesktopLayout",flowMode:"logical",fontSize:i.desktopFontSize,fontFamily:i.desktopFontFamily,fontWeight:i.desktopFontWeight,background:n?i.desktopBackgroundInverse:i.desktopBackground,borderBlockEnd:n?i.desktopBottomBorderInverse:i.desktopBottomBorder,display:"flex",alignItems:"stretch",justifyContent:"space-between",height:i.desktopHeight,zIndex:i.desktopZIndex,maxWidth:"100%",overflow:"hidden",paddingInline:i.desktopInlinePadding,paddingBlock:0,...o&&{paddingInlineStart:0}},brandContainer:{label:"topNavBarDesktopLayout__brandContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:i.desktopBrandContainerInlineMargin},menuItemsContainer:{label:"topNavBarDesktopLayout__menuItemsContainer",display:"flex",flexGrow:1,flexShrink:1,marginBlock:0,marginInline:i.desktopMenuItemsContainerInlineMargin,overflow:"hidden"},actionItemsContainer:{label:"topNavBarDesktopLayout__actionItemsContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:i.desktopActionItemsContainerInlineMargin},spacer:{flexGrow:"1"},userContainer:{label:"topNavBarDesktopLayout__userContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:i.desktopUserContainerInlineMargin,...l&&{position:"relative",paddingInlineStart:i.desktopUserSeparatorGap,"&::before":{content:'""',position:"absolute",insetInlineStart:0,insetBlockStart:"50%",marginBlockStart:`calc(-${i.desktopUserSeparatorHeight} / 2)`,height:i.desktopUserSeparatorHeight,width:i.desktopUserSeparatorWidth,background:n?i.desktopUserSeparatorColorInverse:i.desktopUserSeparatorColor,display:"block"}}},breadcrumbContainer:{label:"topNavBarDesktopLayout__breadcrumbContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,alignItems:"center"}}},Cu={...ti,...gu},Dr=[...ni,...vu];var Lr,Nr,vn,Ae;let Iu=(Lr=E(Su,Ls),Nr=T(),Lr(vn=Nr(vn=(Ae=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}get makeStylesVariables(){return{inverseColor:this.context.inverseColor,hasBrandBlock:this.hasBrandBlock,hasActionItemsBlock:this.hasActionItemsBlock,hasUserBlock:this.hasUserBlock}}get hasBrandBlock(){const e=this.props.renderBrand;return!!e&&!!e.props.renderIcon}get hasActionItemsBlock(){const e=this.props.renderActionItems;return!!e&&v.Children.count(e.props.children)>0}get hasUserBlock(){const e=this.props.renderUser;return!!e&&v.Children.count(e.props.children)>0}get hasMenuItemsBlock(){const e=this.props.renderMenuItems;return!!e&&v.Children.count(e.props.children)>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&v.Children.count(e.props.children)>0}render(){const e=this.props,t=e.renderBrand,n=e.renderMenuItems,o=e.renderActionItems,r=e.renderUser,a=e.renderBreadcrumb,l=e.navLabel,d=e.styles,c=!(this.hasBrandBlock||this.hasMenuItemsBlock)&&this.hasBreadcrumbBlock;return h("nav",Object.assign({},j(this.props,Dr),{ref:this.handleRef,css:d==null?void 0:d.topNavBarDesktopLayout,"aria-label":l}),this.hasBrandBlock&&h("div",{css:d==null?void 0:d.brandContainer},t),this.hasMenuItemsBlock&&h("div",{css:d==null?void 0:d.menuItemsContainer},n),c&&a,h("span",{css:d==null?void 0:d.spacer}),this.hasActionItemsBlock&&h("div",{css:d==null?void 0:d.actionItemsContainer},o),this.hasUserBlock&&h("div",{css:d==null?void 0:d.userContainer},r))}},Ae.displayName="TopNavBarDesktopLayout",Ae.componentId="TopNavBar.DesktopLayout",Ae.propTypes=Cu,Ae.allowedProps=Dr,Ae.defaultProps={},Ae.contextType=pe,Ae))||vn)||vn);const xu=["smallViewportConfig","styles","makeStyles"];var Fr,zr,bn,De;let Wr=(Fr=E(null,Jc),zr=T(),Fr(bn=zr(bn=(De=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}componentDidMount(){"desktopConfig"in this.props}get sortedThemeOverride(){const e=this.props.themeOverride;if(!e||typeof e=="function")return{desktopThemeOverride:e,smallViewportThemeOverride:e};const t={},n={};for(const o in e)if(o.startsWith("smallViewport")){const r=o;n[r]=e[r]}else if(o.startsWith("desktop")){const r=o;t[r]=e[r]}return{desktopThemeOverride:t,smallViewportThemeOverride:n}}render(){const e=this.props,t=e.smallViewportConfig;e.styles,e.makeStyles;const n=H(e,xu);return this.context.layout==="smallViewport"?h(_u,Object.assign({},t,n,{themeOverride:this.sortedThemeOverride.smallViewportThemeOverride,elementRef:this.handleRef})):h(Iu,Object.assign({},n,{themeOverride:this.sortedThemeOverride.desktopThemeOverride,elementRef:this.handleRef}))}},De.displayName="TopNavBarLayout",De.componentId="TopNavBar.Layout",De.propTypes=mu,De.allowedProps=yu,De.defaultProps={smallViewportConfig:{}},De.contextType=pe,De))||bn)||bn);const ku={children:s.func,breakpoint:s.oneOfType([s.string,s.number]),mediaQueryMatch:s.oneOf(["element","media"]),inverseColor:s.oneOfType([s.bool,s.func]),elementRef:s.func},Ou=["children","breakpoint","mediaQueryMatch","inverseColor","elementRef"];var Hr,Vr,K;let Se=(Hr=T(),Hr(Vr=(K=class extends y.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const n=this.props.elementRef;this.ref=t,typeof n=="function"&&n(t)}}get breakpoint(){return Y(this.props.breakpoint)}render(){const e=this.props,t=e.children,n=e.mediaQueryMatch,o=e.inverseColor;return v.createElement(nn,{elementRef:this.handleRef,match:n,query:{smallViewport:{maxWidth:this.breakpoint-1},desktop:{minWidth:this.breakpoint}},render:(r,a)=>{const l=a?a[0]:"smallViewport",d=typeof o=="function"?o(l):!!o,c=t({currentLayout:l,inverseColor:d});return U(c,[Wr])||N(!1,"The `children` function prop of TopNavBar has to return a child of type , but it returned:",c),v.createElement(pe.Provider,{value:{layout:l,inverseColor:d}},c)}})}},K.displayName="TopNavBar",K.componentId="TopNavBar",K.ActionItems=Ms,K.Brand=As,K.Item=me,K.Layout=Wr,K.MenuItems=zs,K.User=Ws,K.Breadcrumb=Hs,K.contextType=pe,K.propTypes=ku,K.allowedProps=Ou,K.defaultProps={breakpoint:1024,mediaQueryMatch:"media",inverseColor:!1},K))||Vr);var js={exports:{}},Us={};/** + * @license React + * react-compiler-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $u=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Us.c=function(i){return $u.H.useMemoCache(i)};js.exports=Us;var Gs=js.exports;const Ru=["EN","ES_LA","PT_BR","DE"],Bu=[{lang:"English",local:"English",code:"EN"},{lang:"Spanish",local:"Español",code:"ES_LA"},{lang:"Portuguese",local:"Português",code:"PT_BR"},{lang:"German",local:"Deutsch",code:"DE"}];function op(i="EN"){return Ru.find(e=>e.includes(i.toUpperCase()))||"EN"}function qs(i,e="EN"){return Object.fromEntries(Object.entries(i).map(([t,n])=>[t,n[e]||n.EN]))}const Eu={made_with:{EN:"Made with",ES_LA:"Hecho con",PT_BR:"Feito com",DE:"Mit"},love:{EN:"love",ES_LA:"amor",PT_BR:"amor",DE:"liebe"},by:{EN:"by",ES_LA:"por",PT_BR:"por",DE:"gemacht von"}};function rp(i){const e=Gs.c(9),{language:t}=i,n=t;let o;e[0]!==n?(o=qs(Eu,n),e[0]=n,e[1]=o):o=e[1];const r=o;let a;e[2]!==r.love?(a=O.jsx(Vt,{color:"primary-inverse",title:r.love}),e[2]=r.love,e[3]=a):a=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=O.jsx(ct,{color:"link-inverse",href:"https://www.instructure.com",children:"Instructure"}),e[4]=l):l=e[4];let d;return e[5]!==r.made_with||e[6]!==r.by||e[7]!==a?(d=O.jsx(W,{id:"footer",as:"div",textAlign:"center",padding:"small",position:"absolute",insetBlockEnd:"0",margin:"0 auto",width:"100%",borderWidth:"small none none",children:O.jsxs(lt,{transform:"uppercase",letterSpacing:"expanded",color:"primary-inverse",size:"small",children:[r.made_with," ",a," ",r.by," ",l]})}),e[5]=r.made_with,e[6]=r.by,e[7]=a,e[8]=d):d=e[8],d}const jr=(i,e)=>{const t=document.querySelector("body");for(const n of e)n.removeAttribute("aria-current"),n.classList.remove("active");if(i!==null&&document.location.hash!=="#/"&&(i.setAttribute("aria-current","page"),i.classList.add("active")),t==null||t.classList.remove(...ai.map(n=>n.toLowerCase())),i!=null&&i.id.length){t==null||t.classList.add(i.id);const n=ai.find(o=>o.toLowerCase()===i.id);document.title=`${n} Compliance Package`}else t==null||t.classList.add("instructure"),document.title="Instructure Compliance Packages"};window.addEventListener("load",()=>{const i=document.location.href.split("#")[1],e=document.querySelectorAll("nav a");if(i!==void 0&&i!=="/"&&i!==null){const t=document.getElementById(i.split("/")[1]);t instanceof HTMLElement&&jr(t,e)}for(const t of e)t.onclick=()=>{jr(t,e)}});const Pu={language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},help:{EN:"Help",ES_LA:"Ayuda",PT_BR:"Ajuda",DE:"Hilfe"},toggle_menu:{EN:"Toggle menu",ES_LA:"Alternar menú",PT_BR:"Alternar menu",DE:"Menü umschalten"},main_menu:{EN:"Main menu",ES_LA:"Menú principal",PT_BR:"Menu principal",DE:"Hauptmenü"},page_navigation:{EN:"Page navigation",ES_LA:"Navegación de la página",PT_BR:"Navegação da página",DE:"Seitenavigation"},more:{EN:"More",ES_LA:"Más",PT_BR:"Mais",DE:"Mehr"},actions:{EN:"Actions",ES_LA:"Acciones",PT_BR:"Ações",DE:"Aktionen"},more_actions:{EN:"More actions",ES_LA:"Más acciones",PT_BR:"Mais ações",DE:"Mehr Aktionen"},contact_info:{EN:"Contact Information",ES_LA:"Información de Contacto",PT_BR:"Informações de Contato",DE:"Kontaktinformationen"},info_overview:{EN:"This site and its contents are maintained by Instructure, inc.",ES_LA:"Este sitio y su contenido son mantenidos por Instructure, inc.",PT_BR:"Este site e seu conteúdo são mantidos pela Instructure, inc.",DE:"Diese Website und ihre Inhalte werden von Instructure, inc. gepflegt."},current_customers:{EN:"Current customers",ES_LA:"Clientes actuales",PT_BR:"Clientes atuais",DE:"Aktuelle kunden"},contact_csm:{EN:"Reach out to your CSM.",ES_LA:"Comuníquese con su CSM.",PT_BR:"Entre em contato com seu CSM.",DE:"Kontaktieren Sie Ihren CSM."},prospects:{EN:"Prospective customers",ES_LA:"Clientes potenciales",PT_BR:"Clientes em potencial",DE:"Potenzielle Kunden"},contact_sales:{EN:"Reach out to your sales contact.",ES_LA:"Comuníquese con su contacto de ventas.",PT_BR:"Entre em contato com seu contato de vendas.",DE:"Kontaktieren Sie Ihren Vertriebskontakt."},contact_general:{EN:"For general inquiries email",ES_LA:"Para consultas generales envíe un correo electrónico a",PT_BR:"Para perguntas gerais, envie um e-mail para",DE:"Für allgemeine Anfragen senden Sie eine E-Mail an"},redirects:{EN:"Redirects",ES_LA:"Redirecciones",PT_BR:"Redirecionamentos",DE:"Weiterleitungen"},releases:{EN:"Releases",ES_LA:"Lanzamientos",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},contact:{EN:"Contact",ES_LA:"Contacto",PT_BR:"Contato",DE:"Kontakt"}};function sp(i){const e=Gs.c(23),{language:t}=i,n=t;let o;e[0]!==n?(o=qs(Pu,n),e[0]=n,e[1]=o):o=e[1];const r=o;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[...ta],a.shift(),e[2]=a):a=e[2];let l;return e[3]!==r.toggle_menu||e[4]!==r.main_menu||e[5]!==r.page_navigation||e[6]!==r.more||e[7]!==r.actions||e[8]!==r.more_actions||e[9]!==r.language||e[10]!==r.help||e[11]!==r.contact_info||e[12]!==r.info_overview||e[13]!==r.current_customers||e[14]!==r.contact_csm||e[15]!==r.prospects||e[16]!==r.contact_sales||e[17]!==r.contact_general||e[18]!==r.redirects||e[19]!==r.releases||e[20]!==r.contact||e[21]!==n?(l=O.jsx(W,{id:"nav",as:"div",tabIndex:0,children:O.jsx(Se,{inverseColor:!0,children:()=>O.jsx(Se.Layout,{navLabel:"main",smallViewportConfig:{dropdownMenuToggleButtonLabel:r.toggle_menu,dropdownMenuLabel:r.main_menu},themeOverride:{desktopBackgroundInverse:"#FFF",smallViewportBackgroundInverse:"#FFF"},renderBrand:O.jsx(Se.Brand,{screenReaderLabel:"Instructure",renderIcon:O.jsx(Xt,{size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem"}),iconBackground:"#287A9F",href:`#/${n==="EN"?"":n.toLowerCase().split("_")[0]}`}),renderMenuItems:O.jsx(Se.MenuItems,{listLabel:r.page_navigation,currentPageId:"",renderHiddenItemsMenuTriggerLabel:d=>`${d} ${r.more}`,children:a.map(d=>O.jsx(Se.Item,{id:d.title,href:`#${d.route}${n==="EN"?"":`/${n.toLowerCase().split("_")[0]}`}`,themeOverride:{activeIndicatorColor:d.color},children:d.brandName},d.title))}),renderActionItems:O.jsxs(Se.ActionItems,{listLabel:r.actions,renderHiddenItemsMenuTriggerLabel:d=>`${d} ${r.more_actions}`,children:[O.jsx(Se.Item,{id:"langSwitcher",showSubmenuChevron:!0,tooltip:r.language,renderIcon:O.jsx(Ht,{}),renderSubmenu:O.jsx(q,{id:"language",rootPageId:"language",children:O.jsx(q.Page,{id:"language",children:Bu.map(d=>O.jsx(q.Option,{id:d.lang,disabled:d.code===n,children:d.code===n?d.local:O.jsx(na,{className:"lang",to:`./${d.code!=="EN"?d.code.toLowerCase().split("_")[0]:""}`,children:d.local})},d.code))})}),children:r.language}),O.jsx(Se.Item,{id:"info",showSubmenuChevron:!1,tooltip:r.help,renderIcon:O.jsx(Ut,{}),customPopoverConfig:{on:"click",placement:"bottom end",shouldContainFocus:!0,children:O.jsxs(W,{id:"help",as:"div",padding:"medium",width:"25rem",role:"dialog",tabIndex:0,"aria-label":r.contact_info,position:"relative",borderRadius:"small",children:[O.jsx(_d,{level:"h3",children:r.contact_info}),O.jsx(lt,{children:r.info_overview}),O.jsxs(W,{as:"div",margin:"medium 0 0",children:[O.jsx(lt,{weight:"bold",children:r.current_customers}),O.jsx("br",{}),O.jsx(lt,{children:r.contact_csm})]}),O.jsxs(W,{as:"div",margin:"medium 0 0",children:[O.jsx(lt,{weight:"bold",children:r.prospects}),O.jsx("br",{}),O.jsx(lt,{children:r.contact_sales}),O.jsx("br",{}),O.jsxs(lt,{children:[r.contact_general," "]})]}),O.jsx(W,{as:"hr",shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary"}),O.jsxs(Kt,{delimiter:"pipe",size:"small",children:[O.jsx(Kt.Item,{children:O.jsx(ct,{href:`#/links${n!=="EN"?`/${n.toLowerCase().split("_")[0]}`:""}`,children:r.redirects})}),O.jsx(Kt.Item,{children:O.jsx(ct,{href:`#/releases${n!=="EN"?`/${n.toLowerCase().split("_")[0]}`:""}`,children:r.releases})}),O.jsx(Kt.Item,{children:O.jsx(ct,{href:`#/mdui${n!=="EN"?`/${n.toLowerCase().split("_")[0]}`:""}`,children:"MDUI"})}),O.jsx(Kt.Item,{children:O.jsx(ct,{href:{EN:"https://www.instructure.com/contact-us",ES_LA:"https://www.instructure.com/es/contact-us",PT_BR:"https://www.instructure.com/pt-br/contato",DE:"https://www.instructure.com/de/contact-us"}[n],children:r.contact})})]})]})},children:r.help})]})})})}),e[3]=r.toggle_menu,e[4]=r.main_menu,e[5]=r.page_navigation,e[6]=r.more,e[7]=r.actions,e[8]=r.more_actions,e[9]=r.language,e[10]=r.help,e[11]=r.contact_info,e[12]=r.info_overview,e[13]=r.current_customers,e[14]=r.contact_csm,e[15]=r.prospects,e[16]=r.contact_sales,e[17]=r.contact_general,e[18]=r.redirects,e[19]=r.releases,e[20]=r.contact,e[21]=n,e[22]=l):l=e[22],l}export{bs as A,Rl as B,G as C,vt as D,mt as E,_d as H,qt as I,ct as L,Je as O,te as P,sp as R,$ as S,lt as T,op as a,rp as b,Gs as c,ba as d,Bu as e,Jl as f,qs as g,Ru as h,Jt as i,Jr as j,Zn as k,ge as l,U as m,z as n,cd as o,L as p,xl as q,Le as r,J as s,T as t,is as u,fe as v,re as w,V as x,cc as y,Qn as z}; diff --git a/assets/error-pmzUJ_SX.js b/assets/error-pmzUJ_SX.js new file mode 100644 index 00000000..12a4deb2 --- /dev/null +++ b/assets/error-pmzUJ_SX.js @@ -0,0 +1 @@ +import{a as _,z as w,A as R,j as s,V as j}from"./index-DT1C1ZDw.js";import{c as f,a as k,g as y,L as N,T as E,R as b,b as B}from"./RenderTopNavBar-BKjAQtrP.js";import{B as T}from"./index-BIsQGgQp.js";const A={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"},unknown_error:{EN:"An unknown error occurred.",ES_LA:"Ocurrió un error desconocido.",PT_BR:"Ocorreu um erro desconhecido.",DE:"Ein unbekannter Fehler ist aufgetreten."}};function x(){const e=f.c(24),a=_().language;let g,r;e[0]!==a?(r=k(a),g=y(A,r),e[0]=a,e[1]=g,e[2]=r):(g=e[1],r=e[2]);const t=g,i=w();let n;R(i)?n=`${i.status} ${i.statusText}`:i instanceof Error?n=i.message:typeof i=="string"?n=i:(console.error(i),n=t.unknown_error);let o;e[3]!==r?(o=s.jsx(b,{language:r}),e[3]=r,e[4]=o):o=e[4];let l;e[5]!==n?(l=s.jsx(E,{as:"p",children:s.jsx("i",{children:n})}),e[5]=n,e[6]=l):l=e[6];let d;e[7]!==t.class_dismissed?(d=s.jsx(N,{href:"./#/",children:t.class_dismissed}),e[7]=t.class_dismissed,e[8]=d):d=e[8];let c;e[9]!==t.uhm||e[10]!==d?(c=s.jsxs(E,{as:"p",children:[t.uhm," ",d,"."]}),e[9]=t.uhm,e[10]=d,e[11]=c):c=e[11];let u;e[12]!==l||e[13]!==c?(u=s.jsxs(s.Fragment,{children:[l,c]}),e[12]=l,e[13]=c,e[14]=u):u=e[14];let m;e[15]!==t.awkward||e[16]!==u?(m=s.jsx(j,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:s.jsx(T,{size:"medium",heading:t.awkward,headingAs:"h1",message:u})}),e[15]=t.awkward,e[16]=u,e[17]=m):m=e[17];let h;e[18]!==r?(h=s.jsx(B,{language:r}),e[18]=r,e[19]=h):h=e[19];let p;return e[20]!==o||e[21]!==m||e[22]!==h?(p=s.jsxs(s.Fragment,{children:[o,m,h]}),e[20]=o,e[21]=m,e[22]=h,e[23]=p):p=e[23],p}x.displayName="Route.Error";function L(){const e=f.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(x,{}),e[0]=a):a=e[0],a}L.displayName="Error.ErrorPage";export{x as Component,L as ErrorBoundary}; diff --git a/assets/favicon-DheGqUGe.ico b/assets/favicon-DheGqUGe.ico deleted file mode 100644 index 2664ce4d54d7364288845ad960554c14948863e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmeI3dvH|M9mj775mi!X&pPQ6fIStRf=>V4Az#H zRS-dH2L_9PR2j5LnYNmNB50xFXhm!bL7^xi5P4;j?B@3K-OXKYZuai(&29pJurr^W zd(Z3lJ?Gwg&bhyHV;C7mrZIG=L6~c7$Ty4|4a3OItvk;#j6=lb5Gs92OT&1a4E@PN z5#wG^eE63a37Ycnn%M(0;TCuqs=Zob!!P1g%oB zmF}|W=?$~sBd7(tZs+ky(pSL^keO~RUh2bsCzt~JAqY;b@y?Hue*yG|3@>(5&5OOZ za5wA#>mHA%)h$ie>fi7v^iEY*qVm{i4PS>p!3A*BU zpy$x5zGU<3TJD7JLOZWIo%yLlW8n~34rP$6j#TqiVrwgmgVs)6iOwmbu`nMVha-@x zp2n8fwO$Wjf~ykgRyz55!b~^-iN?al>hfAn*M0>Ig_vV5@tt8Z>;s-A$Rd5-qQR=AMM(5qYffejUe6Io>B~vwc3uw)#2QP;G^=ps_fe^KByCA?&4X zKBlgAkdF0EBHh+{Xg2oJz8<1ZtvBz7cOczk>@n(G2pUJ4bUjM_Ue^1G`n;U_eh1C^ zKA=7V^_AA}TFWQW=}bRMnHS+JaLL}su&p(o`fe5I-O8!cd9FEfJB)`m$&MvWoewRo zU=(bCGvL&%v2Zus19%%Q&mY>_z&GH}puX0a@*X@0T`y174OO8v2fhyvgCCl7Olhd# zO3alWxY7g89?01n$`a1_%l#b9nQ#-Vfj_`4fVVjHUt!;}7H}PmhYqRNSic5z=EDN` zADDG~O1K0Hq0wU_di%gH;XhCb+d=I}*;kFOE-(!aKrL9>tx$0X;pfn;eyii3p|1-} zg?AwYrj4^4zX+qi^V$e4*TO{jJJf)s*DX|@-EcRwji($v+3-Es1=V2J?L0n7`YN~q zV){+&wy@m_M!{w{4{mzh;#Fn~d=={T8}{44IM@akz^OIf`BCyOg8mTon^@Yh)dGgV zawr2geaXg`Q^(5e{h=ZKipsMJ{bgUq?nXER@pQ&ZtEH@-kw-z#O!S$a&ObtC zr@z#gJ=a#5zNacp|NIMPzkAM@1;fiD8dGb>d30}q+acz=1G@Xb94Jk?4bn}UI+g^@ z9_!J)tkTSV0)7imM)1!&Z|2?gxmhseq#3>z-r7-x-q+zyxYpk9v5wKA=V36cgp&~W zT6EYIG`qc2ZT5L4a8b9k+fh3>_s^ys->NVRuB&TD{O2Kv-hFT%c%IkLt?@`>iN>P~ zaIqb_$M2{{69gAtlblNeRb`(UP?~l>^800~8jPat^EpN`g zP*?hVdiM?02YpK`YoqtLQ=6A_wPPXA_~f%?1%pp6FZ7iSL3e{O-c6I&_`#FTWcU|W z7I42ThT}=!H|}jZ$20y??$d!HNNSJ8tL9kw(cKbmhIMcTl79vwd8;Y21MY;B*J`me zCKHG4)-WFa3RRG(9kt~70H#5gWNb7?9<+3T$*>h+hDCkk)52U2Q~HA1H=W zP+zMZ6|e?IK*Duoy0kR59%+OdVKcl1y2oSA_l>n-l{3v?k!c!+X;x%M!qUu0SWF!8 zwT3ZQVZbna3QG+mOJOnJ6%mq52Ezy{^chBlLf(!`6w=eB3OT2EINi!`m52a zpQpafFdFK;f2(hZ%Yb}n?4FU+p4<6pY^;V65cQF9tbK)p;8rf(@tc>V03wxvoJ!cnq52TM27FQsb2CTuqw3br=lG;RM*VH|AK+&n75> zq}RdZZ3(x+I?y=l)plC;1F?HGjDcjo?bG8;=s$piWD zM?=zMhm_+hXbZ!^^D~I8&hQXue?h*bQy`z&^$>TBhrKNL8pxk`3SNV;aCM>{rS5Cs zJK(lIAm5{WkiDFBQGZLg3D!ad*nPM1Pp^lO(4ZfwPyVzbco`D;_e127FZW07-mlFW zW*o_&PVG@W1)qW4uJgEz^c7IgmqT55z)`s9$BTCy@vBzhE8Cto=Jb<=xn+kv`mv9p zVG4xjf9$r0dtooAeQ|Yk*cmjtZ^AFSJYf3g;P;$>-*ZsX{#*6Y({Mf18?&(61AYPj zZJ>lW;;wD~nH|LZJtjH@sU2gLMS>N@D2(7kapMAu%<`v|)kFaVZ9c+W(8 z23@w{m;8O5-B^A}=~#l_@n`rQZ^Q3c7}a6<)^EcuZ>-7vu-y{B;z;^>Q_ttC&gbIu zPs*<-9gEO0^=x&)i1HHdjXSWL&^PX;%C{`g#=oR;0)7Jd#A+ax|Hd9C-^hEpODpeZ zkHWKW+f4^`c7mxOAD88SvD?-0QJ4=+HV;#`AASY0W!XQ)@pCW?;*O7Q?eh|k4f%0y zg{`m$z6nX+TXtJvH%$N+O(|}K;*79c2A6}c6z@t2o(jTDd==SI_k-Lfa+%0oV&ZCW z{Azu{xq<8oUukAZw7gsx^~+-`;4@8J74lQaEs+aRKZWblNhaHmwMTpS36#R8p!HC~ zwI6v}gWkFHy`25MTIpsLiuCr%{$g!-3-b{|96VAU6@y9 zbb3AbQLi<&eKyS-+BciV{5A5_5!Ms)D3|Nj=j@5*F&`~r+_CQ!l`~JRVB8-x$oM4T z^{1@Hu_DkO$D1$~8u(|Vp>{65R7UkuM!8~YE|CwFm965G7V&)=#wW)~pI4VoUMv0o D$c-k0 diff --git a/assets/index-3znfDf88.js b/assets/index-3znfDf88.js new file mode 100644 index 00000000..6816c039 --- /dev/null +++ b/assets/index-3znfDf88.js @@ -0,0 +1,5 @@ +import{q as Co,s as Io,P as o,T as Ft,w as F,r as b,h as M,i as ze,R as P,v as ao,o as E,d as f,p as He,x as po,k as Ao,V as j,m as ht,y as Lo}from"./index-DT1C1ZDw.js";import{q as co,t as De,j as Fe,B as uo,S as B,k as ke,C as Y,m as L,s as $e,u as ho,w as Ye,d as Et,v as Po,i as Mt,n as ie,P as Ee,O as xe,x as Kt,p as Ot,y as Bo,z as zo,D as Fo,E as Eo}from"./RenderTopNavBar-BKjAQtrP.js";var xt={exports:{}};(function(n,e){(function(t,i){var s="1.0.38",r="",c="?",u="function",m="undefined",g="object",v="string",w="major",l="model",a="name",d="type",p="vendor",h="version",C="architecture",z="console",y="mobile",S="tablet",O="smarttv",k="wearable",D="embedded",Ce=500,Ie="Amazon",se="Apple",je="ASUS",Ge="BlackBerry",K="Browser",Qe="Chrome",$o="Edge",et="Firefox",tt="Google",Tt="Huawei",gt="LG",mt="Microsoft",Nt="Motorola",Ue="Opera",it="Samsung",Vt="Sharp",ot="Sony",bt="Xiaomi",vt="Zebra",qt="Facebook",jt="Chromium OS",Gt="Mac OS",_o=function(_,I){var $={};for(var A in _)I[A]&&I[A].length%2===0?$[A]=I[A].concat(_[A]):$[A]=_[A];return $},nt=function(_){for(var I={},$=0;$<_.length;$++)I[_[$].toUpperCase()]=_[$];return I},Ut=function(_,I){return typeof _===v?Ze(I).indexOf(Ze(_))!==-1:!1},Ze=function(_){return _.toLowerCase()},ko=function(_){return typeof _===v?_.replace(/[^\d\.]/g,r).split(".")[0]:i},yt=function(_,I){if(typeof _===v)return _=_.replace(/^\s\s*/,r),typeof I===m?_:_.substring(0,Ce)},Xe=function(_,I){for(var $=0,A,J,G,R,x,U;$0?R.length===2?typeof R[1]==u?this[R[0]]=R[1].call(this,U):this[R[0]]=R[1]:R.length===3?typeof R[1]===u&&!(R[1].exec&&R[1].test)?this[R[0]]=U?R[1].call(this,U,R[2]):i:this[R[0]]=U?U.replace(R[1],R[2]):i:R.length===4&&(this[R[0]]=U?R[3].call(this,U.replace(R[1],R[2])):i):this[R]=U||i;$+=2}},wt=function(_,I){for(var $ in I)if(typeof I[$]===g&&I[$].length>0){for(var A=0;A2&&(x[l]="iPad",x[d]=S),x},this.getEngine=function(){var x={};return x[a]=i,x[h]=i,Xe.call(x,A,G.engine),x},this.getOS=function(){var x={};return x[a]=i,x[h]=i,Xe.call(x,A,G.os),R&&!x[a]&&J&&J.platform&&J.platform!="Unknown"&&(x[a]=J.platform.replace(/chrome os/i,jt).replace(/macos/i,Gt)),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return A},this.setUA=function(x){return A=typeof x===v&&x.length>Ce?yt(x,Ce):x,this},this.setUA(A),this};T.VERSION=s,T.BROWSER=nt([a,h,w]),T.CPU=nt([C]),T.DEVICE=nt([l,p,d,z,y,O,S,k,D]),T.ENGINE=T.OS=nt([a,h]),n.exports&&(e=n.exports=T),e.UAParser=T;var Ae=typeof t!==m&&(t.jQuery||t.Zepto);if(Ae&&!Ae.ua){var st=new T;Ae.ua=st.getResult(),Ae.ua.get=function(){return st.getUA()},Ae.ua.set=function(_){st.setUA(_);var I=st.getResult();for(var $ in I)Ae.ua[$]=I[$]}}})(typeof window=="object"?window:Co)})(xt,xt.exports);var Mo=xt.exports;const Ho=Io(Mo),Do=()=>new Ho().getResult().browser,Wo=()=>Do().name==="Safari",To={children:o.node,type:o.oneOf(["button","submit","reset"]),size:o.oneOf(["small","medium","large"]),elementRef:o.func,as:o.elementType,interaction:o.oneOf(["enabled","disabled","readonly"]),color:o.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:o.oneOf(["info","inverse"]),display:o.oneOf(["inline-block","block"]),textAlign:o.oneOf(["start","center"]),withBackground:o.bool,margin:Ft.spacing,cursor:o.string,href:o.string,renderIcon:o.oneOfType([o.node,o.func]),onClick:o.func},No=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],Vo=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var Jt,Qt,rt,re;let qo=(Jt=F(null,co),Qt=De(),Jt(rt=Qt(rt=(re=class extends b.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)},this.handleButtonRef=t=>{this._buttonComponent=t}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,t=e.children,i=e.type,s=e.size,r=e.as,c=e.color,u=e.focusColor,m=e.display,g=e.textAlign,v=e.withBackground,w=e.margin,l=e.cursor,a=e.href,d=e.renderIcon,p=M(e,Vo),h=Fe({props:p}),C=this.props.themeOverride,z={...ze(p),type:i,size:s,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:r,color:c,interaction:h,focusColor:u,display:m,textAlign:g,withBackground:v,margin:w,cursor:l,href:a,renderIcon:d,themeOverride:C};return P.createElement(uo,z,t)}},re.displayName="Button",re.componentId="Button",re.propTypes=To,re.allowedProps=No,re.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},re))||rt)||rt);var ei;class We extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),ei||(ei=P.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}We.glyphName="arrow-open-down";We.variant="Line";We.displayName="IconArrowOpenDownLine";We.propTypes={...B.propTypes};We.allowedProps=[...B.allowedProps];var ti;class Te extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),ti||(ti=P.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}Te.glyphName="arrow-open-up";Te.variant="Line";Te.displayName="IconArrowOpenUpLine";Te.propTypes={...B.propTypes};Te.allowedProps=[...B.allowedProps];var ii;class oe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),ii||(ii=P.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}oe.glyphName="check";oe.variant="Line";oe.displayName="IconCheckLine";oe.propTypes={...B.propTypes};oe.allowedProps=[...B.allowedProps];var oi;class Ne extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),oi||(oi=P.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}Ne.glyphName="mini-arrow-double";Ne.variant="Line";Ne.displayName="IconMiniArrowDoubleLine";Ne.propTypes={...B.propTypes};Ne.allowedProps=[...B.allowedProps];var ni;class Ve extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),ni||(ni=P.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Ve.glyphName="mini-arrow-down";Ve.variant="Line";Ve.displayName="IconMiniArrowDownLine";Ve.propTypes={...B.propTypes};Ve.allowedProps=[...B.allowedProps];var si;class qe extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),si||(si=P.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}qe.glyphName="mini-arrow-up";qe.variant="Line";qe.displayName="IconMiniArrowUpLine";qe.propTypes={...B.propTypes};qe.allowedProps=[...B.allowedProps];var ri;class Ke extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),ri||(ri=P.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}Ke.glyphName="search";Ke.variant="Line";Ke.displayName="IconSearchLine";Ke.propTypes={...B.propTypes};Ke.allowedProps=[...B.allowedProps];var li;class Je extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(B,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),li||(li=P.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}Je.glyphName="x";Je.variant="Solid";Je.displayName="IconXSolid";Je.propTypes={...B.propTypes};Je.allowedProps=[...B.allowedProps];const jo={children:o.oneOfType([o.node,o.func]),renderIcon:o.oneOfType([o.node,o.func]),screenReaderLabel:o.string.isRequired,type:o.oneOf(["button","submit","reset"]),size:o.oneOf(["small","medium","large"]),elementRef:o.func,as:o.elementType,interaction:o.oneOf(["enabled","disabled","readonly"]),color:o.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:o.oneOf(["info","inverse"]),shape:o.oneOf(["rectangle","circle"]),withBackground:o.bool,withBorder:o.bool,margin:Ft.spacing,cursor:o.string,href:o.string,onClick:o.func},Go=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],Uo=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var ai,di,lt,le;let Us=(ai=F(null,co),di=De(),ai(lt=di(lt=(le=class extends b.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,t=e.children,i=e.renderIcon,s=e.screenReaderLabel,r=e.type,c=e.size;e.elementRef;const u=e.as,m=e.interaction,g=e.color,v=e.focusColor,w=e.shape,l=e.withBackground,a=e.withBorder,d=e.margin,p=e.cursor,h=e.href,C=M(e,Uo),z=this.props.themeOverride;return P.createElement(uo,Object.assign({},ze(C),{type:r,size:c,elementRef:this.handleRef,as:u,interaction:m,color:g,focusColor:v,shape:w,withBackground:l,withBorder:a,margin:d,cursor:p,href:h,renderIcon:t||i,themeOverride:z,ref:y=>{this._baseButton=y}}),P.createElement(ke,null,s))}},le.displayName="IconButton",le.componentId="IconButton",le.propTypes=jo,le.allowedProps=Go,le.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},le))||lt)||lt);const Zo=(n,e)=>{const t=e.vAlign,i=e.textAlign,s=e.rowSpacing,r=e.colSpacing,c=e.isLastRow,u=e.isLastCol,m=e.startAt,g=e.visualDebug,v={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}},w=()=>{const O={small:{paddingLeft:`calc(${n.spacingSmall} / 2)`,paddingRight:`calc(${n.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${n.spacingMedium} / 2)`,paddingRight:`calc(${n.spacingMedium} / 2)`},large:{paddingLeft:`calc(${n.spacingLarge} / 2)`,paddingRight:`calc(${n.spacingLarge} / 2)`},none:{}},k={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},D={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...r&&O[r],...t&&k[t],...i&&D[i]}},l=()=>{const O=["small","medium","large","x-large",null];return O.slice(O.indexOf(m))},a=O=>l().includes(O),d=O=>{let k=e.width;if(k)return k&&typeof k=="object"&&(k=k[O==="x-large"?"xLarge":O]),k},p=O=>{let k=e.offset;if(k)return k&&typeof k=="object"&&(k=k[O==="x-large"?"xLarge":O]),k},h=(O="1")=>{switch(O){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${O} / 12 * 99.999%)`,maxWidth:`calc(${O} / 12 * 99.999%)`}}},C=(O="1")=>{switch(O){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${O} / 12 * 99.999%)`,marginInlineEnd:0}}},z=O=>m&&m===O?{...w()}:{},y=O=>{const k=d(O),D=p(O);return a(O)?{...k&&h(k),...D&&C(D)}:{}},S=O=>({...z(O),...y(O)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...s&&v[s],...c&&u&&{marginBottom:0},...S("small"),[`@media screen and (${n.mediumMin})`]:{...S("medium")},[`@media screen and (${n.largeMin})`]:{...S("large")},[`@media screen and (${n.xLargeMin})`]:{...S("x-large")},...g&&{outline:"0.0625rem dashed red"}}}},Xo=n=>{const e=n.spacing,t=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...t}}},Z=o.oneOfType([o.number,o.oneOf(["auto"])]),Yo={children:o.node,colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),textAlign:o.oneOf(["start","end","center","inherit"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,width:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),offset:o.oneOfType([Z,o.shape({small:Z,medium:Z,large:Z,xLarge:Z})]),isLastRow:o.bool,isLastCol:o.bool,elementRef:o.func},Ko=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var pi,ci,ae;let Ht=(pi=F(Zo,Xo),pi(ci=(ae=class fo extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}widthCheck(){const e=this.props.width;let t=!1;e&&(typeof e=="number"&&e<=0&&(t=!0),typeof e=="object"&&Object.keys(e).forEach(i=>{typeof e[i]=="number"&&e[i]<=0&&(t=!0)})),t&&ao(!1,"Col width must be positive!")}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t),this.widthCheck()}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t),this.widthCheck()}render(){const e=this.props,t=e.children,i=e.styles,s=E(this.props,fo.allowedProps);return f("span",Object.assign({},s,{ref:this.handleRef,css:i==null?void 0:i.gridCol}),t)}},ae.displayName="GridCol",ae.componentId="Grid.Col",ae.propTypes=Yo,ae.allowedProps=Ko,ae.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},ae))||ci);const Jo=(n,e)=>{const t=e.hAlign,i=e.vAlign,s=e.rowSpacing,r=e.colSpacing,c=e.isLastRow,u=e.startAt,m=e.visualDebug,g=()=>{const w={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},l={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},a={small:{margin:`0 calc(-1 * ${n.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${n.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${n.spacingLarge} / 2)`},none:{}},d={small:{marginBottom:n.spacingSmall},medium:{marginBottom:n.spacingMedium},large:{marginBottom:n.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...t&&w[t],...i&&l[i],...r&&a[r],...s&&d[s],...c&&{marginBottom:0}}},v=w=>u&&u===w?{...g()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...v("small"),[`@media screen and (${n.mediumMin})`]:{...v("medium")},[`@media screen and (${n.largeMin})`]:{...v("large")},[`@media screen and (${n.xLargeMin})`]:{...v("x-large")},...m&&{outline:"0.0625rem dashed blue"}}}},Qo=n=>{const e=n.spacing,t=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...t}}},en={children:Y.oneOf([Ht,ke]),rowSpacing:o.oneOf(["none","small","medium","large"]),colSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool,isLastRow:o.bool},tn=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],on=["styles","makeStyles"],nn=["styles"];var ui,hi,de;let $t=(ui=F(Jo,Qo),ui(hi=(de=class _t extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const t=M(e,on);return b.Children.map(this.props.children,(i,s)=>L(i,[Ht])?$e(i,{...He(t,_t.allowedProps),...i.props,isLastRow:t.isLastRow,isLastCol:s+1===b.Children.count(this.props.children)}):i)}render(){const e=this.props,t=e.styles,i=M(e,nn),s=E(i,_t.allowedProps);return f("span",Object.assign({},s,{css:t==null?void 0:t.gridRow,ref:this.handleRef}),this.renderChildren())}},de.displayName="GridRow",de.componentId="Grid.Row",de.propTypes=en,de.allowedProps=tn,de.defaultProps={children:null,isLastRow:!1},de))||hi);const sn=(n,e)=>{const t=e.startAt,i=e.visualDebug,s=r=>t&&t===r?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...s("small"),[`@media screen and (${n.mediumMin})`]:{...s("medium")},[`@media screen and (${n.largeMin})`]:{...s("large")},[`@media screen and (${n.xLargeMin})`]:{...s("x-large")},...i&&{outline:"0.0625rem dashed red"}}}},rn=n=>{const e=n.spacing,t=n.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...t}}},ln={children:Y.oneOf([$t,ke]),colSpacing:o.oneOf(["none","small","medium","large"]),rowSpacing:o.oneOf(["none","small","medium","large"]),hAlign:o.oneOf(["start","center","end","space-around","space-between"]),vAlign:o.oneOf(["top","middle","bottom","stretch"]),startAt:o.oneOf(["small","medium","large","x-large",null]),visualDebug:o.bool},an=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],dn=["styles","makeStyles"],pn=["styles"];var fi,gi,Q;let N=(fi=F(sn,rn),fi(gi=(Q=class kt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const t=M(e,dn),i=b.Children.toArray(this.props.children);return i.map((s,r)=>L(s,[$t])?$e(s,{...He(t,kt.allowedProps),...s.props,isLastRow:r+1===i.length}):s)}render(){const e=this.props,t=e.styles,i=M(e,pn),s=E(i,kt.allowedProps);return f("span",Object.assign({},s,{css:t==null?void 0:t.grid,ref:this.handleRef}),this.renderChildren())}},Q.displayName="Grid",Q.componentId="Grid",Q.propTypes=ln,Q.allowedProps=an,Q.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},Q.Row=$t,Q.Col=Ht,Q))||gi);const cn=(n,e)=>{const t=e.children,s={all:"initial",display:"block",...ho(t)&&{color:n.color,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...s,"&:is(label)":s,"&:-webkit-any(label)":s}}},un=n=>{const e=n.colors,t=n.typography,i=n.key,s={canvas:{color:n["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightBold,fontSize:t==null?void 0:t.fontSizeMedium,lineHeight:t==null?void 0:t.lineHeightFit},...s[i]}},hn={children:o.node.isRequired,as:o.elementType},fn=["as","children"];var mi,bi,pe;let gn=(mi=F(cn,un),mi(bi=(pe=class Rt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=po(Rt,this.props),t=this.props,i=t.styles,s=t.children;return f(e,Object.assign({},E(this.props,Rt.allowedProps),{css:i==null?void 0:i.formFieldLabel,ref:this.handleRef}),s)}},pe.displayName="FormFieldLabel",pe.componentId="FormFieldLabel",pe.propTypes=hn,pe.allowedProps=fn,pe.defaultProps={as:"span"},pe))||bi);const mn=(n,e)=>{const t=e.variant,i={hint:{color:n.colorHint},error:{color:n.colorError},success:{color:n.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,display:"block",...i[t]}}},bn=n=>{const e=n.colors,t=n.typography,i=n.key,s={canvas:{colorHint:n["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,fontSize:t==null?void 0:t.fontSizeSmall,lineHeight:t==null?void 0:t.lineHeight},...s[i]}},go=o.oneOf(["error","hint","success","screenreader-only"]),mo=o.node,Re={message:o.shape({type:go,text:mo})},vn={variant:go,children:mo},yn=["variant","children"];var vi,yi,ce;let wn=(vi=F(mn,bn),vi(yi=(ce=class extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,i=e.styles;return this.props.variant!=="screenreader-only"?f("span",{css:i==null?void 0:i.formFieldMessage,ref:this.handleRef},t):f(ke,{elementRef:this.handleRef},t)}},ce.displayName="FormFieldMessage",ce.componentId="FormFieldMessage",ce.propTypes=vn,ce.allowedProps=yn,ce.defaultProps={variant:"hint"},ce))||yi);const Sn=n=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${n.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),On=n=>{const e=n.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},xn={messages:o.arrayOf(Re.message)},$n=["messages"];var wi,Si,ue;let Oi=(wi=F(Sn,On),wi(Si=(ue=class bo extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{this.ref=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.messages,i=e.styles;return t&&t.length>0?f("span",Object.assign({css:i==null?void 0:i.formFieldMessages},E(this.props,bo.allowedProps),{ref:this.handleRef}),t.map((s,r)=>f("span",{key:`error${r}`,css:i==null?void 0:i.message},f(wn,{variant:s.type},s.text)))):null}},ue.displayName="FormFieldMessages",ue.componentId="FormFieldMessages",ue.propTypes=xn,ue.allowedProps=$n,ue.defaultProps={},ue))||Si);const _n=(n,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),kn={label:o.node.isRequired,id:o.string,as:o.elementType,messages:o.arrayOf(Re.message),messagesId:o.string,children:o.node,inline:o.bool,layout:o.oneOf(["stacked","inline"]),labelAlign:o.oneOf(["start","end"]),vAlign:o.oneOf(["top","middle","bottom"]),width:o.string,inputContainerRef:o.func,elementRef:o.func},Rn=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],Cn=["makeStyles","styles"];var xi,$i,at,he;let ft=(xi=Ye(),$i=F(_n,null),xi(at=$i(at=(he=class Ct extends b.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)},this.handleInputContainerRef=t=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(t)},this._messagesId=e.messagesId||e.deterministicId(),Ao(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. + This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.`)}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}get hasVisibleLabel(){return this.props.label&&ho(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return po(Ct,this.props)}get inlineContainerAndLabel(){return this.props.inline&&this.props.layout==="inline"}renderLabel(){return this.hasVisibleLabel?f(N.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},f(gn,{"aria-hidden":this.elementType==="fieldset"?"true":void 0},this.props.label)):this.elementType!=="fieldset"?this.props.label:null}renderLegend(){return f(ke,{as:"legend"},this.props.label,this.hasMessages&&f(Oi,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?f(N.Row,null,f(N.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},f(Oi,{id:this._messagesId,messages:this.props.messages}))):null}render(){const e=this.elementType,t=this.props;t.makeStyles;const i=t.styles,s=M(t,Cn),r=s.width,c=s.layout,u=s.children;return f(e,Object.assign({},E(s,[...Ct.allowedProps,...N.allowedProps]),{css:i==null?void 0:i.formFieldLayout,style:{width:r},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),this.elementType==="fieldset"&&this.renderLegend(),f(N,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:c==="inline"&&this.hasVisibleLabel?"medium":null},He(s,N.allowedProps)),f(N.Row,null,this.renderLabel(),f(N.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},u)),this.renderVisibleMessages()))}},he.displayName="FormFieldLayout",he.componentId="FormFieldLayout",he.propTypes=kn,he.allowedProps=Rn,he.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},he))||at)||at);const In={label:o.node.isRequired,id:o.string.isRequired,messages:o.arrayOf(Re.message),messagesId:o.string,children:o.node,inline:o.bool,layout:o.oneOf(["stacked","inline"]),labelAlign:o.oneOf(["start","end"]),vAlign:o.oneOf(["top","middle","bottom"]),width:o.string,inputContainerRef:o.func,elementRef:o.func},An=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"];class ne extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}render(){return P.createElement(ft,Object.assign({},E(this.props,ne.allowedProps),He(this.props,ft.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}ne.displayName="FormField";ne.componentId="FormField";ne.propTypes=In;ne.allowedProps=An;ne.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const Ln=(n,e,t)=>{const i=e.disabled,s=t.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${n.borderWidth} ${n.borderStyle} ${n.borderColor}`,borderRadius:n.borderRadius,display:"block",...s&&{borderColor:n.errorBorderColor,padding:n.errorFieldsPadding},...i&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}},Pn=n=>{const e=n.borders,t=n.colors,i=n.spacing;return{...{borderWidth:e==null?void 0:e.widthSmall,borderStyle:e==null?void 0:e.style,borderColor:"transparent",borderRadius:e==null?void 0:e.radiusMedium,errorBorderColor:t==null?void 0:t.borderDanger,errorFieldsPadding:i==null?void 0:i.xSmall}}},Bn={description:o.node.isRequired,as:o.elementType,messages:o.arrayOf(Re.message),messagesId:o.string,disabled:o.bool,children:o.node,layout:o.oneOf(["stacked","columns","inline"]),rowSpacing:o.oneOf(["none","small","medium","large"]),colSpacing:o.oneOf(["none","small","medium","large"]),vAlign:o.oneOf(["top","middle","bottom"]),startAt:o.oneOf(["small","medium","large","x-large",null]),elementRef:o.func},zn=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],Fn=["styles","makeStyles"];var _i,ki,fe;let Ys=(_i=F(Ln,Pn),_i(ki=(fe=class vo extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}renderColumns(){return b.Children.map(this.props.children,(e,t)=>e?f(N.Col,{width:e.props&&e.props.width?"auto":void 0,key:t},e):null)}renderChildren(){return f(N,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||(this.props.layout==="columns"?"medium":null)},f(N.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return f("span",{key:"fields",css:e==null?void 0:e.formFieldGroup},this.renderChildren())}render(){const e=this.props;e.styles,e.makeStyles;const t=M(e,Fn);return f(ft,Object.assign({},E(t,vo.allowedProps),He(t,ft.allowedProps),{vAlign:t.vAlign,layout:t.layout==="inline"?"inline":"stacked",label:t.description,"aria-disabled":t.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},fe.displayName="FormFieldGroup",fe.componentId="FormFieldGroup",fe.propTypes=Bn,fe.allowedProps=zn,fe.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},fe))||ki);const En=(n,e,t)=>{const i=e.size,s=e.textAlign,r=e.shouldNotWrap,c=t.disabled,u=t.invalid,m=t.focused,g=t.beforeElementHasWidth,v=t.afterElementHasWidth,w={small:{fontSize:n.smallFontSize,height:`calc(${n.smallHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.smallHeight} - (2 * ${n.borderWidth}))`},medium:{fontSize:n.mediumFontSize,height:`calc(${n.mediumHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.mediumHeight} - (2 * ${n.borderWidth}))`},large:{fontSize:n.largeFontSize,height:`calc(${n.largeHeight} - (2 * ${n.borderWidth}))`,lineHeight:`calc(${n.largeHeight} - (2 * ${n.borderWidth}))`}},l=c?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},a=m?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},d=u?{borderColor:n.errorBorderColor}:{},p=u&&m?{borderColor:n.errorBorderColor}:{},h={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,padding:`0 ${n.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:n.placeholderColor},...w[i],textAlign:s},C={boxSizing:"border-box",fontFamily:n.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},z={...C,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},y={...C,flexShrink:0};return{textInput:{label:"textInput",...h,"&:is(input)[type]":h,"&:-webkit-any(input)[type]":h},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${n.borderWidth} ${n.borderStyle} ${n.borderColor}`,borderRadius:n.borderRadius,background:n.background,color:n.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${n.focusOutlineWidth} ${n.focusOutlineStyle} ${n.focusOutlineColor}`,borderRadius:`calc(${n.borderRadius} * 1.5)`,transition:"all 0.2s",...a,...p},...l,...d},layout:{label:"textInput__layout",...z,...!r&&{flexWrap:"wrap"}},beforeElement:{label:"textInput__beforeElement",...y,paddingInlineStart:n.padding,...g===!1&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...y,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...z},afterElement:{label:"textInput__afterElement",...y,paddingInlineEnd:n.padding,...v===!1&&{paddingInlineEnd:0}}}},Mn=n=>{const e=n.colors,t=n.typography,i=n.borders,s=n.spacing,r=n.forms,c=n.key,u={canvas:{color:n["ic-brand-font-color-dark"],focusOutlineColor:n["ic-brand-primary"]}};return{...{fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,borderWidth:i==null?void 0:i.widthSmall,borderStyle:i==null?void 0:i.style,borderColor:e==null?void 0:e.borderMedium,borderRadius:i==null?void 0:i.radiusMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,padding:s==null?void 0:s.small,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style,focusOutlineColor:e==null?void 0:e.borderBrand,errorBorderColor:e==null?void 0:e.borderDanger,errorOutlineColor:e==null?void 0:e.borderDanger,placeholderColor:e==null?void 0:e.textDark,smallFontSize:t==null?void 0:t.fontSizeSmall,smallHeight:r==null?void 0:r.inputHeightSmall,mediumFontSize:t==null?void 0:t.fontSizeMedium,mediumHeight:r==null?void 0:r.inputHeightMedium,largeFontSize:t==null?void 0:t.fontSizeLarge,largeHeight:r==null?void 0:r.inputHeightLarge},...u[c]}},Hn={renderLabel:o.oneOfType([o.node,o.func]),type:o.oneOf(["text","email","url","tel","search","password"]),id:o.string,value:Et(o.string),defaultValue:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),messages:o.arrayOf(Re.message),size:o.oneOf(["small","medium","large"]),textAlign:o.oneOf(["start","center"]),width:o.string,htmlSize:o.number,display:o.oneOf(["inline-block","block"]),shouldNotWrap:o.bool,placeholder:o.string,isRequired:o.bool,elementRef:o.func,inputRef:o.func,inputContainerRef:o.func,renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),onChange:o.func,onBlur:o.func,onFocus:o.func},Dn=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],Wn=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var Ri,Ci,Ii,Le,ge;let Tn=(Ri=Ye(),Ci=F(En,Mn),Ii=De(),Ri(Le=Ci(Le=Ii(Le=(ge=class extends b.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)},this.makeStyleProps=()=>{const t=this.interaction,i=this.state,s=i.hasFocus,r=i.beforeElementHasWidth,c=i.afterElementHasWidth;return{disabled:t==="disabled",invalid:this.invalid,focused:s,beforeElementHasWidth:r,afterElementHasWidth:c}},this.handleInputRef=t=>{this._input=t,typeof this.props.inputRef=="function"&&this.props.inputRef(t)},this.handleChange=t=>{typeof this.props.onChange=="function"&&this.props.onChange(t,t.target.value)},this.handleBlur=t=>{typeof this.props.onBlur=="function"&&this.props.onBlur(t),this.setState({hasFocus:!1})},this.handleFocus=t=>{typeof this.props.onFocus=="function"&&this.props.onFocus(t),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,t;this._input&&(this._focusListener=Po(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var t,i;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),Fe({props:e})!=="disabled"&&Fe({props:this.props})==="disabled"&&this.setState({hasFocus:!1}),(t=(i=this.props).makeStyles)===null||t===void 0||t.call(i,this.makeStyleProps())}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get interaction(){return Fe({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}get focused(){return Mt(this._input)}get value(){var e;return(e=this._input)===null||e===void 0?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const t=this.props,i=t.type;t.size;const s=t.htmlSize;t.display,t.textAlign;const r=t.placeholder,c=t.value,u=t.defaultValue,m=t.isRequired;t.onFocus;const g=M(t,Wn),v=ze(g),w=this.interaction;let l="";return v["aria-describedby"]&&(l=`${v["aria-describedby"]}`),this.hasMessages&&(l=l!==""?`${l} ${this._messagesId}`:this._messagesId),f("input",Object.assign({},v,{css:(e=this.props.styles)===null||e===void 0?void 0:e.textInput,defaultValue:u,value:c,placeholder:r,ref:this.handleInputRef,type:i,id:this.id,required:m,"aria-invalid":this.invalid?"true":void 0,disabled:w==="disabled",readOnly:w==="readonly","aria-describedby":l!==""?l:void 0,size:s,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const t=getComputedStyle(e),i=t.width,s=t.paddingInlineStart,r=t.paddingInlineEnd;return i==="auto"||i===""?!0:parseFloat(i)-parseFloat(s)-parseFloat(r)>0}render(){const e=this.props,t=e.width,i=e.display,s=e.renderLabel,r=e.renderBeforeInput,c=e.renderAfterInput,u=e.messages,m=e.inputContainerRef,g=e.styles,v=r?ie(r):null,w=c?ie(c):null,l=!!v||!!w;return f(ne,{id:this.id,label:ie(s),messagesId:this._messagesId,messages:u,inline:i==="inline-block",width:t,inputContainerRef:m,layout:this.props.layout,elementRef:this.handleRef},f("span",{css:g==null?void 0:g.facade},l?f("div",null,f("span",{css:g==null?void 0:g.layout},v&&f("span",{css:g==null?void 0:g.beforeElement,ref:a=>{this._beforeElement=a}},v),f("span",{css:g==null?void 0:g.innerWrapper},f("span",{css:g==null?void 0:g.inputLayout},f("span",{css:g==null?void 0:g.innerWrapper},this.renderInput()),w&&f("span",{css:g==null?void 0:g.afterElement,ref:a=>{this._afterElement=a}},w))))):this.renderInput()))}},ge.displayName="TextInput",ge.componentId="TextInput",ge.allowedProps=Dn,ge.propTypes=Hn,ge.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},ge))||Le)||Le)||Le);const Nn=(n,e)=>{const t=e.size,i={small:{fontSize:n.smallIconSize},medium:{fontSize:n.mediumIconSize},large:{fontSize:n.largeIconSize}};return{select:{label:"select",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color},icon:{label:"select__icon",...i[t]},assistiveText:{label:"select__assistiveText",display:"none"}}},Vn=n=>{const e=n.colors,t=n.typography;return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,smallIconSize:t==null?void 0:t.fontSizeXSmall,mediumIconSize:t==null?void 0:t.fontSizeSmall,largeIconSize:t==null?void 0:t.fontSizeMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},qn={id:o.string.isRequired,isHighlighted:o.bool,isSelected:o.bool,isDisabled:o.bool,renderBeforeLabel:o.oneOfType([o.node,o.func]),renderAfterLabel:o.oneOfType([o.node,o.func]),children:o.node},jn=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let V=class extends b.Component{render(){return null}};V.displayName="Option";V.componentId="Select.Option";V.allowedProps=jn;V.propTypes=qn;V.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const Gn={renderLabel:o.oneOfType([o.node,o.func]).isRequired,children:Y.oneOf([V])},Un=["renderLabel","children"];let W=class extends b.Component{render(){return null}};W.displayName="Group";W.componentId="Select.Group";W.allowedProps=Un;W.propTypes=Gn;W.defaultProps={};const Zn={renderLabel:o.oneOfType([o.node,o.func]).isRequired,inputValue:o.string,id:o.string,size:o.oneOf(["small","medium","large"]),assistiveText:o.string,placeholder:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),isRequired:o.bool,isInline:o.bool,width:o.string,htmlSize:o.number,visibleOptionsCount:o.number,optionsMaxHeight:o.string,optionsMaxWidth:o.string,messages:o.arrayOf(Re.message),placement:Ee.placement,constrain:Ee.constrain,mountNode:Ee.mountNode,onFocus:o.func,onBlur:o.func,onInputChange:o.func,isShowingOptions:o.bool,onRequestShowOptions:o.func,onRequestHideOptions:o.func,onRequestHighlightOption:o.func,onRequestSelectOption:o.func,inputRef:o.func,listRef:o.func,renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),children:Y.oneOf([W,V]),shouldNotWrap:o.bool,scrollToHighlightedOption:o.bool},Xn=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],Yn=["id","renderLabel","children"],Kn=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],Jn=["ref"];var Ai,Li,Pi,Pe,ee,Bi,zi,Fi,Ei;const yo=b.memo(function(e){const t=e.optionsItemProps,i=e.children;return f(xe.Item,Object.assign({as:"li"},t),i)},(n,e)=>n.selectOption.props.isHighlighted===e.selectOption.props.isHighlighted&&n.selectOption.props.isSelected===e.selectOption.props.isSelected&&n.selectOption.props.isDisabled===e.selectOption.props.isDisabled&&n.selectOption.props.children===e.selectOption.props.children&&n.selectOption.props.id===e.selectOption.props.id&&n.selectOption.props.renderBeforeLabel===e.selectOption.props.renderBeforeLabel&&n.selectOption.props.renderAfterLabel===e.selectOption.props.renderAfterLabel&&n.children===e.children);yo.displayName="Item";let dt=(Ai=Ye(),Li=F(Nn,Vn),Pi=De(),Ai(Pe=Li(Pe=Pi(Pe=(ee=class wo extends b.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=t=>{var i,s;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=t,(i=(s=this.props).inputRef)===null||i===void 0||i.call(s,t)},this.handleListRef=t=>{var i,s;(i=(s=this.props).listRef)===null||i===void 0||i.call(s,t),t&&t.querySelector('[role="option"]')&&(this._optionHeight=t.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=t=>{this._inputContainer=t}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t),this.props.scrollToHighlightedOption&&requestAnimationFrame(()=>this.scrollToOption(this.highlightedOptionId))}focus(){this._input&&this._input.focus()}get childrenArray(){return b.Children.toArray(this.props.children)}getGroupChildrenArray(e){return b.Children.toArray(e.props.children)}get focused(){return this._input?Mt(this._input):!1}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return Fe({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach(t=>{L(t,[W])?this.getGroupChildrenArray(t).forEach(i=>{i.props.isHighlighted&&(e=i.props.id)}):t.props.isHighlighted&&(e=t.props.id)}),e}get selectedOptionId(){const e=[];if(this.childrenArray.forEach(t=>{L(t,[W])?this.getGroupChildrenArray(t).forEach(i=>{i.props.isSelected&&e.push(i.props.id)}):t.props.isSelected&&e.push(t.props.id)}),e.length===1)return e[0];if(e.length!==0)return e}scrollToOption(e){if(this._listView){const t=this._listView.querySelector(`[id="${e}"]`);if(!t)return;const i=t.parentNode,s=Kt(this._listView).top,r=Kt(i).top,c=s+this._listView.clientHeight,u=r+(i?i.clientHeight:0);u>c?this._listView.scrollTop+=u-c:r{i==null||i(c);const u=this.selectedOptionId;u&&!Array.isArray(u)&&this.highlightOption(c,u)},onRequestHideOptions:c=>{s==null||s(c)},onRequestHighlightOption:(c,{id:u,direction:m})=>{if(!t)return;const g=this.highlightedOptionId;let v=this._optionIds.indexOf(u)>-1?u:void 0;if(!v)if(!g)v=this._optionIds[0];else{const w=this._optionIds.indexOf(g);v=w>-1?this._optionIds[w+m]:void 0}v&&this.highlightOption(c,v)},onRequestHighlightFirstOption:c=>{this.highlightOption(c,this._optionIds[0])},onRequestHighlightLastOption:c=>{this.highlightOption(c,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(c,{id:u})=>{u&&this._optionIds.indexOf(u)!==-1&&(r==null||r(c,{id:u}))}}:{}}renderOption(e,t){const i=t.getOptionProps,s=t.getDisabledOptionProps,r=e.props,c=r.id,u=r.isDisabled,m=r.isHighlighted,g=r.isSelected,v=r.renderBeforeLabel,w=r.renderAfterLabel,l=r.children,a=p=>{var h;return typeof p=="function"&&!(p!=null&&(h=p.prototype)!==null&&h!==void 0&&h.isReactComponent)?p.bind(null,{id:c,isDisabled:u,isSelected:g,isHighlighted:m,children:l}):p};let d={...E(e.props,[...V.allowedProps,...xe.Item.allowedProps]),...i({id:c}),renderBeforeLabel:a(v),renderAfterLabel:a(w)};return g?d.variant="selected":m&&(d.variant="highlighted"),u?(d.variant="disabled",d={...d,...s()}):this._optionIds.push(c),f(yo,{optionsItemProps:d,selectOption:e},l)}renderGroup(e,t){const i=t.getOptionProps,s=t.getDisabledOptionProps,r=t.isFirstChild,c=t.isLastChild,u=t.afterGroup,m=e.props,g=m.id,v=m.renderLabel,w=m.children,l=M(m,Yn),a=[];return!r&&!u&&a.push(Bi||(Bi=f(xe.Separator,null))),a.push(f(xe,Object.assign({id:g,as:"ul",role:"group",renderLabel:v},E(l,[...xe.allowedProps,...W.allowedProps])),b.Children.map(w,d=>this.renderOption(d,{getOptionProps:i,getDisabledOptionProps:s})))),c||a.push(zi||(zi=f(xe.Separator,null))),a}renderList(e){const t=e.getListProps,i=e.getOptionProps,s=e.getDisabledOptionProps,r=this.props,c=r.isShowingOptions,u=r.optionsMaxWidth,m=r.optionsMaxHeight,g=r.visibleOptionsCount,v=r.children;let w=!1;const l=c?{display:"block",overflowY:"auto",maxHeight:m||this._optionHeight*g,maxWidth:u||this.width,background:"primary",elementRef:a=>this._listView=a}:{maxHeight:0};return f(j,l,f(xe,t({as:"ul",elementRef:this.handleListRef}),c?b.Children.map(v,(a,d)=>{if(!(!a||!L(a,[W,V]))){if(L(a,[V]))return w=!1,this.renderOption(a,{getOptionProps:i,getDisabledOptionProps:s});if(L(a,[W])){const p=w;return w=!0,this.renderGroup(a,{getOptionProps:i,getDisabledOptionProps:s,isFirstChild:d===0,isLastChild:d===b.Children.count(v)-1,afterGroup:p})}}}):null))}renderIcon(){const e=this.props,t=e.styles,i=e.isShowingOptions;return f("span",{css:t==null?void 0:t.icon},i?Fi||(Fi=f(Te,{inline:!1})):Ei||(Ei=f(We,{inline:!1})))}renderInput(e){const t=e.getInputProps,i=e.getTriggerProps,s=this.props,r=s.renderLabel,c=s.inputValue,u=s.placeholder,m=s.isRequired,g=s.shouldNotWrap,v=s.size,w=s.isInline,l=s.width,a=s.htmlSize,d=s.messages,p=s.renderBeforeInput,h=s.renderAfterInput,C=s.onFocus,z=s.onBlur,y=s.onInputChange,S=s.onRequestHideOptions,O=M(s,Kn),k=this.interaction,D=E(O,wo.allowedProps),Ce=i({...D}),Ie=Ce.ref,se=M(Ce,Jn),je=typeof y<"u",Ge=je?{}:{role:Wo()?"button":"combobox",title:c,"aria-autocomplete":void 0,"aria-readonly":!0};D.autoComplete&&(Ge.autoComplete=D.autoComplete);const K={id:this.id,renderLabel:r,placeholder:u,size:v,width:l,htmlSize:a,messages:d,value:c,inputRef:Ot(Ie,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:k==="enabled"&&!je?"readonly":k,isRequired:m,shouldNotWrap:g,display:w?"inline-block":"block",renderBeforeInput:p,renderAfterInput:h||this.renderIcon(),onChange:typeof y=="function"?y:c?()=>{}:void 0,onFocus:C,onBlur:Ot(z,S),...Ge};return f(Tn,Object.assign({},se,t(K)))}render(){const e=this.props,t=e.constrain,i=e.placement,s=e.mountNode,r=e.assistiveText,c=e.isShowingOptions,u=e.styles;this._optionIds=[];const m=this.highlightedOptionId,g=this.selectedOptionId;return f(Bo,Object.assign({highlightedOptionId:m,isShowingOptions:c,selectedOptionId:g},this.getEventHandlers()),({getRootProps:v,getInputProps:w,getTriggerProps:l,getListProps:a,getOptionProps:d,getDisabledOptionProps:p,getDescriptionProps:h})=>f("span",Object.assign({},v({css:u==null?void 0:u.select}),{ref:C=>this.ref=C}),this.renderInput({getInputProps:w,getTriggerProps:l}),f("span",Object.assign({},h(),{css:u==null?void 0:u.assistiveText}),r),f(zo,{constrain:t,placement:i,mountNode:s,positionTarget:this._inputContainer,isShowingContent:c,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:a,getOptionProps:d,getDisabledOptionProps:p}))))}},ee.displayName="Select",ee.componentId="Select",ee.allowedProps=Xn,ee.propTypes=Zn,ee.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!1},ee.Option=V,ee.Group=W,ee))||Pe)||Pe)||Pe);const Qn={expanded:Et(o.bool,"onToggle","defaultExpanded"),defaultExpanded:o.bool,onToggle:o.func,children:o.func,render:o.func},es=["expanded","defaultExpanded","onToggle","children","render"];var Mi,Hi,Be;const ts=({expanded:n})=>({expanded:!n});let Di=(Mi=Ye(),Mi(Hi=(Be=class extends b.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=t=>{this.isControlled()||this.setState(ts),this.props.onToggle(t,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,t){return typeof e.expanded=="boolean"&&e.expanded!==t.expanded?{expanded:e.expanded}:null}render(){const e=this.props,t=e.children,i=e.render,s=i===void 0?t:i;return typeof s=="function"?s({expanded:this.expanded,getToggleProps:(r={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:Ot(this.handleToggle,r.onClick),...r}),getDetailsProps:()=>({id:this._contentId})}):null}},Be.displayName="Expandable",Be.propTypes=Qn,Be.allowedProps=es,Be.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},Be))||Hi);const is={id:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,isDisabled:o.bool,renderBeforeLabel:o.oneOfType([o.node,o.func]),renderAfterLabel:o.oneOfType([o.node,o.func]),children:o.string},os=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"];class q extends b.Component{render(){return null}}q.displayName="Option";q.componentId="SimpleSelect.Option";q.allowedProps=os;q.propTypes=is;q.defaultProps={isDisabled:!1};const ns={renderLabel:o.oneOfType([o.node,o.func]).isRequired,children:Y.oneOf([q])},ss=["renderLabel","children"];class X extends b.Component{render(){return null}}X.displayName="Group";X.componentId="SimpleSelect.Group";X.allowedProps=ss;X.propTypes=ns;X.defaultProps={};const rs={renderLabel:o.oneOfType([o.node,o.func]).isRequired,value:o.oneOfType([o.string,o.number]),defaultValue:o.string,id:o.string,size:o.oneOf(["small","medium","large"]),assistiveText:o.string,placeholder:o.string,interaction:o.oneOf(["enabled","disabled","readonly"]),isRequired:o.bool,isInline:o.bool,width:o.string,visibleOptionsCount:o.number,optionsMaxHeight:o.string,optionsMaxWidth:o.string,messages:o.arrayOf(Re.message),placement:Ee.placement,constrain:Ee.constrain,mountNode:Ee.mountNode,onChange:o.func,onFocus:o.func,onBlur:o.func,onShowOptions:o.func,onHideOptions:o.func,inputRef:o.func,listRef:o.func,renderEmptyOption:o.oneOfType([o.node,o.func]),renderBeforeInput:o.oneOfType([o.node,o.func]),renderAfterInput:o.oneOfType([o.node,o.func]),children:Y.oneOf([X,q])},ls=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],as=["id","value","children","renderBeforeLabel","renderAfterLabel"],ds=["id","renderLabel","children"],ps=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var Wi,Ti,pt,te;let Ni=(Wi=Ye(),Ti=De(),Wi(pt=Ti(pt=(te=class extends b.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(i,s)=>{const r=b.Children.toArray(this.props.children);let c;for(let u=0;u{this.ref=i},this.handleBlur=i=>{this.setState({highlightedOptionId:void 0}),typeof this.props.onBlur=="function"&&this.props.onBlur(i)},this.handleShowOptions=i=>{this.setState({isShowingOptions:!0}),typeof this.props.onShowOptions=="function"&&this.props.onShowOptions(i)},this.handleHideOptions=i=>{this.setState(s=>{const r=this.getOption("id",s.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:r?r.props.children:""}}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)},this.handleHighlightOption=(i,{id:s})=>{if(s===this._emptyOptionId)return;const r=this.getOption("id",s),c=r==null?void 0:r.props.children,u=i.type==="keydown"?c:this.state.inputValue;this.setState({highlightedOptionId:s,inputValue:u})},this.handleSelectOption=(i,{id:s})=>{if(s===this._emptyOptionId){this.setState({isShowingOptions:!1});return}const r=this.getOption("id",s),c=r&&r.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState(u=>({isShowingOptions:!1,selectedOptionId:s,inputValue:r?r.props.children:u.inputValue})),r&&typeof this.props.onChange=="function"&&this.props.onChange(i,{value:c,id:s}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)};const t=this.getInitialOption(e);this.state={inputValue:t?t.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:t?t.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return this.ref?this.ref.focused:!1}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return typeof this.props.value<"u"}get interaction(){return Fe({props:this.props})}componentDidUpdate(e){if(this.props.value!==e.value){let t=this.getOption("value",this.props.value);typeof this.props.value>"u"&&(t=this.getOption("value",e.value)),this.setState({inputValue:t?t.props.children:"",selectedOptionId:t?t.props.id:""})}}getInitialOption(e){const t=e.value,i=e.defaultValue,s=t||i;return typeof s=="string"||typeof s=="number"?this.getOption("value",s):this.getFirstOption()}getOptionLabelById(e){const t=this.getOption("id",e);return t?t.props.children:""}getFirstOption(){const e=b.Children.toArray(this.props.children);let t;for(let i=0;iL(t,[q])?this.renderOption(t):L(t,[X])?this.renderGroup(t):null).filter(t=>!!t),e.length===0?this.renderEmptyOption():e}renderEmptyOption(){return P.createElement(dt.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},ie(this.props.renderEmptyOption))}renderOption(e){const t=e.props,i=t.id,s=t.value,r=t.children,c=t.renderBeforeLabel,u=t.renderAfterLabel,m=M(t,as),g=e.props.isDisabled,v=i===this.state.selectedOptionId,w=i===this.state.highlightedOptionId,l=a=>{var d;return typeof a=="function"&&!(a!=null&&(d=a.prototype)!==null&&d!==void 0&&d.isReactComponent)?a.bind(null,{id:i,isDisabled:g,isSelected:v,isHighlighted:w,children:r}):a};return P.createElement(dt.Option,Object.assign({id:i,value:s,key:e.key||i,isHighlighted:i===this.state.highlightedOptionId,isSelected:i===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:l(c),renderAfterLabel:l(u)},ze(m)),r)}renderGroup(e){const t=e.props,i=t.id,s=t.renderLabel,r=t.children,c=M(t,ds);return P.createElement(dt.Group,Object.assign({renderLabel:s,key:e.key||i},ze(c)),b.Children.map(r,u=>this.renderOption(u)))}render(){const e=this.props,t=e.renderLabel;e.value,e.defaultValue;const i=e.id,s=e.size,r=e.assistiveText,c=e.placeholder;e.interaction;const u=e.isRequired,m=e.isInline,g=e.width,v=e.optionsMaxWidth,w=e.optionsMaxHeight,l=e.visibleOptionsCount,a=e.messages,d=e.placement,p=e.constrain,h=e.mountNode,C=e.inputRef,z=e.listRef;e.renderEmptyOption;const y=e.renderBeforeInput,S=e.renderAfterInput,O=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const k=M(e,ps);return P.createElement(dt,Object.assign({renderLabel:t,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:i,size:s,assistiveText:r,placeholder:c,interaction:this.interaction,isRequired:u,isInline:m,width:g,optionsMaxWidth:v,optionsMaxHeight:w,visibleOptionsCount:l,messages:a,placement:d,constrain:p,mountNode:h,ref:this.handleRef,inputRef:C,listRef:z,renderBeforeInput:y,renderAfterInput:S,onFocus:O,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},ze(k)),this.renderChildren())}},te.displayName="SimpleSelect",te.componentId="SimpleSelect",te.Option=q,te.Group=X,te.allowedProps=ls,te.propTypes=rs,te.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},te))||pt)||pt);const cs=(n,e)=>{const t=e.layout;return{table:{label:"table",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,...t==="fixed"&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}},us=n=>{const e=n.colors,t=n.typography,i=n.key,s={canvas:{color:n["ic-brand-font-color-dark"]}};return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest},...s[i]}},hs=n=>({head:{label:"head",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background}}),fs=n=>{const e=n.colors,t=n.typography;return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},gs=(n,e)=>{const t=e.hover,i=e.isStacked;return{row:{label:"row",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:n.borderColor,...t&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:n.hoverBorderColor,borderRightColor:n.hoverBorderColor}},...i&&{padding:n.padding}}}},ms=n=>{const e=n.colors,t=n.typography,i=n.spacing,s=n.key,r={canvas:{hoverBorderColor:n["ic-brand-primary"]}};return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,hoverBorderColor:e==null?void 0:e.borderBrand,padding:`${i==null?void 0:i.xSmall} 0`},...r[s]}},bs=(n,e)=>{const t=e.onRequestSort,i=e.textAlign,s={color:n.color,fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:"bold",lineHeight:n.lineHeight,padding:n.padding},r={start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}};return{colHeader:{label:"colHeader",background:n.background,verticalAlign:"middle",boxSizing:"border-box",...!t&&s,textAlign:i},button:{label:"colHeader__button",...s,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${n.focusOutlineWidth} ${n.focusOutlineStyle} ${n.focusOutlineColor}`},...r[i]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"}}},vs=n=>{const e=n.typography,t=n.colors,i=n.borders,s=n.spacing;return{...{fontSize:e==null?void 0:e.fontSizeMedium,fontFamily:e==null?void 0:e.fontFamily,color:t==null?void 0:t.textDarkest,background:t==null?void 0:t.backgroundLightest,borderColor:t==null?void 0:t.borderMedium,lineHeight:e==null?void 0:e.lineHeightCondensed,padding:`${s==null?void 0:s.xSmall} ${s==null?void 0:s.small}`,focusOutlineColor:t==null?void 0:t.borderBrand,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style}}},ys={id:o.string.isRequired,stackedSortByLabel:o.string,children:o.oneOfType([o.node,o.func]),width:o.oneOfType([o.string,o.number]),textAlign:o.oneOf(["start","center","end"]),sortDirection:o.oneOf(["none","ascending","descending"]),onRequestSort:o.func,scope:o.oneOf(["row","col","rowgroup","colgroup","auto"])},ws=["id","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"];var Vi,qi,me,ji,Gi;let Me=(Vi=F(bs,vs),Vi(qi=(me=class So extends b.Component{constructor(...e){super(...e),this.handleClick=t=>{const i=this.props,s=i.id,r=i.onRequestSort;r&&r(t,{id:s})}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderSortArrow(){const e=this.props,t=e.sortDirection,i=e.onRequestSort;if(t==="ascending")return ji||(ji=f(qe,null));if(t==="descending")return Gi||(Gi=f(Ve,null));if(i)return f(Ne,{css:{opacity:"30%"}})}render(){const e=this.props,t=e.onRequestSort,i=e.width,s=e.children,r=e.sortDirection,c=e.scope,u=e.styles;return f("th",Object.assign({},E(this.props,So.allowedProps),{css:u==null?void 0:u.colHeader,style:{width:i},scope:c,"aria-sort":r}),t&&f("button",{onClick:this.handleClick,css:u==null?void 0:u.button},f("div",{css:u==null?void 0:u.buttonContent},ie(s),this.renderSortArrow())),!t&&s,!t&&this.renderSortArrow())}},me.displayName="ColHeader",me.componentId="Table.ColHeader",me.allowedProps=ws,me.propTypes=ys,me.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},me))||qi);const Ss=(n,e)=>{const t=e.textAlign;return{rowHeader:{label:"rowHeader",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:"bold",color:n.color,background:n.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:n.lineHeight,padding:n.padding,...t&&{textAlign:t}}}},Os=n=>{const e=n.colors,t=n.typography,i=n.spacing;return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:t==null?void 0:t.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},xs={children:o.oneOfType([o.node,o.func]),isStacked:o.bool,textAlign:o.oneOf(["start","center","end"])},$s=["children","isStacked","textAlign"];var Ui,Zi,be;let Dt=(Ui=F(Ss,Os),Ui(Zi=(be=class It extends b.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,i=e.isStacked,s=e.styles;return f(j,Object.assign({},j.omitViewProps(E(this.props,It.allowedProps),It),{as:i?"div":"th",css:s==null?void 0:s.rowHeader,scope:"row",role:i?"rowheader":void 0}),ie(t))}},be.displayName="RowHeader",be.componentId="Table.RowHeader",be.allowedProps=$s,be.propTypes=xs,be.defaultProps={textAlign:"start",children:null},be))||Zi);const _s=(n,e)=>{const t=e.textAlign;return{cell:{label:"cell",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:n.lineHeight,padding:n.padding,...t&&{textAlign:t}}}},ks=n=>{const e=n.colors,t=n.typography,i=n.spacing;return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:t==null?void 0:t.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},Rs={children:o.oneOfType([o.node,o.func]),isStacked:o.bool,header:o.oneOfType([o.node,o.func]),textAlign:o.oneOf(["start","center","end"])},Cs=["children","isStacked","header","textAlign"];var Xi,Yi,ve;let Wt=(Xi=F(_s,ks),Xi(Yi=(ve=class At extends b.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,i=e.styles,s=e.isStacked,r=e.header;return f(j,Object.assign({},j.omitViewProps(E(this.props,At.allowedProps),At),{as:s?"div":"td",css:i==null?void 0:i.cell,role:s?"cell":void 0}),r&&ie(r),r&&": ",ie(t))}},ve.displayName="Cell",ve.componentId="Table.Cell",ve.allowedProps=Cs,ve.propTypes=Rs,ve.defaultProps={textAlign:"start",children:null},ve))||Yi);const Is={children:Y.oneOf([Me,Dt,Wt]),hover:o.bool,isStacked:o.bool,headers:o.arrayOf(o.oneOfType([o.node,o.func]))},As=["children","hover","isStacked","headers"];var Ki,Ji,ye;let _e=(Ki=F(gs,ms),Ki(Ji=(ye=class Lt extends b.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,i=e.styles,s=e.isStacked,r=e.headers;return f(j,Object.assign({},j.omitViewProps(E(this.props,Lt.allowedProps),Lt),{as:s?"div":"tr",css:i==null?void 0:i.row,role:s?"row":void 0}),b.Children.toArray(t).filter(Boolean).map((c,u)=>L(c,[Me])?c:L(c,[Dt])?$e(c,{key:c.props.name,isStacked:s}):L(c,[Wt])?$e(c,{key:c.props.name,isStacked:s,header:r&&r[u]}):null))}},ye.displayName="Row",ye.componentId="Table.Row",ye.allowedProps=As,ye.propTypes=Is,ye.defaultProps={children:null},ye))||Ji);const Ls={children:Y.oneOf([_e]),isStacked:o.bool,renderSortLabel:o.oneOfType([o.node,o.func])},Ps=["children","isStacked","renderSortLabel"];var Qi,eo,we,to;let ut=(Qi=F(hs,fs),Qi(eo=(we=class Oo extends b.Component{get isSortable(){const e=b.Children.toArray(this.props.children),t=ht(e,1),i=t[0];let s=!1;return i&&b.Children.forEach(i.props.children,r=>{L(r,[Me])&&r.props.onRequestSort&&(s=!0)}),s}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;this.isSortable&&typeof this.props.renderSortLabel>"u"&&ao(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}renderSelect(){const e=this.props,t=e.children,i=e.renderSortLabel,s=b.Children.toArray(t),r=ht(s,1),c=r[0];if(!L(c,[_e]))return null;const u=[],m={};let g,v=0;if(b.Children.forEach(c.props.children,l=>{if(v+=1,L(l,[Me])){const a=l.props,d=a.id,p=a.stackedSortByLabel,h=a.sortDirection,C=a.onRequestSort,z=p||d;C&&(u.push({id:d,label:z}),m[d]=C,h!=="none"&&(g=d))}}),!u.length)return null;const w=(l,{value:a})=>{a&&typeof m[a]=="function"&&m[a](l,{id:`${a}`})};return f("div",{role:"rowgroup"},f("div",{role:"row"},f("div",{role:"cell","aria-colspan":v},f(Ni,{renderLabel:i?ie(i):to||(to=f(ke,null)),renderBeforeInput:g&&oe,value:g,onChange:w},u.map(({id:l,label:a})=>f(Ni.Option,{id:l,key:l,value:l,renderBeforeLabel:l===g?oe:()=>f(oe,{style:{color:"transparent"}})},a))))))}render(){const e=this.props,t=e.children,i=e.isStacked,s=e.styles;return i?this.renderSelect():f("thead",Object.assign({},E(this.props,Oo.allowedProps),{css:s==null?void 0:s.head}),b.Children.map(t,r=>L(r,[_e])?r:null))}},we.displayName="Head",we.componentId="Table.Head",we.allowedProps=Ps,we.propTypes=Ls,we.defaultProps={children:null},we))||eo);const Bs=n=>({body:{label:"body",fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,color:n.color,background:n.background}}),zs=n=>{const e=n.colors,t=n.typography;return{...{fontSize:t==null?void 0:t.fontSizeMedium,fontFamily:t==null?void 0:t.fontFamily,fontWeight:t==null?void 0:t.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Fs={children:Y.oneOf([_e]),hover:o.bool,isStacked:o.bool,headers:o.arrayOf(o.oneOfType([o.node,o.func]))},Es=["children","hover","isStacked","headers"];var io,oo,Se;let Pt=(io=F(Bs,zs),io(oo=(Se=class Bt extends b.Component{componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}render(){const e=this.props,t=e.children,i=e.hover,s=e.isStacked,r=e.headers,c=e.styles;return f(j,Object.assign({},j.omitViewProps(E(this.props,Bt.allowedProps),Bt),{as:s?"div":"tbody",css:c==null?void 0:c.body,role:s?"rowgroup":void 0}),b.Children.map(t,u=>L(u,[_e])?$e(u,{key:u.props.name,hover:i,isStacked:s,headers:r}):null))}},Se.displayName="Body",Se.componentId="Table.Body",Se.allowedProps=Es,Se.propTypes=Fs,Se.defaultProps={children:null},Se))||oo);const Ms={caption:o.node.isRequired,children:Y.oneOf([ut,Pt]),margin:Ft.spacing,elementRef:o.func,hover:o.bool,layout:o.oneOf(["auto","fixed","stacked"])},Hs=["caption","children","margin","elementRef","hover","layout"];var no,so,H;let ir=(no=F(cs,us),no(so=(H=class zt extends b.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=t=>{const i=this.props.elementRef;this.ref=t,typeof i=="function"&&i(t)}}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t)}getHeaders(){const e=this.props.children,t=b.Children.toArray(e),i=ht(t,1),s=i[0];if(L(s,[ut])){const r=b.Children.toArray(s.props.children),c=ht(r,1),u=c[0];if(L(u,[_e]))return b.Children.map(u.props.children,m=>L(m,[Me])?m.props.children:void 0)}}render(){const e=this.props,t=e.margin,i=e.layout,s=e.caption,r=e.children,c=e.hover,u=e.styles,m=i==="stacked",g=m?this.getHeaders():void 0;return f(j,Object.assign({},j.omitViewProps(E(this.props,zt.allowedProps),zt),{as:m?"div":"table",margin:t,elementRef:this.handleRef,css:u==null?void 0:u.table,role:m?"table":void 0,"aria-label":m?s:void 0}),!m&&f("caption",null,f(ke,null,s)),b.Children.map(r,v=>L(v,[ut])?$e(v,{key:v.props.name,isStacked:m}):L(v,[Pt])?$e(v,{key:v.props.name,isStacked:m,hover:c,headers:g}):null))}},H.displayName="Table",H.componentId="Table",H.allowedProps=Hs,H.propTypes=Ms,H.defaultProps={children:null,hover:!1,layout:"auto"},H.Head=ut,H.Body=Pt,H.Row=_e,H.ColHeader=Me,H.RowHeader=Dt,H.Cell=Wt,H))||so);const Ds=Lo` + to { + opacity: 1; + }`,Ws=(n,e,t)=>{const i=e.fluidWidth,s=e.iconPosition,r=e.size,c=e.variant,u=t.animate,m=s==="end"&&(c==="filled"||i),g=i?{display:"block",width:"100%"}:{},v={start:{marginInlineEnd:n.iconMargin,marginInlineStart:0},end:{marginInlineStart:n.iconMargin,marginInlineEnd:0}},w={small:{fontSize:n.fontSizeSmall},medium:{fontSize:n.fontSizeMedium},large:{fontSize:n.fontSizeLarge}},l={small:{fontSize:n.smallIconSize},medium:{fontSize:n.mediumIconSize},large:{fontSize:n.largeIconSize}},a=s==="start"&&!i?{small:{paddingInlineStart:`calc(${n.smallIconSize} + ${n.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${n.mediumIconSize} + ${n.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${n.largeIconSize} + ${n.togglePadding})`,paddingInlineEnd:"0"}}:{small:{},medium:{},large:{}};return{toggleDetails:{label:"toggleDetails",fontFamily:n.fontFamily,fontWeight:n.fontWeight,lineHeight:n.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...m?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:n.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:n.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${n.toggleBorderWidth} ${n.toggleBorderStyle} ${n.toggleFocusBorderColor}`,borderRadius:`calc(${n.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:n.textColor},textDecoration:"none",...g,...w[r]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...v[s],...l[r]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:n.togglePadding,color:n.textColor,...w[r],...a[r]},content:u?{label:"toggleDetails__content",opacity:.01,animationName:Ds,animationFillMode:"forwards",animationDuration:".3s"}:{}}},Ts=n=>{const e=n.colors,t=n.spacing,i=n.borders,s=n.typography,r=n.key,c={canvas:{toggleFocusBorderColor:n["ic-brand-primary"],iconColor:n["ic-brand-font-color-dark"],textColor:n["ic-brand-font-color-dark"]}};return{...{fontFamily:s==null?void 0:s.fontFamily,fontWeight:s==null?void 0:s.fontWeightNormal,lineHeight:s==null?void 0:s.lineHeight,textColor:e==null?void 0:e.textDarkest,fontSizeSmall:s==null?void 0:s.fontSizeSmall,fontSizeMedium:s==null?void 0:s.fontSizeMedium,fontSizeLarge:s==null?void 0:s.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:t==null?void 0:t.xxSmall,iconColor:e==null?void 0:e.textDarkest,togglePadding:t==null?void 0:t.xxSmall,toggleBorderRadius:i==null?void 0:i.radiusMedium,toggleBorderWidth:i==null?void 0:i.widthMedium,toggleBorderStyle:i==null?void 0:i.style,toggleFocusBorderColor:e==null?void 0:e.borderBrand,filledBackgroundColor:e==null?void 0:e.backgroundLight,filledBorderWidth:i==null?void 0:i.widthSmall,filledBorderStyle:i==null?void 0:i.style,filledBorderColor:e==null?void 0:e.borderMedium,filledBorderRadius:i==null?void 0:i.radiusMedium,filledPadding:t==null?void 0:t.small},...c[r]}},Ns={variant:o.oneOf(["default","filled"]),summary:o.node.isRequired,expanded:Et(o.bool,"onToggle","defaultExpanded"),defaultExpanded:o.bool,onToggle:o.func,icon:o.func,iconExpanded:o.func,iconPosition:o.oneOf(["start","end"]),fluidWidth:o.bool,children:o.node,size:o.oneOf(["small","medium","large"])},Vs=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"];var ro,lo,ct,Oe;let or=(ro=F(Ws,Ts),lo=De(),ro(ct=lo(ct=(Oe=class xo extends b.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=t=>this._button=t,this.handleToggle=(t,i)=>{var s,r;typeof this.props.onToggle=="function"&&this.props.onToggle(t,i),(s=(r=this.props).makeStyles)===null||s===void 0||s.call(r,{animate:!0})}}get focused(){return Mt(this._button)}focus(){var e;(e=this._button)===null||e===void 0||e.focus()}componentDidMount(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{animate:!1})}componentDidUpdate(){var e,t;(e=(t=this.props).makeStyles)===null||e===void 0||e.call(t,{animate:!0})}renderSummary(e){var t,i;const s=this.props,r=s.summary,c=s.iconPosition;return f("span",{css:(t=this.props.styles)===null||t===void 0?void 0:t.summary},c==="start"&&this.renderIcon(e),f("span",{css:(i=this.props.styles)===null||i===void 0?void 0:i.summaryText},r),c==="end"&&this.renderIcon(e))}renderToggle(e,t){const i=this.props.variant,s={...E(this.props,xo.allowedProps),...e,children:this.renderSummary(t)},r=this.renderSummary(t);if(i==="filled")return f(qo,Object.assign({},s,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),r);if(s.href){var c;return f("a",Object.assign({},s,{css:(c=this.props.styles)===null||c===void 0?void 0:c.toggle,ref:this.getButtonRef}),r)}else{var u;return f("button",Object.assign({},s,{type:"button",css:(u=this.props.styles)===null||u===void 0?void 0:u.toggle,ref:this.getButtonRef}),r)}}renderIcon(e){var t;const i=e?this.props.iconExpanded:this.props.icon;return this.props.children&&i?f("span",{css:(t=this.props.styles)===null||t===void 0?void 0:t.icon},f(i,null)):null}renderDetails(e,t){var i;const s=this.props.children,r=e?{display:"block"}:{display:"none"};return f("div",Object.assign({},t,{css:[(i=this.props.styles)===null||i===void 0?void 0:i.details,r]}),s&&e&&this.renderContent())}renderContent(){var e;return f("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.content},this.props.children)}render(){return f(Di,Object.assign({},He(this.props,Di.allowedProps),{onToggle:this.handleToggle}),({expanded:e,getToggleProps:t,getDetailsProps:i})=>{var s;return f("div",{css:(s=this.props.styles)===null||s===void 0?void 0:s.toggleDetails,ref:r=>{this.ref=r}},this.renderToggle(t(),e),this.renderDetails(e,i()))})}},Oe.displayName="ToggleDetails",Oe.componentId="ToggleDetails",Oe.allowedProps=Vs,Oe.propTypes=Ns,Oe.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:Fo,iconExpanded:Eo,iconPosition:"start",defaultExpanded:!1,children:null},Oe))||ct)||ct);export{qo as B,Re as F,N as G,Ke as I,or as T,Ys as a,Tn as b,ir as c,Us as d,Je as e,Oi as f,We as g,Te as h}; diff --git a/assets/index-BIsQGgQp.js b/assets/index-BIsQGgQp.js new file mode 100644 index 00000000..7bd77d85 --- /dev/null +++ b/assets/index-BIsQGgQp.js @@ -0,0 +1 @@ +import{P as s,T as f,w as y,r as k,d,x as S,V as u,o as C}from"./index-DT1C1ZDw.js";import{H as z,n as x}from"./RenderTopNavBar-BKjAQtrP.js";const _=(o,i)=>{const e=i.size,l=i.href,r=i.onClick,a=i.disabled,n=i.hero,g=i.heading,p=l||r,c={small:{billboard:{padding:o.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:o.messageFontSizeSmall},heading:{...n&&{margin:`${o.mediumMargin} 0 0`}}},medium:{billboard:{padding:o.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:o.messageFontSizeMedium},heading:{}},large:{billboard:{padding:o.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:o.messageFontSizeLarge},heading:{}}},m=p?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${o.buttonBorderWidth} ${o.buttonBorderStyle} transparent`,borderRadius:o.buttonBorderRadius,background:o.backgroundColor,textDecoration:"none","&:hover":{borderStyle:o.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:o.iconHoverColor,"& [class$=-billboard__hero]":{color:o.iconHoverColor}},"&:active":{background:o.clickableActiveBg,borderColor:o.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:o.clickableActiveText}}}:{backgroundColor:o.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:o.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...c[e].billboard,...m,...a&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:o.iconColor,...c[e].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...n&&{margin:`${o.largeMargin} 0 0`},...c[e].heading},message:{label:"billboard__message",display:"block",color:p?o.messageColorClickable:o.messageColor,...(n||g)&&{margin:`${o.mediumMargin} 0 0`},...c[e].message}}},L=o=>{const i=o.borders,e=o.colors,l=o.spacing,r=o.typography,a=o.key,n={canvas:{iconHoverColor:o["ic-link-color"],messageColorClickable:o["ic-link-color"],clickableActiveBg:o["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:l==null?void 0:l.small,paddingMedium:l==null?void 0:l.medium,paddingLarge:l==null?void 0:l.medium,iconColor:e==null?void 0:e.textDark,mediumMargin:l==null?void 0:l.small,largeMargin:l==null?void 0:l.medium,iconHoverColor:e==null?void 0:e.textLink,backgroundColor:e==null?void 0:e.backgroundLightest,iconHoverColorInverse:e==null?void 0:e.textLightest,buttonBorderWidth:i==null?void 0:i.widthMedium,buttonBorderRadius:i==null?void 0:i.radiusLarge,messageColor:e==null?void 0:e.textDark,messageColorClickable:e==null?void 0:e.textLink,messageColorInverse:e==null?void 0:e.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:e==null?void 0:e.backgroundBrand,clickableActiveText:e==null?void 0:e.textLightest,buttonBorderStyle:i==null?void 0:i.style,buttonHoverBorderStyle:"dashed"},...n[a]}},$={hero:s.oneOfType([s.element,s.func]),size:s.oneOf(["small","medium","large"]),as:s.elementType,elementRef:s.func,heading:s.string,headingAs:s.oneOf(["h1","h2","h3","span"]),headingLevel:s.oneOf(["h1","h2","h3","h4"]),message:s.oneOfType([s.node,s.func]),onClick:s.func,href:s.string,disabled:s.bool,readOnly:s.bool,margin:f.spacing},B=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var v,h,t;let R=(v=y(_,L),v(h=(t=class b extends k.Component{constructor(...i){super(...i),this.ref=null,this.handleRef=e=>{const l=this.props.elementRef;this.ref=e,typeof l=="function"&&l(e)},this.handleClick=e=>{const l=this.props,r=l.readOnly,a=l.onClick;r?(e.preventDefault(),e.stopPropagation()):typeof a=="function"&&a(e)}}componentDidMount(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}componentDidUpdate(){var i,e;(i=(e=this.props).makeStyles)===null||i===void 0||i.call(e)}renderHeading(){const i=this.props,e=i.headingLevel,l=i.headingAs,r=i.heading,a=i.styles;return d("span",{css:a==null?void 0:a.heading},d(z,{level:e,as:l,color:"primary"},r))}get SVGIconSize(){const i=this.props.size;return i==="small"?"medium":i==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const i=this.props,e=i.heading,l=i.message,r=i.hero,a=i.styles;return d("span",{css:a==null?void 0:a.content},r&&d("span",{css:a==null?void 0:a.hero},this.renderHero()),e&&this.renderHeading(),l&&d("span",{css:a==null?void 0:a.message},x(l)))}render(){const i=this.props,e=i.href,l=i.disabled,r=i.readOnly,a=i.margin,n=i.styles,g=S(b,this.props);return d(u,{as:"div",margin:a},d(u,Object.assign({},C(this.props,[...b.allowedProps,...u.allowedProps]),{type:g==="button"?"button":void 0,as:g,elementRef:this.handleRef,css:n==null?void 0:n.billboard,href:e,onClick:this.handleClick,disabled:l,"aria-disabled":l||r?"true":void 0}),this.renderContent()))}},t.displayName="Billboard",t.componentId="Billboard",t.propTypes=$,t.allowedProps=B,t.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},t))||h);export{R as B}; diff --git a/assets/index-Bg_tX0Zf.js b/assets/index-Bg_tX0Zf.js deleted file mode 100644 index 6faee3c9..00000000 --- a/assets/index-Bg_tX0Zf.js +++ /dev/null @@ -1,314 +0,0 @@ -function j_(t,e){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var qv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var C6={exports:{}},TO={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var fH=Symbol.for("react.transitional.element"),pH=Symbol.for("react.fragment");function T6(t,e,n){var i=null;if(n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),"key"in e){n={};for(var r in e)r!=="key"&&(n[r]=e[r])}else n=e;return e=n.ref,{$$typeof:fH,type:t,key:i,ref:e!==void 0?e:null,props:n}}TO.Fragment=pH;TO.jsx=T6;TO.jsxs=T6;C6.exports=TO;var L=C6.exports,A6={exports:{}},je={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var X_=Symbol.for("react.transitional.element"),mH=Symbol.for("react.portal"),gH=Symbol.for("react.fragment"),bH=Symbol.for("react.strict_mode"),OH=Symbol.for("react.profiler"),yH=Symbol.for("react.consumer"),vH=Symbol.for("react.context"),SH=Symbol.for("react.forward_ref"),wH=Symbol.for("react.suspense"),_H=Symbol.for("react.memo"),R6=Symbol.for("react.lazy"),q2=Symbol.iterator;function kH(t){return t===null||typeof t!="object"?null:(t=q2&&t[q2]||t["@@iterator"],typeof t=="function"?t:null)}var P6={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I6=Object.assign,$6={};function mh(t,e,n){this.props=t,this.context=e,this.refs=$6,this.updater=n||P6}mh.prototype.isReactComponent={};mh.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};mh.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function D6(){}D6.prototype=mh.prototype;function Z_(t,e,n){this.props=t,this.context=e,this.refs=$6,this.updater=n||P6}var q_=Z_.prototype=new D6;q_.constructor=Z_;I6(q_,mh.prototype);q_.isPureReactComponent=!0;var Y2=Array.isArray,Zt={H:null,A:null,T:null},L6=Object.prototype.hasOwnProperty;function Y_(t,e,n,i,r,s,o){return n=o.ref,{$$typeof:X_,type:t,key:e,ref:n!==void 0?n:null,props:o}}function xH(t,e){return Y_(t.type,e,null,void 0,void 0,void 0,t.props)}function G_(t){return typeof t=="object"&&t!==null&&t.$$typeof===X_}function EH(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var G2=/\/+/g;function G1(t,e){return typeof t=="object"&&t!==null&&t.key!=null?EH(""+t.key):e.toString(36)}function K2(){}function CH(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(K2,K2):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function Yc(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"bigint":case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case X_:case mH:o=!0;break;case R6:return o=t._init,Yc(o(t._payload),e,n,i,r)}}if(o)return r=r(t),o=i===""?"."+G1(t,0):i,Y2(r)?(n="",o!=null&&(n=o.replace(G2,"$&/")+"/"),Yc(r,e,n,"",function(u){return u})):r!=null&&(G_(r)&&(r=xH(r,n+(!r.key||t&&t.key===r.key?"":(""+r.key).replace(G2,"$&/")+"/")+o)),e.push(r)),1;o=0;var a=i===""?".":i+":";if(Y2(t))for(var l=0;l>>1,P=Z[fe];if(0>>1;fer($,ee))$er(Fe,$)?(Z[fe]=Fe,Z[$e]=ee,fe=$e):(Z[fe]=$,Z[_e]=ee,fe=_e);else if($er(Fe,ee))Z[fe]=Fe,Z[$e]=ee,fe=$e;else break e}}return ne}function r(Z,ne){var ee=Z.sortIndex-ne.sortIndex;return ee!==0?ee:Z.id-ne.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,h=3,f=!1,m=!1,b=!1,y=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function S(Z){for(var ne=n(u);ne!==null;){if(ne.callback===null)i(u);else if(ne.startTime<=Z)i(u),ne.sortIndex=ne.expirationTime,e(l,ne);else break;ne=n(u)}}function _(Z){if(b=!1,S(Z),!m)if(n(l)!==null)m=!0,J();else{var ne=n(u);ne!==null&&re(_,ne.startTime-Z)}}var k=!1,x=-1,w=5,M=-1;function H(){return!(t.unstable_now()-MZ&&H());){var fe=d.callback;if(typeof fe=="function"){d.callback=null,h=d.priorityLevel;var P=fe(d.expirationTime<=Z);if(Z=t.unstable_now(),typeof P=="function"){d.callback=P,S(Z),ne=!0;break t}d===n(l)&&i(l),S(Z)}else i(l);d=n(l)}if(d!==null)ne=!0;else{var Ae=n(u);Ae!==null&&re(_,Ae.startTime-Z),ne=!1}}break e}finally{d=null,h=ee,f=!1}ne=void 0}}finally{ne?z():k=!1}}}var z;if(typeof v=="function")z=function(){v(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,X=U.port2;U.port1.onmessage=I,z=function(){X.postMessage(null)}}else z=function(){y(I,0)};function J(){k||(k=!0,z())}function re(Z,ne){x=y(function(){Z(t.unstable_now())},ne)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Z){Z.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,J())},t.unstable_forceFrameRate=function(Z){0>Z||125fe?(Z.sortIndex=ee,e(u,Z),n(l)===null&&Z===n(u)&&(b?(O(x),x=-1):b=!0,re(_,ee-fe))):(Z.sortIndex=P,e(l,Z),m||f||(m=!0,J())),Z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(Z){var ne=h;return function(){var ee=h;h=ne;try{return Z.apply(this,arguments)}finally{h=ee}}}})(B6);N6.exports=B6;var RH=N6.exports,Q6={exports:{}},xi={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function z6(t){var e="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H6)}catch(t){console.error(t)}}H6(),Q6.exports=xi;var PO=Q6.exports;const vm=Gs(PO),$H=j_({__proto__:null,default:vm},[PO]);/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var _n=RH,DH=T,LH=PO;function K(t){var e="https://react.dev/errors/"+t;if(1od||(t.current=Gv[od],Gv[od]=null,od--)}function Ht(t,e){od++,Gv[od]=t.current,t.current=e}var Bs=Ks(null),Ep=Ks(null),Aa=Ks(null),Kv=Ks(null),ob={$$typeof:wa,Provider:null,Consumer:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ab(t,e){switch(Ht(Aa,e),Ht(Ep,t),Ht(Bs,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?tC(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=tC(t),e=aL(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Rn(Bs),Ht(Bs,e)}function Ud(){Rn(Bs),Rn(Ep),Rn(Aa)}function Jv(t){t.memoizedState!==null&&Ht(Kv,t);var e=Bs.current,n=aL(e,t.type);e!==n&&(Ht(Ep,t),Ht(Bs,n))}function lb(t){Ep.current===t&&(Rn(Bs),Rn(Ep)),Kv.current===t&&(Rn(Kv),ob._currentValue=null)}var eS=Object.prototype.hasOwnProperty,K_=_n.unstable_scheduleCallback,K1=_n.unstable_cancelCallback,UH=_n.unstable_shouldYield,FH=_n.unstable_requestPaint,Qs=_n.unstable_now,VH=_n.unstable_getCurrentPriorityLevel,J_=_n.unstable_ImmediatePriority,q6=_n.unstable_UserBlockingPriority,ub=_n.unstable_NormalPriority,WH=_n.unstable_LowPriority,Y6=_n.unstable_IdlePriority,jH=_n.log,XH=_n.unstable_setDisableYieldValue,Sm=null,ar=null;function ZH(t){if(ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(Sm,t,void 0,(t.current.flags&128)===128)}catch{}}function _a(t){if(typeof jH=="function"&&XH(t),ar&&typeof ar.setStrictMode=="function")try{ar.setStrictMode(Sm,t)}catch{}}var Ar=Math.clz32?Math.clz32:GH,qH=Math.log,YH=Math.LN2;function GH(t){return t>>>=0,t===0?32:31-(qH(t)/YH|0)|0}var eg=128,tg=4194304;function Lf(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function cb(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes;t=t.pingedLanes;var s=n&134217727;return s!==0?(n=s&~r,n!==0?i=Lf(n):(t&=s,t!==0&&(i=Lf(t)))):(n&=~r,n!==0?i=Lf(n):t!==0&&(i=Lf(t))),i===0?0:e!==0&&e!==i&&!(e&r)&&(r=i&-i,t=e&-e,r>=t||r===32&&(t&4194176)!==0)?e:i}function KH(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G6(t,e){return t.errorRecoveryDisabledLanes&e?0:(t=t.pendingLanes&-536870913,t!==0?t:t&536870912?536870912:0)}function K6(){var t=eg;return eg<<=1,!(eg&4194176)&&(eg=128),t}function J6(){var t=tg;return tg<<=1,!(tg&62914560)&&(tg=4194304),t}function J1(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function JH(t,e,n){var i=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0,e=t.entanglements;for(var r=t.expirationTimes,s=t.hiddenUpdates;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iU=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),oE={},aE={};function rU(t){return eS.call(aE,t)?!0:eS.call(oE,t)?!1:iU.test(t)?aE[t]=!0:(oE[t]=!0,!1)}function _0(t,e,n){if(rU(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var i=e.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function ey(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function io(t,e,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+i)}}var ty;function Nf(t){if(ty===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ty=e&&e[1]||""}return` -`+ty+t}var ny=!1;function iy(t,e){if(!t||ny)return"";ny=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var i={DetermineComponentFrameRoot:function(){try{if(e){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(f){var h=f}Reflect.construct(t,[],d)}else{try{d.call()}catch(f){h=f}t.call(d.prototype)}}else{try{throw Error()}catch(f){h=f}(d=t())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(f){if(f&&h&&typeof f.stack=="string")return[f.stack,h.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});try{var s=i.DetermineComponentFrameRoot(),o=s[0],a=s[1];if(o&&a){var l=o.split(` -`),u=a.split(` -`);for(r=i=0;ir||l[i]!==u[r]){var c=` -`+l[i].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=i&&0<=r);break}}}finally{ny=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Nf(n):""}function sU(t){switch(t.tag){case 26:case 27:case 5:return Nf(t.type);case 16:return Nf("Lazy");case 13:return Nf("Suspense");case 19:return Nf("SuspenseList");case 0:case 15:return t=iy(t.type,!1),t;case 11:return t=iy(t.type.render,!1),t;case 1:return t=iy(t.type,!0),t;default:return""}}function lE(t){try{var e="";do e+=sU(t),t=t.return;while(t);return e}catch(n){return` -Error generating stack: `+n.message+` -`+n.stack}}function Or(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function o4(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function oU(t){var e=o4(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function db(t){t._valueTracker||(t._valueTracker=oU(t))}function a4(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=o4(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function hb(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var aU=/[\n"\\]/g;function kr(t){return t.replace(aU,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function nS(t,e,n,i,r,s,o,a){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Or(e)):t.value!==""+Or(e)&&(t.value=""+Or(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?iS(t,o,Or(e)):n!=null?iS(t,o,Or(n)):i!=null&&t.removeAttribute("value"),r==null&&s!=null&&(t.defaultChecked=!!s),r!=null&&(t.checked=r&&typeof r!="function"&&typeof r!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?t.name=""+Or(a):t.removeAttribute("name")}function l4(t,e,n,i,r,s,o,a){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(t.type=s),e!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||e!=null))return;n=n!=null?""+Or(n):"",e=e!=null?""+Or(e):n,a||e===t.value||(t.value=e),t.defaultValue=e}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=a?t.checked:!!i,t.defaultChecked=!!i,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o)}function iS(t,e,n){e==="number"&&hb(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function wd(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r=Yf),mE=" ",gE=!1;function m4(t,e){switch(t){case"keyup":return LU.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function g4(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ld=!1;function NU(t,e){switch(t){case"compositionend":return g4(e);case"keypress":return e.which!==32?null:(gE=!0,mE);case"textInput":return t=e.data,t===mE&&gE?null:t;default:return null}}function BU(t,e){if(ld)return t==="compositionend"||!sk&&m4(t,e)?(t=f4(),x0=ik=ka=null,ld=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=SE(n)}}function v4(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?v4(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function S4(){for(var t=window,e=hb();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=hb(t.document)}return e}function ok(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function jU(t){var e=S4(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&v4(n.ownerDocument.documentElement,n)){if(i!==null&&ok(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=wE(n,s);var o=wE(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ud=null,oS=null,Kf=null,aS=!1;function _E(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;aS||ud==null||ud!==hb(i)||(i=ud,"selectionStart"in i&&ok(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Kf&&Rp(Kf,i)||(Kf=i,i=Tb(oS,"onSelect"),0>=o,r-=o,Oo=1<<32-Ar(e)+r|n<M?(H=w,w=null):H=w.sibling;var I=h(O,w,S[M],_);if(I===null){w===null&&(w=H);break}t&&w&&I.alternate===null&&e(O,w),v=s(I,v,M),x===null?k=I:x.sibling=I,x=I,w=H}if(M===S.length)return n(O,w),ft&&au(O,M),k;if(w===null){for(;MM?(H=w,w=null):H=w.sibling;var z=h(O,w,I.value,_);if(z===null){w===null&&(w=H);break}t&&w&&z.alternate===null&&e(O,w),v=s(z,v,M),x===null?k=z:x.sibling=z,x=z,w=H}if(I.done)return n(O,w),ft&&au(O,M),k;if(w===null){for(;!I.done;M++,I=S.next(),null)I=d(O,I.value,_),I!==null&&(v=s(I,v,M),x===null?k=I:x.sibling=I,x=I);return ft&&au(O,M),k}for(w=i(w);!I.done;M++,I=S.next(),null)I=f(w,O,M,I.value,_),I!==null&&(t&&I.alternate!==null&&w.delete(I.key===null?M:I.key),v=s(I,v,M),x===null?k=I:x.sibling=I,x=I);return t&&w.forEach(function(U){return e(O,U)}),ft&&au(O,M),k}function y(O,v,S,_){if(typeof S=="object"&&S!==null&&S.type===$f&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Km:e:{for(var k=S.key,x=v;x!==null;){if(x.key===k){if(k=S.type,k===$f){if(x.tag===7){n(O,x.sibling),v=r(x,S.props.children),v.return=O,O=v;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ou&&RE(k)===x.type){n(O,x.sibling),v=r(x,S.props),lf(O,x,v,S),v.return=O,O=v;break e}n(O,x);break}else e(O,x);x=x.sibling}S.type===$f?(v=ku(S.props.children,O.mode,_,S.key),v.return=O,O=v):(_=I0(S.type,S.key,S.props,null,O.mode,_),lf(O,v,_,S),_.return=O,O=_)}return o(O);case Jm:e:{for(x=S.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(O,v.sibling),v=r(v,S.children||[]),v.return=O,O=v;break e}else{n(O,v);break}else e(O,v);v=v.sibling}v=ky(S,O.mode,_),v.return=O,O=v}return o(O);case ou:return x=S._init,y(O,v,x(S._payload),_)}if(Df(S))return m(O,v,S,_);if(rf(S)){if(x=rf(S),typeof x!="function")throw Error(K(150));return S=x.call(S),b(O,v,S,_)}if(typeof S.then=="function")return y(O,v,rg(S),_);if(S.$$typeof===wa)return y(O,v,lg(O,S,_),_);sg(O,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,v!==null&&v.tag===6?(n(O,v.sibling),v=r(v,S),v.return=O,O=v):(n(O,v),v=_y(S,O.mode,_),v.return=O,O=v),o(O)):n(O,v)}return function(O,v,S,_){return Ip=0,O=y(O,v,S,_),kd=null,O}}var Tu=I4(!0),$4=I4(!1),Wd=Ks(null),gb=Ks(0);function PE(t,e){t=Po,Ht(gb,t),Ht(Wd,e),Po=t|e.baseLanes}function cS(){Ht(gb,Po),Ht(Wd,Wd.current)}function dk(){Po=gb.current,Rn(Wd),Rn(gb)}var Ws=Ks(null),zs=null;function ba(t){var e=t.alternate;Ht(Sn,Sn.current&1),Ht(Ws,t),zs===null&&(e===null||Wd.current!==null||e.memoizedState!==null)&&(zs=t)}function D4(t){if(t.tag===22){if(Ht(Sn,Sn.current),Ht(Ws,t),zs===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(zs=t)}}else Oa()}function Oa(){Ht(Sn,Sn.current),Ht(Ws,Ws.current)}function vo(t){Rn(Ws),zs===t&&(zs=null),Rn(Sn)}var Sn=Ks(0);function bb(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var GU=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,i){t.push(i)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},KU=_n.unstable_scheduleCallback,JU=_n.unstable_NormalPriority,yn={$$typeof:wa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hk(){return{controller:new GU,data:new Map,refCount:0}}function km(t){t.refCount--,t.refCount===0&&KU(JU,function(){t.controller.abort()})}var ep=null,dS=0,jd=0,xd=null;function eF(t,e){if(ep===null){var n=ep=[];dS=0,jd=Bk(),xd={status:"pending",value:void 0,then:function(i){n.push(i)}}}return dS++,e.then(IE,IE),e}function IE(){if(ep!==null&&--dS===0){xd!==null&&(xd.status="fulfilled");var t=ep;ep=null,jd=0,xd=null;for(var e=0;es?s:8;var o=Je.T,a={_callbacks:new Set};Je.T=a,Ek(t,!1,e,n);try{var l=r();if(l!==null&&typeof l=="object"&&typeof l.then=="function"){L4(a,l);var u=tF(l,i);Td(t,e,u)}else Td(t,e,i)}catch(c){Td(t,e,{then:function(){},status:"rejected",reason:c})}finally{Dt.p=s,Je.T=o}}function aF(){}function fS(t,e,n,i){if(t.tag!==5)throw Error(K(476));var r=aD(t).queue;oD(t,r,e,qf,n===null?aF:function(){return lD(t),n(i)})}function aD(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:qf,baseState:qf,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:qf},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function lD(t){fk();var e=aD(t).next.queue;Td(t,e,{})}function xk(){var t=ii(ob);return t!==null?t:qf}function uD(){return pn().memoizedState}function cD(){return pn().memoizedState}function lF(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=ko();t=_o(n);var i=Ra(e,t,n);i!==null&&(wi(i,e,n),np(i,e,n)),e={cache:hk()},t.payload=e;return}e=e.return}}function uF(t,e,n){var i=ko();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},zO(t)?dD(e,n):(n=lk(t,e,n,i),n!==null&&(wi(n,t,i),hD(n,e,i)))}function Td(t,e,n){var i=ko(),r={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(zO(t))dD(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,$r(a,o)){MO(t,e,r,0),yt===null&&LO();return}}catch{}finally{}n=lk(t,e,r,i),n!==null&&(wi(n,t,i),hD(n,e,i))}}function Ek(t,e,n,i){if(fk(),i={lane:2,revertLane:Bk(),action:i,hasEagerState:!1,eagerState:null,next:null},zO(t)){if(e)throw Error(K(479))}else e=lk(t,n,i,2),e!==null&&wi(e,t,2)}function zO(t){var e=t.alternate;return t===We||e!==null&&e===We}function dD(t,e){Ed=Ob=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function hD(t,e,n){if(n&4194176){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,t4(t,n)}}var js={readContext:ii,use:BO,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en};js.useCacheRefresh=en;js.useMemoCache=en;js.useHostTransitionStatus=en;js.useFormState=en;js.useActionState=en;js.useOptimistic=en;var Gu={readContext:ii,use:BO,useCallback:function(t,e){return Ii().memoizedState=[t,e===void 0?null:e],t},useContext:ii,useEffect:$E,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,R0(4194308,4,tD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return R0(4194308,4,t,e)},useInsertionEffect:function(t,e){R0(4,2,t,e)},useMemo:function(t,e){var n=Ii();e=e===void 0?null:e;var i=t();return Au&&(_a(!0),t(),_a(!1)),n.memoizedState=[i,e],i},useReducer:function(t,e,n){var i=Ii();if(n!==void 0){var r=n(e);Au&&(_a(!0),n(e),_a(!1))}else r=e;return i.memoizedState=i.baseState=r,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},i.queue=t,t=t.dispatch=uF.bind(null,We,t),[i.memoizedState,t]},useRef:function(t){var e=Ii();return t={current:t},e.memoizedState=t},useState:function(t){t=hS(t);var e=t.queue,n=Td.bind(null,We,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:_k,useDeferredValue:function(t,e){var n=Ii();return kk(n,t,e)},useTransition:function(){var t=hS(!1);return t=oD.bind(null,We,t.queue,!0,!1),Ii().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var i=We,r=Ii();if(ft){if(n===void 0)throw Error(K(407));n=n()}else{if(n=e(),yt===null)throw Error(K(349));mt&60||z4(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,$E(U4.bind(null,i,s,t),[t]),i.flags|=2048,Xd(9,H4.bind(null,i,s,n,e),{destroy:void 0},null),n},useId:function(){var t=Ii(),e=yt.identifierPrefix;if(ft){var n=yo,i=Oo;n=(i&~(1<<32-Ar(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=yb++,0 title"))),Xn(r,i,n),r[ni]=t,Tn(r),i=r;break e;case"link":var s=oC("link","href",e).get(i+(n.href||""));if(s){for(var o=0;o<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof i.is=="string"?r.createElement("select",{is:i.is}):r.createElement("select"),i.multiple?t.multiple=!0:i.size&&(t.size=i.size);break;default:t=typeof i.is=="string"?r.createElement(n,{is:i.is}):r.createElement(n)}}t[ni]=e,t[Si]=i;e:for(r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}e.stateNode=t;e:switch(Xn(t,n,i),n){case"button":case"input":case"select":case"textarea":t=!!i.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&oo(e)}}return qt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==i&&oo(e);else{if(typeof i!="string"&&e.stateNode===null)throw Error(K(166));if(t=Aa.current,af(e)){if(t=e.stateNode,n=e.memoizedProps,i=null,r=bi,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}t[ni]=e,t=!!(t.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||oL(t.nodeValue,n)),t||Cu(e)}else t=Ab(t).createTextNode(i),t[ni]=e,e.stateNode=t}return qt(e),null;case 13:if(i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(r=af(e),i!==null&&i.dehydrated!==null){if(t===null){if(!r)throw Error(K(318));if(r=e.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(K(317));r[ni]=e}else _m(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;qt(e),r=!1}else Zr!==null&&(TS(Zr),Zr=null),r=!0;if(!r)return e.flags&256?(vo(e),e):(vo(e),null)}if(vo(e),e.flags&128)return e.lanes=n,e;if(n=i!==null,t=t!==null&&t.memoizedState!==null,n){i=e.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool);var s=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==r&&(i.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),ug(e,e.updateQueue),qt(e),null;case 4:return Ud(),t===null&&Qk(e.stateNode.containerInfo),qt(e),null;case 10:return wo(e.type),qt(e),null;case 19:if(Rn(Sn),r=e.memoizedState,r===null)return qt(e),null;if(i=(e.flags&128)!==0,s=r.rendering,s===null)if(i)uf(r,!1);else{if(Gt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=bb(t),s!==null){for(e.flags|=128,uf(r,!1),t=s.updateQueue,e.updateQueue=t,ug(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)VD(n,t),n=n.sibling;return Ht(Sn,Sn.current&1|2),e.child}t=t.sibling}r.tail!==null&&Qs()>kb&&(e.flags|=128,i=!0,uf(r,!1),e.lanes=4194304)}else{if(!i)if(t=bb(s),t!==null){if(e.flags|=128,i=!0,t=t.updateQueue,e.updateQueue=t,ug(e,t),uf(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!ft)return qt(e),null}else 2*Qs()-r.renderingStartTime>kb&&n!==536870912&&(e.flags|=128,i=!0,uf(r,!1),e.lanes=4194304);r.isBackwards?(s.sibling=e.child,e.child=s):(t=r.last,t!==null?t.sibling=s:e.child=s,r.last=s)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Qs(),e.sibling=null,t=Sn.current,Ht(Sn,i?t&1|2:t&1),e):(qt(e),null);case 22:case 23:return vo(e),dk(),i=e.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(e.flags|=8192):i&&(e.flags|=8192),i?n&536870912&&!(e.flags&128)&&(qt(e),e.subtreeFlags&6&&(e.flags|=8192)):qt(e),n=e.updateQueue,n!==null&&ug(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),i=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),i!==n&&(e.flags|=2048),t!==null&&Rn(_u),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),wo(yn),qt(e),null;case 25:return null}throw Error(K(156,e.tag))}function gF(t,e){switch(ck(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wo(yn),Ud(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return lb(e),null;case 13:if(vo(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(K(340));_m()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Rn(Sn),null;case 4:return Ud(),null;case 10:return wo(e.type),null;case 22:case 23:return vo(e),dk(),t!==null&&Rn(_u),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return wo(yn),null;case 25:return null;default:return null}}function jD(t,e){switch(ck(e),e.tag){case 3:wo(yn),Ud();break;case 26:case 27:case 5:lb(e);break;case 4:Ud();break;case 13:vo(e);break;case 19:Rn(Sn);break;case 10:wo(e.type);break;case 22:case 23:vo(e),dk(),t!==null&&Rn(_u);break;case 24:wo(yn)}}var bF={getCacheForType:function(t){var e=ii(yn),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},OF=typeof WeakMap=="function"?WeakMap:Map,gt=0,yt=null,et=null,mt=0,jt=0,mr=null,$k=!1,Po=0,Gt=0,Io=0,yh=0,Dk=0,Li=0,op=null,es=null,qd=!1,_b=!1,Lk=0,kb=1/0,Dp=null,Ia=null,cg=!1,uu=null,ap=0,xS=0,ES=null,lp=0,CS=null;function ko(){if(gt&2&&mt!==0)return mt&-mt;if(fk()!==null){var t=jd;return t!==0?t:Bk()}return i4()}function XD(){Li===0&&(Li=!(mt&536870912)||ft?K6():536870912);var t=Ws.current;return t!==null&&(t.flags|=32),Li}function wi(t,e,n){(t===yt&&jt===2||t.cancelPendingCommit!==null)&&(ec(t,0),Is(t,mt,Li)),Em(t,n),(!(gt&2)||t!==yt)&&(t===yt&&(!(gt&2)&&(yh|=n),Gt===4&&Is(t,mt,Li)),Mi(t))}function ZD(t,e){if(gt&6)throw Error(K(327));var n=t.callbackNode;if(Ad()&&t.callbackNode!==n)return null;var i=cb(t,t===yt?mt:0);if(i===0)return null;var r=(i&60)===0&&(i&t.expiredLanes)===0&&!e;if(e=r?wF(t,i):xb(t,i),e!==0){var s=r;do{if(e===6)Is(t,i,0);else{if(r=t.current.alternate,s&&!yF(r)){e=xb(t,i),s=!1;continue}if(e===2){s=i;var o=G6(t,s);if(o!==0&&(i=o,e=qD(t,s,o),s=!1,e!==2))continue}if(e===1){ec(t,0),Is(t,i,0);break}t.finishedWork=r,t.finishedLanes=i;e:{switch(s=t,e){case 0:case 1:throw Error(K(345));case 4:if((i&4194176)===i){Is(s,i,Li);break e}break;case 2:es=null;break;case 3:case 5:break;default:throw Error(K(329))}if((i&62914560)===i&&(e=Lk+300-Qs(),10n?32:n,Je.T=null,uu===null)var s=!1;else{n=ES,ES=null;var o=uu,a=ap;if(uu=null,ap=0,gt&6)throw Error(K(331));var l=gt;if(gt|=4,UD(o.current),QD(o,o.current,a,n),gt=l,Cm(),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(Sm,o)}catch{}s=!0}return s}finally{Dt.p=r,Je.T=i,tL(t,e)}}return!1}function qE(t,e,n){e=xr(n,e),e=pS(t.stateNode,e,2),t=Ra(t,e,2),t!==null&&(Em(t,2),Mi(t))}function St(t,e,n){if(t.tag===3)qE(t,t,n);else for(;e!==null;){if(e.tag===3){qE(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ia===null||!Ia.has(i))){t=xr(n,t),n=gD(2),i=Ra(e,n,2),i!==null&&(bD(n,i,e,t),Em(i,2),Mi(i));break}}e=e.return}}function xy(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new OF;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||($k=!0,r.add(n),t=xF.bind(null,t,e,n),e.then(t,t))}function xF(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&n,gt&2?qd=!0:gt&4&&(_b=!0),Nk(),yt===t&&(mt&n)===n&&(Gt===4||Gt===3&&(mt&62914560)===mt&&300>Qs()-Lk?!(gt&2)&&ec(t,0):Dk|=n),Mi(t)}function nL(t,e){e===0&&(e=J6()),t=Ha(t,e),t!==null&&(Em(t,e),Mi(t))}function EF(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),nL(t,n)}function CF(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(K(314))}i!==null&&i.delete(e),nL(t,n)}function Nk(){if(50"u"?null:document;function cL(t,e,n){var i=vh;if(i&&typeof e=="string"&&e){var r=kr(e);r='link[rel="'+t+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),rC.has(r)||(rC.add(r),t={rel:t,crossOrigin:n,href:e},i.querySelector(r)===null&&(e=i.createElement("link"),Xn(e,"link",t),Tn(e),i.head.appendChild(e)))}}function WF(t){No.D(t),cL("dns-prefetch",t,null)}function jF(t,e){No.C(t,e),cL("preconnect",t,e)}function XF(t,e,n){No.L(t,e,n);var i=vh;if(i&&t&&e){var r='link[rel="preload"][as="'+kr(e)+'"]';e==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+kr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+kr(n.imageSizes)+'"]')):r+='[href="'+kr(t)+'"]';var s=r;switch(e){case"style":s=Yd(t);break;case"script":s=Sh(t)}Dr.has(s)||(t=Lt({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Dr.set(s,t),i.querySelector(r)!==null||e==="style"&&i.querySelector(Tm(s))||e==="script"&&i.querySelector(Am(s))||(e=i.createElement("link"),Xn(e,"link",t),Tn(e),i.head.appendChild(e)))}}function ZF(t,e){No.m(t,e);var n=vh;if(n&&t){var i=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+kr(i)+'"][href="'+kr(t)+'"]',s=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Sh(t)}if(!Dr.has(s)&&(t=Lt({rel:"modulepreload",href:t},e),Dr.set(s,t),n.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Am(s)))return}i=n.createElement("link"),Xn(i,"link",t),Tn(i),n.head.appendChild(i)}}}function qF(t,e,n){No.S(t,e,n);var i=vh;if(i&&t){var r=Sd(i).hoistableStyles,s=Yd(t);e=e||"default";var o=r.get(s);if(!o){var a={loading:0,preload:null};if(o=i.querySelector(Tm(s)))a.loading=5;else{t=Lt({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Dr.get(s))&&zk(t,n);var l=o=i.createElement("link");Tn(l),Xn(l,"link",t),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,$0(o,e,i)}o={type:"stylesheet",instance:o,count:1,state:a},r.set(s,o)}}}function YF(t,e){No.X(t,e);var n=vh;if(n&&t){var i=Sd(n).hoistableScripts,r=Sh(t),s=i.get(r);s||(s=n.querySelector(Am(r)),s||(t=Lt({src:t,async:!0},e),(e=Dr.get(r))&&Hk(t,e),s=n.createElement("script"),Tn(s),Xn(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function GF(t,e){No.M(t,e);var n=vh;if(n&&t){var i=Sd(n).hoistableScripts,r=Sh(t),s=i.get(r);s||(s=n.querySelector(Am(r)),s||(t=Lt({src:t,async:!0,type:"module"},e),(e=Dr.get(r))&&Hk(t,e),s=n.createElement("script"),Tn(s),Xn(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function KF(t,e,n){if(e=(e=Aa.current)?Rb(e):null,!e)throw Error(K(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Yd(n.href),e=Sd(e).hoistableStyles,t=e.get(n),t||(t={type:"style",instance:null,count:0,state:null},e.set(n,t)),t):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Yd(n.href);var i=Sd(e).hoistableStyles,r=i.get(t);return r||(e=e.ownerDocument||e,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,r),Dr.has(t)||JF(e,t,{rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},r.state)),r}return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Sh(n),e=Sd(e).hoistableScripts,t=e.get(n),t||(t={type:"script",instance:null,count:0,state:null},e.set(n,t)),t):{type:"void",instance:null,count:0,state:null};default:throw Error(K(444,t))}}function Yd(t){return'href="'+kr(t)+'"'}function Tm(t){return'link[rel="stylesheet"]['+t+"]"}function dL(t){return Lt({},t,{"data-precedence":t.precedence,precedence:null})}function JF(t,e,n,i){Dr.set(e,n),t.querySelector(Tm(e))||(t.querySelector('link[rel="preload"][as="style"]['+e+"]")?i.loading=1:(e=t.createElement("link"),i.preload=e,e.addEventListener("load",function(){return i.loading|=1}),e.addEventListener("error",function(){return i.loading|=2}),Xn(e,"link",n),Tn(e),t.head.appendChild(e)))}function Sh(t){return'[src="'+kr(t)+'"]'}function Am(t){return"script[async]"+t}function sC(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var i=t.querySelector('style[data-href~="'+kr(n.href)+'"]');if(i)return e.instance=i,Tn(i),i;var r=Lt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),Tn(i),Xn(i,"style",r),$0(i,n.precedence,t),e.instance=i;case"stylesheet":r=Yd(n.href);var s=t.querySelector(Tm(r));if(s)return e.state.loading|=4,e.instance=s,Tn(s),s;i=dL(n),(r=Dr.get(r))&&zk(i,r),s=(t.ownerDocument||t).createElement("link"),Tn(s);var o=s;return o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Xn(s,"link",i),e.state.loading|=4,$0(s,n.precedence,t),e.instance=s;case"script":return s=Sh(n.src),(r=t.querySelector(Am(s)))?(e.instance=r,Tn(r),r):(i=n,(r=Dr.get(s))&&(i=Lt({},n),Hk(i,r)),t=t.ownerDocument||t,r=t.createElement("script"),Tn(r),Xn(r,"link",i),t.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(K(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(i=e.instance,e.state.loading|=4,$0(i,n.precedence,t));return e.instance}function $0(t,e,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,s=r,o=0;o title"):null)}function eV(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function hL(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Np=null;function tV(){}function nV(t,e,n){if(Np===null)throw Error(K(475));var i=Np;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var r=Yd(n.href),s=t.querySelector(Tm(r));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(i.count++,i=Pb.bind(i),t.then(i,i)),e.state.loading|=4,e.instance=s,Tn(s);return}s=t.ownerDocument||t,n=dL(n),(r=Dr.get(r))&&zk(n,r),s=s.createElement("link"),Tn(s);var o=s;o._p=new Promise(function(a,l){o.onload=a,o.onerror=l}),Xn(s,"link",n),e.instance=s}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(i.count++,e=Pb.bind(i),t.addEventListener("load",e),t.addEventListener("error",e))}}function iV(){if(Np===null)throw Error(K(475));var t=Np;return t.stylesheets&&t.count===0&&NS(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yL)}catch(t){console.error(t)}}yL(),M6.exports=AO;var jk=M6.exports;const fV=Gs(jk),pV=j_({__proto__:null,default:fV},[jk]);/** - * @remix-run/router v1.16.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Xt(){return Xt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Iu(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function gV(){return Math.random().toString(36).substr(2,8)}function fC(t,e){return{usr:t.state,key:t.key,idx:e}}function Hp(t,e,n,i){return n===void 0&&(n=null),Xt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Bo(e):e,{state:n,key:e&&e.key||i||gV()})}function $u(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Bo(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function bV(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=un.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Xt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=un.Pop;let y=c(),O=y==null?null:y-u;u=y,l&&l({action:a,location:b.location,delta:O})}function h(y,O){a=un.Push;let v=Hp(b.location,y,O);n&&n(v,y),u=c()+1;let S=fC(v,u),_=b.createHref(v);try{o.pushState(S,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;r.location.assign(_)}s&&l&&l({action:a,location:b.location,delta:1})}function f(y,O){a=un.Replace;let v=Hp(b.location,y,O);n&&n(v,y),u=c();let S=fC(v,u),_=b.createHref(v);o.replaceState(S,"",_),s&&l&&l({action:a,location:b.location,delta:0})}function m(y){let O=r.location.origin!=="null"?r.location.origin:r.location.href,v=typeof y=="string"?y:$u(y);return v=v.replace(/ $/,"%20"),Ye(O,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,O)}let b={get action(){return a},get location(){return t(r,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(hC,d),l=y,()=>{r.removeEventListener(hC,d),l=null}},createHref(y){return e(r,y)},createURL:m,encodeLocation(y){let O=m(y);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:h,replace:f,go(y){return o.go(y)}};return b}var zt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(zt||(zt={}));const OV=new Set(["lazy","caseSensitive","path","id","index","children"]);function yV(t){return t.index===!0}function zS(t,e,n,i){return n===void 0&&(n=[]),i===void 0&&(i={}),t.map((r,s)=>{let o=[...n,s],a=typeof r.id=="string"?r.id:o.join("-");if(Ye(r.index!==!0||!r.children,"Cannot specify children on an index route"),Ye(!i[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),yV(r)){let l=Xt({},r,e(r),{id:a});return i[a]=l,l}else{let l=Xt({},r,e(r),{id:a,children:void 0});return i[a]=l,r.children&&(l.children=zS(r.children,e,o,i)),l}})}function gd(t,e,n){n===void 0&&(n="/");let i=typeof e=="string"?Bo(e):e,r=wh(i.pathname||"/",n);if(r==null)return null;let s=vL(t);SV(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ye(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let u=xo([i,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(Ye(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),vL(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:TV(u,s.index),routesMeta:c})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of SL(s.path))r(s,o,l)}),e}function SL(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=SL(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function SV(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:AV(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const wV=/^:[\w-]+$/,_V=3,kV=2,xV=1,EV=10,CV=-2,pC=t=>t==="*";function TV(t,e){let n=t.split("/"),i=n.length;return n.some(pC)&&(i+=CV),e&&(i+=kV),n.filter(r=>!pC(r)).reduce((r,s)=>r+(wV.test(s)?_V:s===""?xV:EV),i)}function AV(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function RV(t,e){let{routesMeta:n}=t,i={},r="/",s=[];for(let o=0;o{let{paramName:h,isOptional:f}=c;if(h==="*"){let b=a[d]||"";o=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const m=a[d];return f&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function IV(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Iu(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function $V(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Iu(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function wh(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function DV(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?Bo(t):t;return{pathname:n?n.startsWith("/")?n:LV(n,e):e,search:NV(i),hash:BV(r)}}function LV(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function $y(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function wL(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Xk(t,e){let n=wL(t);return e?n.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function Zk(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=Bo(t):(r=Xt({},t),Ye(!r.pathname||!r.pathname.includes("?"),$y("?","pathname","search",r)),Ye(!r.pathname||!r.pathname.includes("#"),$y("#","pathname","hash",r)),Ye(!r.search||!r.search.includes("#"),$y("#","search","hash",r)));let s=t===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!i&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;r.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=DV(r,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const xo=t=>t.join("/").replace(/\/\/+/g,"/"),MV=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),NV=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,BV=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class qk{constructor(e,n,i,r){r===void 0&&(r=!1),this.status=e,this.statusText=n||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function Yk(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const _L=["post","put","patch","delete"],QV=new Set(_L),zV=["get",..._L],HV=new Set(zV),UV=new Set([301,302,303,307,308]),FV=new Set([307,308]),Dy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},VV={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},hf={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Gk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,WV=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),kL="remix-router-transitions";function jV(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",i=!n;Ye(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r;if(t.mapRouteProperties)r=t.mapRouteProperties;else if(t.detectErrorBoundary){let N=t.detectErrorBoundary;r=V=>({hasErrorBoundary:N(V)})}else r=WV;let s={},o=zS(t.routes,r,void 0,s),a,l=t.basename||"/",u=t.unstable_dataStrategy||YV,c=Xt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),d=null,h=new Set,f=null,m=null,b=null,y=t.hydrationData!=null,O=gd(o,t.history.location,l),v=null;if(O==null){let N=gr(404,{pathname:t.history.location.pathname}),{matches:V,route:G}=kC(o);O=V,v={[G.id]:N}}let S,_=O.some(N=>N.route.lazy),k=O.some(N=>N.route.loader);if(_)S=!1;else if(!k)S=!0;else if(c.v7_partialHydration){let N=t.hydrationData?t.hydrationData.loaderData:null,V=t.hydrationData?t.hydrationData.errors:null,G=oe=>oe.route.loader?typeof oe.route.loader=="function"&&oe.route.loader.hydrate===!0?!1:N&&N[oe.route.id]!==void 0||V&&V[oe.route.id]!==void 0:!0;if(V){let oe=O.findIndex(pe=>V[pe.route.id]!==void 0);S=O.slice(0,oe+1).every(G)}else S=O.every(G)}else S=t.hydrationData!=null;let x,w={historyAction:t.history.action,location:t.history.location,matches:O,initialized:S,navigation:Dy,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||v,fetchers:new Map,blockers:new Map},M=un.Pop,H=!1,I,z=!1,U=new Map,X=null,J=!1,re=!1,Z=[],ne=[],ee=new Map,fe=0,P=-1,Ae=new Map,_e=new Set,$=new Map,$e=new Map,Fe=new Set,Xe=new Map,Mt=new Map,on=!1;function qn(){if(d=t.history.listen(N=>{let{action:V,location:G,delta:oe}=N;if(on){on=!1;return}Iu(Mt.size===0||oe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let pe=hr({currentLocation:w.location,nextLocation:G,historyAction:V});if(pe&&oe!=null){on=!0,t.history.go(oe*-1),zr(pe,{state:"blocked",location:G,proceed(){zr(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),t.history.go(oe)},reset(){let He=new Map(w.blockers);He.set(pe,hf),Rt({blockers:He})}});return}return Jt(V,G)}),n){lW(e,U);let N=()=>uW(e,U);e.addEventListener("pagehide",N),X=()=>e.removeEventListener("pagehide",N)}return w.initialized||Jt(un.Pop,w.location,{initialHydration:!0}),x}function kn(){d&&d(),X&&X(),h.clear(),I&&I.abort(),w.fetchers.forEach((N,V)=>ke(V)),w.blockers.forEach((N,V)=>Yn(V))}function ci(N){return h.add(N),()=>h.delete(N)}function Rt(N,V){V===void 0&&(V={}),w=Xt({},w,N);let G=[],oe=[];c.v7_fetcherPersist&&w.fetchers.forEach((pe,He)=>{pe.state==="idle"&&(Fe.has(He)?oe.push(He):G.push(He))}),[...h].forEach(pe=>pe(w,{deletedFetchers:oe,unstable_viewTransitionOpts:V.viewTransitionOpts,unstable_flushSync:V.flushSync===!0})),c.v7_fetcherPersist&&(G.forEach(pe=>w.fetchers.delete(pe)),oe.forEach(pe=>ke(pe)))}function di(N,V,G){var oe,pe;let{flushSync:He}=G===void 0?{}:G,xe=w.actionData!=null&&w.navigation.formMethod!=null&&Xr(w.navigation.formMethod)&&w.navigation.state==="loading"&&((oe=N.state)==null?void 0:oe._isRedirect)!==!0,be;V.actionData?Object.keys(V.actionData).length>0?be=V.actionData:be=null:xe?be=w.actionData:be=null;let Ve=V.loaderData?wC(w.loaderData,V.loaderData,V.matches||[],V.errors):w.loaderData,Me=w.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((Ie,Nt)=>Me.set(Nt,hf)));let Ln=H===!0||w.navigation.formMethod!=null&&Xr(w.navigation.formMethod)&&((pe=N.state)==null?void 0:pe._isRedirect)!==!0;a&&(o=a,a=void 0),J||M===un.Pop||(M===un.Push?t.history.push(N,N.state):M===un.Replace&&t.history.replace(N,N.state));let Mn;if(M===un.Pop){let Ie=U.get(w.location.pathname);Ie&&Ie.has(N.pathname)?Mn={currentLocation:w.location,nextLocation:N}:U.has(N.pathname)&&(Mn={currentLocation:N,nextLocation:w.location})}else if(z){let Ie=U.get(w.location.pathname);Ie?Ie.add(N.pathname):(Ie=new Set([N.pathname]),U.set(w.location.pathname,Ie)),Mn={currentLocation:w.location,nextLocation:N}}Rt(Xt({},V,{actionData:be,loaderData:Ve,historyAction:M,location:N,initialized:!0,navigation:Dy,revalidation:"idle",restoreScrollPosition:X2(N,V.matches||w.matches),preventScrollReset:Ln,blockers:Me}),{viewTransitionOpts:Mn,flushSync:He===!0}),M=un.Pop,H=!1,z=!1,J=!1,re=!1,Z=[],ne=[]}async function $n(N,V){if(typeof N=="number"){t.history.go(N);return}let G=HS(w.location,w.matches,l,c.v7_prependBasename,N,c.v7_relativeSplatPath,V==null?void 0:V.fromRouteId,V==null?void 0:V.relative),{path:oe,submission:pe,error:He}=mC(c.v7_normalizeFormMethod,!1,G,V),xe=w.location,be=Hp(w.location,oe,V&&V.state);be=Xt({},be,t.history.encodeLocation(be));let Ve=V&&V.replace!=null?V.replace:void 0,Me=un.Push;Ve===!0?Me=un.Replace:Ve===!1||pe!=null&&Xr(pe.formMethod)&&pe.formAction===w.location.pathname+w.location.search&&(Me=un.Replace);let Ln=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,Mn=(V&&V.unstable_flushSync)===!0,Ie=hr({currentLocation:xe,nextLocation:be,historyAction:Me});if(Ie){zr(Ie,{state:"blocked",location:be,proceed(){zr(Ie,{state:"proceeding",proceed:void 0,reset:void 0,location:be}),$n(N,V)},reset(){let Nt=new Map(w.blockers);Nt.set(Ie,hf),Rt({blockers:Nt})}});return}return await Jt(Me,be,{submission:pe,pendingError:He,preventScrollReset:Ln,replace:V&&V.replace,enableViewTransition:V&&V.unstable_viewTransition,flushSync:Mn})}function Fi(){if(ge(),Rt({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Jt(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Jt(M||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Jt(N,V,G){I&&I.abort(),I=null,M=N,J=(G&&G.startUninterruptedRevalidation)===!0,cH(w.location,w.matches),H=(G&&G.preventScrollReset)===!0,z=(G&&G.enableViewTransition)===!0;let oe=a||o,pe=G&&G.overrideNavigation,He=gd(oe,V,l),xe=(G&&G.flushSync)===!0;if(!He){let Ie=gr(404,{pathname:V.pathname}),{matches:Nt,route:xn}=kC(oe);Y1(),di(V,{matches:Nt,loaderData:{},errors:{[xn.id]:Ie}},{flushSync:xe});return}if(w.initialized&&!re&&nW(w.location,V)&&!(G&&G.submission&&Xr(G.submission.formMethod))){di(V,{matches:He},{flushSync:xe});return}I=new AbortController;let be=xc(t.history,V,I.signal,G&&G.submission),Ve;if(G&&G.pendingError)Ve=[up(He).route.id,{type:zt.error,error:G.pendingError}];else if(G&&G.submission&&Xr(G.submission.formMethod)){let Ie=await Dn(be,V,G.submission,He,{replace:G.replace,flushSync:xe});if(Ie.shortCircuited)return;Ve=Ie.pendingActionResult,pe=Ly(V,G.submission),xe=!1,be=xc(t.history,be.url,be.signal)}let{shortCircuited:Me,loaderData:Ln,errors:Mn}=await Ci(be,V,He,pe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,xe,Ve);Me||(I=null,di(V,Xt({matches:He},_C(Ve),{loaderData:Ln,errors:Mn})))}async function Dn(N,V,G,oe,pe){pe===void 0&&(pe={}),ge();let He=oW(V,G);Rt({navigation:He},{flushSync:pe.flushSync===!0});let xe,be=FS(oe,V);if(!be.route.action&&!be.route.lazy)xe={type:zt.error,error:gr(405,{method:N.method,pathname:V.pathname,routeId:be.route.id})};else if(xe=(await vt("action",N,[be],oe))[0],N.signal.aborted)return{shortCircuited:!0};if(bu(xe)){let Ve;return pe&&pe.replace!=null?Ve=pe.replace:Ve=yC(xe.response.headers.get("Location"),new URL(N.url),l)===w.location.pathname+w.location.search,await Re(N,xe,{submission:G,replace:Ve}),{shortCircuited:!0}}if(gu(xe))throw gr(400,{type:"defer-action"});if(Sr(xe)){let Ve=up(oe,be.route.id);return(pe&&pe.replace)!==!0&&(M=un.Push),{pendingActionResult:[Ve.route.id,xe]}}return{pendingActionResult:[be.route.id,xe]}}async function Ci(N,V,G,oe,pe,He,xe,be,Ve,Me){let Ln=oe||Ly(V,pe),Mn=pe||He||CC(Ln),Ie=a||o,[Nt,xn]=gC(t.history,w,G,Mn,V,c.v7_partialHydration&&be===!0,c.unstable_skipActionErrorRevalidation,re,Z,ne,Fe,$,_e,Ie,l,Me);if(Y1(nt=>!(G&&G.some(hi=>hi.route.id===nt))||Nt&&Nt.some(hi=>hi.route.id===nt)),P=++fe,Nt.length===0&&xn.length===0){let nt=Wt();return di(V,Xt({matches:G,loaderData:{},errors:Me&&Sr(Me[1])?{[Me[0]]:Me[1].error}:null},_C(Me),nt?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ve}),{shortCircuited:!0}}if(!J&&(!c.v7_partialHydration||!be)){xn.forEach(hi=>{let fr=w.fetchers.get(hi.key),Nn=ff(void 0,fr?fr.data:void 0);w.fetchers.set(hi.key,Nn)});let nt;Me&&!Sr(Me[1])?nt={[Me[0]]:Me[1].data}:w.actionData&&(Object.keys(w.actionData).length===0?nt=null:nt=w.actionData),Rt(Xt({navigation:Ln},nt!==void 0?{actionData:nt}:{},xn.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ve})}xn.forEach(nt=>{ee.has(nt.key)&&we(nt.key),nt.controller&&ee.set(nt.key,nt.controller)});let tf=()=>xn.forEach(nt=>we(nt.key));I&&I.signal.addEventListener("abort",tf);let{loaderResults:Xo,fetcherResults:yc}=await bn(w.matches,G,Nt,xn,N);if(N.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",tf),xn.forEach(nt=>ee.delete(nt.key));let vc=xC([...Xo,...yc]);if(vc){if(vc.idx>=Nt.length){let nt=xn[vc.idx-Nt.length].key;_e.add(nt)}return await Re(N,vc.result,{replace:xe}),{shortCircuited:!0}}let{loaderData:Sc,errors:ys}=SC(w,G,Nt,Xo,Me,xn,yc,Xe);Xe.forEach((nt,hi)=>{nt.subscribe(fr=>{(fr||nt.done)&&Xe.delete(hi)})}),c.v7_partialHydration&&be&&w.errors&&Object.entries(w.errors).filter(nt=>{let[hi]=nt;return!Nt.some(fr=>fr.route.id===hi)}).forEach(nt=>{let[hi,fr]=nt;ys=Object.assign(ys||{},{[hi]:fr})});let Zm=Wt(),qm=dr(P),Ym=Zm||qm||xn.length>0;return Xt({loaderData:Sc,errors:ys},Ym?{fetchers:new Map(w.fetchers)}:{})}function Vi(N,V,G,oe){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ee.has(N)&&we(N);let pe=(oe&&oe.unstable_flushSync)===!0,He=a||o,xe=HS(w.location,w.matches,l,c.v7_prependBasename,G,c.v7_relativeSplatPath,V,oe==null?void 0:oe.relative),be=gd(He,xe,l);if(!be){W(N,V,gr(404,{pathname:xe}),{flushSync:pe});return}let{path:Ve,submission:Me,error:Ln}=mC(c.v7_normalizeFormMethod,!0,xe,oe);if(Ln){W(N,V,Ln,{flushSync:pe});return}let Mn=FS(be,Ve);if(H=(oe&&oe.preventScrollReset)===!0,Me&&Xr(Me.formMethod)){Ti(N,V,Ve,Mn,be,pe,Me);return}$.set(N,{routeId:V,path:Ve}),Qr(N,V,Ve,Mn,be,pe,Me)}async function Ti(N,V,G,oe,pe,He,xe){if(ge(),$.delete(N),!oe.route.action&&!oe.route.lazy){let Nn=gr(405,{method:xe.formMethod,pathname:G,routeId:V});W(N,V,Nn,{flushSync:He});return}let be=w.fetchers.get(N);B(N,aW(xe,be),{flushSync:He});let Ve=new AbortController,Me=xc(t.history,G,Ve.signal,xe);ee.set(N,Ve);let Ln=fe,Ie=(await vt("action",Me,[oe],pe))[0];if(Me.signal.aborted){ee.get(N)===Ve&&ee.delete(N);return}if(c.v7_fetcherPersist&&Fe.has(N)){if(bu(Ie)||Sr(Ie)){B(N,da(void 0));return}}else{if(bu(Ie))if(ee.delete(N),P>Ln){B(N,da(void 0));return}else return _e.add(N),B(N,ff(xe)),Re(Me,Ie,{fetcherSubmission:xe});if(Sr(Ie)){W(N,V,Ie.error);return}}if(gu(Ie))throw gr(400,{type:"defer-action"});let Nt=w.navigation.location||w.location,xn=xc(t.history,Nt,Ve.signal),tf=a||o,Xo=w.navigation.state!=="idle"?gd(tf,w.navigation.location,l):w.matches;Ye(Xo,"Didn't find any matches after fetcher action");let yc=++fe;Ae.set(N,yc);let vc=ff(xe,Ie.data);w.fetchers.set(N,vc);let[Sc,ys]=gC(t.history,w,Xo,xe,Nt,!1,c.unstable_skipActionErrorRevalidation,re,Z,ne,Fe,$,_e,tf,l,[oe.route.id,Ie]);ys.filter(Nn=>Nn.key!==N).forEach(Nn=>{let nf=Nn.key,Z2=w.fetchers.get(nf),hH=ff(void 0,Z2?Z2.data:void 0);w.fetchers.set(nf,hH),ee.has(nf)&&we(nf),Nn.controller&&ee.set(nf,Nn.controller)}),Rt({fetchers:new Map(w.fetchers)});let Zm=()=>ys.forEach(Nn=>we(Nn.key));Ve.signal.addEventListener("abort",Zm);let{loaderResults:qm,fetcherResults:Ym}=await bn(w.matches,Xo,Sc,ys,xn);if(Ve.signal.aborted)return;Ve.signal.removeEventListener("abort",Zm),Ae.delete(N),ee.delete(N),ys.forEach(Nn=>ee.delete(Nn.key));let nt=xC([...qm,...Ym]);if(nt){if(nt.idx>=Sc.length){let Nn=ys[nt.idx-Sc.length].key;_e.add(Nn)}return Re(xn,nt.result)}let{loaderData:hi,errors:fr}=SC(w,w.matches,Sc,qm,void 0,ys,Ym,Xe);if(w.fetchers.has(N)){let Nn=da(Ie.data);w.fetchers.set(N,Nn)}dr(yc),w.navigation.state==="loading"&&yc>P?(Ye(M,"Expected pending action"),I&&I.abort(),di(w.navigation.location,{matches:Xo,loaderData:hi,errors:fr,fetchers:new Map(w.fetchers)})):(Rt({errors:fr,loaderData:wC(w.loaderData,hi,Xo,fr),fetchers:new Map(w.fetchers)}),re=!1)}async function Qr(N,V,G,oe,pe,He,xe){let be=w.fetchers.get(N);B(N,ff(xe,be?be.data:void 0),{flushSync:He});let Ve=new AbortController,Me=xc(t.history,G,Ve.signal);ee.set(N,Ve);let Ln=fe,Ie=(await vt("loader",Me,[oe],pe))[0];if(gu(Ie)&&(Ie=await TL(Ie,Me.signal,!0)||Ie),ee.get(N)===Ve&&ee.delete(N),!Me.signal.aborted){if(Fe.has(N)){B(N,da(void 0));return}if(bu(Ie))if(P>Ln){B(N,da(void 0));return}else{_e.add(N),await Re(Me,Ie);return}if(Sr(Ie)){W(N,V,Ie.error);return}Ye(!gu(Ie),"Unhandled fetcher deferred data"),B(N,da(Ie.data))}}async function Re(N,V,G){let{submission:oe,fetcherSubmission:pe,replace:He}=G===void 0?{}:G;V.response.headers.has("X-Remix-Revalidate")&&(re=!0);let xe=V.response.headers.get("Location");Ye(xe,"Expected a Location header on the redirect Response"),xe=yC(xe,new URL(N.url),l);let be=Hp(w.location,xe,{_isRedirect:!0});if(n){let Nt=!1;if(V.response.headers.has("X-Remix-Reload-Document"))Nt=!0;else if(Gk.test(xe)){const xn=t.history.createURL(xe);Nt=xn.origin!==e.location.origin||wh(xn.pathname,l)==null}if(Nt){He?e.location.replace(xe):e.location.assign(xe);return}}I=null;let Ve=He===!0?un.Replace:un.Push,{formMethod:Me,formAction:Ln,formEncType:Mn}=w.navigation;!oe&&!pe&&Me&&Ln&&Mn&&(oe=CC(w.navigation));let Ie=oe||pe;if(FV.has(V.response.status)&&Ie&&Xr(Ie.formMethod))await Jt(Ve,be,{submission:Xt({},Ie,{formAction:xe}),preventScrollReset:H});else{let Nt=Ly(be,oe);await Jt(Ve,be,{overrideNavigation:Nt,fetcherSubmission:pe,preventScrollReset:H})}}async function vt(N,V,G,oe){try{let pe=await GV(u,N,V,G,oe,s,r);return await Promise.all(pe.map((He,xe)=>{if(iW(He)){let be=He.result;return{type:zt.redirect,response:eW(be,V,G[xe].route.id,oe,l,c.v7_relativeSplatPath)}}return JV(He)}))}catch(pe){return G.map(()=>({type:zt.error,error:pe}))}}async function bn(N,V,G,oe,pe){let[He,...xe]=await Promise.all([G.length?vt("loader",pe,G,V):[],...oe.map(be=>{if(be.matches&&be.match&&be.controller){let Ve=xc(t.history,be.path,be.controller.signal);return vt("loader",Ve,[be.match],be.matches).then(Me=>Me[0])}else return Promise.resolve({type:zt.error,error:gr(404,{pathname:be.path})})})]);return await Promise.all([EC(N,G,He,He.map(()=>pe.signal),!1,w.loaderData),EC(N,oe.map(be=>be.match),xe,oe.map(be=>be.controller?be.controller.signal:null),!0)]),{loaderResults:He,fetcherResults:xe}}function ge(){re=!0,Z.push(...Y1()),$.forEach((N,V)=>{ee.has(V)&&(ne.push(V),we(V))})}function B(N,V,G){G===void 0&&(G={}),w.fetchers.set(N,V),Rt({fetchers:new Map(w.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function W(N,V,G,oe){oe===void 0&&(oe={});let pe=up(w.matches,V);ke(N),Rt({errors:{[pe.route.id]:G},fetchers:new Map(w.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function le(N){return c.v7_fetcherPersist&&($e.set(N,($e.get(N)||0)+1),Fe.has(N)&&Fe.delete(N)),w.fetchers.get(N)||VV}function ke(N){let V=w.fetchers.get(N);ee.has(N)&&!(V&&V.state==="loading"&&Ae.has(N))&&we(N),$.delete(N),Ae.delete(N),_e.delete(N),Fe.delete(N),w.fetchers.delete(N)}function Te(N){if(c.v7_fetcherPersist){let V=($e.get(N)||0)-1;V<=0?($e.delete(N),Fe.add(N)):$e.set(N,V)}else ke(N);Rt({fetchers:new Map(w.fetchers)})}function we(N){let V=ee.get(N);Ye(V,"Expected fetch controller: "+N),V.abort(),ee.delete(N)}function Se(N){for(let V of N){let G=le(V),oe=da(G.data);w.fetchers.set(V,oe)}}function Wt(){let N=[],V=!1;for(let G of _e){let oe=w.fetchers.get(G);Ye(oe,"Expected fetcher: "+G),oe.state==="loading"&&(_e.delete(G),N.push(G),V=!0)}return Se(N),V}function dr(N){let V=[];for(let[G,oe]of Ae)if(oe0}function Os(N,V){let G=w.blockers.get(N)||hf;return Mt.get(N)!==V&&Mt.set(N,V),G}function Yn(N){w.blockers.delete(N),Mt.delete(N)}function zr(N,V){let G=w.blockers.get(N)||hf;Ye(G.state==="unblocked"&&V.state==="blocked"||G.state==="blocked"&&V.state==="blocked"||G.state==="blocked"&&V.state==="proceeding"||G.state==="blocked"&&V.state==="unblocked"||G.state==="proceeding"&&V.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+V.state);let oe=new Map(w.blockers);oe.set(N,V),Rt({blockers:oe})}function hr(N){let{currentLocation:V,nextLocation:G,historyAction:oe}=N;if(Mt.size===0)return;Mt.size>1&&Iu(!1,"A router only supports one blocker at a time");let pe=Array.from(Mt.entries()),[He,xe]=pe[pe.length-1],be=w.blockers.get(He);if(!(be&&be.state==="proceeding")&&xe({currentLocation:V,nextLocation:G,historyAction:oe}))return He}function Y1(N){let V=[];return Xe.forEach((G,oe)=>{(!N||N(oe))&&(G.cancel(),V.push(oe),Xe.delete(oe))}),V}function uH(N,V,G){if(f=N,b=V,m=G||null,!y&&w.navigation===Dy){y=!0;let oe=X2(w.location,w.matches);oe!=null&&Rt({restoreScrollPosition:oe})}return()=>{f=null,b=null,m=null}}function j2(N,V){return m&&m(N,V.map(oe=>vV(oe,w.loaderData)))||N.key}function cH(N,V){if(f&&b){let G=j2(N,V);f[G]=b()}}function X2(N,V){if(f){let G=j2(N,V),oe=f[G];if(typeof oe=="number")return oe}return null}function dH(N){s={},a=zS(N,r,void 0,s)}return x={get basename(){return l},get future(){return c},get state(){return w},get routes(){return o},get window(){return e},initialize:qn,subscribe:ci,enableScrollRestoration:uH,navigate:$n,fetch:Vi,revalidate:Fi,createHref:N=>t.history.createHref(N),encodeLocation:N=>t.history.encodeLocation(N),getFetcher:le,deleteFetcher:Te,dispose:kn,getBlocker:Os,deleteBlocker:Yn,_internalFetchControllers:ee,_internalActiveDeferreds:Xe,_internalSetRoutes:dH},x}function XV(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function HS(t,e,n,i,r,s,o,a){let l,u;if(o){l=[];for(let d of e)if(l.push(d),d.route.id===o){u=d;break}}else l=e,u=e[e.length-1];let c=Zk(r||".",Xk(l,s),wh(t.pathname,n)||t.pathname,a==="path");return r==null&&(c.search=t.search,c.hash=t.hash),(r==null||r===""||r===".")&&u&&u.route.index&&!Kk(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i&&n!=="/"&&(c.pathname=c.pathname==="/"?n:xo([n,c.pathname])),$u(c)}function mC(t,e,n,i){if(!i||!XV(i))return{path:n};if(i.formMethod&&!sW(i.formMethod))return{path:n,error:gr(405,{method:i.formMethod})};let r=()=>({path:n,error:gr(400,{type:"invalid-body"})}),s=i.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),a=EL(n);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Xr(o))return r();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((f,m)=>{let[b,y]=m;return""+f+b+"="+y+` -`},""):String(i.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!Xr(o))return r();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return r()}}}Ye(typeof FormData=="function","FormData is not available in this environment");let l,u;if(i.formData)l=US(i.formData),u=i.formData;else if(i.body instanceof FormData)l=US(i.body),u=i.body;else if(i.body instanceof URLSearchParams)l=i.body,u=vC(l);else if(i.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(i.body),u=vC(l)}catch{return r()}let c={formMethod:o,formAction:a,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Xr(c.formMethod))return{path:n,submission:c};let d=Bo(n);return e&&d.search&&Kk(d.search)&&l.append("index",""),d.search="?"+l,{path:$u(d),submission:c}}function ZV(t,e){let n=t;if(e){let i=t.findIndex(r=>r.route.id===e);i>=0&&(n=t.slice(0,i))}return n}function gC(t,e,n,i,r,s,o,a,l,u,c,d,h,f,m,b){let y=b?Sr(b[1])?b[1].error:b[1].data:void 0,O=t.createURL(e.location),v=t.createURL(r),S=b&&Sr(b[1])?b[0]:void 0,_=S?ZV(n,S):n,k=b?b[1].statusCode:void 0,x=o&&k&&k>=400,w=_.filter((H,I)=>{let{route:z}=H;if(z.lazy)return!0;if(z.loader==null)return!1;if(s)return typeof z.loader!="function"||z.loader.hydrate?!0:e.loaderData[z.id]===void 0&&(!e.errors||e.errors[z.id]===void 0);if(qV(e.loaderData,e.matches[I],H)||l.some(J=>J===H.route.id))return!0;let U=e.matches[I],X=H;return bC(H,Xt({currentUrl:O,currentParams:U.params,nextUrl:v,nextParams:X.params},i,{actionResult:y,unstable_actionStatus:k,defaultShouldRevalidate:x?!1:a||O.pathname+O.search===v.pathname+v.search||O.search!==v.search||xL(U,X)}))}),M=[];return d.forEach((H,I)=>{if(s||!n.some(re=>re.route.id===H.routeId)||c.has(I))return;let z=gd(f,H.path,m);if(!z){M.push({key:I,routeId:H.routeId,path:H.path,matches:null,match:null,controller:null});return}let U=e.fetchers.get(I),X=FS(z,H.path),J=!1;h.has(I)?J=!1:u.includes(I)?J=!0:U&&U.state!=="idle"&&U.data===void 0?J=a:J=bC(X,Xt({currentUrl:O,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},i,{actionResult:y,unstable_actionStatus:k,defaultShouldRevalidate:x?!1:a})),J&&M.push({key:I,routeId:H.routeId,path:H.path,matches:z,match:X,controller:new AbortController})}),[w,M]}function qV(t,e,n){let i=!e||n.route.id!==e.route.id,r=t[n.route.id]===void 0;return i||r}function xL(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function bC(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function OC(t,e,n){if(!t.lazy)return;let i=await t.lazy();if(!t.lazy)return;let r=n[t.id];Ye(r,"No route found in manifest");let s={};for(let o in i){let l=r[o]!==void 0&&o!=="hasErrorBoundary";Iu(!l,'Route "'+r.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!OV.has(o)&&(s[o]=i[o])}Object.assign(r,s),Object.assign(r,Xt({},e(r),{lazy:void 0}))}function YV(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function GV(t,e,n,i,r,s,o,a){let l=i.reduce((d,h)=>d.add(h.route.id),new Set),u=new Set,c=await t({matches:r.map(d=>{let h=l.has(d.route.id);return Xt({},d,{shouldLoad:h,resolve:m=>(u.add(d.route.id),h?KV(e,n,d,s,o,m,a):Promise.resolve({type:zt.data,result:void 0}))})}),request:n,params:r[0].params,context:a});return r.forEach(d=>Ye(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),c.filter((d,h)=>l.has(r[h].route.id))}async function KV(t,e,n,i,r,s,o){let a,l,u=c=>{let d,h=new Promise((b,y)=>d=y);l=()=>d(),e.signal.addEventListener("abort",l);let f=b=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:o},...b!==void 0?[b]:[]),m;return s?m=s(b=>f(b)):m=(async()=>{try{return{type:"data",result:await f()}}catch(b){return{type:"error",result:b}}})(),Promise.race([m,h])};try{let c=n.route[t];if(n.route.lazy)if(c){let d,[h]=await Promise.all([u(c).catch(f=>{d=f}),OC(n.route,r,i)]);if(d!==void 0)throw d;a=h}else if(await OC(n.route,r,i),c=n.route[t],c)a=await u(c);else if(t==="action"){let d=new URL(e.url),h=d.pathname+d.search;throw gr(405,{method:e.method,pathname:h,routeId:n.route.id})}else return{type:zt.data,result:void 0};else if(c)a=await u(c);else{let d=new URL(e.url),h=d.pathname+d.search;throw gr(404,{pathname:h})}Ye(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:zt.error,result:c}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function JV(t){let{result:e,type:n,status:i}=t;if(CL(e)){let o;try{let a=e.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?e.body==null?o=null:o=await e.json():o=await e.text()}catch(a){return{type:zt.error,error:a}}return n===zt.error?{type:zt.error,error:new qk(e.status,e.statusText,o),statusCode:e.status,headers:e.headers}:{type:zt.data,data:o,statusCode:e.status,headers:e.headers}}if(n===zt.error)return{type:zt.error,error:e,statusCode:Yk(e)?e.status:i};if(rW(e)){var r,s;return{type:zt.deferred,deferredData:e,statusCode:(r=e.init)==null?void 0:r.status,headers:((s=e.init)==null?void 0:s.headers)&&new Headers(e.init.headers)}}return{type:zt.data,data:e,statusCode:i}}function eW(t,e,n,i,r,s){let o=t.headers.get("Location");if(Ye(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Gk.test(o)){let a=i.slice(0,i.findIndex(l=>l.route.id===n)+1);o=HS(new URL(e.url),a,r,!0,o,s),t.headers.set("Location",o)}return t}function yC(t,e,n){if(Gk.test(t)){let i=t,r=i.startsWith("//")?new URL(e.protocol+i):new URL(i),s=wh(r.pathname,n)!=null;if(r.origin===e.origin&&s)return r.pathname+r.search+r.hash}return t}function xc(t,e,n,i){let r=t.createURL(EL(e)).toString(),s={signal:n};if(i&&Xr(i.formMethod)){let{formMethod:o,formEncType:a}=i;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(i.json)):a==="text/plain"?s.body=i.text:a==="application/x-www-form-urlencoded"&&i.formData?s.body=US(i.formData):s.body=i.formData}return new Request(r,s)}function US(t){let e=new URLSearchParams;for(let[n,i]of t.entries())e.append(n,typeof i=="string"?i:i.name);return e}function vC(t){let e=new FormData;for(let[n,i]of t.entries())e.append(n,i);return e}function tW(t,e,n,i,r,s){let o={},a=null,l,u=!1,c={},d=i&&Sr(i[1])?i[1].error:void 0;return n.forEach((h,f)=>{let m=e[f].route.id;if(Ye(!bu(h),"Cannot handle redirect results in processLoaderData"),Sr(h)){let b=h.error;d!==void 0&&(b=d,d=void 0),a=a||{};{let y=up(t,m);a[y.route.id]==null&&(a[y.route.id]=b)}o[m]=void 0,u||(u=!0,l=Yk(h.error)?h.error.status:500),h.headers&&(c[m]=h.headers)}else gu(h)?(r.set(m,h.deferredData),o[m]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers)):(o[m]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(l=h.statusCode),h.headers&&(c[m]=h.headers))}),d!==void 0&&i&&(a={[i[0]]:d},o[i[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:c}}function SC(t,e,n,i,r,s,o,a){let{loaderData:l,errors:u}=tW(e,n,i,r,a);for(let c=0;ci.route.id===e)+1):[...t]).reverse().find(i=>i.route.hasErrorBoundary===!0)||t[0]}function kC(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function gr(t,e){let{pathname:n,routeId:i,method:r,type:s}=e===void 0?{}:e,o="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(o="Bad Request",r&&n&&i?a="You made a "+r+' request to "'+n+'" but '+('did not provide a `loader` for route "'+i+'", ')+"so there is no way to handle the request.":s==="defer-action"?a="defer() is not supported in actions":s==="invalid-body"&&(a="Unable to encode submission body")):t===403?(o="Forbidden",a='Route "'+i+'" does not match URL "'+n+'"'):t===404?(o="Not Found",a='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",r&&n&&i?a="You made a "+r.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+i+'", ')+"so there is no way to handle the request.":r&&(a='Invalid request method "'+r.toUpperCase()+'"')),new qk(t||500,o,new Error(a),!0)}function xC(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(bu(n))return{result:n,idx:e}}}function EL(t){let e=typeof t=="string"?Bo(t):t;return $u(Xt({},e,{hash:""}))}function nW(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function iW(t){return CL(t.result)&&UV.has(t.result.status)}function gu(t){return t.type===zt.deferred}function Sr(t){return t.type===zt.error}function bu(t){return(t&&t.type)===zt.redirect}function rW(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function CL(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function sW(t){return HV.has(t.toLowerCase())}function Xr(t){return QV.has(t.toLowerCase())}async function EC(t,e,n,i,r,s){for(let o=0;od.route.id===l.route.id),c=u!=null&&!xL(u,l)&&(s&&s[l.route.id])!==void 0;if(gu(a)&&(r||c)){let d=i[o];Ye(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await TL(a,d,r).then(h=>{h&&(n[o]=h||n[o])})}}}async function TL(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:zt.data,data:t.deferredData.unwrappedData}}catch(r){return{type:zt.error,error:r}}return{type:zt.data,data:t.deferredData.data}}}function Kk(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function FS(t,e){let n=typeof e=="string"?Bo(e).search:e.search;if(t[t.length-1].route.index&&Kk(n||""))return t[t.length-1];let i=wL(t);return i[i.length-1]}function CC(t){let{formMethod:e,formAction:n,formEncType:i,text:r,formData:s,json:o}=t;if(!(!e||!n||!i)){if(r!=null)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r};if(s!=null)return{formMethod:e,formAction:n,formEncType:i,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:o,text:void 0}}}function Ly(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function oW(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function ff(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function aW(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function da(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function lW(t,e){try{let n=t.sessionStorage.getItem(kL);if(n){let i=JSON.parse(n);for(let[r,s]of Object.entries(i||{}))s&&Array.isArray(s)&&e.set(r,new Set(s||[]))}}catch{}}function uW(t,e){if(e.size>0){let n={};for(let[i,r]of e)n[i]=[...r];try{t.sessionStorage.setItem(kL,JSON.stringify(n))}catch(i){Iu(!1,"Failed to save applied view transitions in sessionStorage ("+i+").")}}}/** - * React Router v6.23.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Lb(){return Lb=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),T.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){i.go(u);return}let d=Zk(u,JSON.parse(o),s,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:xo([e,d.pathname])),(c.replace?i.replace:i.push)(d,c.state,c)},[e,i,o,s,t])}function _h(){let{matches:t}=T.useContext(Ya),e=t[t.length-1];return e?e.params:{}}function IL(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=T.useContext(tc),{matches:r}=T.useContext(Ya),{pathname:s}=ZO(),o=JSON.stringify(Xk(r,i.v7_relativeSplatPath));return T.useMemo(()=>Zk(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function fW(t,e,n,i){Rm()||Ye(!1);let{navigator:r}=T.useContext(tc),{matches:s}=T.useContext(Ya),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ZO(),c;c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let f=gd(t,{pathname:h});return OW(f&&f.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:xo([l,r.encodeLocation?r.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:xo([l,r.encodeLocation?r.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,i)}function pW(){let t=LL(),e=Yk(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:r},n):null,null)}const mW=T.createElement(pW,null);class gW extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?T.createElement(Ya.Provider,{value:this.props.routeContext},T.createElement(RL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bW(t){let{routeContext:e,match:n,children:i}=t,r=T.useContext(XO);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Ya.Provider,{value:e},i)}function OW(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var s;if((s=n)!=null&&s.errors)t=n.matches;else return null}let o=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Ye(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,h)=>{let f,m=!1,b=null,y=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,b=d.route.errorElement||mW,l&&(u<0&&h===0?(m=!0,y=null):u===h&&(m=!0,y=d.route.hydrateFallbackElement||null)));let O=e.concat(o.slice(0,h+1)),v=()=>{let S;return f?S=b:m?S=y:d.route.Component?S=T.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,T.createElement(bW,{match:d,routeContext:{outlet:c,matches:O,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?T.createElement(gW,{location:n.location,revalidation:n.revalidation,component:b,error:f,children:v(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):v()},null)}var $L=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}($L||{}),Mb=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Mb||{});function yW(t){let e=T.useContext(XO);return e||Ye(!1),e}function vW(t){let e=T.useContext(AL);return e||Ye(!1),e}function SW(t){let e=T.useContext(Ya);return e||Ye(!1),e}function DL(t){let e=SW(),n=e.matches[e.matches.length-1];return n.route.id||Ye(!1),n.route.id}function LL(){var t;let e=T.useContext(RL),n=vW(Mb.UseRouteError),i=DL(Mb.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function wW(){let{router:t}=yW($L.UseNavigateStable),e=DL(Mb.UseNavigateStable),n=T.useRef(!1);return PL(()=>{n.current=!0}),T.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,Lb({fromRouteId:e},s)))},[t,e])}function _W(t){let{basename:e="/",children:n=null,location:i,navigationType:r=un.Pop,navigator:s,static:o=!1,future:a}=t;Rm()&&Ye(!1);let l=e.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:l,navigator:s,static:o,future:Lb({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=Bo(i));let{pathname:c="/",search:d="",hash:h="",state:f=null,key:m="default"}=i,b=T.useMemo(()=>{let y=wh(c,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:f,key:m},navigationType:r}},[l,c,d,h,f,m,r]);return b==null?null:T.createElement(tc.Provider,{value:u},T.createElement(Jk.Provider,{children:n,value:b}))}new Promise(()=>{});function kW(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:T.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** - * React Router DOM v6.23.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Up(){return Up=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function EW(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function CW(t,e){return t.button===0&&(!e||e==="_self")&&!EW(t)}const TW=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],AW="6";try{window.__reactRouterVersion=AW}catch{}function RW(t,e){return jV({basename:void 0,future:Up({},void 0,{v7_prependBasename:!0}),history:mV({window:void 0}),hydrationData:PW(),routes:t,mapRouteProperties:kW,unstable_dataStrategy:void 0,window:void 0}).initialize()}function PW(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Up({},e,{errors:IW(e.errors)})),e}function IW(t){if(!t)return null;let e=Object.entries(t),n={};for(let[i,r]of e)if(r&&r.__type==="RouteErrorResponse")n[i]=new qk(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let s=window[r.__subType];if(typeof s=="function")try{let o=new s(r.message);o.stack="",n[i]=o}catch{}}if(n[i]==null){let s=new Error(r.message);s.stack="",n[i]=s}}else n[i]=r;return n}const $W=T.createContext({isTransitioning:!1}),DW=T.createContext(new Map),LW="startTransition",TC=Yv[LW],MW="flushSync",AC=$H[MW];function NW(t){TC?TC(t):t()}function pf(t){AC?AC(t):t()}class BW{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",n(i))}})}}function QW(t){let{fallbackElement:e,router:n,future:i}=t,[r,s]=T.useState(n.state),[o,a]=T.useState(),[l,u]=T.useState({isTransitioning:!1}),[c,d]=T.useState(),[h,f]=T.useState(),[m,b]=T.useState(),y=T.useRef(new Map),{v7_startTransition:O}=i||{},v=T.useCallback(w=>{O?NW(w):w()},[O]),S=T.useCallback((w,M)=>{let{deletedFetchers:H,unstable_flushSync:I,unstable_viewTransitionOpts:z}=M;H.forEach(X=>y.current.delete(X)),w.fetchers.forEach((X,J)=>{X.data!==void 0&&y.current.set(J,X.data)});let U=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!z||U){I?pf(()=>s(w)):v(()=>s(w));return}if(I){pf(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:z.currentLocation,nextLocation:z.nextLocation})});let X=n.window.document.startViewTransition(()=>{pf(()=>s(w))});X.finished.finally(()=>{pf(()=>{d(void 0),f(void 0),a(void 0),u({isTransitioning:!1})})}),pf(()=>f(X));return}h?(c&&c.resolve(),h.skipTransition(),b({state:w,currentLocation:z.currentLocation,nextLocation:z.nextLocation})):(a(w),u({isTransitioning:!0,flushSync:!1,currentLocation:z.currentLocation,nextLocation:z.nextLocation}))},[n.window,h,c,y,v]);T.useLayoutEffect(()=>n.subscribe(S),[n,S]),T.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new BW)},[l]),T.useEffect(()=>{if(c&&o&&n.window){let w=o,M=c.promise,H=n.window.document.startViewTransition(async()=>{v(()=>s(w)),await M});H.finished.finally(()=>{d(void 0),f(void 0),a(void 0),u({isTransitioning:!1})}),f(H)}},[v,o,c,n.window]),T.useEffect(()=>{c&&o&&r.location.key===o.location.key&&c.resolve()},[c,h,r.location,o]),T.useEffect(()=>{!l.isTransitioning&&m&&(a(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),b(void 0))},[l.isTransitioning,m]),T.useEffect(()=>{},[]);let _=T.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:w=>n.navigate(w),push:(w,M,H)=>n.navigate(w,{state:M,preventScrollReset:H==null?void 0:H.preventScrollReset}),replace:(w,M,H)=>n.navigate(w,{replace:!0,state:M,preventScrollReset:H==null?void 0:H.preventScrollReset})}),[n]),k=n.basename||"/",x=T.useMemo(()=>({router:n,navigator:_,static:!1,basename:k}),[n,_,k]);return T.createElement(T.Fragment,null,T.createElement(XO.Provider,{value:x},T.createElement(AL.Provider,{value:r},T.createElement(DW.Provider,{value:y.current},T.createElement($W.Provider,{value:l},T.createElement(_W,{basename:k,location:r.location,navigationType:r.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},r.initialized||n.future.v7_partialHydration?T.createElement(zW,{routes:n.routes,future:n.future,state:r}):e))))),null)}function zW(t){let{routes:e,future:n,state:i}=t;return fW(e,void 0,i,n)}const HW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FW=T.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=xW(e,TW),{basename:f}=T.useContext(tc),m,b=!1;if(typeof u=="string"&&UW.test(u)&&(m=u,HW))try{let S=new URL(window.location.href),_=u.startsWith("//")?new URL(S.protocol+u):new URL(u),k=wh(_.pathname,f);_.origin===S.origin&&k!=null?u=k+_.search+_.hash:b=!0}catch{}let y=cW(u,{relative:r}),O=VW(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:r,unstable_viewTransition:d});function v(S){i&&i(S),S.defaultPrevented||O(S)}return T.createElement("a",Up({},h,{href:m||y,onClick:b||s?i:v,ref:n,target:l}))});var RC;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(RC||(RC={}));var PC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(PC||(PC={}));function VW(t,e){let{target:n,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=dW(),u=ZO(),c=IL(t,{relative:o});return T.useCallback(d=>{if(CW(d,n)){d.preventDefault();let h=i!==void 0?i:$u(u)===$u(c);l(t,{replace:h,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,c,i,r,n,t,s,o,a])}function WW(t){if(t.sheet)return t.sheet;for(var e=0;e0?zn(kh,--Hi):0,Gd--,dn===10&&(Gd=1,YO--),dn}function lr(){return dn=Hi2||Vp(dn)>3?"":" "}function rj(t,e){for(;--e&&lr()&&!(dn<48||dn>102||dn>57&&dn<65||dn>70&&dn<97););return Pm(t,M0()+(e<6&&Hs()==32&&lr()==32))}function WS(t){for(;lr();)switch(dn){case t:return Hi;case 34:case 39:t!==34&&t!==39&&WS(dn);break;case 40:t===41&&WS(t);break;case 92:lr();break}return Hi}function sj(t,e){for(;lr()&&t+dn!==57;)if(t+dn===84&&Hs()===47)break;return"/*"+Pm(e,Hi-1)+"*"+qO(t===47?t:lr())}function oj(t){for(;!Vp(Hs());)lr();return Pm(t,Hi)}function aj(t){return HL(B0("",null,null,null,[""],t=zL(t),0,[0],t))}function B0(t,e,n,i,r,s,o,a,l){for(var u=0,c=0,d=o,h=0,f=0,m=0,b=1,y=1,O=1,v=0,S="",_=r,k=s,x=i,w=S;y;)switch(m=v,v=lr()){case 40:if(m!=108&&zn(w,d-1)==58){VS(w+=dt(N0(v),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:w+=N0(v);break;case 9:case 10:case 13:case 32:w+=ij(m);break;case 92:w+=rj(M0()-1,7);continue;case 47:switch(Hs()){case 42:case 47:mg(lj(sj(lr(),M0()),e,n),l);break;default:w+="/"}break;case 123*b:a[u++]=Cs(w)*O;case 125*b:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+c:O==-1&&(w=dt(w,/\f/g,"")),f>0&&Cs(w)-d&&mg(f>32?$C(w+";",i,n,d-1):$C(dt(w," ","")+";",i,n,d-2),l);break;case 59:w+=";";default:if(mg(x=IC(w,e,n,u,c,r,a,S,_=[],k=[],d),s),v===123)if(c===0)B0(w,e,x,x,_,s,d,a,k);else switch(h===99&&zn(w,3)===110?100:h){case 100:case 108:case 109:case 115:B0(t,x,x,i&&mg(IC(t,x,x,0,0,r,a,S,r,_=[],d),k),r,k,d,a,i?_:k);break;default:B0(w,x,x,x,[""],k,0,a,k)}}u=c=f=0,b=O=1,S=w="",d=o;break;case 58:d=1+Cs(w),f=m;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&nj()==125)continue}switch(w+=qO(v),v*b){case 38:O=c>0?1:(w+="\f",-1);break;case 44:a[u++]=(Cs(w)-1)*O,O=1;break;case 64:Hs()===45&&(w+=N0(lr())),h=Hs(),c=d=Cs(S=w+=oj(M0())),v++;break;case 45:m===45&&Cs(w)==2&&(b=0)}}return s}function IC(t,e,n,i,r,s,o,a,l,u,c){for(var d=r-1,h=r===0?s:[""],f=nx(h),m=0,b=0,y=0;m0?h[O]+" "+v:dt(v,/&\f/g,h[O])))&&(l[y++]=S);return GO(t,e,n,r===0?ex:a,l,u,c)}function lj(t,e,n){return GO(t,e,n,ML,qO(tj()),Fp(t,2,-2),0)}function $C(t,e,n,i){return GO(t,e,n,tx,Fp(t,0,i),Fp(t,i+1,-1),i)}function Rd(t,e){for(var n="",i=nx(t),r=0;r6)switch(zn(t,e+1)){case 109:if(zn(t,e+4)!==45)break;case 102:return dt(t,/(.+:)(.+)-([^]+)/,"$1"+ct+"$2-$3$1"+Nb+(zn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~VS(t,"stretch")?FL(dt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(zn(t,e+1)!==115)break;case 6444:switch(zn(t,Cs(t)-3-(~VS(t,"!important")&&10))){case 107:return dt(t,":",":"+ct)+t;case 101:return dt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ct+(zn(t,14)===45?"inline-":"")+"box$3$1"+ct+"$2$3$1"+Gn+"$2box$3")+t}break;case 5936:switch(zn(t,e+11)){case 114:return ct+t+Gn+dt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ct+t+Gn+dt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ct+t+Gn+dt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ct+t+Gn+t+t}return t}var bj=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case tx:e.return=FL(e.value,e.length);break;case NL:return Rd([mf(e,{value:dt(e.value,"@","@"+ct)})],r);case ex:if(e.length)return ej(e.props,function(s){switch(JW(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rd([mf(e,{props:[dt(s,/:(read-\w+)/,":"+Nb+"$1")]})],r);case"::placeholder":return Rd([mf(e,{props:[dt(s,/:(plac\w+)/,":"+ct+"input-$1")]}),mf(e,{props:[dt(s,/:(plac\w+)/,":"+Nb+"$1")]}),mf(e,{props:[dt(s,/:(plac\w+)/,Gn+"input-$1")]})],r)}return""})}},Oj=[bj],yj=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(b){var y=b.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var r=e.stylisPlugins||Oj,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var y=b.getAttribute("data-emotion").split(" "),O=1;O=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Nj={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Bj=/[A-Z]|^ms/g,Qj=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YL=function(e){return e.charCodeAt(1)===45},QC=function(e){return e!=null&&typeof e!="boolean"},My=UL(function(t){return YL(t)?t:t.replace(Bj,"-$&").toLowerCase()}),zC=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Qj,function(i,r,s){return Ts={name:r,styles:s,next:Ts},r})}return Nj[e]!==1&&!YL(e)&&typeof n=="number"&&n!==0?n+"px":n};function Wp(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ts={name:n.name,styles:n.styles,next:Ts},n.name;if(n.styles!==void 0){var i=n.next;if(i!==void 0)for(;i!==void 0;)Ts={name:i.name,styles:i.styles,next:Ts},i=i.next;var r=n.styles+";";return r}return zj(t,e,n)}case"function":{if(t!==void 0){var s=Ts,o=n(t);return Ts=s,Wp(t,e,o)}break}}return n}function zj(t,e,n){var i="";if(Array.isArray(n))for(var r=0;rn=>{if(typeof t=="function"){const i=n.displayName||n.name,r=t(n,...e);return r.displayName=i,r}else return n}}function rM(t,e,n,i,...r){}const tt=(t,e,...n)=>rM("error",!0,t,e,...n),Be=(t,e,...n)=>rM("warn",!0,t,e,...n);function cp(t){if(Array.isArray(t)){const e=t.slice(0);for(let n=0;n{if(e==null)return!1;const i=rX(t,e);return i.length===1||n===i[0]}).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...r){e.apply(this,r),n.apply(this,r)}},null)}function rX(t,e){const n=[];return t.forEach((i,r)=>{i===e&&n.push(r)}),n}var sX=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),i=s.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var o=s[r];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const u1=Gs(sX),sM=(t,e)=>(e.has(t)?e.set(t,e.get(t)+1):e.set(t,0),`${t}_${e.get(t)}`),oX=Object.prototype.hasOwnProperty;function oM(t){if(typeof t!="object")return!0;for(const e in t)if(oX.call(t,e))return!1;return!0}function aM(...t){let e={};return t.forEach(n=>{e=lM(e,n)}),e}function lM(t,e){if(Ny(e)){const n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],i={...t};return n.forEach(r=>{Ny(t[r])&&Ny(e[r])?i[r]=lM(t[r],e[r]):By(e[r])&&By(t[r])?i[r]=[...new Set([...t[r],...e[r]])]:By(t[r])?i[r]=[...new Set([...t[r],e[r]])]:i[r]=e[r]}),i}else return{...t}}function Ny(t){return t&&(typeof t=="object"||typeof t=="function")&&!Array.isArray(t)}function By(t){return Array.isArray(t)}function aX(t){if(Array.isArray(t))return t}function lX(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=s.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw r}}return a}}function FC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n0?n[1]:""]}function dX(t){if(!t||typeof t=="number")return t;const e=uM(t),n=as(e,2),i=n[0],r=n[1];return r==="ms"?i:r==="s"?i*1e3:i}const hX=t=>!!t&&t.ref!==void 0,fX=t=>!!t&&t.current!==void 0;function at(t){const e=typeof t=="function"?t():t;if(e&&e===document)return document.documentElement;if(e instanceof Element||e===window||e&&typeof e.nodeType<"u")return e;if(e){const n=e;if(hX(n)){const i=fX(n.ref)?n.ref.current:n.ref;return i instanceof HTMLElement?i:at(i)}else return n.constructor.componentId?n.constructor.componentId:n.constructor.name,vm.findDOMNode(e)}}function qr(t,e,n,i){const r=t===window||t===document?t:at(t);return r==null||r.addEventListener(e,n,i),{remove(){r==null||r.removeEventListener(e,n,i)}}}const wn=!!(typeof window<"u"&&window.document&&window.document.createElement);function pX(t,e){const n=t&&at(t),i=e&&at(e);return!n||!i?!1:!(n instanceof Window)&&!(i instanceof Window)?n.contains(i):cM(n,i)}function cM(t,e){let n=e;for(;n;){if(n===t)return!0;n=n.parentNode}return!1}const Kd=wn?pX:cM;function Zs(t){const e=t&&at(t);let n;e&&"ownerDocument"in e&&(n=e.ownerDocument);const i=wn?window.document:void 0;return n||i}function sn(t){const e={top:0,bottom:0,left:0,right:0,height:0,width:0};if(!wn)return e;const n=t&&at(t);if(!n)return e;if(n===window)return{left:window.pageXOffset,top:window.pageYOffset,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth+window.pageXOffset,bottom:window.innerHeight+window.pageYOffset};const i=t===document?document:Zs(n),r=i&&i.documentElement;if(!r||!Kd(r,n))return e;const s=n.getBoundingClientRect();let o;for(o in e)e[o]=s[o];if(i!==document&&i.defaultView){const a=i.defaultView.frameElement;if(a){const l=sn(a);e.top+=l.top,e.bottom+=l.top,e.left+=l.left,e.right+=l.left}}return{top:e.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:e.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),width:(e.width==null?n.offsetWidth:e.width)||0,height:(e.height==null?n.offsetHeight:e.height)||0,right:i.body.clientWidth-e.width-e.left,bottom:i.body.clientHeight-e.height-e.top}}const Eo=function(){let t;if(wn&&window.requestAnimationFrame&&window.cancelAnimationFrame)t=e=>{const n=window.requestAnimationFrame(e);return{cancel:()=>window.cancelAnimationFrame(n)}};else{let e=new Date().getTime();t=n=>{const i=new Date().getTime(),r=Math.max(0,16-(i-e)),s=setTimeout(n,r);return e=i,{cancel:()=>clearTimeout(s)}}}return t}();function mX(t,e){const n=at(t),i=[];let r=sn(n)||{},s=!1;function o(){if(!s){const a=sn(n)||{};(a.top!==r.top||a.left!==r.left||a.right!==r.right||a.bottom!==r.bottom||a.width!==r.width||a.height!==r.height)&&typeof e=="function"&&e(a),r=a,i.push(Eo(o))}}return o(),{remove(){s=!0,i.forEach(a=>a.cancel())}}}function gX(t){return!!(t.tagName.includes("-")&&customElements.get(t.tagName.toLowerCase()))}function Pd(t){const e=(t||document).activeElement;return e&&gX(e)?e.shadowRoot.activeElement:e}function Du(t){const e=t&&at(t),n=Pd();return!!e&&(n===e||Kd(e,n))}const VC=["a[href]","frame","iframe","object","input:not([type=hidden])","select","textarea","button","*[tabindex]",'[contenteditable="true"]'].join(",");function dx(t,e,n){const i=t&&at(t);if(!i||typeof i.querySelectorAll!="function")return[];let r=Array.from(i.querySelectorAll(VC));return n&&i.matches(VC)&&(r=[...r,i]),r.filter(s=>typeof e=="function"?e(s)&&WC(s):WC(s))}function bX(t){return ls(t).display==="none"}function OX(t){var e,n;const i=["fixed","absolute"];return!!(i.includes((e=t.style.position)===null||e===void 0?void 0:e.toLowerCase())||i.includes((n=ls(t).getPropertyValue("position"))===null||n===void 0?void 0:n.toLowerCase()))}function yX(t){let e=t;for(;e&&!(e===document.body||e instanceof ShadowRoot);){if(bX(e))return!1;if(OX(e))break;e=e.parentNode}return!0}function WC(t){return!t.disabled&&yX(t)}function hx(t,e){return dx(t,n=>!vX(n.getAttribute("tabindex")),e)}function vX(t){return!isNaN(t)&&t<0}const SX={toArray:()=>[],contains:()=>!1,add:()=>{},remove:()=>{}};function jC(t){const e=at(t);if(!e)return SX;const n={toArray(){return[...e.classList]},contains:()=>!1,add:()=>{},remove:()=>{}};return n.add=i=>e.classList.add(i),n.remove=i=>e.classList.remove(i),n.contains=i=>e.classList.contains(i),n}function Id(t){const e=t&&at(t),n=Zs(e);return n&&n.defaultView}function ls(t,e){let n={};if(wn){const i=t&&at(t);if(i){const r=Id(t);n=r?r.getComputedStyle(i,e):{}}}return n}const XC=new WeakMap;function ZC(t,e=!1){var n;if(!wn)return 16;const i=t||((n=Zs(t))===null||n===void 0?void 0:n.documentElement),r=XC.get(i);if(!e&&r)return r;const s=parseInt(ls(i).getPropertyValue("font-size"));return XC.set(i,s),s}function wX(t){const e=[];if(!wn)return e;const n=t&&at(t);if(n){let i=n;for(;(i=i.parentNode)&&i&&i.nodeType===1&&i.tagName!=="BODY";){const r=ls(i),s=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform")||"none",o=s==="none"||s==="matrix(1, 0, 0, 1, 0, 0)";(r.position!=="static"||!o)&&e.push(i)}e.push(Zs(n).body)}return e}function dM(t){const e=[];if(!wn)return e;const n=t&&at(t);if(n){const r=(ls(n)||{}).position;if(r==="fixed")return[n.ownerDocument];let s=n;for(;s&&s.nodeType===1&&(s=s.parentNode);){let a;try{a=ls(s)}catch{}if(typeof a>"u"||a===null)return e.push(s),e;const l=a,u=l.overflow,c=l.overflowX,d=l.overflowY;/(auto|scroll|overlay)/.test(u+d+c)&&(r!=="absolute"||["relative","absolute","fixed"].indexOf(a.position)>=0)&&e.push(s)}const o=n.ownerDocument;o&&(e.push(o.body),o!==document&&e.push(o.defaultView))}return e}function qC(t,e){const n=e.currentTarget,i=e.relatedTarget;(!i||i!==n&&!Kd(n,i))&&t(e)}function qs(t){const e=t&&at(t);return e?Pd()===e:!1}function ZS(t,e=!0){const n=t&&at(t);if(n===window||n===document||n===document.body)return!0;const i=n.parentNode;if(n.nodeType===3)return ZS(i,e);const r=n?ls(n):{};if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return!1;if(r.overflow==="hidden"&&r.position==="absolute"&&r.clip!=="auto"){const s=r.clip.substring(5).slice(0,-1).split(", ");let o=!0;if(s.forEach(a=>{a!=="0px"&&(o=!1)}),o)return!1}return e&&i?ZS(i):!0}function _X(t,e){const n=at(e)||document;if(wn){const i=Id(n);return i&&i.matchMedia(t)}return null}function mi(t,e){if(!t||typeof t=="number")return t;const n=uM(t),i=as(n,2),r=i[0],s=i[1];if(s==="rem")return r*ZC();if(s==="em"){const o=wn?document.body:null;return r*ZC(e||o)}else return r}const kX=Object.prototype.hasOwnProperty;function Bb(t,e){if(YC(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r=0;re[1].toUpperCase())}const xX=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],fM=t=>{if(Array.isArray(t)||typeof t=="function")throw new Error;try{return"key"in t&&xX.every(e=>e in t)}catch{throw new Error}};var qS={exports:{}};(function(t,e){(function(n,i){var r="1.0.38",s="",o="?",a="function",l="undefined",u="object",c="string",d="major",h="model",f="name",m="type",b="vendor",y="version",O="architecture",v="console",S="mobile",_="tablet",k="smarttv",x="wearable",w="embedded",M=500,H="Amazon",I="Apple",z="ASUS",U="BlackBerry",X="Browser",J="Chrome",re="Edge",Z="Firefox",ne="Google",ee="Huawei",fe="LG",P="Microsoft",Ae="Motorola",_e="Opera",$="Samsung",$e="Sharp",Fe="Sony",Xe="Xiaomi",Mt="Zebra",on="Facebook",qn="Chromium OS",kn="Mac OS",ci=function(ge,B){var W={};for(var le in ge)B[le]&&B[le].length%2===0?W[le]=B[le].concat(ge[le]):W[le]=ge[le];return W},Rt=function(ge){for(var B={},W=0;W0?we.length===2?typeof we[1]==a?this[we[0]]=we[1].call(this,Wt):this[we[0]]=we[1]:we.length===3?typeof we[1]===a&&!(we[1].exec&&we[1].test)?this[we[0]]=Wt?we[1].call(this,Wt,we[2]):i:this[we[0]]=Wt?Wt.replace(we[1],we[2]):i:we.length===4&&(this[we[0]]=Wt?we[3].call(this,Wt.replace(we[1],we[2])):i):this[we]=Wt||i;W+=2}},Ci=function(ge,B){for(var W in B)if(typeof B[W]===u&&B[W].length>0){for(var le=0;le2&&(Se[h]="iPad",Se[m]=_),Se},this.getEngine=function(){var Se={};return Se[f]=i,Se[y]=i,Dn.call(Se,le,Te.engine),Se},this.getOS=function(){var Se={};return Se[f]=i,Se[y]=i,Dn.call(Se,le,Te.os),we&&!Se[f]&&ke&&ke.platform&&ke.platform!="Unknown"&&(Se[f]=ke.platform.replace(/chrome os/i,qn).replace(/macos/i,kn)),Se},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return le},this.setUA=function(Se){return le=typeof Se===c&&Se.length>M?Jt(Se,M):Se,this},this.setUA(le),this};Re.VERSION=r,Re.BROWSER=Rt([f,y,d]),Re.CPU=Rt([O]),Re.DEVICE=Rt([h,b,m,v,S,k,_,x,w]),Re.ENGINE=Re.OS=Rt([f,y]),t.exports&&(e=t.exports=Re),e.UAParser=Re;var vt=typeof n!==l&&(n.jQuery||n.Zepto);if(vt&&!vt.ua){var bn=new Re;vt.ua=bn.getResult(),vt.ua.get=function(){return bn.getUA()},vt.ua.set=function(ge){bn.setUA(ge);var B=bn.getResult();for(var W in B)vt.ua[W]=B[W]}}})(typeof window=="object"?window:qv)})(qS,qS.exports);var EX=qS.exports;const CX=Gs(EX),TX=()=>new CX().getResult().browser,AX=()=>TX().name==="Safari";function Vt(t,e,...n){const i=e.ref,r=t.ref,s=typeof r=="function",o=typeof i=="function",a={...e};return t.props.style&&e.style&&(a.style={...t.props.style,...e.style}),a.key=t.key||e.key,Object.keys(e).forEach(l=>{l.indexOf("on")===0&&(typeof e[l]=="function"||typeof t.props[l]=="function")&&(a[l]=ht(t.props[l],e[l]))}),r==null||i==null?F.cloneElement(t,a,...n):(Be(s,`Cloning an element with a ref that will be overwritten because the ref is not a function. Use a composable callback-style ref instead. Ignoring ref: ${r}`),F.cloneElement(t,{...a,ref(l){o?i(l):i.current=l,r(l)}},...n))}function Ou(t,e={}){const n=T.Children.count(t);return n===0?null:typeof t=="string"&&t.length>0||n>1?F.createElement("span",e,t):Vt(Array.isArray(t)?t[0]:t,e)}const RX=()=>t=>t;function GC(t){return typeof t=="string"?t:t.displayName||t.name}function Ei(t,e,n){var i,r;return e.as&&e.as!==((i=t.defaultProps)===null||i===void 0?void 0:i.as)?e.as:typeof n=="function"?n():e.href?"a":e.to?(Be(!e.as,`[${t.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof e.onClick=="function"?"button":((r=t.defaultProps)===null||r===void 0?void 0:r.as)||"span"}function Co({props:t={},interactionTypes:e=["disabled","readonly"]}={}){const n=t.interaction,i=t.disabled,r=t.readOnly;return n||(e.includes("disabled")&&i?"disabled":e.includes("readonly")&&r?"readonly":"enabled")}function Qe(t,e=[]){return t&&t.type?e.map(i=>GC(i)).indexOf(GC(t.type))>=0:!1}function De(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return IX(t,r)}const PX=Object.prototype.hasOwnProperty,IX=(t,e)=>{const n={};for(const i in t)i==="theme"||i==="children"||i==="className"||i==="style"||i==="styles"||i==="makeStyles"||i==="themeOverride"||i==="deterministicId"||e.includes(i)||!PX.call(t,i)||(n[i]=t[i]);return n};var $X=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,DX=UL(function(t){return $X.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function Ft(t){const e={};return Object.keys(t).filter(n=>DX(n)&&n!=="style"&&n!=="className"&&n!=="children"&&n!=="styles"&&n!=="makeStyles"&&n!=="deterministicId").forEach(n=>{e[n]=t[n]}),e}function Qo(t,e,n){const i=Array.isArray(e)?e:Object.keys(e||{}),r=n?i.concat(n):i;return LX(t,r)}function LX(t,e){const n={},i=e.length;let r=-1,s;for(;++rF.createElement(gM.Provider,{value:e},t);bM.defaultProps={instanceCounterMap:mM};const Kt=l1(t=>{const e=T.forwardRef((n,i)=>{const r=t.componentId||t.displayName||t.name,s=T.useContext(gM),o=(a=r)=>sM(a,s);return n.deterministicId&&Be(!1,`Manually passing the "deterministicId" property is not allowed on the ${r} component. -`,n.deterministicId),F.createElement(t,Object.assign({ref:i,deterministicId:o},n))});return lx(e,t),e.propTypes=t.propTypes,e.defaultProps=t.defaultProps,e.allowedProps=t.allowedProps,e.originalType=t.originalType||t,e});function MX(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function Le(t,e){if(t==null)return{};var n,i,r=MX(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}let gf,gg,Qy;const NX=()=>{if(gf)return gf;if(wn){const t=document.documentElement;return gg=t.getAttribute("dir"),gf=gg||ls(t).direction,Qy||(Qy=new MutationObserver(()=>{const e=t.getAttribute("dir");e&&e!==gg&&(gg=gf=e)}),Qy.observe(t,{attributes:!0})),gf}};function BX(t){if(wn)return NX()}const YS=T.createContext(BX()||"ltr"),c1={ltr:"ltr",rtl:"rtl"},QX=["forwardedRef"],ss=l1(t=>{class e extends F.Component{render(){const r=this.props,s=r.forwardedRef,o=Le(r,QX);return F.createElement(YS.Consumer,null,a=>F.createElement(t,Object.assign({ref:s,dir:a},o)))}}e.displayName="TextDirectionContextConsumerComponent";const n=T.forwardRef((i,r)=>F.createElement(e,Object.assign({},i,{forwardedRef:r})));return lx(n,t),n.defaultProps=t.defaultProps,n.propTypes=t.propTypes,n.allowedProps=t.allowedProps,n.originalType=t.originalType||t,n});ss.DIRECTION=c1;function KC(t){return function(e,n,i,r="",s=""){const o=e[n];return o===null||typeof o>"u"?new Error(`The prop \`${n}\` is marked as required in \`${i}\`, but its value is \`${o}\``):t(e,n,i,r,s)}}const _t={oneOf(t){function e(n,i,r){const s=F.Children.toArray(n[i]),o=t.map(a=>a&&rl(a));for(let a=0;a{const u=rl(l);return s[u]=0,u});for(let l=0;l{s[l]>1&&a.push(`${s[l]} children of type ${l}`),s[l]===0&&a.push(`0 children of type ${l}`)}),a.length>0?new Error(`Expected exactly one of each ${o.join(", ")} in ${i} but found:${a.join(` -`)}`):null}},enforceOrder(...t){function e(s,o){for(let a=0;ai(s,a)).join(` - -`)}function i(s,o){const a=o.map(l=>l?rl(l):"??").map(l=>` <${l} />`).join(` -`);return`<${s}> -${a} -`}function r(s,o,a){const l=F.Children.toArray(s[o]).map(u=>{if(u&&u.type)return rl(u.type);if(u)return null});for(let u=0;ud?rl(d):"??");if(e(l,c))return null}return new Error(`Expected children of ${a} in one of the following formats: - ${n(a,t)} - - - Instead of: - ${i(a,l)}`)}return r.isRequired=KC(r),r}},rl=t=>typeof t=="string"?t:t.displayName||t.name;function zX(t,e,n){if(t.as==="input"){if(e==="children"&&t.children||t.value==null)return new Error(`Prop \`value\` and not \`children\` must be supplied if \`${n} as="input"\``)}else{if(e==="value"&&t.value!=null)return new Error(`Prop \`children\` and not \`value\` must be supplied unless \`${n} as="input"\``);if(!t.children)return new Error(`Prop \`children\` should be supplied unless \`${n} as="input"\`.`)}return null}function nc(t,e="onChange",n="defaultValue"){return function(i,r,s){const o=t(i,r,s,"prop",r,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");return o||(i[r]&&typeof i[e]!="function"?new Error([`You provided a '${r}' prop without an '${e}' handler on '${s}'. This will render a controlled component. If the component should be uncontrolled and manage its own state, use '${n}'. Otherwise, set '${e}'.`].join("")):null)}}const HX=p.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"]),UX=!!(typeof window<"u"&&window.document&&window.document.createElement),zi=UX?p.oneOfType([p.element,p.instanceOf(Element)]):p.element,FX=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function VX(t){const e={textDarkest:t.licorice,textDark:t.ash,textLight:t.porcelain,textLightest:t.white,textBrand:t.brand,textLink:t.link,textAlert:t.barney,textInfo:t.brand,textSuccess:t.shamrock,textDanger:t.crimson,textWarning:t.fire},n={backgroundDarkest:t.licorice,backgroundDark:t.ash,backgroundMedium:t.tiara,backgroundLight:t.porcelain,backgroundLightest:t.white,backgroundBrand:t.brand,backgroundBrandSecondary:t.oxford,backgroundAlert:t.barney,backgroundInfo:t.brand,backgroundSuccess:t.shamrock,backgroundDanger:t.crimson,backgroundWarning:t.fire},i={borderLightest:t.white,borderLight:t.porcelain,borderMedium:t.tiara,borderDark:t.ash,borderDarkest:t.licorice,borderBrand:t.brand,borderAlert:t.barney,borderInfo:t.brand,borderSuccess:t.shamrock,borderDanger:t.crimson,borderWarning:t.fire,borderDebug:t.crimson};return{...t,...e,...n,...i,values:t,text:e,background:n,border:i}}const WX={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},jX=Object.freeze(VX(WX)),XX=Object.freeze({duration:"300ms",timing:"ease-in-out"}),ZX=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),qX=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),YX=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),GX=.0625,ao={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},Q0=Object.freeze({xxSmall:`${ao.xxSmall}em`,xSmall:`${ao.xSmall}em`,small:`${ao.small}em`,medium:`${ao.medium}em`,tablet:`${ao.tablet}em`,large:`${ao.large}em`,desktop:`${ao.desktop}em`,xLarge:`${ao.xLarge}em`,maxWidth:`${ao.large-GX}em`}),KX=Object.freeze({mediumMin:`min-width: ${Q0.medium}`,largeMin:`min-width: ${Q0.large}`,xLargeMin:`min-width: ${Q0.xLarge}`}),Ec=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],JX=Object.freeze({depth1:Ec[0],depth2:Ec[1],depth3:Ec[2],resting:Ec[0],above:Ec[1],topmost:Ec[2]}),eZ=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),OM={colors:jX,borders:FX,transitions:XX,typography:ZX,spacing:qX,forms:YX,media:KX,breakpoints:Q0,shadows:JX,stacking:eZ},tZ=["key","description"],nZ=["key","description","use"],iZ="@@themeRegistryDefaultTheme",Qb="__GLOBAL_THEME_REGISTRY__";globalThis[Qb]?fx(rZ(globalThis[Qb])):vM();function yM(){return{currentThemeKey:null,themes:{},registered:[]}}function rZ(t){const e=yM();if(typeof t>"u")return e;let n=!0;return Object.keys(e).forEach(i=>{typeof t[i]>"u"&&(n=!1)}),tt(n,"[theme-registry] Invalid global theme registry!"),t}function d1(){return globalThis[Qb]}function fx(t){globalThis[Qb]=t}function vM(){fx(yM())}function sZ(){const t=d1(),e=t.currentThemeKey;if(e)return t.themes[e]}function oZ(t,e){const n=d1(),i=n.themes[t];i||t!==iZ&&tt(i,`[theme-registry] Could not find theme: '${t}' in the registry.`),n.currentThemeKey=t;const r=aM(i,e);return n.themes[t]=r,r}function aZ(t){const e=t.key,n=t.description,i=Le(t,tZ),r={key:e,description:n,...i,use(s){oZ(e,(s==null?void 0:s.overrides)||{})}};return new Proxy(r,{get(s,o){s.key,s.description,s.use;const a=Le(s,nZ);return o==="variables"?a:Reflect.get(s,o)}})}function lZ(t){const e=d1();if(t.key&&e.themes[t.key])return e.themes[t.key];{if(!fM(t))throw tt(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! -For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const n=aZ(t);return e.themes[n.key]=n,e.registered.push(n.key),n}}const px={getRegistry:d1,clearRegistry:vM,setRegistry:fx,registerTheme:lZ,getCurrentTheme:sZ},Wi=OM.colors,uZ="canvas",cZ={"ic-brand-primary":Wi.textBrand,"ic-brand-font-color-dark":Wi.textDarkest,"ic-link-color":Wi.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":Wi.backgroundBrand,"ic-brand-button--primary-text":Wi.textLightest,"ic-brand-button--secondary-bgd":Wi.backgroundDarkest,"ic-brand-button--secondary-text":Wi.textLightest,"ic-brand-global-nav-bgd":Wi.backgroundBrandSecondary,"ic-global-nav-link-hover":Wi.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":Wi.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":Wi.textBrand,"ic-brand-global-nav-menu-item__text-color":Wi.textLightest,"ic-brand-global-nav-menu-item__text-color--active":Wi.textBrand},dZ={key:uZ,...OM,...cZ},mx=px.registerTheme(dZ),hZ=t=>(e={})=>{var n,i;try{if(fM(t))return t}catch{t={}}let r;Object.keys(e).length===0?r=px.getCurrentTheme()||mx:r=e;const s=r.key,o=((n=t)===null||n===void 0||(i=n.themeOverrides)===null||i===void 0?void 0:i[s])||t.themeOverrides||{};return aM(r,t,o)};function Eu({children:t,theme:e={},dir:n,instanceCounterMap:i,as:r}){const s=n||T.useContext(YS);let o=F.createElement(bM,{instanceCounterMap:i},F.createElement(jj,{theme:hZ(e)},F.createElement(YS.Provider,{value:s},t)));if(n){const a=Ei(Eu,{as:r});o=F.createElement(a,{dir:s},o)}return o}Eu.propTypes={children:p.node,theme:p.object,dir:p.oneOf(["ltr","rtl"]),instanceCounterMap:p.instanceOf(Map),as:p.string};Eu.defaultProps={theme:{},as:void 0};const fZ=(t,e,n,i,r)=>{const s=e,o=n,a=i,l=a.themeOverride,u=t,c=u.componentOverrides;let d={},h={};return c&&(d=s&&c[s]||o&&c[o]||{}),l&&(typeof l=="function"?h=l(r||{},t):h=l),{...d,...h}},pZ=()=>{let t=Fj();if(oM(t)){const e=px.getCurrentTheme();if(e)return e;t=mx}return t},zy={styles:{},makeStyles:()=>{}},de=l1((t,e,n)=>{const i=t.displayName||t.name,r=T.forwardRef((s,o)=>{const a=pZ();s.styles&&Be(!1,`Manually passing the "styles" property is not allowed on the ${i} component. Using the default styles calculated by the @withStyle decorator instead. -`,s.styles),s.makeStyles&&Be(!1,`Manually passing the "makeStyles" property is not allowed on the ${i} component. Styles are calculated by the @withStyle decorator.`);const l={...t.defaultProps,...s,...zy};let u=typeof n=="function"?n(a):{};const c=fZ(a,i,t.componentId,l,u);u={...u,...c};const d=T.useState(e?e(u,l,{}):{}),h=as(d,2),f=h[0],m=h[1],b=y=>{const O=e(u,l,y);u1(O,f)||m(O)};return F.createElement(t,Object.assign({ref:o},s,{makeStyles:b,styles:f,themeOverride:c}))});return lx(r,t),r.originalType=t.originalType||t,r.propTypes=t.propTypes,r.defaultProps=t.defaultProps,r.allowedProps=t.allowedProps,r.generateComponentTheme=n,t.defaultProps={...t.defaultProps,makeStyles:zy.makeStyles,styles:zy.styles},r}),ic={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},mZ=ic.SHADOW_TYPES,gZ=ic.STACKING_TYPES,bZ=ic.BORDER_WIDTHS,OZ=ic.BORDER_RADII,yZ=ic.BACKGROUNDS,vZ=ic.SIZES,SZ=ic.SPACING,pt={shadow:p.oneOf(Object.values(mZ)),stacking:p.oneOf(Object.values(gZ)),borderWidth:Hy(Object.values(bZ)),borderRadius:Hy(Object.values(OZ)),background:p.oneOf(Object.values(yZ)),size:p.oneOf(Object.values(vZ)),spacing:Hy(Object.values(SZ))};function Hy(t){return function(e,n,i,r){const s=e[n];if(typeof s>"u")return null;if(typeof s!="string")return new Error(`Invalid ${r} \`${n}\` of type \`${typeof s}\` supplied to \`${i}\`, expected a string.`);const o=s.split(" "),a=o.length;if(a>0&&a<5){for(let l=0;l{n[hM(`${t}-${String(i)}`)]=e[i]}),n}function zb(t,e,n,i){if(!(typeof n!="string"||oM(e)))return n.split(" ").map(r=>{if(r==="auto"||r==="0")return r;if(r==="none")return"0";if(r==="circle")return"100%";if(r==="pill")return"999em";const s=hM(`${i}-${r}`),o=e[s];return tt(typeof o<"u",`[${t}] '${s}' is an invalid '${i}' value.`),o||"0"}).join(" ").trim()}function GS(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===4){var n=[e[3],e[1]];e[1]=n[0],e[3]=n[1]}return e.join(" ")}function wZ(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===2){var n=[e[1],e[0]];e[0]=n[0],e[1]=n[1]}if(e.length===3&&e.push(e[1]),e.length===4){var i=[e[1],e[0],e[3],e[2]];e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3]}return e.join(" ")}const _Z=()=>({screenReaderContent:{label:"screenReaderContent",width:"0.0625rem",height:"0.0625rem",margin:"-0.0625rem",padding:0,position:"absolute",top:0,insetInlineStart:0,overflow:"hidden",clip:"rect(0 0 0 0)",border:0}}),kZ={as:p.elementType,children:p.node,elementRef:p.func},xZ=["as","children","elementRef"],EZ=["children","styles"];var JC,eT,sl;let cr=(JC=de(_Z,null),JC(eT=(sl=class SM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=Le(e,EZ),s=Ei(SM,r);return C(s,Object.assign({},Ft(r),{css:i==null?void 0:i.screenReaderContent,ref:this.handleRef}),n)}},sl.displayName="ScreenReaderContent",sl.componentId="ScreenReaderContent",sl.propTypes=kZ,sl.allowedProps=xZ,sl.defaultProps={as:"span",children:null},sl))||eT);var KS={exports:{}};(function(t,e){function n(l){if(l&&typeof l=="object"){var u=l.which||l.keyCode||l.charCode;u&&(l=u)}if(typeof l=="number")return o[l];var c=String(l),d=i[c.toLowerCase()];if(d)return d;var d=r[c.toLowerCase()];if(d)return d;if(c.length===1)return c.charCodeAt(0)}n.isEventKey=function(u,c){if(u&&typeof u=="object"){var d=u.which||u.keyCode||u.charCode;if(d==null)return!1;if(typeof c=="string"){var h=i[c.toLowerCase()];if(h)return h===d;var h=r[c.toLowerCase()];if(h)return h===d}else if(typeof c=="number")return c===d;return!1}},e=t.exports=n;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! - * Programatically add the following - */for(s=97;s<123;s++)i[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)i[s-48]=s;for(s=1;s<13;s++)i["f"+s]=s+111;for(s=0;s<10;s++)i["numpad "+s]=s+96;var o=e.names=e.title={};for(s in i)o[i[s]]=s;for(var a in r)i[a]=r[a]})(KS,KS.exports);var CZ=KS.exports;const Rr=Gs(CZ);let JS=!0;try{var Uy,Fy;JS=!((Uy=process)!==null&&Uy!==void 0&&(Fy=Uy.env)!==null&&Fy!==void 0&&Fy.ALWAYS_APPEND_UI_TESTABLE_LOCATORS)}catch(t){if(t instanceof ReferenceError)JS=!1;else throw t}const Ne=JS?()=>t=>t:l1(t=>{const n={attribute:"data-cid",value:t.displayName||t.name},i=`[${n.attribute}~="${n.value}"]`;class r extends t{constructor(...o){super(...o),this._testableUnmounted=void 0,this._locatorTimeout=void 0}componentDidMount(){this._testableUnmounted=!1,super.componentDidMount&&super.componentDidMount(),this.appendLocatorAttribute()}componentDidUpdate(o,a,l){super.componentDidUpdate&&super.componentDidUpdate(o,a,l),this.appendLocatorAttribute()}componentWillUnmount(){this._testableUnmounted=!0,super.componentWillUnmount&&super.componentWillUnmount(),this._locatorTimeout&&clearTimeout(this._locatorTimeout)}appendLocatorAttribute(){this._locatorTimeout=setTimeout(()=>{let o;if(!this._testableUnmounted){try{o=this.DOMNode||at(this)}catch{}if(o){const a=o.getAttribute(n.attribute),l=typeof a=="string"?a.split(/\s+/):[];l.includes(n.value)||l.push(n.value),o.setAttribute(n.attribute,l.join(" "))}}})}}return r.selector=i,r}),wM="getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ",TZ=wM.length-1;function AZ(t="",e=12){return`u${PZ(e-1)}`}function RZ(t){const e=[];for(;0{r.forEach(s=>{const o=Array.from(s.addedNodes),a=Array.from(s.removedNodes);this.hideNodes(o.filter(tT)),a.filter(tT).forEach(l=>{l.tagName.toLowerCase()!=="iframe"&&this.restoreNode(l),this.parseIframeBodies(l).forEach(c=>{this.restoreNode(c)})})})};const i=typeof n.liveRegion=="function"?n.liveRegion():n.liveRegion;this._liveRegion=Array.isArray(i)?i:[i],this._contextElement=e,this._options=n}updateElement(e){this._contextElement=e}muteNode(e){e&&e.tagName.toLowerCase()!=="script"&&(["role","aria-label","aria-hidden"].forEach(n=>{const i=e.getAttribute(n);i!==null&&(this._attributes.push([e,n,i]),e.removeAttribute(n))}),this._observer.observe(e,{childList:!0}))}hideNodes(e){e.forEach(n=>{var i;const r=typeof n.getAttribute=="function"&&((i=n.getAttribute("aria-live"))===null||i===void 0?void 0:i.toLowerCase());n&&n.nodeType===1&&n.tagName.toLowerCase()!=="script"&&r!=="assertive"&&r!=="polite"&&this._parents.indexOf(n)===-1&&this._nodes.indexOf(n)===-1&&this._liveRegion.indexOf(n)===-1&&!this._contextElement.contains(n)&&(n.tagName.toLowerCase()!=="iframe"&&this.hideNode(n),this.parseIframeBodies(n).forEach(o=>{this.hideNode(o)}))})}hideNode(e){e.getAttribute("aria-hidden")!=="true"&&(e.setAttribute("aria-hidden","true"),this._nodes.push(e))}restoreNode(e){const n=this._nodes.indexOf(e);n>=0&&(e.removeAttribute("aria-hidden"),this._nodes.splice(n,1))}parseIframeBodies(e){if(!e)return[];let n=[];return e.tagName.toLowerCase()==="iframe"?n.push(e):e.getElementsByTagName&&(n=Array.from(e.getElementsByTagName("iframe"))),n.map(i=>{let r=null;try{r=i.contentDocument.body}catch(s){Be(!1,`[ui-a11y] could not find a document for iframe: ${s} ${i}`)}return r}).filter(i=>i!==null)}activate(){if(!this._options.shouldContainFocus)return;this._observer=new MutationObserver(this.handleDOMMutation);let e=this._contextElement;for(;e&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()!=="body";){const n=e.parentElement;n&&(this._parents.push(n),this.muteNode(n),this.hideNodes(Array.prototype.slice.call(n.childNodes))),e=e.parentNode}}deactivate(){this._observer&&(this._observer.disconnect(),this._observer=null),this._nodes.forEach(e=>{e.removeAttribute("aria-hidden")}),this._nodes=[],this._attributes.forEach(e=>{e[0].setAttribute(e[1],e[2]||"")}),this._attributes=[],this._parents=[]}}function $Z(t,e,n){const i=at(t),r=hx(i);if(!r.length){e.preventDefault();return}if(Du(t)){const l=Pd();l&&r.indexOf(l)===-1&&r.push(l)}const s=r[e.shiftKey?0:r.length-1];if(!(qs(s)||qs(i)||!Du(t)))return;e.preventDefault(),r[e.shiftKey?r.length-1:0].focus()}class DZ{constructor(e,n){this._options=void 0,this._focusLaterElement=null,this._needToFocus=!1,this._listeners=[],this._raf=[],this._active=!1,this._wasDocumentClick=void 0,this._contextElement=void 0,this.handleKeyDown=i=>{i.keyCode===Rr.codes.tab&&$Z(this._contextElement,i)},this.handleClick=()=>{this._wasDocumentClick=!0},this.handleWindowBlur=()=>{if(this._wasDocumentClick){this._wasDocumentClick=!1;return}this._needToFocus=!0},this.handleFocus=()=>{if(this._needToFocus){if(this._needToFocus=!1,!this._contextElement)return;this._raf.push(Eo(()=>{Du(this._contextElement)||this.focusDefaultElement()}))}},this.handleFirstTabbableKeyDown=i=>{if(i.keyCode===Rr.codes.tab&&i.shiftKey){var r,s;(r=(s=this._options).onBlur)===null||r===void 0||r.call(s,i)}},this.handleLastTabbableKeyDown=i=>{if(i.keyCode===Rr.codes.tab&&!i.shiftKey){var r,s;(r=(s=this._options).onBlur)===null||r===void 0||r.call(s,i)}},this._contextElement=at(e),this._options=n||{shouldContainFocus:!0,shouldReturnFocus:!0,defaultFocusElement:null},this._options.shouldReturnFocus&&(this._focusLaterElement=Pd(this.doc))}get focused(){return Du(this._contextElement)}get shouldContainFocus(){const e=this._options.shouldContainFocus;return e===!0||Array.isArray(e)&&e.includes("keyboard")}get focusable(){return dx(this._contextElement,()=>!0,!0)||[]}get tabbable(){return hx(this._contextElement)||[]}get firstTabbable(){return this.tabbable[0]}get lastTabbable(){return this.tabbable.pop()}get firstFocusable(){return this.focusable[0]}get lastFocusable(){return this.focusable.pop()}get doc(){return Zs(this._contextElement)}get win(){return Id(this._contextElement)}get defaultFocusElement(){const e=this._options.defaultFocusElement,n=at(typeof e=="function"?e():e);return n&&this._contextElement&&this._contextElement.contains(n)?n:this.firstTabbable?this.firstTabbable:this._contextElement&&this.focusable.includes(this._contextElement)?this._contextElement:null}updateElement(e){this._contextElement=at(e)}focusDefaultElement(){if(this.defaultFocusElement){const e=this.defaultFocusElement,n=e.closest("[data-position-content]");n?this.tryFocusOnPositionedElement(n,e):e.focus()}else this.shouldContainFocus&&(Pd(this.doc)&&Pd(this.doc).blur(),tt(!0,"\n [KeyboardFocusRegion] No `defaultFocusElement` was provided and\n `shouldContainFocus` was set to `true` or `keyboard`. Focus has\n been moved to the document body instead."))}tryFocusOnPositionedElement(e,n,i=3){if(i<=0)return;const r=e.getBoundingClientRect(),s=document.documentElement.getBoundingClientRect();r.top>s.bottom||r.rights.right?this._raf.push(Eo(()=>{this.tryFocusOnPositionedElement(e,n,i-1)})):n.focus()}focus(){this.focused||this._raf.push(Eo(()=>{this.focusDefaultElement()}))}blur(){if(this._options.shouldReturnFocus&&this._focusLaterElement){try{this._focusLaterElement.focus()}catch(e){tt(!1,` - [KeyboardFocusRegion] You tried to return focus to ${this._focusLaterElement} - but it is not in the DOM anymore: ${e} - `)}this._focusLaterElement=null}}activate(){const e=this.defaultFocusElement,n=this.shouldContainFocus;this._active||(e||n)&&(n?this._listeners.push(qr(this.doc,"keydown",this.handleKeyDown)):(this._listeners.push(qr(this.firstTabbable||e,"keydown",this.handleFirstTabbableKeyDown)),this._listeners.push(qr(this.lastTabbable||e,"keydown",this.handleLastTabbableKeyDown))),this._listeners.push(qr(this.doc,"click",this.handleClick,!0)),this._listeners.push(qr(this.win,"blur",this.handleWindowBlur,!1)),this._listeners.push(qr(this.doc,"focus",this.handleFocus,!0)),this._active=!0)}deactivate(){this._active&&(this._listeners.forEach(e=>{e.remove()}),this._listeners=[],this._raf.forEach(e=>e.cancel()),this._raf=[],this._active=!1)}}class _M{constructor(e,n){this._contextElement=null,this._options=void 0,this._screenReaderFocusRegion=void 0,this._keyboardFocusRegion=void 0,this._id=void 0,this._listeners=[],this._active=!1,this._documentClickTarget=null,this._contextContainsTarget=!1,this.handleDismiss=(i,r)=>{var s,o;(s=(o=this._options).onDismiss)===null||s===void 0||s.call(o,i,r)},this.captureDocumentMousedown=i=>{this._documentClickTarget=i.target,this._contextContainsTarget=Kd(this._contextElement,this._documentClickTarget)},this.handleDocumentClick=i=>{this._options.shouldCloseOnDocumentClick&&i.button===0&&i.detail>0&&!this._contextContainsTarget&&this.handleDismiss(i,!0)},this.handleFrameClick=(i,r)=>{Kd(this._contextElement,r)||this.handleDismiss(i,!0)},this.handleKeyUp=i=>{if(this._options.shouldCloseOnEscape&&i.keyCode===Rr.codes.esc&&!i.defaultPrevented){var r;const s=(r=Zs(this._contextElement))===null||r===void 0?void 0:r.activeElement;(s==null?void 0:s.tagName)==="INPUT"&&s.type==="file"?s.blur():this.handleDismiss(i)}},this._options=n||{shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0},this._contextElement=e,this._screenReaderFocusRegion=new IZ(e,n),this._keyboardFocusRegion=new DZ(e,n),this._id=AZ()}updateElement(e,n){this._contextElement=e,n&&(this._options=n),this._keyboardFocusRegion&&this._keyboardFocusRegion.updateElement(e),this._screenReaderFocusRegion&&this._screenReaderFocusRegion.updateElement(e)}get id(){return this._id}get focused(){return this._active}get keyboardFocusable(){return(hx(this._contextElement)||[]).length>0}activate(){if(!this._active){const e=Zs(this._contextElement);this._keyboardFocusRegion.activate(),this._screenReaderFocusRegion.activate(),this._options.shouldCloseOnDocumentClick&&(this._listeners.push(qr(e,"mousedown",this.captureDocumentMousedown)),this._listeners.push(qr(e,"click",this.handleDocumentClick)),Array.from(e.getElementsByTagName("iframe")).forEach(n=>{const i=n.contentDocument;i&&this._listeners.push(qr(i,"mouseup",r=>{this.handleFrameClick(r,n)}))})),this._options.shouldCloseOnEscape&&this._listeners.push(qr(e,"keyup",this.handleKeyUp)),this._active=!0}}deactivate({keyboard:e=!0}={}){this._active&&(this._listeners.forEach(n=>{n.remove()}),this._listeners=[],e&&this._keyboardFocusRegion.deactivate(),this._screenReaderFocusRegion.deactivate(),this._active=!1)}focus(){tt(this._active,"[FocusRegion] Cannot call '.focus()' on a region that is not currently active."),this._keyboardFocusRegion.focus()}blur(){tt(!this._active,"[FocusRegion] Cannot call '.blur()' on a region that is currently active."),this._keyboardFocusRegion.blur()}}var Ys;let $o=[];class vi{}Ys=vi;vi.focusRegion=(t,e={})=>{let n;if(typeof e=="string"?n=Ys.getEntry(t,e):n=Ys.addEntry(t,e),n&&n.region&&typeof n.region.focus=="function")return n.region.focus(),n.region;tt(!1,`[FocusRegionManager] Could not focus region with element: ${t}`)};vi.activateRegion=(t,e)=>Ys.addEntry(t,e).region;vi.getActiveEntry=()=>$o.find(({region:t})=>t.focused);vi.findEntry=(t,e)=>{let n;return e?n=$o.findIndex(i=>i.id===e):n=$o.findIndex(i=>i.element===t),n};vi.getEntry=(t,e)=>$o[Ys.findEntry(t,e)];vi.addEntry=(t,e={})=>{const n=new _M(t,e),i=Ys.getActiveEntry(),r=n.keyboardFocusable;$o.forEach(({region:o})=>{if(o){const a=o.focused&&!r?{keyboard:!1}:void 0;o.deactivate(a)}}),n.activate(),e.shouldFocusOnOpen&&n.focus();const s={id:n.id,element:t,region:n,children:[],parent:i};return $o.push(s),i&&i.children.push(s),s};vi.removeEntry=(t,e)=>{const n=Ys.findEntry(t,e),i=$o[n];return n>-1&&$o.splice(n,1),i};vi.isFocused=(t,e)=>{const n=Ys.getActiveEntry();return e?n&&n.region&&n.id===e:n&&n.region&&n.element===t};vi.clearEntries=()=>{$o=[]};vi.blurRegion=(t,e)=>{const n=Ys.removeEntry(t,e);if(n){const i=n.children,r=n.region,s=n.parent;r&&r.deactivate(),i&&i.forEach(({id:o,element:a})=>{const l=Ys.removeEntry(a,o);l&&l.region&&l.region.deactivate()}),s&&s.region&&s.region.activate(),r&&r.blur()}};function h1(t){let e=!1;return F.Children.forEach(t,n=>{n&&!Qe(n,[cr])&&(e=!0)}),e}const LZ=({borderRadius:t,borderWidth:e,dir:n,theme:i})=>{const r=n===c1.rtl;return{borderRadius:zb("View",i,r?wZ(t):t,"borderRadius"),borderWidth:zb("View",i,r?GS(e):e,"borderWidth")}},MZ=({margin:t,padding:e,dir:n,theme:i})=>{const r=n===c1.rtl;return{margin:zb("View",i,r?GS(t):t,"margin"),padding:zb("View",i,r?GS(e):e,"padding")}},NZ=({insetBlockStart:t,insetBlockEnd:e,insetInlineStart:n,insetInlineEnd:i,dir:r})=>{const s=r===c1.rtl;return{...{top:t,insetBlockStart:t},...{bottom:e,insetBlockEnd:e},...{left:s?i:n,right:s?n:i}}},BZ=({cursor:t,style:e})=>{const n=Qo(e||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return t&&(n.cursor=t),n},QZ=(t,e)=>typeof e!="string"?!1:e.trim().split(" ").every(n=>t===n),zZ=t=>{const e="focusRing--radius",n=(t||"").trim().split(" ")[0];if(QZ(n,t)){const i=r=>`${r.charAt(0).toUpperCase()}${r.slice(1)}`;if(["small","medium","large"].includes(n))return`${e}${i(n)}`;if(["circle","pill"].includes(n))return`${e}Inherit`}return`${e}None`},HZ=t=>{const e=t.position,n=t.display,i=t.focusPosition,r=t.withFocusOutline;return typeof r>"u"||r&&(tt(n==="inline"||e==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),tt(n!=="inline"||i==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),r},UZ=t=>{const e=t.borderWidth;return e&&e!=="0"&&e!=="none"},FZ=(t,e)=>{const n=t.focusColor,i=t.focusPosition,r=t.position,s=t.shouldAnimateFocus,o=t.borderRadius,a=HZ(t),l=typeof a>"u",u={offset:{top:`calc(${e.focusOutlineOffset} * -1)`,left:`calc(${e.focusOutlineOffset} * -1)`,right:`calc(${e.focusOutlineOffset} * -1)`,bottom:`calc(${e.focusOutlineOffset}* -1)`},inset:{top:`calc(${e.focusOutlineInset} * -1)`,left:`calc(${e.focusOutlineInset} * -1)`,right:`calc(${e.focusOutlineInset} * -1)`,bottom:`calc(${e.focusOutlineInset} * -1)`}},c={info:e.focusColorInfo,inverse:e.focusColorInverse,success:e.focusColorSuccess,danger:e.focusColorDanger};if(r==="relative"){const d=zZ(o),h={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},f={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:e.focusOutlineStyle,borderWidth:e.focusOutlineWidth,borderColor:c[n],opacity:0,borderRadius:h[d],...f[i][d],...u[i],...s?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...a?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...l?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:c[n],...a?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{},"&:focus":{...l?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{}}}},VZ=(t,e)=>{const n=e.borderRadius,i=e.borderWidth,r=e.margin,s=e.padding,o=e.position,a=e.display,l=e.focusPosition,u=e.textAlign,c=e.borderColor,d=e.background,h=e.stacking,f=e.shadow,m=e.overflowY,b=e.overflowX,y=e.overscrollBehavior,O=e.insetBlockEnd,v=e.insetBlockStart,S=e.insetInlineEnd,_=e.insetInlineStart,k=e.width,x=e.height,w=e.minWidth,M=e.minHeight,H=e.maxWidth,I=e.maxHeight,z=e.withVisualDebug,U=e.dir,X=LZ({theme:t,borderRadius:n,borderWidth:i,dir:U}),J=MZ({margin:r,padding:s,theme:t,dir:U}),re=NZ({dir:U,insetBlockEnd:O,insetBlockStart:v,insetInlineEnd:S,insetInlineStart:_}),Z=o==="relative"||a==="inline"&&l==="inset",ne={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},ee={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},fe={transparent:{borderColor:t.borderColorTransparent},primary:{borderColor:t.borderColorPrimary},secondary:{borderColor:t.borderColorSecondary},brand:{borderColor:t.borderColorBrand},info:{borderColor:t.borderColorInfo},success:{borderColor:t.borderColorSuccess},warning:{borderColor:t.borderColorWarning},alert:{borderColor:t.borderColorAlert},danger:{borderColor:t.borderColorDanger}},P={transparent:{color:t.color,background:"none"},primary:{color:t.color,background:t.backgroundPrimary},secondary:{color:t.color,background:t.backgroundSecondary},"primary-inverse":{color:t.colorPrimaryInverse,background:t.backgroundPrimaryInverse},brand:{color:t.colorPrimaryInverse,background:t.backgroundBrand},info:{color:t.colorPrimaryInverse,background:t.backgroundInfo},alert:{color:t.colorPrimaryInverse,background:t.backgroundAlert},success:{color:t.colorPrimaryInverse,background:t.backgroundSuccess},danger:{color:t.colorPrimaryInverse,background:t.backgroundDanger},warning:{color:t.colorPrimaryInverse,background:t.backgroundWarning}},Ae={topmost:{zIndex:t.stackingTopmost},above:{zIndex:t.stackingAbove},resting:{},below:{zIndex:t.stackingBelow},deepest:{zIndex:t.stackingDeepest}},_e={topmost:{boxShadow:t.shadowTopmost},resting:{boxShadow:t.shadowResting},above:{boxShadow:t.shadowAbove},none:{}},$=FZ(e,t);return{view:{label:"view",boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",...ne[a],...d&&P[d],...h&&Ae[h],...f&&_e[f],...u&&ee[u],overflowX:b&&b!=="visible"?b:"",overflowY:m&&m!=="visible"?m:"",position:o!=="static"?o:"",overscrollBehavior:y||"auto",...z?{outline:`0.0625rem dashed ${t.debugOutlineColor}`}:{},...UZ(e)?{borderStyle:t.borderStyle,...fe[c]}:{},...Z?$:{}},inlineStyles:{"&&&&&&&&&&":{...J,...X,...re,width:k,height:x,minWidth:w,minHeight:M,maxWidth:H,maxHeight:I,...BZ(e)}}}},WZ=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.breakpoints,s=t.spacing,o=t.shadows,a=t.stacking,l=t.key,u={canvas:{color:t["ic-brand-font-color-dark"],focusColorInfo:t["ic-brand-primary"],backgroundBrand:t["ic-brand-primary"],backgroundInfo:t["ic-brand-primary"],borderColorBrand:t["ic-brand-primary"],borderColorInfo:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,color:e==null?void 0:e.textDarkest,colorPrimaryInverse:e==null?void 0:e.textLightest,borderColorPrimary:e==null?void 0:e.borderMedium,borderColorSecondary:e==null?void 0:e.borderDark,borderColorSuccess:e==null?void 0:e.borderSuccess,borderColorBrand:e==null?void 0:e.borderBrand,borderColorInfo:e==null?void 0:e.borderInfo,borderColorAlert:e==null?void 0:e.borderAlert,borderColorWarning:e==null?void 0:e.borderWarning,borderColorDanger:e==null?void 0:e.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:e==null?void 0:e.borderDebug,backgroundPrimary:e==null?void 0:e.backgroundLightest,backgroundSecondary:e==null?void 0:e.backgroundLight,backgroundPrimaryInverse:e==null?void 0:e.backgroundDarkest,backgroundBrand:e==null?void 0:e.backgroundBrand,backgroundInfo:e==null?void 0:e.backgroundInfo,backgroundAlert:e==null?void 0:e.backgroundAlert,backgroundSuccess:e==null?void 0:e.backgroundSuccess,backgroundDanger:e==null?void 0:e.backgroundDanger,backgroundWarning:e==null?void 0:e.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:i==null?void 0:i.style,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:e==null?void 0:e.borderInfo,focusColorDanger:e==null?void 0:e.borderDanger,focusColorSuccess:e==null?void 0:e.borderSuccess,focusColorInverse:e==null?void 0:e.borderLightest,xSmallMaxWidth:r==null?void 0:r.xSmall,smallMaxWidth:r==null?void 0:r.small,mediumMaxWidth:r==null?void 0:r.medium,largeMaxWidth:r==null?void 0:r.large,...bf("margin",s),...bf("padding",s),...bf("shadow",o),...bf("stacking",a),...bf("border",i)},...u[l]}},jZ={as:p.elementType,elementRef:p.func,display:p.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:p.oneOf(["auto","hidden","visible"]),overflowY:p.oneOf(["auto","hidden","visible"]),margin:pt.spacing,padding:pt.spacing,height:p.oneOfType([p.string,p.number]),width:p.oneOfType([p.string,p.number]),maxHeight:p.oneOfType([p.string,p.number]),maxWidth:p.oneOfType([p.string,p.number]),minHeight:p.oneOfType([p.string,p.number]),minWidth:p.oneOfType([p.string,p.number]),children:p.node,textAlign:p.oneOf(["start","center","end"]),borderWidth:pt.borderWidth,borderRadius:pt.borderRadius,borderColor:p.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:p.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:pt.shadow,stacking:pt.stacking,cursor:HX,position:p.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:p.string,insetInlineEnd:p.string,insetBlockStart:p.string,insetBlockEnd:p.string,withFocusOutline:p.bool,focusPosition:p.oneOf(["offset","inset"]),focusColor:p.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:p.bool,withVisualDebug:p.bool,dir:p.oneOf(Object.values(ss.DIRECTION)),overscrollBehavior:p.oneOf(["auto","contain","none"])},XZ=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],ZZ=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var nT,iT,bg,lo;let Oe=(nT=ss(),iT=de(VZ,WZ),nT(bg=iT(bg=(lo=class kM extends T.Component{get _element(){return this.ref}constructor(e){super(e),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=n=>{typeof this.props.elementRef=="function"&&this.props.elementRef(n),this.ref=n},this.spanMarginVerified=!1}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children;e.textAlign,e.background,e.display,e.withVisualDebug,e.width,e.height,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight,e.overflowX,e.overflowY,e.stacking,e.shadow,e.position,e.focusPosition,e.focusColor,e.shouldAnimateFocus,e.borderColor;const i=e.className;e.overscrollBehavior;const r=e.styles;e.makeStyles;const s=Le(e,ZZ),o=Ei(kM,this.props);return C(o,Object.assign({},Ft(s),{className:i,css:[r==null?void 0:r.view,r==null?void 0:r.inlineStyles],ref:this.handleElementRef}),n)}},lo.displayName="View",lo.componentId="View",lo.allowedProps=XZ,lo.propTypes=jZ,lo.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},lo.omitViewProps=(t,e)=>{const n=[...lo.allowedProps,"styles","makeStyles","themeOverride"];let i=!0;try{i=!1}catch(r){if(r instanceof ReferenceError)i=!1;else throw r}return i&&Object.keys(Qo(t,n)).forEach(r=>{tt(!1,`[${e.name}] prop '${r}' is not allowed.`)}),De(t,n)},lo))||bg)||bg);function f1(t,e=0,n={}){let i,r,s,o,a=0,l=[];if(typeof t!="function")throw new TypeError("Expected a function");const u=!!n.leading,c="maxWait"in n,d="trailing"in n?!!n.trailing:!0,h=c?Math.max(+!n.maxWait||0,e):0;function f(w){const M=i,H=r;return i=void 0,r=void 0,a=w,s=t.apply(H,M),s}function m(w){return a=w,l.push(setTimeout(O,e)),u?f(w):s}function b(w){const M=w-o,H=w-a,I=e-M;return c?Math.min(I,h-H):I}function y(w){if(typeof o>"u")return!0;const M=w-o,H=w-a;return M>=e||M<0||c&&H>=h}function O(){const w=Date.now();y(w)?v(w):l.push(setTimeout(O,b(w)))}function v(w){return k(),d&&i?f(w):(i=r=void 0,s)}function S(){k(),a=0,i=o=r=void 0}function _(){return l.length===0?s:v(Date.now())}function k(){l.forEach(w=>clearTimeout(w)),l=[]}function x(...w){const M=Date.now(),H=y(M);if(i=w,r=this,o=M,H){if(l.length===0)return m(o);if(c)return l.push(setTimeout(O,e)),f(o)}return l.length===0&&l.push(setTimeout(O,e)),s}return x.cancel=S,x.flush=_,x}const qZ={open:p.bool,onOpen:p.func,onClose:p.func,mountNode:p.oneOfType([zi,p.func]),insertAt:p.oneOf(["bottom","top"]),children:p.node,elementRef:p.func,dir:p.oneOf(Object.values(ss.DIRECTION))},YZ=["open","onOpen","onClose","mountNode","insertAt","children","elementRef","dir"],GZ=["open","insertAt","onOpen","onClose","mountNode","children","elementRef","dir"];var rT,sT,Cc;let xM=(rT=ss(),rT(sT=(Cc=class extends T.Component{constructor(e){super(e),this.DOMNode=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,this.DOMNode=n,typeof i=="function"&&i(n)},wn&&(this.state={mountNode:this.findMountNode(e)})}componentDidMount(){wn&&this.props.open&&F.Children.count(this.props.children)>0&&this.forceUpdate(()=>{this.props.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode)})}componentDidUpdate(e){if(!wn)return;const n=this.findMountNode(this.props);n!==this.state.mountNode&&this.setState({mountNode:n}),this.props.open&&!e.open&&typeof this.props.onOpen=="function"&&this.props.onOpen(this.DOMNode),!this.props.open&&e.open&&typeof this.props.onClose=="function"&&this.props.onClose()}componentWillUnmount(){wn&&(this.removeNode(),this.props.open&&typeof this.props.onClose=="function"&&this.props.onClose())}removeNode(){this.DOMNode&&this.DOMNode.parentNode&&typeof this.DOMNode.parentNode.removeChild=="function"&&(this.DOMNode.parentNode.removeChild(this.DOMNode),this.handleRef(null))}insertNode(){const e=this.props;e.open;const n=e.insertAt;e.onOpen,e.onClose,e.mountNode,e.children,e.elementRef;const i=e.dir,r=Le(e,GZ);if(!this.DOMNode){const s=document.createElement("span"),o={...Ft(r),dir:i};Object.keys(o).forEach(a=>{s.setAttribute(a,o[a])}),this.handleRef(s)}return this.DOMNode&&this.DOMNode.parentNode!==this.state.mountNode&&(n==="bottom"?this.state.mountNode.appendChild(this.DOMNode):this.state.mountNode.insertBefore(this.DOMNode,this.state.mountNode.firstChild)),this.DOMNode}findMountNode(e){let n;return typeof e.mountNode=="function"?n=e.mountNode():e.mountNode&&(n=e.mountNode),(!n||!n.nodeName)&&(n=document.body),n}get node(){return this.DOMNode}render(){const e=this.props,n=e.children,i=e.open;return!wn&&i?n:i&&F.Children.count(n)>0?vm.createPortal(n,this.insertNode()):null}},Cc.displayName="Portal",Cc.propTypes=qZ,Cc.allowedProps=YZ,Cc.defaultProps={open:!1,insertAt:"bottom",onOpen:()=>{},onClose:()=>{},mountNode:null,children:null,elementRef:()=>{}},Cc))||sT);const KZ=(t,e)=>({position:{label:"position",display:e.containerDisplay},zIndex:t.zIndex}),JZ=t=>{const e=t.stacking;return{...{zIndex:e==null?void 0:e.topmost}}},eq=["top","bottom","start","end","top start","top center","top end","top stretch","bottom start","bottom center","bottom end","bottom stretch","start top","start center","start bottom","start stretch","end top","end center","end bottom","end stretch","center start","center end","offscreen"],hn={placement:p.oneOf(eq),mountNode:p.oneOfType([zi,p.func]),constrain:p.oneOfType([zi,p.func,p.oneOf(["window","scroll-parent","parent","none"])])},EM={center:"center",start:"end",end:"start",top:"bottom",bottom:"top",stretch:"stretch",offscreen:"offscreen"},tq={renderTarget:p.oneOfType([p.node,p.func]),target:p.oneOfType([zi,p.func]),placement:hn.placement,mountNode:hn.mountNode,insertAt:p.oneOf(["bottom","top"]),constrain:hn.constrain,offsetX:p.oneOfType([p.string,p.number]),offsetY:p.oneOfType([p.string,p.number]),id:p.string,shouldTrackPosition:p.bool,shouldPositionOverTarget:p.bool,onPositionChanged:p.func,onPositioned:p.func,children:p.node,containerDisplay:p.oneOf(["inline-block","block"]),elementRef:p.func},nq=["renderTarget","target","placement","mountNode","insertAt","constrain","offsetX","offsetY","id","shouldTrackPosition","shouldPositionOverTarget","onPositionChanged","onPositioned","children","containerDisplay","elementRef"];function CM(t,e,n){const i=Array.isArray(t)?t:t.split(" "),r=as(i,2),s=r[0],o=r[1],a=e(s,o).filter(l=>l);return n?a.join(n):a}function TM(t,e){return CM(t,(n,i)=>[EM[n],i],e)}function iq(t,e,n={}){if(!t||n.placement==="offscreen"){const r=!n.container&&t;return{placement:n.placement,style:{left:"-9999em",overflow:"hidden",position:"absolute",top:0,display:r?"none":null}}}const i=new rq(t,e,n);return{placement:i.placement,style:i.style}}class oT{constructor(e,n,i={top:0,left:0}){this.node=void 0,this.placement=void 0,this.rect=void 0,this._offset=void 0,this.node=at(e),typeof n=="string"?this.placement=AM(n):Array.isArray(n)?this.placement=n:this.placement=["bottom","center"],this.rect=sn(this.node),this._offset=aT(i,this.size,this.node)}get width(){return this.rect.width}get height(){return this.rect.height}get size(){return{width:this.width,height:this.height}}get position(){return{top:this.rect.top,left:this.rect.left}}get hasVerticalPlacement(){return["top","bottom"].indexOf(this.placement[0])>=0}get hasHorizontalPlacement(){return["start","end"].indexOf(this.placement[0])>=0}get shouldStretchVertically(){return this.placement[1]==="stretch"&&this.hasVerticalPlacement}get shouldStretchHorizontally(){return this.placement[1]==="stretch"&&this.hasHorizontalPlacement}get mirroredPlacement(){return TM(this.placement)}calculateOffset(e){const n={top:0,start:0,center:"50%",bottom:"100%",end:"100%",stretch:0};let i=as(e,2),r=i[0],s=i[1];if(["start","end"].indexOf(r)>=0){var o=[s,r];r=o[0],s=o[1]}let a=0,l=0;return typeof n[r]<"u"&&(a=n[r]),typeof n[s]<"u"&&(l=n[s]),z0([aT({top:a,left:l},this.size,this.node),sq(this._offset,this.placement)])}get scrollParentsOffset(){const e=dM(this.node);let n=0,i=0;for(let r=1;r1?0:sn(n==null?void 0:n.documentElement).top,r=0,s=0;for(let o=1;od.bottom?c-d.bottom:0,left:ad.right?l-d.right:0}}constrainTo(e){if(!e)return;const n=this.overflow(e),i={top:n.top>0,bottom:n.bottom>0,left:n.left>0,right:n.right>0};this.element.hasVerticalPlacement?(this.element.placement[1]!=="stretch"&&(i.left&&i.right?(this.element.placement[1]="center",this.target.placement[1]="center"):i.left?(this.element.placement[1]="start",this.target.placement[1]="start"):i.right&&(this.element.placement[1]="end",this.target.placement[1]="end")),i.top&&i.bottom?n.bottomn.top&&(this.element.placement[0]="top",this.target.placement[0]="bottom"):i.top?(this.element.placement[0]="bottom",this.target.placement[0]="top"):i.bottom&&(this.element.placement[0]="top",this.target.placement[0]="bottom")):this.element.hasHorizontalPlacement&&(i.top&&i.bottom?(this.element.placement[1]="center",this.target.placement[1]="center"):i.top?(this.element.placement[1]="top",this.target.placement[1]="top"):i.bottom&&(this.element.placement[1]="bottom",this.target.placement[1]="bottom"),i.left&&i.right?n.left>n.right?(this.element.placement[0]="end",this.target.placement[0]="start"):n.left({top:e.top+n.top,left:e.left+n.left}),{top:0,left:0})}function sq(t,e){let n=t.top,i=t.left;return typeof i=="string"&&(i=parseFloat(i)),typeof n=="string"&&(n=parseFloat(n)),e[0]==="bottom"&&(n=0-n),e[0]==="end"&&(i=0-i),{top:n,left:i}}function aT(t,e,n){let i=t.left,r=t.top;return typeof i=="string"&&i.indexOf("%")!==-1&&(i=parseFloat(i)/100*e.width),typeof r=="string"&&r.indexOf("%")!==-1&&(r=parseFloat(r)/100*e.height),{top:r,left:i}}function oq(t){let e=as(t,2),n=e[0],i=e[1];if(n==="center"||n==="stretch"){var r=[i,n];n=r[0],i=r[1]}return[n,i]}function AM(t){let e=t.split(" ");return e.length===1&&(e=[t,"center"]),oq(e)}function aq(t){return t.join(" ")}var lT,uT,cT,Tc,vs;let dT=(lT=Kt(),uT=de(KZ,JZ),cT=Ne(),lT(Tc=uT(Tc=cT(Tc=(vs=class ed extends T.Component{constructor(e){super(e),this.ref=null,this._id=void 0,this._timeouts=[],this._listener=null,this._content=void 0,this._target=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handlePortalOpen=()=>{this.position(),this.props.shouldTrackPosition&&this.startTracking(),this._timeouts.push(setTimeout(()=>{this.state.positioned&&typeof this.props.onPositioned=="function"&&this.props.onPositioned({top:this.state.style.top,left:this.state.style.left,placement:this.state.placement})},0))},this.position=()=>{this.setState({positioned:!0,...this.calculatePosition(this.props)})},this.state={positioned:!1,...this.calculatePosition(e)},this.position=f1(this.position,0,{leading:!1,trailing:!0}),this._id=this.props.id||e.deterministicId()}shouldComponentUpdate(e,n,i){return!u1(this.state,n)||!Bb(this.props,e)||!Bb(this.context,i)}componentDidMount(){var e,n;this.toggleLocatorAttributes(!0),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;this.position(),this.toggleLocatorAttributes(!0),this.props.shouldTrackPosition!==e.shouldTrackPosition&&(this.props.shouldTrackPosition?this.startTracking():this.stopTracking());const s=this.state,o=s.style,a=s.placement;o&&n.style&&(a!==n.placement||o.top!==n.style.top||o.left!==n.style.left)&&typeof this.props.onPositionChanged=="function"&&this.props.onPositionChanged({top:o.top,left:o.left,placement:a}),(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}componentWillUnmount(){this.position.cancel(),this.stopTracking(),this._timeouts.forEach(e=>clearTimeout(e)),this.toggleLocatorAttributes(!1)}toggleLocatorAttributes(e){this.toggleLocatorAttribute(at(this._content),ed.contentLocatorAttribute,e),this.toggleLocatorAttribute(at(this._target),ed.targetLocatorAttribute,e)}toggleLocatorAttribute(e,n,i){e&&e.hasAttribute&&(i&&!e.hasAttribute(n)&&e.setAttribute(n,this._id),!i&&e.hasAttribute(n)&&e.removeAttribute(n))}calculatePosition(e){return iq(this._content,this._target,{placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,constrain:e.constrain,container:e.mountNode,over:e.shouldPositionOverTarget})}startTracking(){this._listener=this._listener||mX(this._target,this.position)}stopTracking(){this._listener&&(this._listener.remove(),this._listener=null)}renderContent(){let e=Ou(this.props.children);if(e){var n;e=Vt(e,{ref:i=>{this._content=i},style:{boxSizing:"border-box",zIndex:(n=this.props.styles)===null||n===void 0?void 0:n.zIndex,...e.props.style,...this.state.style},...e.props.className&&{className:e.props.className},[ed.contentLocatorAttribute]:this._id}),e=C(xM,{open:!0,onOpen:this.handlePortalOpen,mountNode:this.props.mountNode,insertAt:this.props.insertAt},e)}return e}renderTarget(){const e=lt(this.props.renderTarget);return e?Vt(e,{ref:n=>{this._target=n},[ed.targetLocatorAttribute]:this._id}):(this.props.target&&(this._target=lt(this.props.target)),null)}render(){var e;const n={[ed.locatorAttribute]:this._id};return C("span",Object.assign({},n,{css:(e=this.props.styles)===null||e===void 0?void 0:e.position,ref:this.handleRef}),this.renderTarget(),this.renderContent())}},vs.displayName="Position",vs.componentId="Position",vs.allowedProps=nq,vs.propTypes=tq,vs.defaultProps={placement:"bottom center",mountNode:null,insertAt:"bottom",constrain:"window",offsetX:0,offsetY:0,shouldTrackPosition:!0,shouldPositionOverTarget:!1,children:null},vs.locatorAttribute="data-position",vs.targetLocatorAttribute="data-position-target",vs.contentLocatorAttribute="data-position-content",vs))||Tc)||Tc)||Tc);function ew(t,e){return CM(t,(n,i)=>[n,i].map(r=>r==="start"||r==="end"?EM[r]:r),e)}const RM=["end center","end top","end bottom","center end","end"],PM=["start center","start top","start bottom","center start","start"],IM=["bottom","bottom end","bottom start","bottom center"],lq=["top","top start","top end","top center"],uq=(t,e)=>RM.includes(t)?{paddingInlineStart:e==null?void 0:e.arrowSize,paddingInlineEnd:"0"}:PM.includes(t)?{paddingInlineEnd:e==null?void 0:e.arrowSize,paddingInlineStart:"0"}:IM.includes(t)?{paddingTop:e==null?void 0:e.arrowSize}:lq.includes(t)?{paddingBottom:e==null?void 0:e.arrowSize}:{position:"absolute",left:"-999em"},cq=(t,e)=>{const n=["top","bottom","top center","bottom center"],i=["top start","bottom start"],r=["top end","bottom end"],s=["start top","end top"],o=["start bottom","end bottom"];return n.includes(t)?{insetInlineStart:"50%"}:i.includes(t)?{insetInlineStart:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:r.includes(t)?{insetInlineStart:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`,insetInlineEnd:"auto"}:s.includes(t)?{top:`calc((${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:o.includes(t)?{top:`calc(100% - (${e==null?void 0:e.arrowSize} + ${e==null?void 0:e.arrowBorderWidth}) * 2)`}:{}},dq=(t,e,n)=>{const i=TM(t," "),r=e==="inverse";return RM.includes(i)?{main:{top:"50%",insetInlineStart:"100%",insetInlineEnd:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderInlineStartColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize},__after:{insetInlineEnd:n==null?void 0:n.arrowBorderWidth,insetInlineStart:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineEndWidth:"0",borderInlineEndColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineStartWidth:n==null?void 0:n.arrowSize,borderInlineStartColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:PM.includes(i)?{main:{top:"50%",insetInlineEnd:"100%",insetInlineStart:"auto",marginTop:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderInlineEndColor:r?n==null?void 0:n.arrowBorderColorInverse:n==null?void 0:n.arrowBorderColor,borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize},__after:{insetInlineStart:n==null?void 0:n.arrowBorderWidth,insetInlineEnd:"auto",marginTop:`calc(-1 * ${n==null?void 0:n.arrowSize})`,borderInlineStartWidth:"0",borderInlineStartColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",borderInlineEndWidth:n==null?void 0:n.arrowSize,borderInlineEndColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:IM.includes(i)?{main:{top:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{bottom:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderBottomWidth:"0",borderBottomColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderTopColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}:{main:{bottom:"100%",marginInlineStart:`calc(-1 * (${n==null?void 0:n.arrowSize} + ${n==null?void 0:n.arrowBorderWidth}))`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent"},__after:{top:n==null?void 0:n.arrowBorderWidth,marginInlineStart:`calc(-1 * ${n==null?void 0:n.arrowSize})`,marginInlineEnd:"0",borderTopWidth:"0",borderTopColor:"transparent",borderInlineStartColor:"transparent",borderInlineEndColor:"transparent",borderBottomColor:r?n==null?void 0:n.arrowBackgroundColorInverse:n==null?void 0:n.arrowBackgroundColor}}},hq=(t,e)=>{const n=e.placement,i=e.background,r={content:'""',height:"0",width:"0",position:"absolute",display:"block",boxSizing:"border-box",pointerEvents:"none",borderStyle:"solid"},s={default:t==null?void 0:t.arrowBorderColor,inverse:t==null?void 0:t.arrowBorderColorInverse},o=dq(n,i,t);return{contextView:{label:"contextView",boxSizing:"border-box",minHeight:`calc(${t==null?void 0:t.arrowSize} * 2)`,...uq(n,t)},contextView__content:{label:"contextView__content",position:"relative"},contextView__arrow:{label:"contextView__arrow",...r,display:"block",borderWidth:`calc(${t==null?void 0:t.arrowSize} + ${t==null?void 0:t.arrowBorderWidth})`,borderColor:s[i],...o.main,...cq(n,t),"&::after":{borderWidth:t==null?void 0:t.arrowSize,borderColor:s[i],...o.__after,...r}},arrowSize:t.arrowSize,arrowBorderWidth:t.arrowBorderWidth}},fq=t=>{var e,n,i,r;return{...{arrowSize:"0.5rem",arrowBorderWidth:t==null||(e=t.borders)===null||e===void 0?void 0:e.widthSmall,arrowBackgroundColor:t==null||(n=t.colors)===null||n===void 0?void 0:n.white,arrowBorderColor:t==null||(i=t.colors)===null||i===void 0?void 0:i.tiara,arrowBackgroundColorInverse:t==null||(r=t.colors)===null||r===void 0?void 0:r.licorice,arrowBorderColorInverse:"transparent"}}},pq={as:p.elementType,elementRef:p.func,margin:pt.spacing,padding:pt.spacing,height:p.oneOfType([p.string,p.number]),width:p.oneOfType([p.string,p.number]),maxHeight:p.oneOfType([p.string,p.number]),maxWidth:p.oneOfType([p.string,p.number]),minHeight:p.oneOfType([p.string,p.number]),minWidth:p.oneOfType([p.string,p.number]),children:p.node,textAlign:p.oneOf(["start","center","end"]),shadow:pt.shadow,stacking:pt.stacking,background:p.oneOf(["default","inverse"]),placement:hn.placement,debug:p.bool},mq=["as","elementRef","margin","padding","height","width","maxHeight","maxWidth","minHeight","minWidth","children","textAlign","shadow","stacking","background","placement","debug"];var hT,fT,ol;let gq=(hT=de(hq,fq),hT(fT=(ol=class $M extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.background,r=e.children,s=e.debug,o=e.height,a=e.width,l=e.maxHeight,u=e.maxWidth,c=e.minHeight,d=e.minWidth,h=e.margin,f=e.padding,m=e.shadow,b=e.stacking,y=e.style,O=e.textAlign,v=e.styles;return C(Oe,Object.assign({},De(this.props,$M.allowedProps),{css:v==null?void 0:v.contextView,style:y,borderWidth:"none",display:"inline-block",as:n,withVisualDebug:s,elementRef:this.handleRef,margin:h,stacking:b}),C(Oe,{css:v==null?void 0:v.contextView__content,display:"block",borderRadius:"medium",borderWidth:"small",borderColor:i==="default"?"primary":"transparent",background:i==="default"?"primary":"primary-inverse",withVisualDebug:s,height:o,width:a,maxHeight:l,maxWidth:u,minHeight:c,minWidth:d,padding:f,shadow:m,textAlign:O},C("span",{css:v==null?void 0:v.contextView__arrow}),r))}},ol.displayName="ContextView",ol.componentId="ContextView",ol.allowedProps=mq,ol.propTypes=pq,ol.defaultProps={as:"span",elementRef:()=>{},debug:!1,width:"auto",height:"auto",children:null,textAlign:"start",background:"default",shadow:"resting",placement:"center end"},ol))||fT);const bq=(t,e,n)=>{const i=e.size,r=e.color,s=e.textAlign,o=e.shape,a=e.withBackground,l=e.withBorder,u=e.isCondensed,c=n.isDisabled,d=n.hasOnlyIconVisible,h={circle:{borderRadius:"50%"},rectangle:{}},f={small:{content:{fontSize:t.smallFontSize,paddingLeft:t.smallPaddingHorizontal,paddingRight:t.smallPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.smallHeight,width:t.smallHeight}},children:{paddingTop:t.smallPaddingTop,paddingBottom:t.smallPaddingBottom},iconSVG:{fontSize:u?t.smallFontSize:t.iconSizeSmall}},medium:{content:{fontSize:t.mediumFontSize,paddingLeft:t.mediumPaddingHorizontal,paddingRight:t.mediumPaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.mediumHeight,width:t.mediumHeight}},children:{paddingTop:t.mediumPaddingTop,paddingBottom:t.mediumPaddingBottom},iconSVG:{fontSize:u?t.mediumFontSize:t.iconSizeMedium}},large:{content:{fontSize:t.largeFontSize,paddingLeft:t.largePaddingHorizontal,paddingRight:t.largePaddingHorizontal,...d&&{paddingLeft:0,paddingRight:0,height:t.largeHeight,width:t.largeHeight}},children:{paddingTop:t.largePaddingTop,paddingBottom:t.largePaddingBottom},iconSVG:{fontSize:u?t.largeFontSize:t.iconSizeLarge}}},m={primary:a?{default:{color:t.primaryColor,background:t.primaryBackground,borderColor:t.primaryBorderColor},active:{background:t.primaryActiveBackground,boxShadow:t.primaryActiveBoxShadow},hover:{background:t.primaryHoverBackground}}:{default:{color:t.primaryGhostColor,borderColor:t.primaryGhostBorderColor,background:t.primaryGhostBackground},active:{background:t.primaryGhostActiveBackground,boxShadow:t.primaryGhostActiveBoxShadow},hover:{background:t.primaryGhostHoverBackground}},secondary:a?{default:{color:t.secondaryColor,background:t.secondaryBackground,borderColor:t.secondaryBorderColor},active:{background:t.secondaryActiveBackground,boxShadow:t.secondaryActiveBoxShadow},hover:{background:t.secondaryHoverBackground}}:{default:{color:t.secondaryGhostColor,borderColor:t.secondaryGhostBorderColor,background:t.secondaryGhostBackground},active:{background:t.secondaryGhostActiveBackground,boxShadow:t.secondaryGhostActiveBoxShadow},hover:{background:t.secondaryGhostHoverBackground}},"primary-inverse":a?{default:{color:t.primaryInverseColor,background:t.primaryInverseBackground,borderColor:t.primaryInverseBorderColor},active:{background:t.primaryInverseActiveBackground,boxShadow:t.primaryInverseActiveBoxShadow},hover:{background:t.primaryInverseHoverBackground}}:{default:{color:t.primaryInverseGhostColor,borderColor:t.primaryInverseGhostBorderColor,background:t.primaryInverseGhostBackground},active:{background:t.primaryInverseGhostActiveBackground,boxShadow:t.primaryInverseGhostActiveBoxShadow},hover:{background:t.primaryInverseGhostHoverBackground}},success:a?{default:{color:t.successColor,background:t.successBackground,borderColor:t.successBorderColor},active:{background:t.successActiveBackground,boxShadow:t.successActiveBoxShadow},hover:{background:t.successHoverBackground}}:{default:{color:t.successGhostColor,borderColor:t.successGhostBorderColor,background:t.successGhostBackground},active:{background:t.successGhostActiveBackground,boxShadow:t.successGhostActiveBoxShadow},hover:{background:t.successGhostHoverBackground}},danger:a?{default:{color:t.dangerColor,background:t.dangerBackground,borderColor:t.dangerBorderColor},active:{background:t.dangerActiveBackground,boxShadow:t.dangerActiveBoxShadow},hover:{background:t.dangerHoverBackground}}:{default:{color:t.dangerGhostColor,borderColor:t.dangerGhostBorderColor,background:t.dangerGhostBackground},active:{background:t.dangerGhostActiveBackground,boxShadow:t.dangerGhostActiveBoxShadow},hover:{background:t.dangerGhostHoverBackground}}};return{baseButton:{label:"baseButton",appearance:"none",textDecoration:"none",touchAction:"manipulation","&::-moz-focus-inner":{border:"0"},"*":{pointerEvents:"none"},"&:focus":{textDecoration:"none"},"&:active > [class$=-baseButton__content]":m[r].active,"&:hover > [class$=-baseButton__content]":m[r].hover},content:{label:"baseButton__content",boxSizing:"border-box",width:"100%",display:"block",direction:"inherit",userSelect:"none",transition:"background 0.2s, transform 0.2s",transform:t.transform,fontFamily:t.fontFamily,fontWeight:t.fontWeight,textTransform:t.textTransform,letterSpacing:t.letterSpacing,borderStyle:t.borderStyle,borderWidth:t.borderWidth,borderRadius:t.borderRadius,lineHeight:t.lineHeight,textAlign:s,"&:hover":{transform:t.hoverTransform},...f[i].content,...m[r].default,...h[o],...u&&{paddingLeft:0,paddingRight:0},...c&&{opacity:.5},...d&&{lineHeight:1},...!l&&{borderStyle:"none"}},children:{label:"baseButton__children",display:"block",...f[i].children,...u&&{paddingTop:0,paddingBottom:0}},iconSVG:{label:"baseButton__iconSVG",display:"flex",alignItems:"center",...f[i].iconSVG},childrenLayout:{label:"baseButton__childrenLayout",display:"flex",height:"100%",width:"100%",justifyContent:d||s==="center"?"center":"flex-start",boxSizing:"border-box",alignItems:"center",flexDirection:"row",maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconOnly:{label:"baseButton__iconOnly",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},iconWrapper:{label:"baseButton__iconWrapper",boxSizing:"border-box",minWidth:"0.0625rem",paddingInlineEnd:u?t.iconTextGapCondensed:t.iconTextGap,flexShrink:0,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"},childrenWrapper:{label:"baseButton__childrenWrapper",boxSizing:"border-box",minWidth:"0.0625rem",flexShrink:1,maxWidth:"100%",overflowX:"visible",overflowY:"visible",unicodeBidi:"isolate"}}};function Hb(t){"@babel/helpers - typeof";return Hb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hb(t)}var Oq=/^\s+/,yq=/\s+$/;function ve(t,e){if(t=t||"",e=e||{},t instanceof ve)return t;if(!(this instanceof ve))return new ve(t,e);var n=vq(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ve.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,i,r,s,o,a;return n=e.r/255,i=e.g/255,r=e.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),.2126*s+.7152*o+.0722*a},setAlpha:function(e){return this._a=DM(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=mT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=mT(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+r+"%)":"hsva("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=pT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=pT(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+r+"%)":"hsla("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return gT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return kq(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Qt(this._r,255)*100)+"%",g:Math.round(Qt(this._g,255)*100)+"%",b:Math.round(Qt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Qt(this._r,255)*100)+"%, "+Math.round(Qt(this._g,255)*100)+"%, "+Math.round(Qt(this._b,255)*100)+"%)":"rgba("+Math.round(Qt(this._r,255)*100)+"%, "+Math.round(Qt(this._g,255)*100)+"%, "+Math.round(Qt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Mq[gT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+bT(this._r,this._g,this._b,this._a),i=n,r=this._gradientType?"GradientType = 1, ":"";if(e){var s=ve(e);i="#"+bT(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+i+")"},toString:function(e){var n=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,s=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return ve(this.toString())},_applyModification:function(e,n){var i=e.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Tq,arguments)},brighten:function(){return this._applyModification(Aq,arguments)},darken:function(){return this._applyModification(Rq,arguments)},desaturate:function(){return this._applyModification(xq,arguments)},saturate:function(){return this._applyModification(Eq,arguments)},greyscale:function(){return this._applyModification(Cq,arguments)},spin:function(){return this._applyModification(Pq,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Dq,arguments)},complement:function(){return this._applyCombination(Iq,arguments)},monochromatic:function(){return this._applyCombination(Lq,arguments)},splitcomplement:function(){return this._applyCombination($q,arguments)},triad:function(){return this._applyCombination(OT,[3])},tetrad:function(){return this._applyCombination(OT,[4])}};ve.fromRatio=function(t,e){if(Hb(t)=="object"){var n={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?n[i]=t[i]:n[i]=zf(t[i]));t=n}return ve(t,e)};function vq(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,s=null,o=!1,a=!1;return typeof t=="string"&&(t=zq(t)),Hb(t)=="object"&&(uo(t.r)&&uo(t.g)&&uo(t.b)?(e=Sq(t.r,t.g,t.b),o=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):uo(t.h)&&uo(t.s)&&uo(t.v)?(i=zf(t.s),r=zf(t.v),e=_q(t.h,i,r),o=!0,a="hsv"):uo(t.h)&&uo(t.s)&&uo(t.l)&&(i=zf(t.s),s=zf(t.l),e=wq(t.h,i,s),o=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=DM(n),{ok:o,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function Sq(t,e,n){return{r:Qt(t,255)*255,g:Qt(e,255)*255,b:Qt(n,255)*255}}function pT(t,e,n){t=Qt(t,255),e=Qt(e,255),n=Qt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),s,o,a=(i+r)/2;if(i==r)s=o=0;else{var l=i-r;switch(o=a>.5?l/(2-i-r):l/(i+r),i){case t:s=(e-n)/l+(e1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(e===0)i=r=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=o(l,a,t+1/3),r=o(l,a,t),s=o(l,a,t-1/3)}return{r:i*255,g:r*255,b:s*255}}function mT(t,e,n){t=Qt(t,255),e=Qt(e,255),n=Qt(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),s,o,a=i,l=i-r;if(o=i===0?0:l/i,i==r)s=0;else{switch(i){case t:s=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,s.push(ve(i));return s}function Lq(t,e){e=e||6;for(var n=ve(t).toHsv(),i=n.h,r=n.s,s=n.v,o=[],a=1/e;e--;)o.push(ve({h:i,s:r,v:s})),s=(s+a)%1;return o}ve.mix=function(t,e,n){n=n===0?0:n||50;var i=ve(t).toRgb(),r=ve(e).toRgb(),s=n/100,o={r:(r.r-i.r)*s+i.r,g:(r.g-i.g)*s+i.g,b:(r.b-i.b)*s+i.b,a:(r.a-i.a)*s+i.a};return ve(o)};ve.readability=function(t,e){var n=ve(t),i=ve(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};ve.isReadable=function(t,e,n){var i=ve.readability(t,e),r,s;switch(s=!1,r=Hq(n),r.level+r.size){case"AAsmall":case"AAAlarge":s=i>=4.5;break;case"AAlarge":s=i>=3;break;case"AAAsmall":s=i>=7;break}return s};ve.mostReadable=function(t,e,n){var i=null,r=0,s,o,a,l;n=n||{},o=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;ur&&(r=s,i=ve(e[u]));return ve.isReadable(t,i,{level:a,size:l})||!o?i:(n.includeFallbackColors=!1,ve.mostReadable(t,["#fff","#000"],n))};var tw=ve.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Mq=ve.hexNames=Nq(tw);function Nq(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function DM(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Qt(t,e){Bq(t)&&(t="100%");var n=Qq(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function p1(t){return Math.min(1,Math.max(0,t))}function Yi(t){return parseInt(t,16)}function Bq(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Qq(t){return typeof t=="string"&&t.indexOf("%")!=-1}function ts(t){return t.length==1?"0"+t:""+t}function zf(t){return t<=1&&(t=t*100+"%"),t}function LM(t){return Math.round(parseFloat(t)*255).toString(16)}function yT(t){return Yi(t)/255}var Vr=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function uo(t){return!!Vr.CSS_UNIT.exec(t)}function zq(t){t=t.replace(Oq,"").replace(yq,"").toLowerCase();var e=!1;if(tw[t])t=tw[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Vr.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Vr.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vr.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Vr.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vr.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Vr.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vr.hex8.exec(t))?{r:Yi(n[1]),g:Yi(n[2]),b:Yi(n[3]),a:yT(n[4]),format:e?"name":"hex8"}:(n=Vr.hex6.exec(t))?{r:Yi(n[1]),g:Yi(n[2]),b:Yi(n[3]),format:e?"name":"hex"}:(n=Vr.hex4.exec(t))?{r:Yi(n[1]+""+n[1]),g:Yi(n[2]+""+n[2]),b:Yi(n[3]+""+n[3]),a:yT(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Vr.hex3.exec(t))?{r:Yi(n[1]+""+n[1]),g:Yi(n[2]+""+n[2]),b:Yi(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Hq(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}function Xp(t,e){return ve(t).setAlpha(e/100).toRgbString()}function So(t,e){return ve(t).darken(e).toRgbString()}const nw="inset 0 0 0.1875rem 0.0625rem",Ac=({style:t,textColor:e,ghostTextColor:n,backgroundColor:i,borderColor:r,ghostBorderColor:s=r})=>({[`${t}Color`]:e,[`${t}BorderColor`]:So(r,10),[`${t}Background`]:i,[`${t}HoverBackground`]:So(i,10),[`${t}ActiveBackground`]:So(i,10),[`${t}ActiveBoxShadow`]:`${nw} ${So(r,20)}`,[`${t}GhostColor`]:n,[`${t}GhostBorderColor`]:s,[`${t}GhostBackground`]:"transparent",[`${t}GhostHoverBackground`]:Xp(n,10),[`${t}GhostActiveBackground`]:"transparent",[`${t}GhostActiveBoxShadow`]:`${nw} ${Xp(s,28)}`}),gx=t=>{const e=t.borders,n=t.colors,i=t.forms,r=t.spacing,s=t.typography,o=t.key,a={canvas:{...Ac({style:"primary",backgroundColor:t["ic-brand-button--primary-bgd"],borderColor:t["ic-brand-button--primary-bgd"],textColor:t["ic-brand-button--primary-text"],ghostTextColor:t["ic-brand-button--primary-bgd"]}),primaryGhostHoverBackground:Xp(t["ic-brand-button--primary-bgd"],10)},"canvas-high-contrast":{secondaryBorderColor:n==null?void 0:n.borderMedium,primaryInverseBorderColor:n==null?void 0:n.borderMedium},instructure:{borderRadius:"999em",smallPaddingTop:"0.5rem",smallPaddingBottom:"0.4375rem",mediumPaddingTop:"0.75rem",mediumPaddingBottom:"0.75rem",largePaddingTop:"1rem",largePaddingBottom:"1rem",largeFontSize:"1.125rem"}};return{...{transform:"none",hoverTransform:"none",fontFamily:s==null?void 0:s.fontFamily,fontWeight:s==null?void 0:s.fontWeightNormal,textTransform:"none",letterSpacing:"normal",borderRadius:e==null?void 0:e.radiusMedium,borderStyle:e==null?void 0:e.style,borderWidth:e==null?void 0:e.widthSmall,smallHeight:i==null?void 0:i.inputHeightSmall,smallFontSize:s==null?void 0:s.fontSizeSmall,smallPaddingHorizontal:r==null?void 0:r.xSmall,smallPaddingTop:"0.375rem",smallPaddingBottom:"0.3125rem",mediumHeight:i==null?void 0:i.inputHeightMedium,mediumFontSize:s==null?void 0:s.fontSizeMedium,mediumPaddingHorizontal:r==null?void 0:r.small,mediumPaddingTop:"0.5625rem",mediumPaddingBottom:"0.5625rem",largeHeight:i==null?void 0:i.inputHeightLarge,largeFontSize:s==null?void 0:s.fontSizeLarge,largePaddingHorizontal:r==null?void 0:r.medium,largePaddingTop:"0.6875rem",largePaddingBottom:"0.6875rem",lineHeight:s==null?void 0:s.lineHeightFit,iconSizeSmall:"1rem",iconSizeMedium:"1.25rem",iconSizeLarge:"1.625rem",iconTextGap:r.xSmall,iconTextGapCondensed:r.xxSmall,...Ac({style:"primary",backgroundColor:n==null?void 0:n.backgroundBrand,borderColor:n==null?void 0:n.borderBrand,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textBrand}),...Ac({style:"secondary",backgroundColor:n==null?void 0:n.backgroundLight,borderColor:n==null?void 0:n.borderLight,ghostBorderColor:n==null?void 0:n.borderDarkest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textDarkest}),...Ac({style:"success",backgroundColor:n==null?void 0:n.backgroundSuccess,borderColor:n==null?void 0:n.borderSuccess,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textSuccess}),...Ac({style:"danger",backgroundColor:n==null?void 0:n.backgroundDanger,borderColor:n==null?void 0:n.borderDanger,textColor:n==null?void 0:n.textLightest,ghostTextColor:n==null?void 0:n.textDanger}),...Ac({style:"primaryInverse",backgroundColor:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderLightest,textColor:n==null?void 0:n.textDarkest,ghostTextColor:n==null?void 0:n.textLightest}),primaryInverseBorderColor:So(n==null?void 0:n.borderLight,10),primaryInverseHoverBackground:So(n==null?void 0:n.backgroundLightest,5),primaryInverseActiveBackground:n==null?void 0:n.backgroundLightest,primaryInverseActiveBoxShadow:`${nw} ${So(n==null?void 0:n.borderLightest,25)}`,successGhostHoverBackground:Xp(n==null?void 0:n.textSuccess,1)},...a[o]}},Uq={children:p.node,type:p.oneOf(["button","submit","reset"]),size:p.oneOf(["small","medium","large"]),elementRef:p.func,as:p.elementType,interaction:p.oneOf(["enabled","disabled","readonly"]),color:p.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:p.oneOf(["info","inverse"]),display:p.oneOf(["inline-block","block"]),textAlign:p.oneOf(["start","center"]),shape:p.oneOf(["rectangle","circle"]),withBackground:p.bool,withBorder:p.bool,isCondensed:p.bool,margin:pt.spacing,cursor:p.string,href:p.string,onClick:p.func,onKeyDown:p.func,renderIcon:p.oneOfType([p.node,p.func]),tabIndex:p.number},Fq=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","isCondensed","margin","onClick","onKeyDown","renderIcon","shape","size","tabIndex","textAlign","type","withBackground","withBorder"],Vq=["type","size","elementRef","as","href","color","focusColor","textAlign","shape","display","withBackground","withBorder","isCondensed","margin","cursor","onClick","renderIcon","tabIndex","styles","makeStyles"];var vT,ST,Og,al;let m1=(vT=de(bq,gx),ST=Ne(),vT(Og=ST(Og=(al=class MM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;if(this.interaction!=="enabled"){n.preventDefault(),n.stopPropagation();return}typeof i=="function"&&i(n)},this.handleKeyDown=n=>{const i=this.props,r=i.onClick,s=i.onKeyDown,o=i.href,a=this.interaction;typeof s=="function"&&s(n);const l=Rr.codes,u=l.space,c=l.enter;this.elementType!=="button"&&[u,c].includes(n.keyCode)&&(n.preventDefault(),n.stopPropagation(),typeof r=="function"&&a==="enabled"&&r(n),o&&this.ref&&this.ref.click())}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{isDisabled:this.isDisabled,hasOnlyIconVisible:this.hasOnlyIconVisible}}get hasOnlyIconVisible(){const e=this.props,n=e.children;return!!(e.renderIcon&&!h1(n))}get elementType(){return Ei(MM,this.props)}get interaction(){return Co({props:this.props})}get isDisabled(){return this.interaction==="disabled"}get isReadOnly(){return this.interaction==="readonly"}get isEnabled(){return this.interaction==="enabled"}get focusColor(){const e=this.props,n=e.color,i=e.focusColor,r=e.withBackground;return i||(n==="primary-inverse"&&r?"info":n.includes("inverse")?"inverse":"info")}get focused(){return qs(this.ref)}focus(){this.ref&&this.ref.focus()}renderChildren(){const e=this.props,n=e.renderIcon,i=e.children,r=e.styles,s=C("span",{css:r==null?void 0:r.children},i);if(!n)return s;const o=this.hasOnlyIconVisible,a=C("span",{css:r==null?void 0:r.iconSVG},lt(n)),l=o?C("span",{css:r==null?void 0:r.iconOnly},a,i):[C("span",{key:"icon",css:r==null?void 0:r.iconWrapper},a),C("span",{key:"children",css:r==null?void 0:r.childrenWrapper},s)];return C("span",{css:r==null?void 0:r.childrenLayout},l)}render(){const e=this.props,n=e.type;e.size,e.elementRef;const i=e.as,r=e.href;e.color,e.focusColor,e.textAlign;const s=e.shape,o=e.display;e.withBackground,e.withBorder,e.isCondensed;const a=e.margin,l=e.cursor,u=e.onClick;e.renderIcon;const c=e.tabIndex,d=e.styles;e.makeStyles;const h=Le(e,Vq),f=this.isDisabled,m=this.isEnabled,b=this.isReadOnly;return C(Oe,Object.assign({},Ft(h),{as:this.elementType,focusColor:this.focusColor,position:"relative",display:o,width:o==="block"?"100%":"auto",borderRadius:s==="circle"?"circle":"medium",background:"transparent",padding:"none",borderWidth:"none",margin:a,cursor:f?"not-allowed":l,href:r,type:r?void 0:n,elementRef:this.handleElementRef,onClick:this.handleClick,onKeyDown:this.handleKeyDown,role:u&&i!=="button"?"button":void 0,tabIndex:u&&i?c||0:c,disabled:f||b,css:m?d==null?void 0:d.baseButton:null}),C("span",{css:d==null?void 0:d.content},this.renderChildren()))}},al.displayName="BaseButton",al.componentId="BaseButton",al.propTypes=Uq,al.allowedProps=Fq,al.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",display:"inline-block",textAlign:"start",withBackground:!0,withBorder:!0,isCondensed:!1,margin:"0",cursor:"pointer"},al))||Og)||Og);const Wq={children:p.node,type:p.oneOf(["button","submit","reset"]),size:p.oneOf(["small","medium","large"]),elementRef:p.func,as:p.elementType,interaction:p.oneOf(["enabled","disabled","readonly"]),color:p.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:p.oneOf(["info","inverse"]),display:p.oneOf(["inline-block","block"]),textAlign:p.oneOf(["start","center"]),withBackground:p.bool,margin:pt.spacing,cursor:p.string,href:p.string,renderIcon:p.oneOfType([p.node,p.func]),onClick:p.func},jq=["as","children","color","cursor","display","elementRef","focusColor","href","interaction","margin","renderIcon","size","textAlign","type","withBackground","onClick"],Xq=["children","type","size","as","color","focusColor","display","textAlign","withBackground","margin","cursor","href","renderIcon"];var wT,_T,yg,ll;let bx=(wT=de(null,gx),_T=Ne(),wT(yg=_T(yg=(ll=class extends T.Component{constructor(...e){super(...e),this._buttonComponent=null,this.ref=null,this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleButtonRef=n=>{this._buttonComponent=n}}get focused(){return this._buttonComponent&&this._buttonComponent.focused}focus(){this._buttonComponent&&this._buttonComponent.focus()}render(){const e=this.props,n=e.children,i=e.type,r=e.size,s=e.as,o=e.color,a=e.focusColor,l=e.display,u=e.textAlign,c=e.withBackground,d=e.margin,h=e.cursor,f=e.href,m=e.renderIcon,b=Le(e,Xq),y=Co({props:b}),O=this.props.themeOverride,v={...Ft(b),type:i,size:r,elementRef:this.handleElementRef,ref:this.handleButtonRef,as:s,color:o,interaction:y,focusColor:a,display:l,textAlign:u,withBackground:c,margin:d,cursor:h,href:f,renderIcon:m,themeOverride:O};return F.createElement(m1,v,n)}},ll.displayName="Button",ll.componentId="Button",ll.propTypes=Wq,ll.allowedProps=jq,ll.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",display:"inline-block",textAlign:"center",withBackground:!0,margin:"0",cursor:"pointer"},ll))||yg)||yg);const Zq=(t,e)=>{const n=e.inline,i=e.color,r={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},warning:{color:t.warningColor},error:{color:t.errorColor},alert:{color:t.alertColor},auto:{}};return{inlineSVG:{label:"inlineSVG",fill:"currentColor",display:n?"inline-block":"block",overflow:"visible",...r[i]}}},qq=t=>{const e=t.colors,n=t.key,i={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,warningColor:e==null?void 0:e.textWarning,brandColor:e==null?void 0:e.textBrand,errorColor:e==null?void 0:e.textDanger,alertColor:e==null?void 0:e.textAlert,successColor:e==null?void 0:e.textSuccess},...i[n]}},Yq={children:p.node,src:p.string,title:p.string,description:p.string,focusable:p.bool,width:p.oneOfType([p.string,p.number]),height:p.oneOfType([p.string,p.number]),inline:p.bool,color:p.oneOf(["inherit","primary","secondary","primary-inverse","secondary-inverse","success","error","alert","warning","brand","auto"]),elementRef:p.func},Gq=["children","src","title","description","focusable","width","height","inline","color","elementRef"],Kq=["style","title","description","focusable","children","src","styles"];var kT,xT,ET,Rc,qo;let NM=(kT=Kt(),xT=de(Zq,qq),ET=Ne(),kT(Rc=xT(Rc=ET(Rc=(qo=class iw extends T.Component{constructor(e){super(e),this.titleId=void 0,this.descId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.titleId=e.deterministicId("InlineSVG-title"),this.descId=e.deterministicId("InlineSVG-desc")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get role(){return this.props.title?"img":"presentation"}renderTitle(){const e=this.props.title;return e?C("title",{id:this.titleId},e):null}renderDesc(e){return e?C("desc",{id:this.descId},e):null}get labelledBy(){const e=[];return this.props.title&&e.push(this.titleId),this.props.description&&e.push(this.descId),e.length>0?e.join(" "):void 0}renderContent(){if(this.props.src){const e=iw.prepareSrc(this.props.src);return C("g",{role:"presentation",dangerouslySetInnerHTML:{__html:e}})}else return C("g",{role:"presentation"},this.props.children)}render(){const e=this.props,n=e.style,i=e.title,r=e.description,s=e.focusable;e.children;const o=e.src,a=e.styles,l=Le(e,Kq),u=this.props.width==="auto"?void 0:this.props.width,c=this.props.height==="auto"?void 0:this.props.height;return C("svg",Object.assign({},Jq(o),De(this.props,iw.allowedProps,["inline"]),{style:{...n,width:u,height:c},width:u,height:c,"aria-hidden":i?void 0:"true","aria-labelledby":this.labelledBy,role:this.role,focusable:s?"true":"false",css:a==null?void 0:a.inlineSVG,className:l.className,ref:this.handleRef}),this.renderTitle(),this.renderDesc(r),this.renderContent())}},qo.displayName="InlineSVG",qo.componentId="InlineSVG",qo.allowedProps=Gq,qo.propTypes=Yq,qo.defaultProps={focusable:!1,src:"",title:"",description:"",inline:!0,width:"1em",height:"1em",color:"inherit"},qo.prepareSrc=t=>{const n=/]*>((.|[\n\r])*)<\/svg>/.exec(t);return n?n[1]:t},qo))||Rc)||Rc)||Rc);function Jq(t){const e={},n=/]*)\s*>/,i=/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?/g;if(typeof t=="string"){const r=n.exec(t),s=r?r[1]:"",o=["xmlns","xmlns:xlink","version"];let a=i.exec(s);for(;a!=null;)o.indexOf(a[1])===-1&&(e[a[1]]=a[2]||(a[3]?a[3]:a[4]?a[4]:a[5])||a[1]),a=i.exec(s)}return e}const eY=(t,e)=>{const n=e.rotate,i=e.size,r=e.bidirectional,s={0:{},90:{transform:"rotate(90deg)"},180:{transform:"rotate(180deg)"},270:{transform:"rotate(270deg)"}},o={0:{transform:"scale3d(-1, 1, 1)"},90:{transform:"scale3d(-1, 1, 1) rotate(90deg)"},180:{transform:"scale3d(-1, 1, 1) rotate(180deg)"},270:{transform:"scale3d(-1, 1, 1) rotate(270deg)"}},a={"x-small":{fontSize:t.sizeXSmall},small:{fontSize:t.sizeSmall},medium:{fontSize:t.sizeMedium},large:{fontSize:t.sizeLarge},"x-large":{fontSize:t.sizeXLarge}};return{svgIcon:{label:"svgIcon",verticalAlign:"middle",lineHeight:1,width:"1em",height:"1em",...s[n],...i&&a[i],...r&&{'[dir="rtl"] &':o[n]}}}},tY=()=>({...{sizeXSmall:"1.125rem",sizeSmall:"2rem",sizeMedium:"3rem",sizeLarge:"5rem",sizeXLarge:"10rem"}}),nY={...NM.propTypes,rotate:p.oneOf(["0","90","180","270"]),size:p.oneOf(["x-small","small","medium","large","x-large"]),bidirectional:p.bool},iY=["children","src","title","description","focusable","width","height","inline","color","elementRef","rotate","size","bidirectional"],rY=["rotate","className","themeOverride","size","bidirectional","makeStyles","styles"],sY=["sizeXSmall","sizeSmall","sizeMedium","sizeLarge","sizeXLarge"];var CT,TT,vg,ul;let ae=(CT=de(eY,tY),TT=Ne(),CT(vg=TT(vg=(ul=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.rotate,i=e.className,r=e.themeOverride;e.size,e.bidirectional,e.makeStyles;const s=e.styles,o=Le(e,rY),a=r;a.sizeXSmall,a.sizeSmall,a.sizeMedium,a.sizeLarge,a.sizeXLarge;const l=Le(a,sY);return C(NM,Object.assign({},o,{themeOverride:l,rotate:n,css:s==null?void 0:s.svgIcon,className:i,elementRef:this.handleRef}))}},ul.displayName="SVGIcon",ul.componentId="SVGIcon",ul.allowedProps=iY,ul.propTypes=nY,ul.defaultProps={rotate:"0",bidirectional:!1},ul))||vg)||vg);var AT;class rc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),AT||(AT=F.createElement("path",{d:"m.153 526.146 92.168-92.299 867.767 867.636 867.636-867.636 92.429 92.299-960.065 959.935z",fillRule:"evenodd"})))}}rc.glyphName="arrow-open-down";rc.variant="Line";rc.displayName="IconArrowOpenDownLine";rc.propTypes={...ae.propTypes};rc.allowedProps=[...ae.allowedProps];var RT;class xh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),RT||(RT=F.createElement("path",{d:"m1394.006 0 92.299 92.168-867.636 867.767 867.636 867.636-92.299 92.429-959.935-960.065z",fillRule:"evenodd"})))}}xh.glyphName="arrow-open-start";xh.variant="Line";xh.displayName="IconArrowOpenStartLine";xh.propTypes={...ae.propTypes};xh.allowedProps=[...ae.allowedProps];var PT;class sc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),PT||(PT=F.createElement("path",{d:"m.153 1393.854 92.168 92.299 867.767-867.636 867.636 867.636 92.429-92.299L960.088 433.92z",fillRule:"evenodd"})))}}sc.glyphName="arrow-open-up";sc.variant="Line";sc.displayName="IconArrowOpenUpLine";sc.propTypes={...ae.propTypes};sc.allowedProps=[...ae.allowedProps];var IT;class Ma extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),IT||(IT=F.createElement("path",{d:"M1827.701 303.065 698.835 1431.801 92.299 825.266 0 917.564 698.835 1616.4 1919.869 395.234z",fillRule:"evenodd"})))}}Ma.glyphName="check";Ma.variant="Line";Ma.displayName="IconCheckLine";Ma.propTypes={...ae.propTypes};Ma.allowedProps=[...ae.allowedProps];var $T;class Eh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),$T||($T=F.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}Eh.glyphName="copy";Eh.variant="Line";Eh.displayName="IconCopyLine";Eh.propTypes={...ae.propTypes};Eh.allowedProps=[...ae.allowedProps];var DT;class Ch extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconDiscussion",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),DT||(DT=F.createElement("path",{d:"M677.647 16v338.936h112.941V129.054h1016.47V919.53h-225.994v259.765L1321.412 919.53h-79.172V467.878H0v1016.47h338.71v418.9l417.996-418.9h485.534v-451.877h32.753l419.125 419.124v-419.124H1920V16H677.647ZM338.79 919.563h564.706v-112.94H338.79v112.94Zm0 225.883h338.936v-113.054H338.79v113.054Zm-225.85-564.74h1016.47v790.701H710.4L451.652 1631.06v-259.652h-338.71V580.706Z",fillRule:"evenodd"})))}}Ch.glyphName="discussion";Ch.variant="Line";Ch.displayName="IconDiscussionLine";Ch.propTypes={...ae.propTypes};Ch.allowedProps=[...ae.allowedProps];var LT;class oc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconHamburger",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),LT||(LT=F.createElement("path",{d:"M1920 1468.412v112.94H0v-112.94h1920Zm0-564.706v112.941H0V903.706h1920ZM1920 339v112.941H0V339h1920Z",fillRule:"evenodd"})))}}oc.glyphName="hamburger";oc.variant="Line";oc.displayName="IconHamburgerLine";oc.propTypes={...ae.propTypes};oc.allowedProps=[...ae.allowedProps];var MT;class Th extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconHeart",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),MT||(MT=F.createElement("path",{d:"m1692.48 910.647-732.762 687.36-731.182-685.779c-154.616-156.875-154.616-412.122 0-568.997 74.542-75.558 173.704-117.233 279.304-117.233h.113c105.487 0 204.65 41.675 279.078 117.233l.113.113c74.767 75.783 116.103 176.865 116.103 284.385h112.941c0-107.52 41.224-208.602 116.104-284.498 74.428-75.558 173.59-117.233 279.19-117.233h.113c105.487 0 204.763 41.675 279.19 117.233 154.617 156.875 154.617 412.122 1.695 567.416m78.833-646.701c-95.887-97.355-223.737-150.89-359.718-150.89h-.113c-136.094 0-263.83 53.535-359.604 150.777-37.61 38.061-68.443 80.979-92.16 127.398-23.718-46.42-54.664-89.337-92.16-127.285-95.774-97.355-223.51-150.89-359.605-150.89h-.113c-135.981 0-263.83 53.535-359.83 150.89-197.648 200.696-197.648 526.983 1.694 729.035l810.014 759.868L1771.313 991.4c197.647-200.47 197.647-526.758 0-727.454",fillRule:"evenodd"})))}}Th.glyphName="heart";Th.variant="Line";Th.displayName="IconHeartLine";Th.propTypes={...ae.propTypes};Th.allowedProps=[...ae.allowedProps];var NT;class Ah extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconMiniArrowDouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),NT||(NT=F.createElement("path",{d:"M1319.1 790.054 1020.06 355.79c-33.165-48.165-87.553-47.273-120.104 0L600.92 790.054c-33.166 48.165-12.581 87.21 46.116 87.21h625.944c58.64 0 78.67-39.938 46.12-87.21ZM600.634 1129.94l299.035 434.27c33.167 48.16 87.554 47.27 120.101 0l299.04-434.27c33.17-48.16 12.58-87.21-46.12-87.21H646.75c-58.636 0-78.668 39.94-46.116 87.21Z"})))}}Ah.glyphName="mini-arrow-double";Ah.variant="Line";Ah.displayName="IconMiniArrowDoubleLine";Ah.propTypes={...ae.propTypes};Ah.allowedProps=[...ae.allowedProps];var BT;class Rh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconMiniArrowDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),BT||(BT=F.createElement("path",{d:"M994.034 1226.26c-18.796 27.296-49.269 27.3-68.067 0L574.893 716.424C556.096 689.128 567.713 667 600.852 667h718.297c33.133 0 44.757 22.125 25.959 49.424L994.034 1226.26Z",fillRule:"evenodd"})))}}Rh.glyphName="mini-arrow-down";Rh.variant="Line";Rh.displayName="IconMiniArrowDownLine";Rh.propTypes={...ae.propTypes};Rh.allowedProps=[...ae.allowedProps];var QT;class Ph extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconMiniArrowUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),QT||(QT=F.createElement("path",{d:"M994.034 694.296c-18.796-27.296-49.269-27.3-68.067 0l-351.074 509.836c-18.797 27.296-7.18 49.424 25.959 49.424h718.297c33.133 0 44.757-22.125 25.959-49.424L994.034 694.296Z",fillRule:"evenodd"})))}}Ph.glyphName="mini-arrow-up";Ph.variant="Line";Ph.displayName="IconMiniArrowUpLine";Ph.propTypes={...ae.propTypes};Ph.allowedProps=[...ae.allowedProps];var zT;class Ih extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconMore",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),zT||(zT=F.createElement("path",{d:"M960 1468.235c93.448 0 169.412 75.965 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.447 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.448-75.964 169.412-169.412 169.412-93.448 0-169.412-75.964-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Zm0-677.647c93.448 0 169.412 75.964 169.412 169.412 0 93.447-75.964 169.412-169.412 169.412-93.448 0-169.412-75.965-169.412-169.412 0-93.448 75.964-169.412 169.412-169.412Z",fillRule:"evenodd"})))}}Ih.glyphName="more";Ih.variant="Line";Ih.displayName="IconMoreLine";Ih.propTypes={...ae.propTypes};Ih.allowedProps=[...ae.allowedProps];var HT;class $h extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconQuestion",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),HT||(HT=F.createElement("path",{d:"M960 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059M960 0C430.645 0 0 430.645 0 960s430.645 960 960 960 960-430.645 960-960S1489.355 0 960 0m.056 1355.181 56.471.113h-56.47v-.113ZM752.64 409.65c83.69-64.715 191.661-86.4 296.696-59.294 114.862 29.703 208.264 123.106 237.968 237.967 23.378 90.466 10.729 183.303-35.464 261.459-45.515 77.026-121.186 133.948-207.586 156.084-13.779 3.502-27.783 14.796-27.783 31.85v91.708H903.529v-91.708c0-66.07 46.306-124.123 112.716-141.29 57.6-14.682 107.971-52.63 138.353-104.018 30.833-52.292 39.19-114.749 23.378-175.85-19.651-75.67-81.204-137.223-156.875-156.875-70.927-18.184-143.548-3.953-199.341 39.303-55.68 43.144-87.642 108.311-87.642 178.673H621.176c0-105.6 47.888-203.294 131.464-268.01Zm207.416 832.704c-62.343 0-112.94 50.71-112.94 112.941 0 62.23 50.597 112.941 112.94 112.941 62.231 0 112.942-50.71 112.942-112.94 0-62.231-50.71-112.942-112.942-112.942Z",fillRule:"evenodd"})))}}$h.glyphName="question";$h.variant="Line";$h.displayName="IconQuestionLine";$h.propTypes={...ae.propTypes};$h.allowedProps=[...ae.allowedProps];var UT;class Dh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),UT||(UT=F.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}Dh.glyphName="rss";Dh.variant="Line";Dh.displayName="IconRssLine";Dh.propTypes={...ae.propTypes};Dh.allowedProps=[...ae.allowedProps];var FT;class ac extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconSearch",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),FT||(FT=F.createElement("path",{d:"M790.588 1468.235c-373.722 0-677.647-303.924-677.647-677.647 0-373.722 303.925-677.647 677.647-677.647 373.723 0 677.647 303.925 677.647 677.647 0 373.723-303.924 677.647-677.647 677.647Zm596.781-160.715c120.396-138.692 193.807-319.285 193.807-516.932C1581.176 354.748 1226.428 0 790.588 0S0 354.748 0 790.588s354.748 790.588 790.588 790.588c197.647 0 378.24-73.411 516.932-193.807l516.028 516.142 79.963-79.963-516.142-516.028Z",fillRule:"evenodd"})))}}ac.glyphName="search";ac.variant="Line";ac.displayName="IconSearchLine";ac.propTypes={...ae.propTypes};ac.allowedProps=[...ae.allowedProps];var VT;class Lh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconTrouble",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),VT||(VT=F.createElement("path",{d:"M961 1C431.645 1 1 431.645 1 961s430.645 960 960 960 960-430.645 960-960S1490.355 1 961 1m0 1807.059c-467.125 0-847.059-379.934-847.059-847.059 0-467.125 379.934-847.059 847.059-847.059 467.125 0 847.059 379.934 847.059 847.059 0 467.125-379.934 847.059-847.059 847.059m319.465-1246.374-319.51 319.51-319.398-319.51-79.85 79.85 319.398 319.51-319.397 319.398 79.85 79.85 319.397-319.398 319.51 319.397 79.85-79.85-319.51-319.397 319.51-319.51-79.85-79.85Z",fillRule:"evenodd"})))}}Lh.glyphName="trouble";Lh.variant="Line";Lh.displayName="IconTroubleLine";Lh.propTypes={...ae.propTypes};Lh.allowedProps=[...ae.allowedProps];var WT;class Lu extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),WT||(WT=F.createElement("path",{d:"M954.64 826.418 426.667 298.445 298.445 426.667 826.418 954.64l-527.973 527.973 128.222 128.222 527.973-527.973 527.973 527.973 128.222-128.222-527.973-527.973 527.973-527.973-128.222-128.222z"})))}}Lu.glyphName="x";Lu.variant="Line";Lu.displayName="IconXLine";Lu.propTypes={...ae.propTypes};Lu.allowedProps=[...ae.allowedProps];var jT;class Ga extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenDown",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),jT||(jT=F.createElement("path",{d:"m.08 568.063 176.13-176.13 783.988 783.864 783.74-783.864 176.129 176.13-959.87 960.118z",fillRule:"evenodd"})))}}Ga.glyphName="arrow-open-down";Ga.variant="Solid";Ga.displayName="IconArrowOpenDownSolid";Ga.propTypes={...ae.propTypes};Ga.allowedProps=[...ae.allowedProps];var XT;class Ka extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenEnd",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),XT||(XT=F.createElement("path",{d:"M568.13.012 392 176.142l783.864 783.989L392 1743.87 568.13 1920l960.118-959.87z",fillRule:"evenodd"})))}}Ka.glyphName="arrow-open-end";Ka.variant="Solid";Ka.displayName="IconArrowOpenEndSolid";Ka.propTypes={...ae.propTypes};Ka.allowedProps=[...ae.allowedProps];var ZT;class Mh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenStart",viewBox:"0 0 1920 1920",elementRef:this.handleRef,bidirectional:!0}),ZT||(ZT=F.createElement("path",{d:"m1352.005.012 176.13 176.13-783.864 783.989 783.864 783.74L1352.005 1920 391.887 960.13z",fillRule:"evenodd"})))}}Mh.glyphName="arrow-open-start";Mh.variant="Solid";Mh.displayName="IconArrowOpenStartSolid";Mh.propTypes={...ae.propTypes};Mh.allowedProps=[...ae.allowedProps];var qT;class lc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconArrowOpenUp",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),qT||(qT=F.createElement("path",{d:"m.08 1351.937 176.13 176.13 783.988-783.864 783.74 783.864 176.129-176.13-959.87-960.118z",fillRule:"evenodd"})))}}lc.glyphName="arrow-open-up";lc.variant="Solid";lc.displayName="IconArrowOpenUpSolid";lc.propTypes={...ae.propTypes};lc.allowedProps=[...ae.allowedProps];var YT;class uc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconCheckMark",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),YT||(YT=F.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}uc.glyphName="check-mark";uc.variant="Solid";uc.displayName="IconCheckMarkSolid";uc.propTypes={...ae.propTypes};uc.allowedProps=[...ae.allowedProps];var GT;class cc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconCheck",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),GT||(GT=F.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}cc.glyphName="check";cc.variant="Solid";cc.displayName="IconCheckSolid";cc.propTypes={...ae.propTypes};cc.allowedProps=[...ae.allowedProps];var KT;class Nh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconInfoBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),KT||(KT=F.createElement("path",{d:"M1229.93 594.767c36.644 37.975 50.015 91.328 43.72 142.909-9.128 74.877-30.737 144.983-56.093 215.657-27.129 75.623-54.66 151.09-82.332 226.512-44.263 120.685-88.874 241.237-132.65 362.1-10.877 30.018-18.635 62.072-21.732 93.784-3.376 34.532 21.462 51.526 52.648 36.203 24.977-12.278 49.288-28.992 68.845-48.768 31.952-32.31 63.766-64.776 94.805-97.98 15.515-16.605 30.86-33.397 45.912-50.438 11.993-13.583 24.318-34.02 40.779-42.28 31.17-15.642 55.226 22.846 49.582 49.794-5.39 25.773-23.135 48.383-39.462 68.957l-1.123 1.416a1559.53 1559.53 0 0 0-4.43 5.6c-54.87 69.795-115.043 137.088-183.307 193.977-67.103 55.77-141.607 103.216-223.428 133.98-26.65 10.016-53.957 18.253-81.713 24.563-53.585 12.192-112.798 11.283-167.56 3.333-40.151-5.828-76.246-31.44-93.264-68.707-29.544-64.698-8.98-144.595 6.295-210.45 18.712-80.625 46.8-157.388 75.493-234.619l2.18-5.867 1.092-2.934 2.182-5.87 2.182-5.873c33.254-89.517 67.436-178.676 101.727-267.797 31.294-81.296 62.72-162.537 93.69-243.95 2.364-6.216 5.004-12.389 7.669-18.558l1-2.313c6.835-15.806 13.631-31.617 16.176-48.092 6.109-39.537-22.406-74.738-61.985-51.947-68.42 39.4-119.656 97.992-170.437 156.944l-6.175 7.17c-15.78 18.323-31.582 36.607-47.908 54.286-16.089 17.43-35.243 39.04-62.907 19.07-29.521-21.308-20.765-48.637-3.987-71.785 93.18-128.58 205.056-248.86 350.86-316.783 60.932-28.386 146.113-57.285 225.882-58.233 59.802-.707 116.561 14.29 157.774 56.99Zm92.038-579.94c76.703 29.846 118.04 96.533 118.032 190.417-.008 169.189-182.758 284.908-335.53 212.455-78.956-37.446-117.358-126.202-98.219-227.002 26.494-139.598 183.78-227.203 315.717-175.87Z",fillRule:"evenodd"})))}}Nh.glyphName="info-borderless";Nh.variant="Solid";Nh.displayName="IconInfoBorderlessSolid";Nh.propTypes={...ae.propTypes};Nh.allowedProps=[...ae.allowedProps];var JT;class Bh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconInstructureLogo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),JT||(JT=F.createElement("path",{d:"M1448.57 288.052 1084.46 502.746 1448.55 718.026 1813.23 502.732 1448.57 288.052ZM959.966 429.191 1323.92 214.589 959.988 0 596.032 214.602 959.966 429.191ZM835.499 502.732 471.388 288.038 106.704 502.732 471.388 718.026 835.499 502.732ZM106.667 1416.54 960 1920 1813.33 1416.54 960 913.07 106.667 1416.54Z"})))}}Bh.glyphName="instructure-logo";Bh.variant="Solid";Bh.displayName="IconInstructureLogoSolid";Bh.propTypes={...ae.propTypes};Bh.allowedProps=[...ae.allowedProps];var eA;class Qh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconNo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),eA||(eA=F.createElement("path",{d:"M213.333 960c0-167.36 56-321.707 149.44-446.4L1406.4 1557.227c-124.693 93.44-279.04 149.44-446.4 149.44-411.627 0-746.667-335.04-746.667-746.667m1493.334 0c0 167.36-56 321.707-149.44 446.4L513.6 362.773c124.693-93.44 279.04-149.44 446.4-149.44 411.627 0 746.667 335.04 746.667 746.667M960 0C429.76 0 0 429.76 0 960s429.76 960 960 960 960-429.76 960-960S1490.24 0 960 0",fillRule:"evenodd"})))}}Qh.glyphName="no";Qh.variant="Solid";Qh.displayName="IconNoSolid";Qh.propTypes={...ae.propTypes};Qh.allowedProps=[...ae.allowedProps];var tA;class zh extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconWarningBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),tA||(tA=F.createElement("path",{d:"M994.578 1436.356c-133.365 0-241.822 108.457-241.822 241.822S861.213 1920 994.578 1920s241.822-108.457 241.822-241.822-108.457-241.822-241.822-241.822zm170.485-120.912L1310.156 0H679l145.093 1315.444z",fillRule:"evenodd"})))}}zh.glyphName="warning-borderless";zh.variant="Solid";zh.displayName="IconWarningBorderlessSolid";zh.propTypes={...ae.propTypes};zh.allowedProps=[...ae.allowedProps];var nA;class dc extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(ae,Object.assign({},this.props,{name:"IconX",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),nA||(nA=F.createElement("path",{d:"M797.32 985.882 344.772 1438.43l188.561 188.562 452.549-452.549 452.548 452.549 188.562-188.562-452.549-452.548 452.549-452.549-188.562-188.561L985.882 797.32 533.333 344.772 344.772 533.333z"})))}}dc.glyphName="x";dc.variant="Solid";dc.displayName="IconXSolid";dc.propTypes={...ae.propTypes};dc.allowedProps=[...ae.allowedProps];const oY=(t,e)=>{const n=e.placement,i=e.offset,r={none:0,"x-small":t.offsetXSmall,small:t.offsetSmall,medium:t.offsetMedium},s=()=>{const o=r[i];return{...o!==0&&{top:o},insetInlineStart:n==="start"?o:"auto",insetInlineEnd:n==="end"?o:"auto"}};return{closeButton:{label:"closeButton",zIndex:t.zIndex,display:"inline-block",...n==="static"?{position:"static"}:{position:"absolute",...s()}}}},aY=t=>{const e=t.spacing,n=t.stacking;return{...{offsetMedium:e==null?void 0:e.medium,offsetSmall:e==null?void 0:e.small,offsetXSmall:e==null?void 0:e.xSmall,zIndex:n==null?void 0:n.above}}},lY={screenReaderLabel:p.oneOfType([p.string,p.node]).isRequired,color:p.oneOf(["primary","primary-inverse"]),interaction:p.oneOf(["enabled","disabled","readonly"]),elementRef:p.func,size:p.oneOf(["small","medium","large"]),onClick:p.func,margin:pt.spacing,placement:p.oneOf(["start","end","static"]),offset:p.oneOf(["none","x-small","small","medium"]),type:p.oneOf(["button","submit","reset"]),as:p.elementType,href:p.string,cursor:p.string,tabIndex:p.number},uY=["as","color","cursor","elementRef","href","interaction","margin","offset","onClick","placement","screenReaderLabel","size","tabIndex","type"],cY=["screenReaderLabel","elementRef","size","onClick","margin","placement","offset","type","as","href","cursor","tabIndex","styles"];var iA,rA,Sg,cl;let dY=(iA=de(oY,aY),rA=Ne(),iA(Sg=rA(Sg=(cl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get interaction(){return Co({props:this.props})}get color(){const e=this.props.color;return e==="primary"?"secondary":e}render(){const e=this.props,n=e.screenReaderLabel;e.elementRef;const i=e.size,r=e.onClick,s=e.margin;e.placement,e.offset;const o=e.type,a=e.as,l=e.href,u=e.cursor,c=e.tabIndex,d=e.styles,h=Le(e,cY);return C("span",Object.assign({},Ft(h),{css:d==null?void 0:d.closeButton,ref:f=>this.ref=f}),C(m1,{renderIcon:dc,elementRef:this.handleRef,interaction:this.interaction,type:o,color:this.color,size:i,onClick:r,margin:s,withBorder:!1,withBackground:!1,as:a,href:l,cursor:u,tabIndex:c},C(cr,null,n)))}},cl.displayName="CloseButton",cl.componentId="CloseButton",cl.propTypes=lY,cl.allowedProps=uY,cl.defaultProps={interaction:void 0,type:"button",placement:"static",offset:"x-small",size:"small",margin:"0",as:"button",cursor:"pointer"},cl))||Sg)||Sg);const hY={children:p.oneOfType([p.node,p.func]),renderIcon:p.oneOfType([p.node,p.func]),screenReaderLabel:p.string.isRequired,type:p.oneOf(["button","submit","reset"]),size:p.oneOf(["small","medium","large"]),elementRef:p.func,as:p.elementType,interaction:p.oneOf(["enabled","disabled","readonly"]),color:p.oneOf(["primary","primary-inverse","secondary","success","danger"]),focusColor:p.oneOf(["info","inverse"]),shape:p.oneOf(["rectangle","circle"]),withBackground:p.bool,withBorder:p.bool,margin:pt.spacing,cursor:p.string,href:p.string,onClick:p.func},fY=["as","children","color","cursor","elementRef","focusColor","href","interaction","margin","renderIcon","screenReaderLabel","shape","size","type","withBackground","withBorder","onClick"],pY=["children","renderIcon","screenReaderLabel","type","size","elementRef","as","interaction","color","focusColor","shape","withBackground","withBorder","margin","cursor","href"];var sA,oA,wg,dl;let Ub=(sA=de(null,gx),oA=Ne(),sA(wg=oA(wg=(dl=class extends T.Component{constructor(...e){super(...e),this._baseButton=null,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get focused(){return this._baseButton&&this._baseButton.focused}focus(){this._baseButton&&this._baseButton.focus()}render(){const e=this.props,n=e.children,i=e.renderIcon,r=e.screenReaderLabel,s=e.type,o=e.size;e.elementRef;const a=e.as,l=e.interaction,u=e.color,c=e.focusColor,d=e.shape,h=e.withBackground,f=e.withBorder,m=e.margin,b=e.cursor,y=e.href,O=Le(e,pY),v=this.props.themeOverride;return F.createElement(m1,Object.assign({},Ft(O),{type:s,size:o,elementRef:this.handleRef,as:a,interaction:l,color:u,focusColor:c,shape:d,withBackground:h,withBorder:f,margin:m,cursor:b,href:y,renderIcon:n||i,themeOverride:v,ref:S=>{this._baseButton=S}}),F.createElement(cr,null,r))}},dl.displayName="IconButton",dl.componentId="IconButton",dl.propTypes=hY,dl.allowedProps=fY,dl.defaultProps={type:"button",size:"medium",as:"button",interaction:void 0,color:"secondary",shape:"rectangle",withBackground:!0,withBorder:!0,margin:"0",cursor:"pointer"},dl))||wg)||wg);const mY={children:p.node,as:p.elementType,display:p.oneOf(["auto","block","inline-block"]),label:p.string,open:p.bool,onBlur:p.func,onDismiss:p.func,defaultFocusElement:p.oneOfType([p.element,p.func]),contentElement:p.oneOfType([p.element,p.func]),liveRegion:p.oneOfType([zi,p.arrayOf(zi),p.func]),shouldContainFocus:p.oneOfType([p.bool,p.oneOf(["keyboard","screenreader"])]),shouldReturnFocus:p.bool,shouldCloseOnDocumentClick:p.bool,shouldCloseOnEscape:p.bool,shouldFocusOnOpen:p.bool,elementRef:p.func},gY=["children","as","display","label","open","onBlur","onDismiss","defaultFocusElement","contentElement","liveRegion","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusOnOpen","elementRef"],bY=["open","contentElement"],OY=["open","contentElement"];class us extends T.Component{constructor(...e){super(...e),this._raf=[],this._focusRegion=null,this.ref=null,this.getRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get _root(){return this.ref}componentDidUpdate(e){const n=this.props,i=n.open;n.contentElement;const r=Le(n,bY);i&&!e.open?this.open():!i&&e.open&&this.close(),this._focusRegion&&this._focusRegion.updateElement(this.contentElement,r)}componentDidMount(){this.props.open&&this.open()}componentWillUnmount(){this.props.open&&this.close(),this._raf.forEach(e=>e.cancel()),this._raf=[]}open(){const e=this.props;e.open,e.contentElement;const n=Le(e,OY);this._raf.push(Eo(()=>{this._focusRegion=vi.activateRegion(this.contentElement,{...n})}))}close(){const e=this._focusRegion,n=this.contentElement;e&&vi.blurRegion(n,e.id)}focus(){if(!this.props.open||!this.contentElement){tt(!1,"[Dialog] Can't focus a Dialog that isn't open.");return}this._focusRegion&&vi.focusRegion(this.contentElement,this._focusRegion.id)}blur(){if(!this.props.open||!this.contentElement){tt(!1,"[Dialog] Can't blur a Dialog that isn't open.");return}this.close()}get contentElement(){let e=at(this.props.contentElement);return e||(e=at(this.ref)),e}get focused(){return this.contentElement&&this._focusRegion&&vi.isFocused(this.contentElement,this._focusRegion.id)}render(){const e=Ei(us,this.props),n=this.props.role||(this.props.label?"dialog":void 0);return this.props.open?F.createElement(e,Object.assign({},De(this.props,us.allowedProps),{role:n,"aria-label":this.props.label,className:this.props.className,ref:this.getRef}),this.props.children):null}}us.displayName="Dialog";us.componentId="Dialog";us.propTypes=mY;us.allowedProps=gY;us.defaultProps={open:!1,shouldFocusOnOpen:!0,shouldContainFocus:!1,shouldReturnFocus:!1,shouldCloseOnDocumentClick:!0,shouldCloseOnEscape:!0};const yY={isShowingContent:p.bool,defaultIsShowingContent:p.bool,on:p.oneOfType([p.oneOf(["click","hover","focus"]),p.arrayOf(p.oneOf(["click","hover","focus"]))]),withArrow:p.bool,color:p.oneOf(["primary","primary-inverse"]),placement:hn.placement,shadow:pt.shadow,stacking:pt.stacking,contentRef:p.func,defaultFocusElement:p.oneOfType([p.element,p.func]),screenReaderLabel:p.string,offsetX:p.oneOfType([p.string,p.number]),offsetY:p.oneOfType([p.string,p.number]),constrain:hn.constrain,positionTarget:p.oneOfType([zi,p.func]),positionContainerDisplay:p.oneOf(["inline-block","block"]),mountNode:hn.mountNode,insertAt:p.oneOf(["bottom","top"]),liveRegion:p.oneOfType([zi,p.arrayOf(zi),p.func]),id:p.string,shouldAlignArrow:p.bool,shouldTrackPosition:p.bool,shouldRenderOffscreen:p.bool,shouldContainFocus:p.bool,shouldReturnFocus:p.bool,shouldCloseOnDocumentClick:p.bool,shouldCloseOnEscape:p.bool,shouldFocusContentOnTriggerBlur:p.bool,onShowContent:p.func,onHideContent:p.func,onPositioned:p.func,onPositionChanged:p.func,onClick:p.func,onFocus:p.func,onBlur:p.func,onKeyDown:p.func,onKeyUp:p.func,onMouseOver:p.func,onMouseOut:p.func,renderTrigger:p.oneOfType([p.node,p.func]),children:p.oneOfType([p.node,p.func]),elementRef:p.func},vY=["isShowingContent","defaultIsShowingContent","on","withArrow","color","placement","shadow","stacking","contentRef","defaultFocusElement","screenReaderLabel","offsetX","offsetY","constrain","positionTarget","positionContainerDisplay","mountNode","insertAt","liveRegion","id","shouldAlignArrow","shouldTrackPosition","shouldRenderOffscreen","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","shouldCloseOnEscape","shouldFocusContentOnTriggerBlur","onShowContent","onHideContent","onPositioned","onPositionChanged","onClick","onFocus","onBlur","onKeyDown","onKeyUp","onMouseOver","onMouseOut","renderTrigger","children","elementRef"];var aA,lA,uA,Pc,hl;let g1=(aA=Kt(),lA=ss(),uA=Ne(),aA(Pc=lA(Pc=uA(Pc=(hl=class extends T.Component{constructor(e){super(e),this._handleMouseOver=void 0,this._handleMouseOut=void 0,this._id=void 0,this._raf=[],this._trigger=null,this._view=null,this._dialog=null,this._contentElement=null,this._focusRegion=void 0,this._renderTrigger=void 0,this._renderTriggerProp=void 0,this.mouseOutTimeout=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.show=n=>{var i,r;typeof this.props.isShowingContent>"u"&&this.setState({isShowingContent:!0}),(i=(r=this.props).onShowContent)===null||i===void 0||i.call(r,n)},this.hide=(n,i=!1)=>{const r=this.props,s=r.onHideContent,o=r.isShowingContent;typeof o>"u"?this.setState(({isShowingContent:a})=>(a&&(s==null||s(n,{documentClick:i})),{isShowingContent:!1})):o&&(s==null||s(n,{documentClick:i}))},this.toggle=n=>{this.shown?this.hide(n):this.show(n)},this.handleDialogDismiss=(n,i)=>{if(!this.props.shouldReturnFocus&&this.props.shouldFocusContentOnTriggerBlur){const r=at(this._trigger);r&&typeof r.focus=="function"&&r.focus()}this.hide(n,i)},this.handleDialogBlur=n=>{n.keyCode===Rr.codes.tab&&n.shiftKey&&this.props.shouldFocusContentOnTriggerBlur||this.hide(n)},this.handleTriggerKeyDown=n=>{this.props.shouldFocusContentOnTriggerBlur&&n.keyCode===Rr.codes.tab&&!n.shiftKey&&(n.preventDefault(),this._raf.push(Eo(()=>{this._dialog&&this._dialog.focus()})))},this.handleTriggerKeyUp=n=>{n.keyCode===Rr.codes.esc&&this.shown&&this.isTooltip&&(n.preventDefault(),this.hide(n))},this.handleTriggerBlur=n=>{const i=this.props.on;i&&i.indexOf("focus")>-1&&this._raf.push(Eo(()=>{Du(this._view)||this.hide(n)}))},this.handlePositioned=n=>{var i,r;const s=n.placement;this.setState({placement:s,...this.computeOffsets(s)}),(i=(r=this.props).onPositioned)===null||i===void 0||i.call(r,n)},this.handlePositionChanged=n=>{var i,r;const s=n.placement;this.setState({placement:s,...this.computeOffsets(s)}),(i=(r=this.props).onPositionChanged)===null||i===void 0||i.call(r,n)},this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=lt(this.props.renderTrigger),this.state={placement:e.placement,offsetX:e.offsetX,offsetY:e.offsetY,isShowingContent:typeof e.isShowingContent>"u"?e.defaultIsShowingContent:void 0},this._id=this.props.id||e.deterministicId(),this._raf=[],this._handleMouseOver=qC.bind(null,n=>{this.show(n),clearTimeout(this.mouseOutTimeout)}),this._handleMouseOut=qC.bind(null,n=>{this.mouseOutTimeout=setTimeout(()=>{this.hide(n)},1)})}get isTooltip(){return this.props.shouldRenderOffscreen&&!this.props.shouldReturnFocus&&!this.props.shouldContainFocus&&!this.props.shouldFocusContentOnTriggerBlur}componentDidMount(){this.isTooltip&&(this._focusRegion=new _M(this._contentElement,{shouldCloseOnEscape:!1,shouldCloseOnDocumentClick:!1,onDismiss:this.hide}),this.shown&&this._focusRegion.activate())}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this._raf=[],this._focusRegion&&(this._focusRegion.deactivate(),this._focusRegion.blur())}shouldComponentUpdate(e,n){return!Bb(this.props,e)||!Bb(this.state,n)}componentDidUpdate(e,n){this._focusRegion&&this.isTooltip&&((!e.isShowingContent&&this.props.isShowingContent||!n.isShowingContent&&this.state.isShowingContent)&&(this._focusRegion.activate(),this._focusRegion.focus()),(e.isShowingContent&&!this.props.isShowingContent||n.isShowingContent&&!this.state.isShowingContent)&&this._focusRegion.deactivate()),(this.props.offsetX!==e.offsetX||this.props.offsetY!==e.offsetY||this.props.placement!==e.placement||this.props.shouldAlignArrow!==e.shouldAlignArrow||this.props.withArrow!==e.withArrow)&&this.setState({...this.computeOffsets(this.placement)})}computeOffsets(e){let n=this.props,i=n.offsetX,r=n.offsetY;if(this.props.shouldAlignArrow&&this._view){const s=AM(e)[1],o=this._view.props.styles,a=o.arrowSize,l=a===void 0?0:a,u=o.arrowBorderWidth,c=u===void 0?0:u,d=(mi(l)+mi(c))*2;s==="start"?i=d:s==="end"?i=-d:s==="top"?r=d:s==="bottom"&&(r=-d)}return{offsetX:i,offsetY:r}}get placement(){let e=this.props.placement;return this.props.dir===ss.DIRECTION.rtl&&(e=ew(e," ")),!this.shown&&this.props.shouldRenderOffscreen?"offscreen":e}get positionProps(){return{offsetX:this.state.offsetX,offsetY:this.state.offsetY,shouldTrackPosition:this.props.shouldTrackPosition&&this.shown,insertAt:this.props.insertAt,placement:this.placement,constrain:this.props.constrain,onPositioned:this.handlePositioned,onPositionChanged:this.handlePositionChanged,target:this.props.positionTarget,containerDisplay:this.props.positionContainerDisplay,mountNode:this.props.mountNode,id:this._id}}get shown(){return typeof this.props.isShowingContent>"u"?this.state.isShowingContent:this.props.isShowingContent}get defaultFocusElement(){return this.props.defaultFocusElement}renderTrigger(){this._renderTriggerProp!=this.props.renderTrigger&&(this._renderTriggerProp=this.props.renderTrigger,this._renderTrigger=lt(this.props.renderTrigger));let e=this._renderTrigger;if(e){const n=this.props,i=n.on,r=n.shouldContainFocus;let s,o,a,l,u;i&&i.indexOf("click")>-1&&(s=c=>{this.toggle(c)}),i&&i.indexOf("hover")>-1&&(tt(i!=="hover",'[Popover] Specifying only the `"hover"` trigger limits the visibility of the Popover to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the Popover content as well.'),l=this._handleMouseOver,a=this._handleMouseOut),i&&i.indexOf("focus")>-1&&(o=c=>{this.show(c)}),r?(u=this.shown?"true":"false","aria-expanded"in this.props&&(u=this.props["aria-expanded"])):u=void 0,e=Vt(e,{ref:c=>{this._trigger=c},"aria-expanded":u,"data-popover-trigger":!0,onKeyDown:ht(this.handleTriggerKeyDown,this.props.onKeyDown),onKeyUp:ht(this.handleTriggerKeyUp,this.props.onKeyUp),onClick:ht(s,this.props.onClick),onBlur:ht(this.handleTriggerBlur,this.props.onBlur),onFocus:ht(o,this.props.onFocus),onMouseOut:ht(a,this.props.onMouseOut),onMouseOver:ht(l,this.props.onMouseOver)})}return e}renderContent(){let e=lt(this.props.children);if(this.shown&&!this.isTooltip&&(e=F.createElement(us,{open:this.shown,label:this.props.screenReaderLabel,ref:n=>this._dialog=n,display:"block",onBlur:this.handleDialogBlur,onDismiss:this.handleDialogDismiss,liveRegion:this.props.liveRegion,defaultFocusElement:this.props.defaultFocusElement,shouldContainFocus:this.props.shouldContainFocus,shouldReturnFocus:this.props.shouldReturnFocus,shouldFocusOnOpen:!this.props.shouldFocusContentOnTriggerBlur,shouldCloseOnDocumentClick:this.props.shouldCloseOnDocumentClick,shouldCloseOnEscape:this.props.shouldCloseOnEscape},e)),this.shown||this.props.shouldRenderOffscreen){const n=this.props.color;let i={ref:s=>this._view=s,elementRef:s=>{var o,a;this._contentElement=s,(o=(a=this.props).contentRef)===null||o===void 0||o.call(a,s)},background:n,stacking:this.props.stacking,shadow:this.props.shadow,display:"block"};this.isTooltip&&(i={...i,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut});const r=this.state.placement;return this.props.withArrow?(i={...i,background:n==="primary"?"default":"inverse",placement:this.props.dir===ss.DIRECTION.rtl?ew(r," "):r},F.createElement(gq,i,e)):(i={...i,borderWidth:"small",borderRadius:"medium",...n==="primary-inverse"&&{borderColor:"transparent"}},F.createElement(Oe,i,e))}else return null}render(){const e=this.positionProps;return this.props.positionTarget?F.createElement("span",{ref:this.handleRef},this.renderTrigger(),F.createElement(dT,e,this.renderContent())):F.createElement(dT,Object.assign({},e,{renderTarget:this.renderTrigger(),elementRef:this.handleRef}),this.renderContent())}},hl.displayName="Popover",hl.componentId="Popover",hl.allowedProps=vY,hl.propTypes=yY,hl.defaultProps={defaultIsShowingContent:!1,placement:"bottom center",stacking:"topmost",shadow:"resting",offsetX:0,offsetY:0,color:"primary",on:["hover","focus"],withArrow:!0,constrain:"window",insertAt:"bottom",shouldAlignArrow:!1,shouldTrackPosition:!0,shouldRenderOffscreen:!1,shouldContainFocus:!1,shouldReturnFocus:!0,shouldCloseOnDocumentClick:!0,shouldFocusContentOnTriggerBlur:!1,shouldCloseOnEscape:!0},hl))||Pc)||Pc)||Pc);const SY=t=>({tooltip:{label:"tooltip",fontFamily:t.fontFamily,fontWeight:t.fontWeight,boxSizing:"border-box",display:"block",fontSize:t.fontSize,padding:t.padding}}),wY=t=>{const e=t.typography,n=t.spacing;return{...{fontFamily:e==null?void 0:e.fontFamily,fontWeight:e==null?void 0:e.fontWeightNormal,fontSize:e==null?void 0:e.fontSizeSmall,padding:n==null?void 0:n.small}}},_Y={elementRef:p.func,children:p.oneOfType([p.node,p.func]).isRequired,renderTip:p.oneOfType([p.node,p.func]).isRequired,isShowingContent:p.bool,defaultIsShowingContent:p.bool,as:p.elementType,on:p.oneOfType([p.oneOf(["click","hover","focus"]),p.arrayOf(p.oneOf(["click","hover","focus"]))]),color:p.oneOf(["primary","primary-inverse"]),placement:hn.placement,mountNode:hn.mountNode,constrain:hn.constrain,offsetX:p.oneOfType([p.string,p.number]),offsetY:p.oneOfType([p.string,p.number]),positionTarget:p.oneOfType([zi,p.func]),onShowContent:p.func,onHideContent:p.func},kY=["elementRef","children","renderTip","isShowingContent","defaultIsShowingContent","as","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent"],xY=["renderTip","isShowingContent","defaultIsShowingContent","on","color","placement","mountNode","constrain","offsetX","offsetY","positionTarget","onShowContent","onHideContent","styles"];var cA,dA,hA,Ic,fl;let BM=(cA=Kt(),dA=de(SY,wY),hA=Ne(),cA(Ic=dA(Ic=hA(Ic=(fl=class rw extends T.Component{constructor(e){super(e),this._id=void 0,this.ref=null,this.handleRef=n=>{this.ref=n,typeof this.props.elementRef=="function"&&this.props.elementRef(n)},this.handleFocus=()=>{this.setState({hasFocus:!0})},this.handleBlur=()=>{this.setState({hasFocus:!1})},this._id=e.deterministicId(),this.state={hasFocus:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderTrigger(){const e=this.props,n=e.children,i=e.as,r=this.state.hasFocus,s={"aria-describedby":this._id};if(i){const o=Ei(rw,this.props),a=De(this.props,rw.allowedProps);return C(o,Object.assign({},a,s),n)}else return typeof n=="function"?n({focused:r,getTriggerProps:o=>({...s,...o})}):Ou(n,s)}render(){const e=this.props,n=e.renderTip,i=e.isShowingContent,r=e.defaultIsShowingContent,s=e.on,o=e.color,a=e.placement,l=e.mountNode,u=e.constrain,c=e.offsetX,d=e.offsetY,h=e.positionTarget,f=e.onShowContent,m=e.onHideContent,b=e.styles,y=Le(e,xY);return C(g1,Object.assign({},Ft(y),{isShowingContent:i,defaultIsShowingContent:r,on:s,shouldRenderOffscreen:!0,shouldReturnFocus:!1,placement:a,color:o==="primary"?"primary-inverse":"primary",mountNode:l,constrain:u,shadow:"none",offsetX:c,offsetY:d,positionTarget:h,renderTrigger:()=>this.renderTrigger(),onShowContent:f,onHideContent:m,onFocus:this.handleFocus,onBlur:this.handleBlur,elementRef:this.handleRef,shouldCloseOnDocumentClick:!1}),C("span",{id:this._id,css:b==null?void 0:b.tooltip,role:"tooltip"},lt(n)))}},fl.displayName="Tooltip",fl.componentId="Tooltip",fl.allowedProps=kY,fl.propTypes=_Y,fl.defaultProps={defaultIsShowingContent:!1,color:"primary",placement:"top",constrain:"window",offsetX:0,offsetY:0},fl))||Ic)||Ic)||Ic);const EY=t=>({transitioning:`transition--${t}-transitioning`,exited:`transition--${t}-exited`,exiting:`transition--${t}-exiting`,entered:`transition--${t}-entered`,entering:`transition--${t}-entering`}),CY=(t,e)=>{const n=e.type,i=`opacity ${t.duration} ${t.timing}, transform ${t.duration} ${t.timing}`,r={".transition--fade-transitioning":{transition:i},".transition--fade-exiting,\n .transition--fade-exited":{opacity:.01},".transition--fade-entering,\n .transition--fade-entered":{opacity:1}},s={".transition--scale-transitioning":{transition:i},".transition--scale-exiting,\n .transition--scale-exited":{transform:"scale(0.01) translate3d(0, 0, 0)",opacity:.01},".transition--scale-entering,\n .transition--scale-entered":{transform:"scale(1) translate3d(0, 0, 0)",opacity:1}},o={".transition--slide-right-transitioning,\n .transition--slide-left-transitioning,\n .transition--slide-up-transitioning,\n .transition--slide-down-transitioning":{transition:i},".transition--slide-right-exited,\n .transition--slide-left-exited,\n .transition--slide-up-exited,\n .transition--slide-down-exited":{opacity:.01},".transition--slide-right-exiting,\n .transition--slide-right-exited":{transform:"translate3d(100%, 0, 0)"},".transition--slide-left-exiting,\n .transition--slide-left-exited":{transform:"translate3d(-100%, 0, 0)"},".transition--slide-up-exiting,\n .transition--slide-up-exited":{transform:"translate3d(0, -100%, 0)"},".transition--slide-down-exiting,\n .transition--slide-down-exited":{transform:"translate3d(0, 100%, 0)"},".transition--slide-left-entering,\n .transition--slide-right-entering,\n .transition--slide-up-entering,\n .transition--slide-down-entering,\n .transition--slide-left-entered,\n .transition--slide-right-entered,\n .transition--slide-up-entered,\n .transition--slide-down-entered":{transform:"translate3d(0, 0, 0)",opacity:1}};return{duration:t.duration,classNames:EY(n),globalStyles:{...r,...s,...o}}},TY=t=>{const e=t.transitions;return{...{duration:e==null?void 0:e.duration,timing:e==null?void 0:e.timing}}},QM={in:p.bool,unmountOnExit:p.bool,transitionOnMount:p.bool,transitionEnter:p.bool,transitionExit:p.bool,onTransition:p.func,onEnter:p.func,onEntering:p.func,onEntered:p.func,onExit:p.func,onExiting:p.func,onExited:p.func,children:p.node,elementRef:p.func},AY={...QM,enterDelay:p.number,exitDelay:p.number,transitionClassName:p.string.isRequired,exitedClassName:p.string.isRequired,exitingClassName:p.string.isRequired,enteredClassName:p.string.isRequired,enteringClassName:p.string.isRequired,className:p.string},RY=["in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","enterDelay","exitDelay","transitionClassName","exitedClassName","exitingClassName","enteredClassName","enteringClassName","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","className","elementRef"],Yt={EXITED:-2,EXITING:-1,ENTERING:1,ENTERED:2};class Mu extends F.Component{constructor(...e){super(...e),this._timeouts=[],this._unmounted=!1,this.state={transitioning:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.startTransition=(n,i)=>{const r=this.props,s=r.transitionEnter,o=r.transitionExit;n?this.enter(s&&i?Yt.EXITED:null):this.exit(o&&i?Yt.ENTERED:null)},this.transition=(n,i,r,s=0)=>{if(this._unmounted)return;const o=this.props.onTransition,a=jC(this.ref),l=this.getTransitionClassName(n),u=this.getTransitionClassName(i),c=this.props.transitionClassName;i&&s&&this.transitionEnabled(n)?c&&a.add(c):c&&a.remove(c),u&&a.remove(u),l&&a.add(l),n&&i&&typeof o=="function"&&o(n,i),this._timeouts.push(setTimeout(()=>{this._unmounted||typeof r=="function"&&r()},s))},this.enter=n=>{if(this.state.transitioning||this._unmounted)return;const i=this.props;typeof i.onEnter=="function"&&i.onEnter(),i.transitionEnter?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onEntering=="function"&&i.onEntering(),this.transition(Yt.ENTERED,Yt.ENTERING,()=>{this.setState({transitioning:!1},()=>{typeof i.onEntered=="function"&&i.onEntered()})})};n?this.transition(n,null,()=>{this.transition(Yt.ENTERING,n,r,i.enterDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Yt.ENTERED,Yt.EXITED),typeof i.onEntered=="function"&&i.onEntered()})},this.exit=n=>{if(this.state.transitioning)return;const i=this.props;typeof i.onExit=="function"&&i.onExit(),i.transitionExit?this.setState({transitioning:!0},()=>{const r=()=>{typeof i.onExiting=="function"&&i.onExiting(),this.transition(Yt.EXITED,Yt.EXITING,()=>{this.setState({transitioning:!1},()=>{typeof i.onExited=="function"&&i.onExited()})})};n?this.transition(n,null,()=>{this.transition(Yt.EXITING,n,r,i.exitDelay)}):r()}):this.setState({transitioning:!1},()=>{this.transition(Yt.EXITED,Yt.ENTERED),typeof i.onExited=="function"&&i.onExited()})}}componentDidMount(){this.startTransition(this.props.in,this.props.transitionOnMount),this._unmounted=!1}getSnapshotBeforeUpdate(e,n){return this.props.in!==e.in&&n.transitioning?!0:null}componentDidUpdate(e,n,i){i&&this.clearTransition(e.transitionClassName),this.props.transitionClassName!==e.transitionClassName&&this.clearTransition(e.transitionClassName),e.in!==this.props.in&&(n.transitioning?(this.clearTransition(e.transitionClassName),clearTimeout(this._timeouts.pop()),this.setState({transitioning:!1},()=>this.startTransition(this.props.in,!0))):this.startTransition(this.props.in,!0))}componentWillUnmount(){this._timeouts.forEach(e=>{clearTimeout(e)}),this._unmounted=!0}clearTransition(e){this._unmounted||this.setState({transitioning:!1},()=>{if(this._unmounted)return;const n=jC(this.ref);Object.values(Yt).forEach(i=>{const r=this.getTransitionClassName(i);r&&n.remove(r)}),n.remove(e)})}transitionEnabled(e){const n=this.props;switch(e){case Yt.EXITED:case Yt.EXITING:return n.transitionExit;case Yt.ENTERED:case Yt.ENTERING:return n.transitionEnter;default:return!1}}getTransitionClassName(e){const n=this.props;switch(e){case Yt.EXITED:return n.exitedClassName;case Yt.ENTERING:return n.enteringClassName;case Yt.ENTERED:return n.enteredClassName;case Yt.EXITING:return n.exitingClassName;default:return}}renderChildren(){return this.props.children?Vt(Ou(this.props.children),{"aria-hidden":this.props.in?void 0:!0,ref:e=>{const n=at(e)||null;this.handleRef(n)}}):null}render(){return!this.props.in&&this.props.unmountOnExit&&!this.state.transitioning?null:this.renderChildren()}}Mu.displayName="BaseTransition";Mu.propTypes=AY;Mu.allowedProps=RY;Mu.defaultProps={in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0,enterDelay:300,exitDelay:300};Mu.states=Yt;const PY=["fade","scale","slide-down","slide-up","slide-left","slide-right"],IY=p.oneOf(PY),$Y={type:IY,...QM},DY=["type","children","in","unmountOnExit","transitionOnMount","transitionEnter","transitionExit","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","elementRef"],LY=["type","children","styles"];var fA,pA,_g,Yo;let zM=(fA=de(CY,TY),pA=Ne(),fA(_g=pA(_g=(Yo=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleExited=()=>{typeof this.props.onExited=="function"&&this.props.onExited(this.props.type)},this.handleEntered=()=>{typeof this.props.onEntered=="function"&&this.props.onEntered(this.props.type)},this.renderTransitionHelper=()=>{const n=this.props.styles;return C(eM,{styles:n==null?void 0:n.globalStyles})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.type;const n=e.children,i=e.styles,r=Le(e,LY),s=dX(i.duration);return C(F.Fragment,null,this.renderTransitionHelper(),C(Mu,Object.assign({},r,{enterDelay:s,exitDelay:s,transitionClassName:i.classNames.transitioning,exitedClassName:i.classNames.exited,exitingClassName:i.classNames.exiting,enteredClassName:i.classNames.entered,enteringClassName:i.classNames.entering,onEntered:this.handleEntered,onExited:this.handleExited,elementRef:this.handleRef}),n))}},Yo.displayName="Transition",Yo.componentId="Transition",Yo.allowedProps=DY,Yo.propTypes=$Y,Yo.defaultProps={type:"fade",in:!1,unmountOnExit:!1,transitionOnMount:!1,transitionEnter:!0,transitionExit:!0},Yo.states=Mu.states,Yo))||_g)||_g);const MY=(t,e)=>{const n=e.variant,i=e.hasShadow,r={error:{alert:{borderColor:t.dangerBorderColor},icon:{background:t.dangerIconBackground,borderRightColor:t.dangerIconBackground}},info:{alert:{borderColor:t.infoBorderColor},icon:{background:t.infoIconBackground,borderRightColor:t.infoIconBackground}},success:{alert:{borderColor:t.successBorderColor},icon:{backgroundColor:t.successIconBackground,borderRightColor:t.successIconBackground}},warning:{alert:{borderColor:t.warningBorderColor},icon:{background:t.warningIconBackground,borderRightColor:t.warningIconBackground}}};return{alert:{label:"alert",color:t.color,background:t.background,boxSizing:"border-box",display:"flex",minWidth:"12rem",borderWidth:t.borderWidth,borderStyle:t.borderStyle,borderRadius:t.borderRadius,...r[n].alert,...i&&{boxShadow:t.boxShadow}},icon:{color:t.iconColor,boxSizing:"border-box",flex:"0 0 2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.125rem",borderRight:`${t.borderWidth} ${t.borderStyle}`,...r[n].icon},closeButton:{boxSizing:"border-box",display:"flex",alignItems:"flex-start",order:1,marginTop:t.closeButtonMarginTop,marginRight:t.closeButtonMarginRight},content:{boxSizing:"border-box",flex:1,minWidth:"0.0625rem",fontSize:t.contentFontSize,fontFamily:t.contentFontFamily,fontWeight:t.contentFontWeight,lineHeight:t.contentLineHeight,padding:t.contentPadding}}},NY=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,s=t.shadows,o=t.key,a={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,marginTop:n==null?void 0:n.small,borderRadius:i==null?void 0:i.radiusMedium,borderWidth:i==null?void 0:i.widthMedium,borderStyle:i==null?void 0:i.style,contentPadding:`${n==null?void 0:n.small} ${n==null?void 0:n.medium}`,contentFontSize:r==null?void 0:r.fontSizeMedium,contentFontFamily:r==null?void 0:r.fontFamily,contentFontWeight:r==null?void 0:r.fontWeightNormal,contentLineHeight:r==null?void 0:r.lineHeightCondensed,closeButtonMarginTop:n==null?void 0:n.xSmall,closeButtonMarginRight:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textLightest,successBorderColor:e==null?void 0:e.borderSuccess,successIconBackground:e==null?void 0:e.backgroundSuccess,infoBorderColor:e==null?void 0:e.borderInfo,infoIconBackground:e==null?void 0:e.backgroundInfo,warningBorderColor:e==null?void 0:e.borderWarning,warningIconBackground:e==null?void 0:e.backgroundWarning,dangerBorderColor:e==null?void 0:e.borderDanger,dangerIconBackground:e==null?void 0:e.backgroundDanger,boxShadow:s==null?void 0:s.depth2},...a[o]}},BY={children:p.node,variant:p.oneOf(["info","success","warning","error"]),margin:pt.spacing,liveRegion:p.func,liveRegionPoliteness:p.oneOf(["polite","assertive"]),isLiveRegionAtomic:p.bool,screenReaderOnly:p.bool,timeout:p.number,renderCloseButtonLabel:p.oneOfType([p.func,p.node]),onDismiss:p.func,transition:p.oneOf(["none","fade"]),open:p.bool,hasShadow:p.bool},QY=["children","variant","margin","liveRegion","liveRegionPoliteness","isLiveRegionAtomic","screenReaderOnly","timeout","renderCloseButtonLabel","onDismiss","transition","open","hasShadow"];var mA,gA,kg,pl;let zY=(mA=Kt(),gA=de(MY,NY),mA(kg=gA(kg=(pl=class extends T.Component{constructor(e){super(e),this._timeouts=[],this.srid=void 0,this.variantUI={error:Qh,info:Nh,success:uc,warning:zh},this.ref=null,this.handleRef=n=>{this.ref=n},this.handleTimeout=()=>{this.props.timeout>0&&this._timeouts.push(setTimeout(()=>{this.close()},this.props.timeout))},this.onExitTransition=()=>{this.props.onDismiss&&this.props.onDismiss()},this.close=()=>{this.clearTimeouts(),this.removeScreenreaderAlert(),this.setState({open:!1},()=>{this.props.onDismiss&&this.props.transition==="none"&&this.props.onDismiss()})},this.handleKeyUp=n=>{this.props.renderCloseButtonLabel&&n.keyCode===Rr.codes.esc&&this.close()},this.srid=this.props.deterministicId(),this.state={open:!0}}clearTimeouts(){this._timeouts.forEach(e=>clearTimeout(e)),this._timeouts=[]}isDOMNode(e){return e&&typeof e=="object"&&e.nodeType===1}getLiveRegion(){let e=null;return typeof this.props.liveRegion=="function"&&(e=this.props.liveRegion()),this.isDOMNode(e)?e:null}initLiveRegion(e){tt(e.getAttribute("role")==="alert","[Alert] live region must have role='alert' set on page load in order to announce content"),e&&(e.setAttribute("aria-live",this.props.liveRegionPoliteness),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic",`${this.props.isLiveRegionAtomic}`))}createScreenreaderContentNode(){return C(cr,null,this.props.children)}createScreenreaderAlert(){const e=this.getLiveRegion();if(e){const n=document.createElement("div");n.setAttribute("id",this.srid),e.appendChild(n)}}removeScreenreaderAlert(){const e=this.getLiveRegion();e&&document.getElementById(this.srid)&&(e.removeAttribute("aria-live"),e.removeAttribute("aria-relevant"),e.removeAttribute("aria-atomic"),this.initLiveRegion(e))}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=this.getLiveRegion();i&&this.initLiveRegion(i),this.handleTimeout()}componentWillUnmount(){this.clearTimeouts()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),!this.props.open&&!!this.props.open!=!!e.open&&this.close()}renderIcon(){var e;const n=this.variantUI[this.props.variant];return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(n,null))}renderCloseButton(){var e;const n=this.props.renderCloseButtonLabel&<(this.props.renderCloseButtonLabel);return n?C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.closeButton,key:"closeButton"},C(dY,{onClick:this.close,size:"small",screenReaderLabel:n})):null}renderAlert(){var e,n;return C(Oe,{as:"div",margin:this.props.margin,css:(e=this.props.styles)===null||e===void 0?void 0:e.alert,onKeyUp:this.handleKeyUp,elementRef:this.handleRef},this.renderIcon(),C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},this.props.children),this.renderCloseButton())}createScreenReaderPortal(e){return this.state.open?vm.createPortal(C("div",{id:this.srid},this.createScreenreaderContentNode()),e):null}render(){const e=this.getLiveRegion(),n=e?this.createScreenReaderPortal(e):null;return this.props.screenReaderOnly?(tt(!!this.getLiveRegion(),"[Alert] The 'screenReaderOnly' prop must be used in conjunction with 'liveRegion'."),n):this.props.transition==="none"?this.state.open?C(F.Fragment,null,n,this.renderAlert()):null:C(F.Fragment,null,n,C(zM,{type:this.props.transition,transitionOnMount:!0,in:this.state.open,unmountOnExit:!0,onExited:this.onExitTransition},this.renderAlert()))}},pl.displayName="Alert",pl.componentId="Alert",pl.propTypes=BY,pl.allowedProps=QY,pl.defaultProps={variant:"info",margin:"x-small 0",timeout:0,transition:"fade",open:!0,screenReaderOnly:!1,liveRegionPoliteness:"assertive",isLiveRegionAtomic:!1,children:null,hasShadow:!0},pl))||kg)||kg);const HY=(t,e,n)=>{const i=e.size,r=e.color,s=e.hasInverseColor,o=e.shape,a=e.src,l=e.showBorder,u=n.loaded,c={auto:{fontSize:"inherit",borderWidth:t.borderWidthSmall},"xx-small":{fontSize:"0.5rem",borderWidth:t.borderWidthSmall},"x-small":{fontSize:"0.75rem",borderWidth:t.borderWidthSmall},small:{fontSize:"1rem",borderWidth:t.borderWidthSmall},medium:{fontSize:"1.25rem",borderWidth:t.borderWidthMedium},large:{fontSize:"1.5rem",borderWidth:t.borderWidthMedium},"x-large":{fontSize:"1.75rem",borderWidth:t.borderWidthMedium},"xx-large":{fontSize:"2rem",borderWidth:t.borderWidthMedium}},d={circle:{width:"2.5em",position:"relative",borderRadius:"100%",overflow:"hidden"},rectangle:{width:"3em"}},h={default:t.color,shamrock:t.colorShamrock,barney:t.colorBarney,crimson:t.colorCrimson,fire:t.colorFire,licorice:t.colorLicorice,ash:t.colorAsh},f=s?h[r]:t.background,m=s?t.background:h[r];return{avatar:{label:"avatar",height:"2.5em",boxSizing:"border-box",backgroundColor:f,backgroundPosition:"center",backgroundSize:"cover",backgroundClip:"content-box",backgroundRepeat:"no-repeat",overflow:"hidden",lineHeight:0,textAlign:"center",borderStyle:"solid",borderColor:t.borderColor,...c[i],...d[o],...u?{backgroundImage:`url('${a}')`,...l!=="always"&&{border:0},boxShadow:`inset 0 0 ${t.boxShadowBlur} 0 ${t.boxShadowColor}`}:{backgroundImage:void 0,...s&&{border:0,padding:c[i].borderWidth,backgroundClip:"border-box"}},...l==="never"&&{border:0}},initials:{label:"avatar__initials",color:m,lineHeight:"2.375em",fontFamily:t.fontFamily,fontWeight:t.fontWeight,letterSpacing:"0.0313em"},loadImage:{label:"avatar__loadImage",display:"none"},iconSVG:{label:"avatar__iconSVG",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",svg:{fill:m,height:"1em",width:"1em"}}}},UY=t=>{const e=t.colors,n=t.borders,i=t.typography,r=e.brand,s=e.shamrock,o=e.barney,a=e.crimson,l=e.fire,u=e.licorice,c=e.ash;return{...{background:e==null?void 0:e.backgroundLightest,borderWidthSmall:n==null?void 0:n.widthSmall,borderWidthMedium:n==null?void 0:n.widthMedium,borderColor:e==null?void 0:e.borderMedium,boxShadowColor:Xp(e==null?void 0:e.backgroundDarkest,12),boxShadowBlur:"1rem",fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightBold,color:r,colorShamrock:s,colorBarney:o,colorCrimson:a,colorFire:l,colorLicorice:u,colorAsh:c}}},FY={name:p.string.isRequired,src:p.string,alt:p.string,size:p.oneOf(["auto","xx-small","x-small","small","medium","large","x-large","xx-large"]),color:p.oneOf(["default","shamrock","barney","crimson","fire","licorice","ash"]),hasInverseColor:p.bool,showBorder:p.oneOf(["auto","always","never"]),shape:p.oneOf(["circle","rectangle"]),margin:pt.spacing,display:p.oneOf(["inline-block","block"]),onImageLoaded:p.func,as:p.elementType,elementRef:p.func,renderIcon:p.oneOfType([p.node,p.func])},VY=["name","src","alt","size","color","hasInverseColor","shape","margin","display","onImageLoaded","as","elementRef","renderIcon","showBorder"],WY=["onImageLoaded","styles"];var bA,OA,xg,ml;let Ox=(bA=de(HY,UY),OA=Ne(),bA(xg=OA(xg=(ml=class extends T.Component{constructor(...e){super(...e),this.state={loaded:!1},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleImageLoaded=n=>{this.setState({loaded:!0}),this.props.onImageLoaded(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.state),this.state.loaded&&!this.props.src&&this.setState({loaded:!1})}makeInitialsFromName(){let e=this.props.name;if(!(!e||typeof e!="string")&&(e=e.trim(),e.length!==0))if(e.match(/\s+/)){const n=e.split(/\s+/);return(n[0][0]+n[n.length-1][0]).toUpperCase()}else return e[0].toUpperCase()}renderInitials(){var e;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.initials,"aria-hidden":"true"},this.makeInitialsFromName())}renderContent(){const e=this.props,n=e.renderIcon,i=e.styles;return n?C("span",{css:i==null?void 0:i.iconSVG},lt(n)):this.renderInitials()}render(){var e;const n=this.props;n.onImageLoaded;const i=n.styles,r=Le(n,WY);return C(Oe,Object.assign({},Ft(r),{"aria-label":this.props.alt?this.props.alt:void 0,role:this.props.alt?"img":void 0,as:this.props.as,elementRef:this.handleRef,margin:this.props.margin,css:i==null?void 0:i.avatar,display:this.props.display}),C("img",{src:this.props.src,css:(e=this.props.styles)===null||e===void 0?void 0:e.loadImage,alt:this.props.alt,onLoad:this.handleImageLoaded,"aria-hidden":"true"}),!this.state.loaded&&this.renderContent())}},ml.displayName="Avatar",ml.componentId="Avatar",ml.propTypes=FY,ml.allowedProps=VY,ml.defaultProps={size:"medium",color:"default",hasInverseColor:!1,showBorder:"auto",shape:"circle",display:"inline-block",onImageLoaded:t=>{}},ml))||xg)||xg);const jY=(t,e)=>{const n=e.level,i=e.color,r=e.border,s={h1:{fontFamily:t.h1FontFamily,fontSize:t.h1FontSize,fontWeight:t.h1FontWeight},h2:{fontFamily:t.h2FontFamily,fontSize:t.h2FontSize,fontWeight:t.h2FontWeight},h3:{fontFamily:t.h3FontFamily,fontSize:t.h3FontSize,fontWeight:t.h3FontWeight},h4:{fontFamily:t.h4FontFamily,fontSize:t.h4FontSize,fontWeight:t.h4FontWeight},h5:{fontFamily:t.h5FontFamily,fontSize:t.h5FontSize,fontWeight:t.h5FontWeight},reset:{margin:0,fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"}},o={inherit:{color:"inherit"},primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor}},a={top:{paddingTop:t.borderPadding,borderTop:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},bottom:{paddingBottom:t.borderPadding,borderBottom:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`},none:{}},l={outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:"-0.375rem 0 0 0",color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block","&:focus":{outline:"none"}};return{heading:{label:"heading",lineHeight:t.lineHeight,margin:0,"&:is(input)[type]":l,"&:-webkit-any(input)[type]":l,...s[n],...o[i],...a[r]}}},XY=t=>{const e=t.typography,n=t.colors,i=t.spacing,r=t.borders,s=t.key,o={canvas:{primaryColor:t["ic-brand-font-color-dark"]},instructure:{h1FontFamily:e==null?void 0:e.fontFamilyHeading,h2FontFamily:e==null?void 0:e.fontFamilyHeading,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontSize:"2.125rem",h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontSize:e==null?void 0:e.fontSizeLarge,h5FontWeight:e==null?void 0:e.fontWeightBold,h5FontSize:e==null?void 0:e.fontSizeMedium}};return{...{lineHeight:e==null?void 0:e.lineHeightCondensed,h1FontSize:e==null?void 0:e.fontSizeXXLarge,h1FontWeight:e==null?void 0:e.fontWeightBold,h1FontFamily:e==null?void 0:e.fontFamily,h2FontSize:e==null?void 0:e.fontSizeXLarge,h2FontWeight:e==null?void 0:e.fontWeightNormal,h2FontFamily:e==null?void 0:e.fontFamily,h3FontSize:e==null?void 0:e.fontSizeLarge,h3FontWeight:e==null?void 0:e.fontWeightBold,h3FontFamily:e==null?void 0:e.fontFamily,h4FontSize:e==null?void 0:e.fontSizeMedium,h4FontWeight:e==null?void 0:e.fontWeightBold,h4FontFamily:e==null?void 0:e.fontFamily,h5FontSize:e==null?void 0:e.fontSizeSmall,h5FontWeight:e==null?void 0:e.fontWeightNormal,h5FontFamily:e==null?void 0:e.fontFamily,primaryInverseColor:n==null?void 0:n.textLightest,primaryColor:n==null?void 0:n.textDarkest,secondaryColor:n==null?void 0:n.textDark,secondaryInverseColor:n==null?void 0:n.textLight,borderPadding:i==null?void 0:i.xxxSmall,borderColor:n==null?void 0:n.borderMedium,borderWidth:r==null?void 0:r.widthSmall,borderStyle:r==null?void 0:r.style},...o[s]}},ZY={border:p.oneOf(["none","top","bottom"]),children:zX,color:p.oneOf(["primary","secondary","primary-inverse","secondary-inverse","inherit"]),level:p.oneOf(["h1","h2","h3","h4","h5","reset"]),as:p.elementType,margin:pt.spacing,elementRef:p.func},qY=["border","children","color","level","as","margin","elementRef"],YY=["border","children","color","level","margin","elementRef","makeStyles"];var yA,vA,Eg,gl;let Yr=(yA=de(jY,XY),vA=Ne(),yA(Eg=vA(Eg=(gl=class HM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props;n.border;const i=n.children;n.color;const r=n.level,s=n.margin;n.elementRef,n.makeStyles;const o=Le(n,YY),a=Ei(HM,this.props,()=>r==="reset"?"span":r);return C(Oe,Object.assign({},Ft(o),{css:(e=this.props.styles)===null||e===void 0?void 0:e.heading,as:a,elementRef:this.handleRef,margin:s}),i)}},gl.displayName="Heading",gl.componentId="Heading",gl.propTypes=ZY,gl.allowedProps=qY,gl.defaultProps={children:null,border:"none",color:"inherit",level:"h2"},gl))||Eg)||Eg);const GY=(t,e)=>{const n=e.size,i=e.href,r=e.onClick,s=e.disabled,o=e.hero,a=e.heading,l=i||r,u={small:{billboard:{padding:t.paddingSmall},hero:{fontSize:"3rem"},message:{fontSize:t.messageFontSizeSmall},heading:{...o&&{margin:`${t.mediumMargin} 0 0`}}},medium:{billboard:{padding:t.paddingMedium},hero:{fontSize:"5rem"},message:{fontSize:t.messageFontSizeMedium},heading:{}},large:{billboard:{padding:t.paddingLarge},hero:{fontSize:"10rem"},message:{fontSize:t.messageFontSizeLarge},heading:{}}},c=l?{appearance:"none",boxSizing:"border-box",cursor:"pointer",userSelect:"none",touchAction:"manipulation",width:"100%",margin:"0",border:`${t.buttonBorderWidth} ${t.buttonBorderStyle} transparent`,borderRadius:t.buttonBorderRadius,background:t.backgroundColor,textDecoration:"none","&:hover":{borderStyle:t.buttonHoverBorderStyle},"&:hover, &:focus":{textDecoration:"none",outline:"none",borderColor:t.iconHoverColor,"& [class$=-billboard__hero]":{color:t.iconHoverColor}},"&:active":{background:t.clickableActiveBg,borderColor:t.iconHoverColor,"& [class$=-billboard__hero], & [class$=-billboard__message]":{color:t.clickableActiveText}}}:{backgroundColor:t.backgroundColor};return{billboard:{label:"billboard",boxSizing:"border-box",position:"relative",fontFamily:t.fontFamily,marginLeft:"auto",marginRight:"auto",textAlign:"center",display:"block",...u[n].billboard,...c,...s&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5}},content:{label:"billboard__content",display:"block"},hero:{label:"billboard__hero",display:"block",color:t.iconColor,...u[n].hero,"& > img, & > svg":{maxWidth:"100%",display:"block",margin:"0 auto"},"& > img":{height:"auto"}},heading:{label:"billboard__heading",display:"block",...o&&{margin:`${t.largeMargin} 0 0`},...u[n].heading},message:{label:"billboard__message",display:"block",color:l?t.messageColorClickable:t.messageColor,...(o||a)&&{margin:`${t.mediumMargin} 0 0`},...u[n].message}}},KY=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,s=t.key,o={canvas:{iconHoverColor:t["ic-link-color"],messageColorClickable:t["ic-link-color"],clickableActiveBg:t["ic-brand-primary"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,paddingSmall:i==null?void 0:i.small,paddingMedium:i==null?void 0:i.medium,paddingLarge:i==null?void 0:i.medium,iconColor:n==null?void 0:n.textDark,mediumMargin:i==null?void 0:i.small,largeMargin:i==null?void 0:i.medium,iconHoverColor:n==null?void 0:n.textLink,backgroundColor:n==null?void 0:n.backgroundLightest,iconHoverColorInverse:n==null?void 0:n.textLightest,buttonBorderWidth:e==null?void 0:e.widthMedium,buttonBorderRadius:e==null?void 0:e.radiusLarge,messageColor:n==null?void 0:n.textDark,messageColorClickable:n==null?void 0:n.textLink,messageColorInverse:n==null?void 0:n.textLight,messageFontSizeSmall:r==null?void 0:r.fontSizeSmall,messageFontSizeMedium:r==null?void 0:r.fontSizeMedium,messageFontSizeLarge:r==null?void 0:r.fontSizeLarge,clickableActiveBg:n==null?void 0:n.backgroundBrand,clickableActiveText:n==null?void 0:n.textLightest,buttonBorderStyle:e==null?void 0:e.style,buttonHoverBorderStyle:"dashed"},...o[s]}},JY={hero:p.oneOfType([p.element,p.func]),size:p.oneOf(["small","medium","large"]),as:p.elementType,elementRef:p.func,heading:p.string,headingAs:p.oneOf(["h1","h2","h3","span"]),headingLevel:p.oneOf(["h1","h2","h3","h4"]),message:p.oneOfType([p.node,p.func]),onClick:p.func,href:p.string,disabled:p.bool,readOnly:p.bool,margin:pt.spacing},eG=["hero","size","as","elementRef","heading","headingAs","headingLevel","message","onClick","href","disabled","readOnly","margin"];var SA,wA,bl;let UM=(SA=de(GY,KY),SA(wA=(bl=class sw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props,r=i.readOnly,s=i.onClick;r?(n.preventDefault(),n.stopPropagation()):typeof s=="function"&&s(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderHeading(){const e=this.props,n=e.headingLevel,i=e.headingAs,r=e.heading,s=e.styles;return C("span",{css:s==null?void 0:s.heading},C(Yr,{level:n,as:i,color:"primary"},r))}get SVGIconSize(){const e=this.props.size;return e==="small"?"medium":e==="large"?"x-large":"large"}renderHero(){return typeof this.props.hero=="function"?this.props.hero(this.SVGIconSize):this.props.hero}renderContent(){const e=this.props,n=e.heading,i=e.message,r=e.hero,s=e.styles;return C("span",{css:s==null?void 0:s.content},r&&C("span",{css:s==null?void 0:s.hero},this.renderHero()),n&&this.renderHeading(),i&&C("span",{css:s==null?void 0:s.message},lt(i)))}render(){const e=this.props,n=e.href,i=e.disabled,r=e.readOnly,s=e.margin,o=e.styles,a=Ei(sw,this.props);return C(Oe,{as:"div",margin:s},C(Oe,Object.assign({},De(this.props,[...sw.allowedProps,...Oe.allowedProps]),{type:a==="button"?"button":void 0,as:a,elementRef:this.handleRef,css:o==null?void 0:o.billboard,href:n,onClick:this.handleClick,disabled:i,"aria-disabled":i||r?"true":void 0}),this.renderContent()))}},bl.displayName="Billboard",bl.componentId="Billboard",bl.propTypes=JY,bl.allowedProps=eG,bl.defaultProps={disabled:!1,readOnly:!1,size:"medium",headingAs:"span",headingLevel:"h1",as:"span",elementRef:()=>{}},bl))||wA);const tG=t=>({truncateText:{label:"truncateText",display:"block",overflow:"hidden",wordWrap:"break-word",whiteSpace:"normal",fontFamily:t.fontFamily},auto:{label:"truncateText__auto",height:"100%"},spacer:{label:"truncateText__spacer",visibility:"hidden",maxHeight:"0",display:"block"},lineHeight:t.lineHeight}),nG=t=>{const e=t.typography;return{...{fontFamily:e==null?void 0:e.fontFamily,lineHeight:e==null?void 0:e.lineHeight}}};/*! - * escape-html - * Copyright(c) 2012-2013 TJ Holowaychuk - * Copyright(c) 2015 Andreas Lubbe - * Copyright(c) 2015 Tiancheng "Timothy" Gu - * MIT Licensed - */var iG=/["'&<>]/,rG=sG;function sG(t){var e=""+t,n=iG.exec(e);if(!n)return e;var i,r="",s=0,o=0;for(s=n.index;sl.toUpperCase())),n.letterSpacing!=="normal"&&(o=s.length*parseInt(n.letterSpacing)),a=r.measureText(s).width+o,a}function H0(t,e,n=!0,i=!0,r=!1){let s=t;const o=s.charAt(0),a=s.slice(-1);return n&&e.indexOf(o)!==-1&&(s=s.slice(1)),i&&e.indexOf(a)!==-1&&(s=s.slice(0,-1)),r&&(s=H0(s,e,n,i,!1)),s}function FM(t,e,n=!1){const i=e.truncate,r=e.ignore,s=e.ellipsis;let o=cp(t),a=-1,l=-1;const u=()=>{for(let c=0;c=0&&(h=o[f],!(h.length>0));)f--;if(h){const m=String(h.slice(-1));r.indexOf(m)!==-1&&(o[f].length-=1)}}}if(u(),c=o[a],c){const d=c[l+1];if(d&&r.indexOf(d)!==-1&&o[a].splice(l+1,1),!d){let h=null,f=a+1;for(;f0));)f++;if(h){const m=String(h[0]);r.indexOf(m)!==-1&&o[f].shift()}}}}else{u();const c=o[a];if(c){const d=c[l-1];if(d&&r.indexOf(d.slice(-1))!==-1&&(d.length===1?o[a].splice(l-1,1):o[a][l-1]=d.slice(0,-1)),!d){let h=null,f=a-1;for(;f>=0&&(h=o[f],!(h.length>0));)f--;if(h){const m=String(h.slice(-1)).slice(-1);if(r.indexOf(m)!==-1){const b=h.length-1;o[f][b]=h[b].slice(0,-1)}}}}}return n&&(o=FM(o,e,!1)),o}function uG(t,e){const n=new cG(t,e);if(n)return n.truncate()}class cG{constructor(e,n={}){this._options=void 0,this._stage=void 0,this._parent=void 0,this._nodeMap=void 0,this._defaultStringData=void 0,this._nodeDataIndexes=void 0,this._maxHeight=void 0,this._maxWidth=void 0,this._maxLines=void 0;const i=e!=null&&e.parentElement?e==null?void 0:e.parentElement:void 0;if(this._options={parent:n.parent||i,maxLines:n.maxLines||1,position:n.position||"end",truncate:n.truncate||"character",ellipsis:n.ellipsis||"…",ignore:n.ignore||[" ",".",","],lineHeight:n.lineHeight||1.2,shouldTruncateWhenInvisible:!!n.shouldTruncateWhenInvisible},!e){tt(!1,"[Truncator] No element to truncate.");return}if(this._stage=e,n.parent)this._parent=this._options.parent;else{const r=this._stage.parentElement?this._stage.parentElement:void 0;this._parent=this._options.maxLines==="auto"?r:this._stage}this.setup()}setup(){if(!this._stage)return;const e=this._options,n=e.maxLines,i=e.truncate,r=e.lineHeight,s=ls(this._parent),o=s.lineHeight==="normal"?r*parseFloat(s.fontSize):parseFloat(s.lineHeight),a=this._stage.firstChild.children?this._stage.firstChild:this._stage,l=[],u=[];this._nodeMap=this.getNodeMap(a);for(let c=0;cc.node),this._parent),this._maxLines=n==="auto"?Math.round(this._maxHeight/o):n}getNodeMap(e){const n=this._options,i=n.shouldTruncateWhenInvisible,r=n.truncate,s=Array.from(e.childNodes),o=[];return s.forEach(a=>{if(a.nodeType===1||a.nodeType===3){const l=i?!0:ZS(a,!1),u=a.textContent+" ";o.push({node:a,data:r==="word"?l?u.match(/.*?[\.\s\/]+?/g):[""]:l?a.textContent.split(""):[]})}}),o}getNodeIndexes(e){const n=[];for(let i=0;i${o}`}else r.node.nodeType===3&&(n+=o)}return n}checkFit(e){const n=this.domString(e),i=this._options.maxLines==="auto"?this._stage:this._parent;let r=!0;return this._stage.innerHTML=n,sn(i).height-this._maxHeight>.5&&(r=!1),r}truncate(){const e=this._options,n=e.ellipsis,i=e.ignore,s=e.position==="middle";let o=!1,a="",l=null;if(!this._stage)return;const u=(m,b,y,O,v=null)=>{let S=m,_=b,k=v;for(;S<=_;){const x=Math.floor((S+_)/2);y(x,O)?(_=x-1,k=x):S=x+1}return k},c=(m,b,y,O)=>{let v=!1;const S=cp(b);switch(m){case 0:break;case y.length:v=!0;for(let _=0;_y[w]),x=Array(2);x[0]=_[0]+1,x[1]=y.length-m-x[0];for(let w=0;w<=k[0];w++)switch(!0){case w=k[1];w--)switch(!0){case w>k[1]:x[1]-=b[w].length;break;case w===k[1]:k[1]>k[0]&&(S[w]=b[w].slice(-x[1])),k[1]===k[0]&&(S[w]=S[w].concat(b[w].slice(-x[1])));break}for(let w=k[0]+1;wk:S[w]=[];break}}break}return{truncated:v,truncatedArray:S}},d=(m,b)=>{const y=c(m,this._defaultStringData,this._nodeDataIndexes,b),O=y.truncatedArray;return this.checkFit(O)},h=u(0,this._nodeDataIndexes.length,d,s,this._nodeDataIndexes.length);var f=c(h,this._defaultStringData,this._nodeDataIndexes,s);o=f.truncated,l=f.truncatedArray,l=FM(l,this._options,!0);for(let m=0;m{this.ref&&this.setState(this.initialState)},this.state=this.initialState}get _ref(){return this.ref}get initialState(){return{isTruncated:!1,needsSecondRender:!0,truncatedElement:void 0,truncatedText:void 0}}componentDidMount(){const e=this.props,n=e.children,i=e.makeStyles;if(i==null||i(),n){var r;this.checkChildren();const s=Ou(n);this._text=s||void 0,this.truncate(),this._debounced=f1(this.update,this.props.debounce,{leading:!0,trailing:!0}),this._prevWidth=(r=sn(this.ref))===null||r===void 0?void 0:r.width,this._resizeListener=new ResizeObserver(o=>{requestAnimationFrame(()=>{for(const a of o){const l=a.contentRect.width;this._prevWidth!==l&&(this._prevWidth=l,this.props.debounce===0?this.update():this._debounced())}})}),this._resizeListener.observe(this.ref)}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debounced&&this._debounced.cancel()}componentDidUpdate(e){const n=this.props,i=n.children,r=n.onUpdate,s=n.makeStyles;s==null||s();const o=this.state,a=o.isTruncated,l=o.needsSecondRender,u=o.truncatedText;if(i){if(e!==this.props){if(e.children!==this.props.children){this.checkChildren();const c=Ou(i);this._text=c||void 0}this.setState(this.initialState);return}!l&&(a||this._wasTruncated)?(r==null||r(a,u),this._wasTruncated=a):this.truncate()}}checkChildren(){tt(!(()=>{let e=!1;const n=Ou(this.props.children);return F.Children.forEach(n.props.children,i=>{i.props&&F.Children.forEach(i.props.children,r=>{r.props&&(e=!0)})}),e})(),"[TruncateText] Some children are too deep in the node tree and will not render.")}truncate(){if(this.state.needsSecondRender)if(wn){var e;const r=uG(this._stage,{...this.props,parent:this.ref?this.ref:void 0,lineHeight:(e=this.props.styles)===null||e===void 0?void 0:e.lineHeight});if(r){const s=this.renderChildren(r.isTruncated,r.data,r.constraints.width);this.setState({needsSecondRender:!1,isTruncated:r.isTruncated,truncatedElement:s,truncatedText:r.text})}}else{var n,i;const r=(n=this.ref)!==null&&n!==void 0&&n.textContent?(i=this.ref)===null||i===void 0?void 0:i.textContent:void 0;this.setState({needsSecondRender:!1,isTruncated:!1,truncatedElement:this._text,truncatedText:r})}}renderChildren(e,n,i){var r;if(!e)return this._text;const s=[];for(let a=0;aa);return this._text.props?Vt(this._text,this._text.props,o):o}render(){var e;const n=this.state.truncatedElement,i=this.props.children;return C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.truncateText,ref:r=>{this.ref=r}},i&&(n?null:C("span",{ref:r=>{this._stage=r}},Ou(i))),n)}},Ol.displayName="TruncateText",Ol.componentId="TruncateText",Ol.allowedProps=hG,Ol.propTypes=dG,Ol.defaultProps={maxLines:1,ellipsis:"…",truncate:"character",position:"end",ignore:[" ",".",","],debounce:0},Ol))||$c)||$c)||$c);const pG=(t,e,n)=>{const i=e.isWithinText,r=e.renderIcon,s=e.iconPlacement,o=e.color,a=n.containsTruncateText,l=n.hasVisibleChildren,u=o==="link-inverse",c={boxSizing:"border-box",fontFamily:t.fontFamily,fontWeight:t.fontWeight,transition:"outline-color 0.2s",verticalAlign:"baseline",outlineColor:"transparent",outlineWidth:t.focusOutlineWidth,outlineStyle:t.focusOutlineStyle,borderRadius:t.focusOutlineBorderRadius,outlineOffset:"0.25rem",...r&&a&&l&&{alignItems:"center"},"&:focus":{outlineColor:t.focusOutlineColor},"&[aria-disabled]":{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"},"&::-moz-focus-inner":{border:0}},d={...c,cursor:"pointer",color:t.color,textDecoration:i?t.textDecorationWithinText:t.textDecorationOutsideText,"&:focus":{color:t.color,outlineColor:t.focusOutlineColor},"&:hover, &:active":{color:t.hoverColor,textDecoration:i?t.hoverTextDecorationWithinText:t.hoverTextDecorationOutsideText}},h={appearance:"none",userSelect:"text",background:"none",border:"none",cursor:"pointer",fontSize:"1em",margin:0,padding:0,textAlign:"inherit"},f={color:t.colorInverse,"&:focus":{outlineColor:t.focusInverseIconOutlineColor},"&:hover, &:focus, &:active":{color:t.colorInverse}};return{link:{label:"link",...c,"&:is(a), &:is(button)":d,"&:-webkit-any(a), &:-webkit-any(button)":d,"&:is(button)":h,"&:-webkit-any(button)":h,...u&&{...f,"&:is(a):link, &:is(a):visited, &:is(button)":f,"&:-webkit-any(a):link, &:-webkit-any(a):visited, &:-webkit-any(button)":f}},icon:{label:"icon",...r&&{fontSize:t.iconSize,boxSizing:"border-box",paddingInlineStart:s==="start"?0:t.iconPlusTextMargin,paddingInlineEnd:s==="start"?t.iconPlusTextMargin:0}}}},mG=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing,s=t.key,o={canvas:{color:t["ic-link-color"],focusOutlineColor:t["ic-brand-primary"],hoverColor:So(t["ic-link-color"],10)},"canvas-high-contrast":{textDecorationOutsideText:"underline",hoverTextDecorationOutsideText:"none"}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:e==null?void 0:e.textLink,textDecorationWithinText:"underline",hoverTextDecorationWithinText:"none",textDecorationOutsideText:"none",hoverTextDecorationOutsideText:"underline",focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineColor:e==null?void 0:e.borderBrand,focusOutlineStyle:n==null?void 0:n.style,focusOutlineBorderRadius:n==null?void 0:n.radiusSmall,hoverColor:So(e==null?void 0:e.textLink,10),colorInverse:e==null?void 0:e.textLight,focusInverseOutlineColor:e==null?void 0:e.borderLightest,focusInverseIconOutlineColor:e==null?void 0:e.borderLightest,iconSize:"1.125em",iconPlusTextMargin:r==null?void 0:r.xxSmall},...o[s]}},gG={children:p.node.isRequired,href:p.string,color:p.oneOf(["link","link-inverse"]),elementRef:p.func,as:p.elementType,role:p.string,forceButtonRole:p.bool,interaction:p.oneOf(["enabled","disabled"]),margin:pt.spacing,renderIcon:p.oneOfType([p.func,p.node]),iconPlacement:p.oneOf(["start","end"]),display:p.oneOf(["auto","block","inline-block","flex","inline-flex"]),isWithinText:p.bool,onBlur:p.func,onClick:p.func,onFocus:p.func,onMouseEnter:p.func},bG=["children","href","color","elementRef","as","role","forceButtonRole","interaction","margin","renderIcon","iconPlacement","display","isWithinText","onBlur","onClick","onFocus","onMouseEnter"],OG=["children","onClick","onMouseEnter","color","href","margin","renderIcon","iconPlacement","isWithinText"];var EA,CA,Cg,yl;let rr=(EA=de(pG,mG),CA=Ne(),EA(Cg=CA(Cg=(yl=class VM extends T.Component{constructor(...e){super(...e),this.state={hasFocus:!1},this.ref=null,this.makeStyleProps=()=>({containsTruncateText:this.containsTruncateText,hasVisibleChildren:this.hasVisibleChildren}),this.handleElementRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleClick=n=>{const i=this.props.onClick;this.interaction==="disabled"?(n.preventDefault(),n.stopPropagation()):typeof i=="function"&&i(n)},this.handleFocus=n=>{this.setState({hasFocus:!0}),typeof this.props.onFocus=="function"&&this.props.onFocus(n)},this.handleBlur=n=>{this.setState({hasFocus:!1}),typeof this.props.onBlur=="function"&&this.props.onBlur(n)}}get _link(){return this.ref}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}get containsTruncateText(){let e=!1;return F.Children.forEach(this.props.children,n=>{n&&Qe(n,["TruncateText"])&&(e=!0)}),Be(!e||this.props.display===void 0,"[Link] Using the display property with TruncateText may cause layout issues."),e}get display(){if(this.props.display)return this.props.display;const e=this.containsTruncateText;return this.props.renderIcon?e?"inline-flex":"inline-block":e?"block":"auto"}get interaction(){return Co({props:this.props,interactionTypes:["disabled"]})}get element(){return Ei(VM,this.props)}get focused(){return qs(this.ref)}get focusable(){return dx(this.ref)}get hasVisibleChildren(){return h1(this.props.children)}get role(){const e=this.props,n=e.role,i=e.forceButtonRole,r=e.onClick;return i&&r&&this.element!=="button"?"button":n}focus(){this.ref&&this.ref.focus()}renderIcon(){var e;return Be(this.props.display===void 0,"[Link] Using the display property with an icon may cause layout issues."),C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},lt(this.props.renderIcon))}render(){var e;const n=this.props,i=n.children;n.onClick;const r=n.onMouseEnter;n.color;const s=n.href,o=n.margin,a=n.renderIcon,l=n.iconPlacement;n.isWithinText;const u=Le(n,OG),d=this.interaction==="disabled",h=this.element==="button"||this.element==="input"?"button":void 0,f=this.role==="button"&&!d?0:void 0;return C(Oe,Object.assign({},Ft(u),{elementRef:this.handleElementRef,as:this.element,display:this.display,margin:o,href:s,onMouseEnter:r,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":d?"true":void 0,role:this.role,type:h,tabIndex:f,css:(e=this.props.styles)===null||e===void 0?void 0:e.link}),a&&l==="start"&&this.renderIcon(),i,a&&l==="end"&&this.renderIcon())}},yl.displayName="Link",yl.componentId="Link",yl.propTypes=gG,yl.allowedProps=bG,yl.defaultProps={interaction:void 0,color:"link",iconPlacement:"start",isWithinText:!0,forceButtonRole:!0},yl))||Cg)||Cg);const yG={children:p.node.isRequired,href:p.string,onClick:p.func,onMouseEnter:p.func,size:p.oneOf(["small","medium","large"]),renderIcon:p.oneOfType([p.node,p.func]),iconPlacement:p.oneOf(["start","end"])},vG=["children","href","iconPlacement","onClick","onMouseEnter","renderIcon","size"];var TA,AA,vl;let WM=(TA=Ne(),TA(AA=(vl=class jM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}render(){const e=this.props,n=e.children,i=e.href,r=e.renderIcon,s=e.iconPlacement,o=e.onClick,a=e.onMouseEnter,l=De(this.props,jM.allowedProps);return F.createElement(rr,Object.assign({},l,{href:i,renderIcon:r,iconPlacement:s,onClick:o,onMouseEnter:a,isWithinText:!1,elementRef:this.handleRef}),F.createElement(fG,null,n))}},vl.displayName="BreadcrumbLink",vl.componentId="Breadcrumb.Link",vl.propTypes=yG,vl.allowedProps=vG,vl.defaultProps={},vl))||AA);const SG=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallFontSize,paddingInlineEnd:`calc(${t.smallSeparatorFontSize} * 2)`,paddingInlineStart:0},medium:{fontSize:t.mediumFontSize,paddingInlineEnd:`calc(${t.mediumSeparatorFontSize} * 2)`,paddingInlineStart:0},large:{fontSize:t.largeFontSize,paddingInlineEnd:`calc(${t.largeSeparatorFontSize} * 2)`,paddingInlineStart:0}},r={small:{fontSize:t.smallSeparatorFontSize,insetInlineEnd:`calc(${t.smallSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.smallSeparatorFontSize} / 2))`},medium:{fontSize:t.mediumSeparatorFontSize,insetInlineEnd:`calc(${t.mediumSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.mediumSeparatorFontSize} / 2))`},large:{fontSize:t.largeSeparatorFontSize,insetInlineEnd:`calc(${t.largeSeparatorFontSize} / 2)`,insetInlineStart:"auto",marginTop:`calc(-1 * (${t.largeSeparatorFontSize} / 2))`}};return{breadcrumb:{label:"breadcrumb",fontFamily:t.fontFamily,margin:0,padding:0,listStyleType:"none",overflow:"visible",display:"flex",alignItems:"center"},crumb:{label:"breadcrumb__crumb",boxSizing:"border-box",position:"relative",...i[n],"&:last-child":{paddingInlineEnd:0}},separator:{label:"breadcrumb__separator",boxSizing:"border-box",position:"absolute",top:"50%",color:t.separatorColor,...r[n]}}},wG=t=>{const e=t.colors,n=t.typography;return{...{fontFamily:n==null?void 0:n.fontFamily,separatorColor:e==null?void 0:e.borderDark,smallSeparatorFontSize:"0.5rem",smallFontSize:n==null?void 0:n.fontSizeSmall,mediumSeparatorFontSize:"0.75rem",mediumFontSize:n==null?void 0:n.fontSizeMedium,largeSeparatorFontSize:"1rem",largeFontSize:n==null?void 0:n.fontSizeLarge}}},_G={children:_t.oneOf([WM]),label:p.string.isRequired,size:p.oneOf(["small","medium","large"]),margin:pt.spacing},kG=["children","label","margin","size"];var RA,PA,Tg,Go;let xG=(RA=de(SG,wG),PA=Ne(),RA(Tg=PA(Tg=(Go=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props,n=e.styles,i=e.children,r=F.Children.count(i),s={maxWidth:`${Math.floor(100/r)}%`};return F.Children.map(i,(o,a)=>C("li",{css:n==null?void 0:n.crumb,style:s},o,a{const n=e.alignContent,i=e.size,r={top:{alignItems:"flex-start"},center:{alignItems:"center"}},s={display:"flex",background:t.background,margin:0,padding:0,fontFamily:t.fontFamily,...r[n]},o={color:t.color,margin:0,padding:0};return{byline:{label:"byline",...s,"&:is(figure)":s,"&:-webkit-any(figure)":s},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:t.figureMargin},caption:{label:"byline__caption",...o,"&:is(figcaption)":o,"&:-webkit-any(figcaption)":o},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:t.titleMargin,fontSize:t.titleFontSize,fontWeight:t.titleFontWeight,lineHeight:t.titleLineHeight},description:{label:"byline__description",fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,fontWeight:t.descriptionFontWeight},maxWidth:i&&t[i]}},CG=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.breakpoints,s=t.key,o={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,figureMargin:n==null?void 0:n.small,titleMargin:`0 0 ${n==null?void 0:n.xSmall} 0`,titleFontSize:i==null?void 0:i.fontSizeLarge,titleFontWeight:i==null?void 0:i.fontWeightNormal,titleLineHeight:i==null?void 0:i.lineHeightFit,descriptionFontSize:i==null?void 0:i.fontSizeMedium,descriptionFontWeight:i==null?void 0:i.fontWeightNormal,descriptionLineHeight:i==null?void 0:i.lineHeightCondensed,small:r==null?void 0:r.small,medium:r==null?void 0:r.medium,large:r==null?void 0:r.large},...o[s]}},TG={children:p.node.isRequired,title:p.node,description:p.oneOfType([p.string,p.node]),alignContent:p.oneOf(["top","center"]),margin:pt.spacing,size:p.oneOf(["small","medium","large"]),elementRef:p.func},AG=["alignContent","children","description","elementRef","margin","size","title"];var IA,$A,Sl;let RG=(IA=de(EG,CG),IA($A=(Sl=class ow extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e,n,i,r,s,o;const a=Oe.omitViewProps(De(this.props,ow.allowedProps),ow);return C(Oe,Object.assign({},a,{elementRef:this.handleRef,css:(e=this.props.styles)===null||e===void 0?void 0:e.byline,as:"figure",margin:this.props.margin,maxWidth:(n=this.props.styles)===null||n===void 0?void 0:n.maxWidth}),C("div",{css:(i=this.props.styles)===null||i===void 0?void 0:i.figure},this.props.children),C("figcaption",{css:(r=this.props.styles)===null||r===void 0?void 0:r.caption},this.props.title&&C("span",{css:(s=this.props.styles)===null||s===void 0?void 0:s.title},this.props.title),this.props.description&&C("div",{css:(o=this.props.styles)===null||o===void 0?void 0:o.description},this.props.description)))}},Sl.displayName="Byline",Sl.componentId="Byline",Sl.propTypes=TG,Sl.allowedProps=AG,Sl.defaultProps={alignContent:"center"},Sl))||$A);const PG=(t,e)=>{const n=e.vAlign,i=e.textAlign,r=e.rowSpacing,s=e.colSpacing,o=e.isLastRow,a=e.isLastCol,l=e.startAt,u=e.visualDebug,c={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}},d=()=>{const k={small:{paddingLeft:`calc(${t.spacingSmall} / 2)`,paddingRight:`calc(${t.spacingSmall} / 2)`},medium:{paddingLeft:`calc(${t.spacingMedium} / 2)`,paddingRight:`calc(${t.spacingMedium} / 2)`},large:{paddingLeft:`calc(${t.spacingLarge} / 2)`,paddingRight:`calc(${t.spacingLarge} / 2)`},none:{}},x={top:{alignSelf:"flex-start"},middle:{alignSelf:"center"},bottom:{alignSelf:"flex-end"},stretch:{alignSelf:"stretch"}},w={start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},inherit:{textAlign:"inherit"}};return{flexGrow:1,flexShrink:1,flexBasis:"0%",marginBottom:0,boxSizing:"border-box",...s&&k[s],...n&&x[n],...i&&w[i]}},h=()=>{const k=["small","medium","large","x-large",null];return k.slice(k.indexOf(l))},f=k=>h().includes(k),m=k=>{let x=e.width;if(x)return x&&typeof x=="object"&&(x=x[k==="x-large"?"xLarge":k]),x},b=k=>{let x=e.offset;if(x)return x&&typeof x=="object"&&(x=x[k==="x-large"?"xLarge":k]),x},y=(k="1")=>{switch(k){case"auto":return{flexGrow:0,flexShrink:0,flexBasis:"auto"};case 12:return{flex:"0 0 100%"};default:return{flexGrow:0,flexShrink:0,flexBasis:`calc(${k} / 12 * 99.999%)`,maxWidth:`calc(${k} / 12 * 99.999%)`}}},O=(k="1")=>{switch(k){case"auto":case 12:return{};default:return{marginInlineStart:`calc(${k} / 12 * 99.999%)`,marginInlineEnd:0}}},v=k=>l&&l===k?{...d()}:{},S=k=>{const x=m(k),w=b(k);return f(k)?{...x&&y(x),...w&&O(w)}:{}},_=k=>({...v(k),...S(k)});return{gridCol:{label:"gridCol",display:"block",boxSizing:"border-box",textAlign:"inherit",minWidth:"0.0625rem",...r&&c[r],...o&&a&&{marginBottom:0},..._("small"),[`@media screen and (${t.mediumMin})`]:{..._("medium")},[`@media screen and (${t.largeMin})`]:{..._("large")},[`@media screen and (${t.xLargeMin})`]:{..._("x-large")},...u&&{outline:"0.0625rem dashed red"}}}},IG=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},Ss=p.oneOfType([p.number,p.oneOf(["auto"])]),$G={children:p.node,colSpacing:p.oneOf(["none","small","medium","large"]),rowSpacing:p.oneOf(["none","small","medium","large"]),textAlign:p.oneOf(["start","end","center","inherit"]),hAlign:p.oneOf(["start","center","end","space-around","space-between"]),vAlign:p.oneOf(["top","middle","bottom","stretch"]),startAt:p.oneOf(["small","medium","large","x-large",null]),visualDebug:p.bool,width:p.oneOfType([Ss,p.shape({small:Ss,medium:Ss,large:Ss,xLarge:Ss})]),offset:p.oneOfType([Ss,p.shape({small:Ss,medium:Ss,large:Ss,xLarge:Ss})]),isLastRow:p.bool,isLastCol:p.bool,elementRef:p.func},DG=["children","colSpacing","rowSpacing","textAlign","hAlign","vAlign","startAt","visualDebug","width","offset","isLastRow","isLastCol","elementRef"];var DA,LA,wl;let yx=(DA=de(PG,IG),DA(LA=(wl=class XM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}widthCheck(){const e=this.props.width;let n=!1;e&&(typeof e=="number"&&e<=0&&(n=!0),typeof e=="object"&&Object.keys(e).forEach(i=>{typeof e[i]=="number"&&e[i]<=0&&(n=!0)})),n&&Be(!1,"Col width must be positive!")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.widthCheck()}render(){const e=this.props,n=e.children,i=e.styles,r=De(this.props,XM.allowedProps);return C("span",Object.assign({},r,{ref:this.handleRef,css:i==null?void 0:i.gridCol}),n)}},wl.displayName="GridCol",wl.componentId="Grid.Col",wl.propTypes=$G,wl.allowedProps=DG,wl.defaultProps={textAlign:"inherit",children:null,isLastCol:!1,isLastRow:!1},wl))||LA);const LG=(t,e)=>{const n=e.hAlign,i=e.vAlign,r=e.rowSpacing,s=e.colSpacing,o=e.isLastRow,a=e.startAt,l=e.visualDebug,u=()=>{const d={center:{justifyContent:"center"},start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},h={top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},f={small:{margin:`0 calc(-1 * ${t.spacingSmall} / 2)`},medium:{margin:`0 calc(-1 * ${t.spacingMedium} / 2)`},large:{margin:`0 calc(-1 * ${t.spacingLarge} / 2)`},none:{}},m={small:{marginBottom:t.spacingSmall},medium:{marginBottom:t.spacingMedium},large:{marginBottom:t.spacingLarge},none:{marginBottom:0}};return{display:"flex",flexFlow:"row nowrap",...n&&d[n],...i&&h[i],...s&&f[s],...r&&m[r],...o&&{marginBottom:0}}},c=d=>a&&a===d?{...u()}:{};return{gridRow:{label:"gridRow",display:"block",boxSizing:"border-box",...c("small"),[`@media screen and (${t.mediumMin})`]:{...c("medium")},[`@media screen and (${t.largeMin})`]:{...c("large")},[`@media screen and (${t.xLargeMin})`]:{...c("x-large")},...l&&{outline:"0.0625rem dashed blue"}}}},MG=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},NG={children:_t.oneOf([yx,cr]),rowSpacing:p.oneOf(["none","small","medium","large"]),colSpacing:p.oneOf(["none","small","medium","large"]),hAlign:p.oneOf(["start","center","end","space-around","space-between"]),vAlign:p.oneOf(["top","middle","bottom","stretch"]),startAt:p.oneOf(["small","medium","large","x-large",null]),visualDebug:p.bool,isLastRow:p.bool},BG=["children","rowSpacing","colSpacing","hAlign","vAlign","startAt","visualDebug","isLastRow"],QG=["styles","makeStyles"],zG=["styles"];var MA,NA,_l;let aw=(MA=de(LG,MG),MA(NA=(_l=class lw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Le(e,QG);return T.Children.map(this.props.children,(i,r)=>Qe(i,[yx])?Vt(i,{...Qo(n,lw.allowedProps),...i.props,isLastRow:n.isLastRow,isLastCol:r+1===T.Children.count(this.props.children)}):i)}render(){const e=this.props,n=e.styles,i=Le(e,zG),r=De(i,lw.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.gridRow,ref:this.handleRef}),this.renderChildren())}},_l.displayName="GridRow",_l.componentId="Grid.Row",_l.propTypes=NG,_l.allowedProps=BG,_l.defaultProps={children:null,isLastRow:!1},_l))||NA);const HG=(t,e)=>{const n=e.startAt,i=e.visualDebug,r=s=>n&&n===s?{boxSizing:"border-box"}:{};return{grid:{label:"grid",display:"block",...r("small"),[`@media screen and (${t.mediumMin})`]:{...r("medium")},[`@media screen and (${t.largeMin})`]:{...r("large")},[`@media screen and (${t.xLargeMin})`]:{...r("x-large")},...i&&{outline:"0.0625rem dashed red"}}}},UG=t=>{const e=t.spacing,n=t.media;return{...{spacingSmall:e==null?void 0:e.small,spacingMedium:e==null?void 0:e.medium,spacingLarge:e==null?void 0:e.large,...n}}},FG={children:_t.oneOf([aw,cr]),colSpacing:p.oneOf(["none","small","medium","large"]),rowSpacing:p.oneOf(["none","small","medium","large"]),hAlign:p.oneOf(["start","center","end","space-around","space-between"]),vAlign:p.oneOf(["top","middle","bottom","stretch"]),startAt:p.oneOf(["small","medium","large","x-large",null]),visualDebug:p.bool},VG=["children","colSpacing","rowSpacing","hAlign","vAlign","startAt","visualDebug"],WG=["styles","makeStyles"],jG=["styles"];var BA,QA,co;let pi=(BA=de(HG,UG),BA(QA=(co=class uw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){const e=this.props;e.styles,e.makeStyles;const n=Le(e,WG),i=T.Children.toArray(this.props.children);return i.map((r,s)=>Qe(r,[aw])?Vt(r,{...Qo(n,uw.allowedProps),...r.props,isLastRow:s+1===i.length}):r)}render(){const e=this.props,n=e.styles,i=Le(e,jG),r=De(i,uw.allowedProps);return C("span",Object.assign({},r,{css:n==null?void 0:n.grid,ref:this.handleRef}),this.renderChildren())}},co.displayName="Grid",co.componentId="Grid",co.propTypes=FG,co.allowedProps=VG,co.defaultProps={colSpacing:"medium",rowSpacing:"medium",hAlign:"start",startAt:"small",vAlign:"top",visualDebug:!1,children:null},co.Row=aw,co.Col=yx,co))||QA);const XG=(t,e)=>{const n=e.children,r={all:"initial",display:"block",...h1(n)&&{color:t.color,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,margin:0,textAlign:"inherit"}};return{formFieldLabel:{label:"formFieldLabel",...r,"&:is(label)":r,"&:-webkit-any(label)":r}}},ZG=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textDarkest,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightBold,fontSize:n==null?void 0:n.fontSizeMedium,lineHeight:n==null?void 0:n.lineHeightFit},...r[i]}},qG={children:p.node.isRequired,as:p.elementType},YG=["as","children"];var zA,HA,kl;let GG=(zA=de(XG,ZG),zA(HA=(kl=class cw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=Ei(cw,this.props),n=this.props,i=n.styles,r=n.children;return C(e,Object.assign({},De(this.props,cw.allowedProps),{css:i==null?void 0:i.formFieldLabel,ref:this.handleRef}),r)}},kl.displayName="FormFieldLabel",kl.componentId="FormFieldLabel",kl.propTypes=qG,kl.allowedProps=YG,kl.defaultProps={as:"span"},kl))||HA);const KG=(t,e)=>{const n=e.variant,i={hint:{color:t.colorHint},error:{color:t.colorError},success:{color:t.colorSuccess},"screenreader-only":{}};return{formFieldMessage:{label:"formFieldMessage",fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,lineHeight:t.lineHeight,display:"block",...i[n]}}},JG=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{colorHint:t["ic-brand-font-color-dark"]}};return{...{colorHint:e==null?void 0:e.textDarkest,colorError:e==null?void 0:e.textDanger,colorSuccess:e==null?void 0:e.textSuccess,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,fontSize:n==null?void 0:n.fontSizeSmall,lineHeight:n==null?void 0:n.lineHeight},...r[i]}},ZM=p.oneOf(["error","hint","success","screenreader-only"]),qM=p.node,zo={message:p.shape({type:ZM,text:qM})},eK={variant:ZM,children:qM},tK=["variant","children"];var UA,FA,xl;let nK=(UA=de(KG,JG),UA(FA=(xl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles;return this.props.variant!=="screenreader-only"?C("span",{css:i==null?void 0:i.formFieldMessage,ref:this.handleRef},n):C(cr,{elementRef:this.handleRef},n)}},xl.displayName="FormFieldMessage",xl.componentId="FormFieldMessage",xl.propTypes=eK,xl.allowedProps=tK,xl.defaultProps={variant:"hint"},xl))||FA);const iK=t=>({formFieldMessages:{label:"formFieldMessages",padding:0,display:"block",margin:`calc(-1 * ${t.topMargin}) 0 0 0`},message:{label:"formFieldMessages__message",display:"block"}}),rK=t=>{const e=t.spacing;return{...{topMargin:e==null?void 0:e.xxSmall}}},sK={messages:p.arrayOf(zo.message)},oK=["messages"];var VA,WA,El;let dw=(VA=de(iK,rK),VA(WA=(El=class YM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.messages,i=e.styles;return n&&n.length>0?C("span",Object.assign({css:i==null?void 0:i.formFieldMessages},De(this.props,YM.allowedProps),{ref:this.handleRef}),n.map((r,s)=>C("span",{key:`error${s}`,css:i==null?void 0:i.message},C(nK,{variant:r.type},r.text)))):null}},El.displayName="FormFieldMessages",El.componentId="FormFieldMessages",El.propTypes=sK,El.allowedProps=oK,El.defaultProps={},El))||WA);const aK=(t,e)=>({formFieldLayout:{label:"formFieldLayout",all:"initial",border:"0",padding:"0",margin:"0",minWidth:"0",direction:"inherit",textAlign:"start",opacity:"inherit",display:"block",width:"100%",...e.inline&&{display:"inline-block",verticalAlign:"middle",width:"auto"}}}),lK={label:p.node.isRequired,id:p.string,as:p.elementType,messages:p.arrayOf(zo.message),messagesId:p.string,children:p.node,inline:p.bool,layout:p.oneOf(["stacked","inline"]),labelAlign:p.oneOf(["start","end"]),vAlign:p.oneOf(["top","middle","bottom"]),width:p.string,inputContainerRef:p.func,elementRef:p.func},uK=["label","id","as","messages","messagesId","children","inline","layout","labelAlign","width","inputContainerRef","elementRef"],cK=["makeStyles","styles"];var jA,XA,Ag,Cl;let Fb=(jA=Kt(),XA=de(aK,null),jA(Ag=XA(Ag=(Cl=class hw extends T.Component{constructor(e){super(e),this._messagesId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleInputContainerRef=n=>{typeof this.props.inputContainerRef=="function"&&this.props.inputContainerRef(n)},this._messagesId=e.messagesId||e.deterministicId(),tt(typeof e.width<"u"||!e.inline||e.layout!=="inline",`[FormFieldLayout] The 'inline' prop is true, and the 'layout' is set to 'inline'. - This will cause a layout issue in Internet Explorer 11 unless you also add a value for the 'width' prop.`)}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get hasVisibleLabel(){return this.props.label&&h1(this.props.label)}get hasMessages(){return this.props.messages&&this.props.messages.length>0}get elementType(){return Ei(hw,this.props)}get inlineContainerAndLabel(){return this.props.inline&&this.props.layout==="inline"}renderLabel(){return this.hasVisibleLabel?C(pi.Col,{textAlign:this.props.labelAlign,width:this.inlineContainerAndLabel?"auto":3},C(GG,{"aria-hidden":this.elementType==="fieldset"?"true":void 0},this.props.label)):this.elementType!=="fieldset"?this.props.label:null}renderLegend(){return C(cr,{as:"legend"},this.props.label,this.hasMessages&&C(dw,{messages:this.props.messages}))}renderVisibleMessages(){return this.hasMessages?C(pi.Row,null,C(pi.Col,{offset:this.inlineContainerAndLabel?void 0:3,textAlign:this.inlineContainerAndLabel?"end":void 0},C(dw,{id:this._messagesId,messages:this.props.messages}))):null}render(){const e=this.elementType,n=this.props;n.makeStyles;const i=n.styles,r=Le(n,cK),s=r.width,o=r.layout,a=r.children;return C(e,Object.assign({},De(r,[...hw.allowedProps,...pi.allowedProps]),{css:i==null?void 0:i.formFieldLayout,style:{width:s},"aria-describedby":this.hasMessages?this._messagesId:void 0,ref:this.handleRef}),this.elementType==="fieldset"&&this.renderLegend(),C(pi,Object.assign({rowSpacing:"small",colSpacing:"small",startAt:o==="inline"&&this.hasVisibleLabel?"medium":null},Qo(r,pi.allowedProps)),C(pi.Row,null,this.renderLabel(),C(pi.Col,{width:this.inlineContainerAndLabel?"auto":void 0,elementRef:this.handleInputContainerRef},a)),this.renderVisibleMessages()))}},Cl.displayName="FormFieldLayout",Cl.componentId="FormFieldLayout",Cl.propTypes=lK,Cl.allowedProps=uK,Cl.defaultProps={inline:!1,layout:"stacked",as:"label",labelAlign:"end"},Cl))||Ag)||Ag);const dK={label:p.node.isRequired,id:p.string.isRequired,messages:p.arrayOf(zo.message),messagesId:p.string,children:p.node,inline:p.bool,layout:p.oneOf(["stacked","inline"]),labelAlign:p.oneOf(["start","end"]),vAlign:p.oneOf(["top","middle","bottom"]),width:p.string,inputContainerRef:p.func,elementRef:p.func},hK=["label","id","messages","messagesId","children","inline","layout","labelAlign","vAlign","width","inputContainerRef","elementRef"];class Ja extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return F.createElement(Fb,Object.assign({},De(this.props,Ja.allowedProps),Qo(this.props,Fb.allowedProps),{label:this.props.label,vAlign:this.props.vAlign,as:"label",htmlFor:this.props.id,elementRef:this.handleRef}))}}Ja.displayName="FormField";Ja.componentId="FormField";Ja.propTypes=dK;Ja.allowedProps=hK;Ja.defaultProps={inline:!1,layout:"stacked",labelAlign:"end",vAlign:"middle"};const fK=(t,e,n)=>{const i=e.disabled,r=n.invalid;return{formFieldGroup:{label:"formFieldGroup",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,display:"block",...r&&{borderColor:t.errorBorderColor,padding:t.errorFieldsPadding},...i&&{opacity:.6,cursor:"not-allowed",pointerEvents:"none"}}}},pK=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{borderWidth:e==null?void 0:e.widthSmall,borderStyle:e==null?void 0:e.style,borderColor:"transparent",borderRadius:e==null?void 0:e.radiusMedium,errorBorderColor:n==null?void 0:n.borderDanger,errorFieldsPadding:i==null?void 0:i.xSmall}}},mK={description:p.node.isRequired,as:p.elementType,messages:p.arrayOf(zo.message),messagesId:p.string,disabled:p.bool,children:p.node,layout:p.oneOf(["stacked","columns","inline"]),rowSpacing:p.oneOf(["none","small","medium","large"]),colSpacing:p.oneOf(["none","small","medium","large"]),vAlign:p.oneOf(["top","middle","bottom"]),startAt:p.oneOf(["small","medium","large","x-large",null]),elementRef:p.func},gK=["description","as","messages","messagesId","disabled","children","layout","rowSpacing","colSpacing","vAlign","startAt","elementRef"],bK=["styles","makeStyles"];var ZA,qA,Tl;let fw=(ZA=de(fK,pK),ZA(qA=(Tl=class GM extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{invalid:this.invalid}}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}renderColumns(){return T.Children.map(this.props.children,(e,n)=>e?C(pi.Col,{width:e.props&&e.props.width?"auto":void 0,key:n},e):null)}renderChildren(){return C(pi,{colSpacing:this.props.colSpacing,rowSpacing:this.props.rowSpacing,vAlign:this.props.vAlign,startAt:this.props.startAt||(this.props.layout==="columns"?"medium":null)},C(pi.Row,null,this.renderColumns()))}renderFields(){const e=this.props.styles;return C("span",{key:"fields",css:e==null?void 0:e.formFieldGroup},this.renderChildren())}render(){const e=this.props;e.styles,e.makeStyles;const n=Le(e,bK);return C(Fb,Object.assign({},De(n,GM.allowedProps),Qo(n,Fb.allowedProps),{vAlign:n.vAlign,layout:n.layout==="inline"?"inline":"stacked",label:n.description,"aria-disabled":n.disabled?"true":void 0,"aria-invalid":this.invalid?"true":void 0,elementRef:this.handleRef}),this.renderFields())}},Tl.displayName="FormFieldGroup",Tl.componentId="FormFieldGroup",Tl.propTypes=mK,Tl.allowedProps=gK,Tl.defaultProps={as:"fieldset",disabled:!1,rowSpacing:"medium",colSpacing:"small",vAlign:"middle"},Tl))||qA);const OK=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,s=e.hovered,o=e.indeterminate,a=i||o,l={small:{label:{fontSize:t.labelFontSizeSmall},facade:{fontSize:t.iconSizeSmall,width:t.facadeSizeSmall,height:t.facadeSizeSmall}},medium:{label:{fontSize:t.labelFontSizeMedium},facade:{fontSize:t.iconSizeMedium,width:t.facadeSizeMedium,height:t.facadeSizeMedium}},large:{label:{fontSize:t.labelFontSizeLarge},facade:{fontSize:t.iconSizeLarge,width:t.facadeSizeLarge,height:t.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:t.color,background:t.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${t.borderWidth} solid ${t.borderColor}`,borderRadius:t.borderRadius,marginInlineEnd:t.marginRight,marginInlineStart:"0",padding:t.padding,...l[n].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${t.borderRadius} * 1.5)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}},...a&&{background:t.checkedBackground,borderColor:t.checkedBorderColor},...s&&{borderColor:t.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...l[n].label,...a&&{color:t.checkedLabelColor}}}},yK=t=>{const e=t.colors,n=t.borders,i=t.spacing,r=t.typography,s=t.key,o={canvas:{focusBorderColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"],checkedLabelColor:t["ic-brand-font-color-dark"],checkedBackground:t["ic-brand-font-color-dark"],checkedBorderColor:t["ic-brand-font-color-dark"],hoverBorderColor:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,background:e==null?void 0:e.backgroundLightest,marginRight:i==null?void 0:i.xSmall,padding:i==null?void 0:i.xxxSmall,checkedBackground:e==null?void 0:e.backgroundDarkest,checkedBorderColor:e==null?void 0:e.borderDarkest,hoverBorderColor:e==null?void 0:e.borderDarkest,focusBorderColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,labelColor:e==null?void 0:e.textDarkest,checkedLabelColor:e==null?void 0:e.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:r==null?void 0:r.fontSizeSmall,labelFontSizeMedium:r==null?void 0:r.fontSizeMedium,labelFontSizeLarge:r==null?void 0:r.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...o[s]}},vK={children:p.node.isRequired,checked:p.bool,focused:p.bool,hovered:p.bool,size:p.oneOf(["small","medium","large"]),indeterminate:p.bool},SK=["children","checked","focused","hovered","size","indeterminate"];var YA,GA,Al,KA,JA;let wK=(YA=de(OK,yK),YA(GA=(Al=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){return this.props.indeterminate?KA||(KA=C(ae,{viewBox:"0 0 1920 1920",inline:!1},C("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?JA||(JA=C(uc,{inline:!1})):null}render(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.checkboxFacade,ref:this.handleRef},C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},this.renderIcon()),C("span",{css:i==null?void 0:i.label},n))}},Al.displayName="CheckboxFacade",Al.componentId="CheckboxFacade",Al.propTypes=vK,Al.allowedProps=SK,Al.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},Al))||GA);const _K=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,s=e.labelPlacement,o={start:{facade:{marginInlineEnd:"0",marginInlineStart:t.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:t.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:t.marginVertical},label:{display:"block"}}},a={small:{fontSize:t.labelFontSizeSmall},medium:{fontSize:t.labelFontSizeMedium},large:{fontSize:t.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",...s==="top"&&{display:"block"}},facade:{label:"toggleFacade__facade",background:t.background,borderColor:t.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${t.borderWidth} ${t.borderColor}`,height:t.toggleSize,width:`calc(${t.toggleSize} * 1.5)`,...o[s].facade,...i&&{background:t.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:t.borderRadius,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:t.toggleSize,width:t.toggleSize,...i&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:t.borderWidth,left:t.borderWidth,height:`calc(100% - (${t.borderWidth} * 2))`,width:`calc(100% - (${t.borderWidth} * 2))`,background:t.toggleBackground,boxShadow:t.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:t.uncheckedIconColor,position:"relative",zIndex:1,...i&&{color:t.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...a[n],...o[s].label}}},kK=t=>{const e=t.colors,n=t.borders,i=t.forms,r=t.shadows,s=t.spacing,o=t.typography,a=t.key,l={canvas:{focusOutlineColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:e==null?void 0:e.backgroundDarkest,borderColor:e==null?void 0:e.borderDarkest}};return{...{color:e==null?void 0:e.textLightest,background:e==null?void 0:e.backgroundLight,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderRadius:"4rem",marginEnd:s==null?void 0:s.small,marginStart:s==null?void 0:s.small,marginVertical:s==null?void 0:s.xSmall,checkedBackground:e==null?void 0:e.backgroundSuccess,uncheckedIconColor:e==null?void 0:e.textDarkest,checkedIconColor:e==null?void 0:e.textSuccess,focusOutlineColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,toggleBackground:e==null?void 0:e.backgroundLightest,toggleShadow:r==null?void 0:r.depth1,toggleSize:i==null?void 0:i.inputHeightSmall,labelColor:e==null?void 0:e.textDarkest,labelFontFamily:o==null?void 0:o.fontFamily,labelFontWeight:o==null?void 0:o.fontWeightNormal,labelLineHeight:o==null?void 0:o.lineHeightCondensed,labelFontSizeSmall:o==null?void 0:o.fontSizeSmall,labelFontSizeMedium:o==null?void 0:o.fontSizeMedium,labelFontSizeLarge:o==null?void 0:o.fontSizeLarge},...l[a]}},xK={children:p.node.isRequired,checked:p.bool,disabled:p.bool,readOnly:p.bool,focused:p.bool,size:p.oneOf(["small","medium","large"]),labelPlacement:p.oneOf(["top","start","end"])},EK=["children","checked","disabled","readOnly","focused","size","labelPlacement"];var eR,tR,Rl;let CK=(eR=de(_K,kK),eR(tR=(Rl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){const e=this.props,n=e.styles;return e.checked?C(cc,{css:n==null?void 0:n.iconSVG}):C(dc,{css:n==null?void 0:n.iconSVG})}renderLabel(){const e=this.props,n=e.children,i=e.styles;return C("span",{css:i==null?void 0:i.label},n)}render(){const e=this.props,n=e.labelPlacement,i=e.styles;return C("span",{css:i==null?void 0:i.toggleFacade,ref:this.handleRef},(n==="top"||n==="start")&&this.renderLabel(),C("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},C("span",{css:i==null?void 0:i.icon},C("span",{css:i==null?void 0:i.iconToggle},this.renderIcon()))),n==="end"&&this.renderLabel())}},Rl.displayName="ToggleFacade",Rl.componentId="ToggleFacade",Rl.propTypes=xK,Rl.allowedProps=EK,Rl.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},Rl))||tR);const TK=(t,e)=>{const n=e.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...e.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...n&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}},AK={label:p.node.isRequired,id:p.string,value:p.oneOfType([p.string,p.number]),messages:p.arrayOf(zo.message),defaultChecked:p.bool,checked:nc(p.bool,"onChange","defaultChecked"),onChange:p.func,onKeyDown:p.func,onFocus:p.func,onBlur:p.func,onMouseOver:p.func,onMouseOut:p.func,disabled:p.bool,readOnly:p.bool,indeterminate:p.bool,size:p.oneOf(["small","medium","large"]),variant:p.oneOf(["simple","toggle"]),inline:p.bool,labelPlacement:p.oneOf(["top","start","end"])},RK=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"];var nR,iR,rR,Dc,Pl;let PK=(nR=Kt(),iR=de(TK,null),rR=Ne(),nR(Dc=iR(Dc=rR(Dc=(Pl=class KM extends T.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=this.props,r=i.onChange,s=i.disabled,o=i.checked,a=i.readOnly;if(s||a){n.preventDefault();return}typeof o>"u"&&this.setState({checked:!this.state.checked}),typeof r=="function"&&r(n)},this.handleKeyDown=n=>{this.props.variant==="toggle"&&n.keyCode===Rr.codes.enter&&(this._input&&this._input.click(),n.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:typeof e.checked>"u"?!!e.defaultChecked:void 0},typeof e.checked>"u"&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;this._input&&(this._input.indeterminate=this.props.indeterminate),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i)}get id(){return this.props.id||this._defaultId}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}get focused(){return qs(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,n=e.size,i=e.disabled,r=e.variant,s=e.label,o=e.readOnly,a=e.indeterminate,l=e.labelPlacement,u=e.themeOverride,c=this.state,d=c.hovered,h=c.focused;return tt(!(r==="simple"&&l!=="end"),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),r==="toggle"?C(CK,{disabled:i,size:n,focused:h,checked:this.checked,readOnly:o,labelPlacement:l,themeOverride:u},s):C(wK,{size:n,hovered:d,focused:h,checked:this.checked,indeterminate:a,themeOverride:u},s)}renderMessages(){const e=this.props.messages;return e&&e.length>0?C(Oe,{display:"block",margin:"small 0 0"},C(dw,{messages:e})):null}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.value,s=e.onKeyDown,o=e.onFocus,a=e.onBlur,l=e.onMouseOver,u=e.onMouseOut,c=e.indeterminate,d=e.variant,h=e.styles,f=De(this.props,KM.allowedProps);return tt(!(d==="toggle"&&c),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),C("div",{css:h==null?void 0:h.checkbox,onMouseOver:ht(l,this.handleMouseOver),onMouseOut:ht(u,this.handleMouseOut),ref:this.handleRef},C("input",Object.assign({},f,{id:this.id,value:r,type:"checkbox",ref:m=>{this._input=m},disabled:n||i,"aria-checked":c?"mixed":void 0,css:h==null?void 0:h.input,onChange:this.handleChange,onKeyDown:ht(s,this.handleKeyDown),onFocus:ht(o,this.handleFocus),onBlur:ht(a,this.handleBlur),checked:this.checked})),C("label",{htmlFor:this.id,css:h==null?void 0:h.control},this.renderFacade(),this.renderMessages()))}},Pl.displayName="Checkbox",Pl.componentId="Checkbox",Pl.propTypes=AK,Pl.allowedProps=RK,Pl.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},Pl))||Dc)||Dc)||Dc);const IK="modulepreload",$K=function(t){return"/"+t},sR={},DK=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.all(n.map(a=>{if(a=$K(a),a in sR)return;sR[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":IK,l||(c.as="script",c.crossOrigin=""),c.href=a,o&&c.setAttribute("nonce",o),document.head.appendChild(c),l)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return r.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},LK=(t,e,n)=>{const i=e.size,r=e.textAlign,s=e.shouldNotWrap,o=n.disabled,a=n.invalid,l=n.focused,u=n.beforeElementHasWidth,c=n.afterElementHasWidth,d={small:{fontSize:t.smallFontSize,height:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.smallHeight} - (2 * ${t.borderWidth}))`},medium:{fontSize:t.mediumFontSize,height:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.mediumHeight} - (2 * ${t.borderWidth}))`},large:{fontSize:t.largeFontSize,height:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`,lineHeight:`calc(${t.largeHeight} - (2 * ${t.borderWidth}))`}},h=o?{cursor:"not-allowed",pointerEvents:"none",opacity:"0.5"}:{},f=l?{opacity:1,transform:"scale(1)"}:{opacity:0,transform:"scale(0.95)"},m=a?{borderColor:t.errorBorderColor}:{},b=a&&l?{borderColor:t.errorBorderColor}:{},y={all:"initial","&::-ms-clear":{display:"none"},WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",appearance:"none",margin:0,width:"100%",display:"block",boxSizing:"border-box",outline:"none",fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,padding:`0 ${t.padding}`,background:"transparent",border:"none",verticalAlign:"baseline",'&[autocomplete="off"]::-webkit-contacts-auto-fill-button':{display:"none !important"},"&:focus":{boxShadow:"initial"},"&::placeholder":{color:t.placeholderColor},...d[i],textAlign:r},O={boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",unicodeBidi:"isolate"},v={...O,display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row"},S={...O,flexShrink:0};return{textInput:{label:"textInput",...y,"&:is(input)[type]":y,"&:-webkit-any(input)[type]":y},facade:{label:"textInput__facade",position:"relative",display:"block",boxSizing:"border-box",border:`${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,borderRadius:t.borderRadius,background:t.background,color:t.color,"&::before":{content:'""',pointerEvents:"none",position:"absolute",display:"block",boxSizing:"border-box",top:"-0.25rem",bottom:"-0.25rem",left:"-0.25rem",right:"-0.25rem",border:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`,borderRadius:`calc(${t.borderRadius} * 1.5)`,transition:"all 0.2s",...f,...b},...h,...m},layout:{label:"textInput__layout",...v,...!s&&{flexWrap:"wrap"}},beforeElement:{label:"textInput__beforeElement",...S,paddingInlineStart:t.padding,...u===!1&&{paddingInlineStart:0}},innerWrapper:{label:"textInput__innerWrapper",...S,minWidth:"0.0625rem",flexShrink:1,flexGrow:1},inputLayout:{label:"textInput__inputLayout",...v},afterElement:{label:"textInput__afterElement",...S,paddingInlineEnd:t.padding,...c===!1&&{paddingInlineEnd:0}}}},MK=t=>{const e=t.colors,n=t.typography,i=t.borders,r=t.spacing,s=t.forms,o=t.key,a={canvas:{color:t["ic-brand-font-color-dark"],focusOutlineColor:t["ic-brand-primary"]}};return{...{fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,borderWidth:i==null?void 0:i.widthSmall,borderStyle:i==null?void 0:i.style,borderColor:e==null?void 0:e.borderMedium,borderRadius:i==null?void 0:i.radiusMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,padding:r==null?void 0:r.small,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style,focusOutlineColor:e==null?void 0:e.borderBrand,errorBorderColor:e==null?void 0:e.borderDanger,errorOutlineColor:e==null?void 0:e.borderDanger,placeholderColor:e==null?void 0:e.textDark,smallFontSize:n==null?void 0:n.fontSizeSmall,smallHeight:s==null?void 0:s.inputHeightSmall,mediumFontSize:n==null?void 0:n.fontSizeMedium,mediumHeight:s==null?void 0:s.inputHeightMedium,largeFontSize:n==null?void 0:n.fontSizeLarge,largeHeight:s==null?void 0:s.inputHeightLarge},...a[o]}},NK={renderLabel:p.oneOfType([p.node,p.func]),type:p.oneOf(["text","email","url","tel","search","password"]),id:p.string,value:nc(p.string),defaultValue:p.string,interaction:p.oneOf(["enabled","disabled","readonly"]),messages:p.arrayOf(zo.message),size:p.oneOf(["small","medium","large"]),textAlign:p.oneOf(["start","center"]),width:p.string,htmlSize:p.number,display:p.oneOf(["inline-block","block"]),shouldNotWrap:p.bool,placeholder:p.string,isRequired:p.bool,elementRef:p.func,inputRef:p.func,inputContainerRef:p.func,renderBeforeInput:p.oneOfType([p.node,p.func]),renderAfterInput:p.oneOfType([p.node,p.func]),onChange:p.func,onBlur:p.func,onFocus:p.func},BK=["renderLabel","type","id","value","defaultValue","interaction","messages","size","textAlign","width","htmlSize","display","shouldNotWrap","placeholder","isRequired","elementRef","inputRef","inputContainerRef","renderBeforeInput","renderAfterInput","onChange","onBlur","onFocus"],QK=["type","size","htmlSize","display","textAlign","placeholder","value","defaultValue","isRequired","onFocus"];var oR,aR,lR,Lc,Il;let vx=(oR=Kt(),aR=de(LK,MK),lR=Ne(),oR(Lc=aR(Lc=lR(Lc=(Il=class extends T.Component{constructor(e){super(e),this.ref=null,this._input=null,this._beforeElement=null,this._afterElement=null,this._defaultId=void 0,this._messagesId=void 0,this._focusListener=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.makeStyleProps=()=>{const n=this.interaction,i=this.state,r=i.hasFocus,s=i.beforeElementHasWidth,o=i.afterElementHasWidth;return{disabled:n==="disabled",invalid:this.invalid,focused:r,beforeElementHasWidth:s,afterElementHasWidth:o}},this.handleInputRef=n=>{this._input=n,typeof this.props.inputRef=="function"&&this.props.inputRef(n)},this.handleChange=n=>{typeof this.props.onChange=="function"&&this.props.onChange(n,n.target.value)},this.handleBlur=n=>{typeof this.props.onBlur=="function"&&this.props.onBlur(n),this.setState({hasFocus:!1})},this.handleFocus=n=>{typeof this.props.onFocus=="function"&&this.props.onFocus(n),this.setState({hasFocus:!0})},this.state={hasFocus:!1,beforeElementHasWidth:void 0,afterElementHasWidth:void 0},this._defaultId=e.deterministicId(),this._messagesId=e.deterministicId("TextInput-messages")}componentDidMount(){var e,n;this._input&&(this._focusListener=qr(this._input,"focus",this.handleFocus),this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement),afterElementHasWidth:this.getElementHasWidth(this._afterElement)})),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStyleProps())}componentWillUnmount(){this._focusListener&&this._focusListener.remove()}componentDidUpdate(e){var n,i;e.renderBeforeInput!==this.props.renderBeforeInput&&this.setState({beforeElementHasWidth:this.getElementHasWidth(this._beforeElement)}),e.renderAfterInput!==this.props.renderAfterInput&&this.setState({afterElementHasWidth:this.getElementHasWidth(this._afterElement)}),Co({props:e})!=="disabled"&&Co({props:this.props})==="disabled"&&this.setState({hasFocus:!1}),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStyleProps())}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get interaction(){return Co({props:this.props})}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get invalid(){return!!this.props.messages&&this.props.messages.findIndex(e=>e.type==="error")>=0}get focused(){return qs(this._input)}get value(){var e;return(e=this._input)===null||e===void 0?void 0:e.value}get id(){return this.props.id||this._defaultId}renderInput(){var e;const n=this.props,i=n.type;n.size;const r=n.htmlSize;n.display,n.textAlign;const s=n.placeholder,o=n.value,a=n.defaultValue,l=n.isRequired;n.onFocus;const u=Le(n,QK),c=Ft(u),d=this.interaction;let h="";return c["aria-describedby"]&&(h=`${c["aria-describedby"]}`),this.hasMessages&&(h=h!==""?`${h} ${this._messagesId}`:this._messagesId),C("input",Object.assign({},c,{css:(e=this.props.styles)===null||e===void 0?void 0:e.textInput,defaultValue:a,value:o,placeholder:s,ref:this.handleInputRef,type:i,id:this.id,required:l,"aria-invalid":this.invalid?"true":void 0,disabled:d==="disabled",readOnly:d==="readonly","aria-describedby":h!==""?h:void 0,size:r,onChange:this.handleChange,onBlur:this.handleBlur}))}getElementHasWidth(e){if(!e)return;const n=getComputedStyle(e),i=n.width,r=n.paddingInlineStart,s=n.paddingInlineEnd;return i==="auto"||i===""?!0:parseFloat(i)-parseFloat(r)-parseFloat(s)>0}render(){const e=this.props,n=e.width,i=e.display,r=e.renderLabel,s=e.renderBeforeInput,o=e.renderAfterInput,a=e.messages,l=e.inputContainerRef,u=e.styles,c=s?lt(s):null,d=o?lt(o):null,h=!!c||!!d;return C(Ja,{id:this.id,label:lt(r),messagesId:this._messagesId,messages:a,inline:i==="inline-block",width:n,inputContainerRef:l,layout:this.props.layout,elementRef:this.handleRef},C("span",{css:u==null?void 0:u.facade},h?C("div",null,C("span",{css:u==null?void 0:u.layout},c&&C("span",{css:u==null?void 0:u.beforeElement,ref:f=>{this._beforeElement=f}},c),C("span",{css:u==null?void 0:u.innerWrapper},C("span",{css:u==null?void 0:u.inputLayout},C("span",{css:u==null?void 0:u.innerWrapper},this.renderInput()),d&&C("span",{css:u==null?void 0:u.afterElement,ref:f=>{this._afterElement=f}},d))))):this.renderInput()))}},Il.displayName="TextInput",Il.componentId="TextInput",Il.allowedProps=BK,Il.propTypes=NK,Il.defaultProps={type:"text",interaction:void 0,isRequired:!1,display:"block",shouldNotWrap:!1,size:"medium",textAlign:"start",messages:[]},Il))||Lc)||Lc)||Lc);const zK=(t,e)=>{const n=e.size,i=e.wrap,r=e.weight,s=e.fontStyle,o=e.transform,a=e.lineHeight,l=e.letterSpacing,u=e.color,c={primary:{color:t.primaryColor},secondary:{color:t.secondaryColor},"primary-inverse":{color:t.primaryInverseColor},"secondary-inverse":{color:t.secondaryInverseColor},success:{color:t.successColor},brand:{color:t.brandColor},danger:{color:t.dangerColor},alert:{color:t.alertColor}},d={overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},h={normal:{fontWeight:t.fontWeightNormal},light:{fontWeight:t.fontWeightLight},bold:{fontWeight:t.fontWeightBold}},f={"x-small":t.fontSizeXSmall,small:t.fontSizeSmall,medium:t.fontSizeMedium,large:t.fontSizeLarge,"x-large":t.fontSizeXLarge,"xx-large":t.fontSizeXXLarge},m={default:{lineHeight:t.lineHeight},fit:{lineHeight:t.lineHeightFit},condensed:{lineHeight:t.lineHeightCondensed},double:{lineHeight:t.lineHeightDouble}},b={normal:t.letterSpacingNormal,condensed:t.letterSpacingCondensed,expanded:t.letterSpacingExpanded},y={"&:focus":{outline:"none"},...u?c[u]:{},...i==="break-word"?d:{},...r?h[r]:{},...s?{fontStyle:s}:{},fontSize:f[n],...a?m[a]:{},letterSpacing:b[l],...o?{textTransform:o}:{}},O={...y,outline:0,appearance:"none",boxSizing:"border-box",background:"none",border:"none",borderRadius:0,padding:0,margin:0,color:"inherit",height:"auto",width:"100%",lineHeight:"inherit",textAlign:"start",boxShadow:"none",display:"block"};return{text:{label:"text",fontFamily:t.fontFamily,...y,"&:is(input)[type]":O,"&:-webkit-any(input)[type]":O,"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.4em"},sub:{bottom:"-0.4em"},"pre, code":{all:"initial",fontFamily:t.fontFamilyMonospace},"i, em":{fontStyle:"italic"},"b, strong":{fontWeight:t.fontWeightBold},p:{display:"block",padding:0,margin:t.paragraphMargin}}}},HK=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,s={canvas:{primaryColor:t["ic-brand-font-color-dark"],brandColor:t["ic-brand-primary"]}};return{...{...n,primaryInverseColor:e==null?void 0:e.textLightest,primaryColor:e==null?void 0:e.textDarkest,secondaryColor:e==null?void 0:e.textDark,secondaryInverseColor:e==null?void 0:e.textLight,brandColor:e==null?void 0:e.textBrand,dangerColor:e==null?void 0:e.textDanger,successColor:e==null?void 0:e.textSuccess,alertColor:e==null?void 0:e.textAlert,warningColor:e==null?void 0:e.textWarning,paragraphMargin:`${i.medium} 0`},...s[r]}},UK={as:p.elementType,children:p.node,color:p.oneOf(["primary","secondary","brand","success","danger","alert","primary-inverse","secondary-inverse"]),elementRef:p.func,fontStyle:p.oneOf(["italic","normal"]),letterSpacing:p.oneOf(["normal","condensed","expanded"]),lineHeight:p.oneOf(["default","fit","condensed","double"]),size:p.oneOf(["x-small","small","medium","large","x-large","xx-large"]),transform:p.oneOf(["none","capitalize","uppercase","lowercase"]),weight:p.oneOf(["normal","light","bold"]),wrap:p.oneOf(["normal","break-word"])},FK=["as","children","color","elementRef","fontStyle","letterSpacing","lineHeight","size","transform","weight","wrap"];var uR,cR,$l;let nn=(uR=de(zK,HK),uR(cR=($l=class JM extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e;const n=this.props.children,i=Ei(JM,this.props);return C(i,Object.assign({},Ft(this.props),{css:(e=this.props.styles)===null||e===void 0?void 0:e.text,ref:this.props.elementRef}),n)}},$l.displayName="Text",$l.componentId="Text",$l.allowedProps=FK,$l.propTypes=UK,$l.defaultProps={as:"span",wrap:"normal",size:"medium",letterSpacing:"normal",children:null},$l))||cR);const VK=t=>({options:{label:"options",boxSizing:"border-box",wordWrap:"break-word"},list:{label:"options__list",listStyleType:"none",position:"relative"},label:{label:"options__label",color:t.labelColor,cursor:"default",display:"block",fontWeight:t.labelFontWeight,padding:t.nestedLabelPadding}}),eN=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{labelFontWeight:n==null?void 0:n.fontWeightBold,background:e==null?void 0:e.backgroundLightest,labelColor:e==null?void 0:e.textDarkest,labelPadding:`${i==null?void 0:i.xSmall} 0`,nestedLabelPadding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},WK=(t,e)=>{const n=e.variant,i=e.children,r=e.renderBeforeLabel,s=e.renderAfterLabel,o=e.beforeLabelContentVAlign,a=e.afterLabelContentVAlign,l=Qe(i,["Options"]),u={highlighted:{background:t.highlightedBackground,color:t.highlightedLabelColor},selected:{background:t.selectedBackground,color:t.highlightedLabelColor},disabled:{cursor:"not-allowed",opacity:.5},"highlighted-disabled":{background:t.highlightedBackground,color:t.highlightedLabelColor,cursor:"not-allowed",opacity:.5},default:{}},c=f=>{const m=f==="before"?o:a,b=f==="before"?t.beforeLabelContentVOffset:t.afterLabelContentVOffset;return{start:{alignItems:"flex-start",paddingBlockStart:b},center:{alignItems:"center",paddingBlockStart:b,paddingBlockEnd:b},end:{alignItems:"flex-end",paddingBlockEnd:b}}[m]},d={textDecoration:"none",color:"currentColor"},h="background 200ms";return{item:{label:"optionItem",background:t.background,color:t.color,cursor:"pointer",display:"block",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight,outline:"none",position:"relative",transition:h,userSelect:"none",...u[n],...l&&{cursor:"default"},"[class*=-optionItem] &":{...!r&&{"[class$=-optionItem__container]":{paddingInlineStart:t.nestedPadding},"[class$=-optionItem__content--before]":{insetInlineStart:t.nestedPadding}}}},container:{label:"optionItem__container",display:"block",outline:"none",padding:t.padding,...l&&{padding:"0"},...r&&{paddingInlineEnd:t.iconPadding,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},...s&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:t.iconPadding},...r&&s&&{paddingInlineEnd:`calc(${t.iconPadding} * 2 + 1em)`,paddingInlineStart:`calc(${t.iconPadding} * 2 + 1em)`},"&:is(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d},"&:-webkit-any(a)":{"&, &:link, &:visited, &:active, &:hover, &:focus":d}},content:{label:"optionItem__content",display:"flex",height:"100%",boxSizing:"border-box",pointerEvents:"none",position:"absolute",top:"0"},contentBefore:{label:"optionItem__content--before",insetInlineEnd:"auto",insetInlineStart:t.iconPadding,...c("before")},contentAfter:{label:"optionItem__content--after",insetInlineEnd:t.iconPadding,insetInlineStart:"auto",...c("after")},description:{label:"optionItem__description",display:"block",transition:h,paddingBlockStart:t.descriptionPaddingStart,fontWeight:t.descriptionFontWeight,fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,color:t.descriptionColor,...u[n],background:"none"}}},tN=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,s={canvas:{color:t["ic-brand-font-color-dark"],highlightedBackground:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,lineHeight:n==null?void 0:n.lineHeightCondensed,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,highlightedLabelColor:e==null?void 0:e.textLightest,highlightedBackground:e==null?void 0:e.backgroundBrand,selectedLabelColor:e==null?void 0:e.textLightest,selectedBackground:e==null?void 0:e.backgroundDark,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`,iconPadding:i==null?void 0:i.small,nestedPadding:i==null?void 0:i.small,beforeLabelContentVOffset:"0.625rem",afterLabelContentVOffset:"0.625rem",descriptionFontSize:n.fontSizeSmall,descriptionFontWeight:n.fontWeightNormal,descriptionLineHeight:n.lineHeight,descriptionPaddingStart:"0.25em",descriptionColor:e.textDark},...s[r]}},jK={as:p.elementType,variant:p.oneOf(["default","highlighted","selected","disabled","highlighted-disabled"]),role:p.string,renderBeforeLabel:p.oneOfType([p.node,p.func]),renderAfterLabel:p.oneOfType([p.node,p.func]),beforeLabelContentVAlign:p.oneOf(["start","center","end"]),afterLabelContentVAlign:p.oneOf(["start","center","end"]),description:p.oneOfType([p.node,p.func]),descriptionRole:p.string,href:p.string,voiceoverRoleBugWorkaround:p.bool,elementRef:p.func,children:p.oneOfType([p.node,p.func])},XK=["as","variant","role","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","voiceoverRoleBugWorkaround","href","elementRef","children"];var dR,hR,fR,Mc,Dl;let pR=(dR=Kt(),hR=de(WK,tN),fR=Ne(),dR(Mc=hR(Mc=fR(Mc=(Dl=class pw extends T.Component{constructor(e){super(e),this.ref=null,this._descriptionId=void 0,this._descriptionId=e.deterministicId("OptionsItem-description")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderContent(e,n){const i=this.props,r=i.styles,s=i.variant,o=i.as,a=i.role,l=i.children;return C("span",{css:[r==null?void 0:r.content,n],role:"presentation","aria-hidden":"true"},lt(e,{variant:s,as:o,role:a,children:l}))}render(){const e=this.props,n=e.as,i=e.href,r=e.role,s=e.styles,o=e.description,a=e.descriptionRole,l=e.renderBeforeLabel,u=e.renderAfterLabel,c=e.elementRef,d=e.children,h=e.voiceoverRoleBugWorkaround,f=Ei(pw,this.props,()=>n),m=i?"a":"span",b=De(this.props,pw.allowedProps),y=lt(d),O=lt(o),v=this.props["aria-describedby"]||(O?this._descriptionId:void 0);return C(f,{role:h?r:"none",css:s==null?void 0:s.item,ref:S=>{this.ref=S,typeof c=="function"&&c(S)},"aria-describedby":h?v:void 0},C(m,Object.assign({},b,{css:s==null?void 0:s.container,role:i||h?void 0:r,href:i,"aria-describedby":h?void 0:v}),y,O&&C("span",{css:s==null?void 0:s.description,role:a,id:this._descriptionId},O)),l&&this.renderContent(l,s==null?void 0:s.contentBefore),u&&this.renderContent(u,s==null?void 0:s.contentAfter))}},Dl.displayName="Item",Dl.componentId="Options.Item",Dl.allowedProps=XK,Dl.propTypes=jK,Dl.defaultProps={as:"span",variant:"default",role:"listitem",voiceoverRoleBugWorkaround:!1,beforeLabelContentVAlign:"center",afterLabelContentVAlign:"center"},Dl))||Mc)||Mc)||Mc);const ZK=t=>({separator:{label:"separator",height:t.height,margin:t.margin,overflow:"hidden",background:t.background}}),nN=t=>{const e=t.borders,n=t.colors,i=t.spacing;return{...{background:n==null?void 0:n.backgroundMedium,height:e==null?void 0:e.widthSmall,margin:`0 ${i==null?void 0:i.small}`}}},qK={as:p.elementType},YK=["as"],GK=["as","styles"];var mR,gR,Ll;let KK=(mR=de(ZK,nN),mR(gR=(Ll=class iN extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.as,i=e.styles,r=Le(e,GK),s=Ei(iN,this.props,()=>n);return C(s,{role:"none"},C("div",Object.assign({},De(r,["styles","makeStyles","themeOverride"]),{css:i==null?void 0:i.separator,role:"presentation"})))}},Ll.displayName="Separator",Ll.componentId="Options.Separator",Ll.allowedProps=YK,Ll.propTypes=qK,Ll.defaultProps={as:"span"},Ll))||gR);const JK={as:p.elementType,role:p.string,elementRef:p.func,renderLabel:p.oneOfType([p.node,p.func]),children:_t.oneOf(["Options","Item","Separator"])},eJ=["as","role","elementRef","renderLabel","children"];var bR,OR,yR,Nc,ho;let $i=(bR=Kt(),OR=de(VK,eN),yR=Ne(),bR(Nc=OR(Nc=yR(Nc=(ho=class mw extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n},this._labelId=this.props.deterministicId("Options-label")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get childAs(){const e=this.props.as;if(e==="ul"||e==="ol")return"li"}renderLabel(){const e=this.props,n=e.renderLabel,i=e.styles;return C("span",{id:this._labelId,role:"presentation","aria-hidden":"true",css:i==null?void 0:i.label},lt(n))}renderSubList(e){const n=this.props.styles;return C(pR,{as:this.childAs,role:"presentation",css:n==null?void 0:n.label},e)}renderChildren(){const e=this.props.children;return T.Children.map(e,n=>{if(Qe(n,["Options"]))return this.renderSubList(n);if(Qe(n,["Item","Separator"]))return Vt(n,{as:this.childAs||n.props.as})})}get ariaLabelledby(){if(this.props.renderLabel)return this._labelId;if(this.props["aria-labelledby"])return this.props["aria-labelledby"]}render(){const e=Oe.omitViewProps(De(this.props,mw.allowedProps),mw),n=this.props,i=n.as,r=n.role,s=n.renderLabel,o=n.elementRef,a=n.styles;return C("div",{css:a==null?void 0:a.options,role:"presentation",ref:this.handleRef},s&&this.renderLabel(),C(Oe,Object.assign({},e,{elementRef:o,css:a==null?void 0:a.list,as:i,role:r,display:"block",margin:"none",padding:"none",background:"primary","aria-labelledby":this.ariaLabelledby}),this.renderChildren()))}},ho.displayName="Options",ho.componentId="Options",ho.allowedProps=eJ,ho.propTypes=JK,ho.defaultProps={as:"span",role:"list",elementRef:()=>{},renderLabel:null,children:null},ho.Item=pR,ho.Separator=KK,ho))||Nc)||Nc)||Nc);const tJ={id:p.string,highlightedOptionId:p.string,selectedOptionId:p.oneOfType([p.string,p.array]),isShowingOptions:p.bool,onRequestShowOptions:p.func,onRequestHideOptions:p.func,onRequestHighlightOption:p.func,onRequestHighlightFirstOption:p.func,onRequestHighlightLastOption:p.func,onRequestSelectOption:p.func,children:p.func,render:p.func},nJ=["id","highlightedOptionId","selectedOptionId","isShowingOptions","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestHighlightFirstOption","onRequestHighlightLastOption","onRequestSelectOption","children","render"];var vR,SR,Bc;let rN=(vR=Kt(),vR(SR=(Bc=class extends T.Component{constructor(...e){super(...e),this._id=this.props.id||this.props.deterministicId(),this._listId=`${this._id}-list`,this._descriptionId=`${this._id}-description`,this._trigger=null,this.isSelectedOption=n=>{const i=this.props.selectedOptionId;return Array.isArray(i)?i.indexOf(n)>-1:i===n},this.handleOpenClose=n=>{const i=this.props,r=i.isShowingOptions,s=i.onRequestShowOptions,o=i.onRequestHideOptions;n.preventDefault(),r?o==null||o(n):(qs(this._trigger)||this._trigger.focus(),s==null||s(n))},this.handleKeyDown=n=>{const i=this.props,r=i.isShowingOptions,s=i.highlightedOptionId,o=i.onRequestHighlightOption,a=i.onRequestHighlightFirstOption,l=i.onRequestHighlightLastOption,u=i.onRequestSelectOption;switch(Rr.names[n.keyCode]){case"space":r||this.handleOpenClose(n);break;case"enter":s&&(n.preventDefault(),u==null||u(n,{id:s}));break;case"down":n.preventDefault(),r?o==null||o(n,{direction:1}):this.handleOpenClose(n);break;case"up":n.preventDefault(),r?o==null||o(n,{direction:-1}):this.handleOpenClose(n);break;case"home":r&&(n.preventDefault(),a==null||a(n));break;case"end":r&&(n.preventDefault(),l==null||l(n));break}},this.handleKeyUp=n=>{const i=this.props.isShowingOptions;Rr.names[n.keyCode]==="esc"&&i&&this.handleOpenClose(n)}}render(){const e=this.props,n=e.isShowingOptions,i=e.highlightedOptionId,r=e.onRequestHighlightOption,s=e.onRequestSelectOption,o=e.children,a=e.render,l=a===void 0?o:a;return typeof l=="function"?l({getRootProps:({onMouseDown:u,...c}={})=>({onMouseDown:ht(d=>{d.target!==this._trigger&&n&&d.preventDefault()},u),...c}),getLabelProps:u=>({htmlFor:this._id,...u}),getTriggerProps:({ref:u,onKeyDown:c,onKeyUp:d,onClick:h,...f}={})=>({id:this._id,ref:ht(u,m=>this._trigger=m),"aria-haspopup":"listbox","aria-expanded":n,"aria-owns":n?this._listId:void 0,"aria-controls":n?this._listId:void 0,"aria-describedby":this._descriptionId,"aria-activedescendant":n?i:void 0,onKeyDown:ht(this.handleKeyDown,c),onKeyUp:ht(this.handleKeyUp,d),onClick:ht(this.handleOpenClose,h),...f}),getInputProps:({readOnly:u,...c}={})=>({role:"combobox","aria-autocomplete":u?"none":"both",autoComplete:"off",readOnly:u,...c}),getListProps:({onMouseDown:u,onClick:c,...d}={})=>({id:this._listId,role:"listbox",onMouseDown:ht(h=>{h.preventDefault()},u),onClick:ht(h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation()},c),...d}),getOptionProps:({id:u,onMouseOver:c,onClick:d,...h}={})=>(tt(!!u,"[Selectable] Must provide id for each option via `getOptionProps`."),{id:u,role:"option","aria-selected":this.isSelectedOption(u)?"true":"false",onClick:ht(f=>{s==null||s(f,{id:u})},d),onMouseOver:ht(f=>{r==null||r(f,{id:u})},c),...h}),getDisabledOptionProps:u=>({"aria-disabled":"true",...u}),getDescriptionProps:u=>({id:this._descriptionId,...u})}):null}},Bc.displayName="Selectable",Bc.allowedProps=nJ,Bc.propTypes=tJ,Bc.defaultProps={isShowingOptions:!1},Bc))||SR);const iJ={id:p.string.isRequired,as:p.elementType},rJ=["id","as"];var wR,_R,Ml;let bd=(wR=de(null,nN),wR(_R=(Ml=class extends T.Component{render(){return null}},Ml.displayName="DrilldownSeparator",Ml.componentId="Drilldown.Separator",Ml.propTypes=iJ,Ml.allowedProps=rJ,Ml.defaultProps={},Ml))||_R);const sJ={id:p.string.isRequired,children:p.oneOfType([p.node,p.func]),subPageId:p.string,disabled:p.bool,selected:p.bool,value:p.oneOfType([p.number,p.string]),href:p.string,as:p.elementType,role:p.string,renderLabelInfo:p.oneOfType([p.node,p.func]),renderBeforeLabel:p.oneOfType([p.node,p.func]),renderAfterLabel:p.oneOfType([p.node,p.func]),beforeLabelContentVAlign:p.oneOf(["start","center","end"]),afterLabelContentVAlign:p.oneOf(["start","center","end"]),description:p.oneOfType([p.node,p.func]),descriptionRole:p.string,onOptionClick:p.func,defaultSelected:p.bool,elementRef:p.func,shouldCloseOnClick:p.oneOf(["auto","always","never"])},oJ=["id","children","subPageId","disabled","selected","value","href","as","role","renderLabelInfo","renderBeforeLabel","renderAfterLabel","beforeLabelContentVAlign","afterLabelContentVAlign","description","descriptionRole","onOptionClick","defaultSelected","elementRef","shouldCloseOnClick"];var kR,xR,Nl;let Wr=(kR=de(null,tN),kR(xR=(Nl=class extends T.Component{render(){return null}},Nl.displayName="DrilldownOption",Nl.componentId="Drilldown.Option",Nl.propTypes=sJ,Nl.allowedProps=oJ,Nl.defaultProps={disabled:!1,beforeLabelContentVAlign:"start",afterLabelContentVAlign:"start",as:"li",role:"menuitem",shouldCloseOnClick:"auto"},Nl))||xR);const aJ={id:p.string.isRequired,children:_t.oneOf([Wr,bd]),renderGroupTitle:p.oneOfType([p.node,p.func]),withoutSeparators:p.bool,disabled:p.bool,role:p.string,as:p.elementType,elementRef:p.func,selectableType:p.oneOf(["single","multiple"]),defaultSelected:p.array,onSelect:p.func},lJ=["id","children","renderGroupTitle","withoutSeparators","disabled","role","as","elementRef","selectableType","defaultSelected","onSelect"];var ER,CR,Bl;let U0=(ER=de(null,eN),ER(CR=(Bl=class extends T.Component{render(){return null}},Bl.displayName="DrilldownGroup",Bl.componentId="Drilldown.Group",Bl.propTypes=aJ,Bl.allowedProps=lJ,Bl.defaultProps={disabled:!1,withoutSeparators:!1,role:"group"},Bl))||CR);const uJ={id:p.string.isRequired,children:_t.oneOf([Wr,bd,U0]),renderTitle:p.oneOfType([p.node,p.func]),renderActionLabel:p.oneOfType([p.node,p.func]),renderBackButtonLabel:p.oneOfType([p.node,p.func]),onHeaderActionClicked:p.func,onBackButtonClicked:p.func,withoutHeaderSeparator:p.bool,disabled:p.bool},cJ=["id","children","renderTitle","renderActionLabel","renderBackButtonLabel","onHeaderActionClicked","onBackButtonClicked","withoutHeaderSeparator","disabled"];class hc extends T.Component{render(){return null}}hc.displayName="DrilldownPage";hc.componentId="Drilldown.Page";hc.propTypes=uJ;hc.allowedProps=cJ;hc.defaultProps={renderBackButtonLabel:"Back",disabled:!1,withoutHeaderSeparator:!1};const dJ=(t,e,n)=>({drilldown:{label:"drilldown",overflow:"visible",...n.hasHighlightedOption&&{"&:focus::before":{display:"none"}}},container:{label:"drilldown__container"},headerBack:{label:"drilldown__headerBack",minHeight:"1.25em"},headerTitle:{label:"drilldown__headerTitle",fontWeight:t.headerTitleFontWeight},optionContainer:{label:"drilldown__optionContainer",alignItems:"center",display:"flex",height:"100%"},optionLabelInfo:{label:"drilldown__optionLabelInfo",display:"flex",flexShrink:0,height:"100%",alignItems:"center",paddingInlineStart:t.labelInfoPadding},optionContent:{label:"drilldown__optionContent",flexGrow:1},headerActionColor:t.headerActionColor}),hJ=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{headerTitleFontWeight:n.fontWeightBold,headerActionColor:e.textLink,labelInfoPadding:i==null?void 0:i.small}}},fJ={rootPageId:p.string.isRequired,children:_t.oneOf([hc]),id:p.string,label:p.string,disabled:p.bool,rotateFocus:p.bool,as:p.elementType,role:p.string,elementRef:p.func,drilldownRef:p.func,overflowX:p.oneOf(["auto","hidden","visible"]),overflowY:p.oneOf(["auto","hidden","visible"]),height:p.oneOfType([p.string,p.number]),width:p.oneOfType([p.string,p.number]),minHeight:p.oneOfType([p.string,p.number]),minWidth:p.oneOfType([p.string,p.number]),maxHeight:p.oneOfType([p.string,p.number]),maxWidth:p.oneOfType([p.string,p.number]),trigger:p.node,placement:hn.placement,defaultShow:p.bool,show:nc(p.bool,"onToggle","defaultShow"),onToggle:p.func,onSelect:p.func,onDismiss:p.func,onFocus:p.func,onMouseOver:p.func,popoverRef:p.func,mountNode:hn.mountNode,positionTarget:hn.mountNode,positionContainerDisplay:p.oneOf(["inline-block","block"]),constrain:hn.constrain,shouldHideOnSelect:p.bool,shouldContainFocus:p.bool,shouldReturnFocus:p.bool,withArrow:p.bool,offsetX:p.oneOfType([p.string,p.number]),offsetY:p.oneOfType([p.string,p.number])},pJ=["rootPageId","children","id","label","disabled","rotateFocus","as","role","overflowX","overflowY","height","width","minHeight","minWidth","maxHeight","maxWidth","trigger","placement","defaultShow","show","onToggle","onSelect","onDismiss","onFocus","onMouseOver","elementRef","drilldownRef","popoverRef","mountNode","positionTarget","positionContainerDisplay","constrain","shouldHideOnSelect","shouldContainFocus","shouldReturnFocus","withArrow","offsetX","offsetY"],mJ=["groupProps"],gJ=["groupProps"],bJ=["id","themeOverride"];var TR,AR,RR,Qc,Fr,PR,IR,$R,DR;let si=(TR=Kt(),AR=de(dJ,hJ),RR=Ne(),TR(Qc=AR(Qc=RR(Qc=(Fr=class extends T.Component{constructor(e){super(e),this._drilldownRef=null,this._popover=null,this._trigger=null,this._containerElement=null,this._id=void 0,this._triggerId=void 0,this._headerBackId=void 0,this._headerTitleId=void 0,this._headerTitleLabelId=void 0,this._headerActionId=void 0,this._pageHistory=void 0,this._activeOptionsMap={},this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleDrilldownRef=n=>{const i=this.props.drilldownRef;this._drilldownRef=n,typeof i=="function"&&i(n),this.props.trigger||this.handleRef(n)},this.show=n=>{this._popover&&(this._popover.show(n),this.setState({isShowingPopover:!0}))},this.hide=n=>{this._popover&&(this._popover.hide(n),this.setState({isShowingPopover:!1}),this.reset())},this.handleOptionHighlight=(n,{id:i,direction:r})=>{const s=this.props.rotateFocus,o=this.state.highlightedOptionId;let a=this.getPageChildById(i)?i:void 0;if(!a){if(!o)a=this.activeOptionIds[0];else if(r){const l=this.activeOptionIds.indexOf(o),u=l+r;if(a=l>-1?this.activeOptionIds[u]:void 0,s){const c=this.activeOptionIds.length-1;u<0&&(a=this.activeOptionIds[c]),u>c&&(a=this.activeOptionIds[0])}}}a&&this.setState({highlightedOptionId:a},()=>{this.focusOption(a)})},this.goToPage=n=>{var i;if(!n){Be(!1,"Cannot go to page because there was no page id provided.");return}if(typeof n!="string"){Be(!1,`Cannot go to page because parameter newPageId has to be string (valid page id). Current newPageId is "${typeof n}".`);return}if(!((i=this.pageMap)!==null&&i!==void 0&&i[n])){Be(!1,`Cannot go to page because page with id: "${n}" doesn't exist.`);return}const r=this._pageHistory[this._pageHistory.length-1],s=this._pageHistory.indexOf(n);return s<0?this._pageHistory.push(n):this._pageHistory.splice(s+1,this._pageHistory.length-1),this.setState({activePageId:n,highlightedOptionId:void 0}),{prevPageId:r,newPageId:n}},this.goToPreviousPage=()=>{if(!this.previousPage){Be(!1,`There is no previous page to go to. The current page history is: [${this._pageHistory.join(", ")}].`);return}const n=this.goToPage(this.previousPage.id),i=n.newPageId,r=n.prevPageId;return{newPageId:i,prevPageId:r}},this.handleBackButtonClick=()=>{const n=this.currentPage,i=n.onBackButtonClicked,r=this.goToPreviousPage(),s=r.newPageId,o=r.prevPageId;typeof i=="function"&&i(s,o)},this.handleOptionSelect=(n,{id:i})=>{const r=this.getPageChildById(i);if(n.persist(),!i||!r||r.props.disabled||n.target.getAttribute("disabled")||n.target.getAttribute("aria-disabled")){n.preventDefault(),n.stopPropagation();return}const s=this.props,o=s.shouldHideOnSelect,a=s.onSelect,l=r.groupProps,u=Le(r,mJ),c=u.props,d=c.subPageId,h=c.href,f=c.value,m=c.onOptionClick;if(typeof m=="function"&&m(n,{optionId:i,drilldown:this,...this.exposedNavigationProps}),d&&this.goToPage(d),n.type==="keydown"&&h){var b;const y=(b=this._drilldownRef)===null||b===void 0?void 0:b.querySelector(`#${i}`);y.tagName.toLowerCase()==="a"&&y!==null&&y!==void 0&&y.href&&y.click()}l!=null&&l.selectableType?this.handleGroupOptionSelected(n,r):typeof a=="function"&&a(n,{value:f,isSelected:!0,selectedOption:u,drilldown:this}),o&&!d&&i!==this._headerBackId&&this.hide(n)},this.handleKeyDown=n=>{const i=n.target.id,r=this.getPageChildById(i);if([" ","space","Space"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),r&&this.handleOptionSelect(n,{id:i})),n.key==="ArrowRight"&&r!=null&&r.props.subPageId&&this.handleOptionSelect(n,{id:i}),n.key==="ArrowLeft"){var s;this._pageHistory.length>1&&this.handleBackButtonClick(),this.isOnRootPage&&(s=this._popover)!==null&&s!==void 0&&s.shown&&this._popover.hide(n)}},this.handleToggle=(n,i)=>{const r=this.props.onToggle;this.setState({isShowingPopover:i}),typeof r=="function"&&r(n,{shown:i,drilldown:this,...this.exposedNavigationProps})},this.state={isShowingPopover:e.trigger?!!e.show:!1,activePageId:e.rootPageId,highlightedOptionId:void 0,lastSelectedId:void 0,selectedGroupOptionsMap:this.setDefaultSelected()},this._pageHistory=[e.rootPageId],this._id=e.id||e.deterministicId(),this._triggerId=e.deterministicId("Drilldown-Trigger"),this._headerBackId=e.deterministicId("DrilldownHeader-Back"),this._headerTitleId=e.deterministicId("DrilldownHeader-Title"),this._headerTitleLabelId=e.deterministicId("DrilldownHeader-Title-Label"),this._headerActionId=e.deterministicId("DrilldownHeader-Action")}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e,n){var i,r;(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r,this.makeStylesVariables),n.activePageId!==this.state.activePageId&&setTimeout(()=>{this.focused()||this.focus()},0),this.currentPage||(this.previousPage?this.goToPreviousPage():this.goToPage(this.props.rootPageId)),this.state.highlightedOptionId&&!this.getPageChildById(this.state.highlightedOptionId)&&this.setState({highlightedOptionId:void 0})}get makeStylesVariables(){return{hasHighlightedOption:!!this.state.highlightedOptionId}}get activeOptionIds(){return Object.keys(this._activeOptionsMap)}get activeOptions(){return Object.values(this._activeOptionsMap)}get pages(){const e=this.props.children;return F.Children.toArray(e||[])}get pageMap(){if(!this.props.children)return;const n={};return this.pages.forEach(i=>{const r=i.props,s=r.children;n[r.id]={...r,children:F.Children.toArray(s||[])}}),n}get isOnRootPage(){return this.state.activePageId===this.props.rootPageId}get currentPage(){return this.getPageById(this.state.activePageId)}get previousPage(){const e=this._pageHistory[this._pageHistory.length-2];return this.getPageById(e)}get exposedNavigationProps(){const e=this.goToPage,n=this.goToPreviousPage;return{pageHistory:[...this._pageHistory],goToPage:e,goToPreviousPage:n}}get currentPageAriaLabel(){var e;if(this.props["aria-labelledby"])return this.props["aria-labelledby"];if((e=this.currentPage)!==null&&e!==void 0&&e.renderTitle)return this._headerTitleLabelId;if(this.isOnRootPage&&this.props.trigger)return this._triggerId}getChildrenArray(e){return e?Array.isArray(e)?e:[e]:[]}getPageById(e){return this.pageMap&&e?this.pageMap[e]:void 0}getPageChildById(e){return e?this._activeOptionsMap[e]:void 0}setDefaultSelected(){const e={};return this.pages.forEach(n=>{const i=n.props.children;this.getChildrenArray(i).forEach(r=>{if(Qe(r,[U0])){var s;const o=r.props,a=o.id,l=o.selectableType,u=o.defaultSelected,c=u===void 0?[]:u,d=o.children;if(!l)return;if(l&&!e[a]&&(e[a]=new Map),l==="single"&&c.length>1){tt(!1,`Radio type selectable groups can have only one item selected! Group with id "${a}" cannot select multiple items: [${c.join(", ")}]!`);return}e[a]=new Map,(s=this.getChildrenArray(d))===null||s===void 0||s.forEach(h=>{if(Qe(h,[Wr])){const f=h.props,m=f.id,b=f.value,y=f.defaultSelected;if(y===!1)return;const O=typeof b<"u"&&c.filter(v=>typeof v<"u").includes(b);(y||O)&&e[a].set(m,b)}})}})}),e}get selectedGroupOptionIdsArray(){return Object.values(this.state.selectedGroupOptionsMap).map(e=>Array.from(e.keys())).flat()}get headerChildren(){const e=this.currentPage,n=this.props,i=n.styles,r=n.deterministicId,s=[];if(!e)return s;const o=e.children,a=e.renderBackButtonLabel,l=e.renderTitle,u=e.renderActionLabel,c=e.onHeaderActionClicked,d=e.withoutHeaderSeparator;if(this.previousPage){const h=lt(this.previousPage.renderTitle),f=lt(a,h);s.push(C(Wr,{id:this._headerBackId,onOptionClick:this.handleBackButtonClick},C("div",{css:i==null?void 0:i.headerBack,role:"presentation"},f)))}if(l){const h=lt(l);h&&s.push(C(Wr,{id:this._headerTitleId,role:"presentation","aria-hidden":"true"},C("div",{css:i==null?void 0:i.headerTitle,id:this._headerTitleLabelId},h)))}if(u){const h=lt(u);h&&s.push(C(Wr,{id:this._headerActionId,themeOverride:{color:i==null?void 0:i.headerActionColor},onOptionClick:f=>{typeof c=="function"&&c(f)}},h))}return s.length>0&&o.length>0&&!d&&s.push(C(bd,{id:r("DrilldownHeader-Separator")})),s}get shown(){return this.props.trigger?this.state.isShowingPopover:!0}containsDuplicateChild(e){let n=!1;const i=new Map;for(const r of e)if(!i.has(r.props.id))i.set(r.props.id,!0);else return Be(!1,`Duplicate id: "${r.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`),n=!0;return n}reset(){this._activeOptionsMap={},this.setState({highlightedOptionId:void 0})}focus(){if(this.shown){var e,n;tt(!!((e=this._drilldownRef)!==null&&e!==void 0&&e.focus),"[Drilldown] Could not focus the drilldown."),(n=this._drilldownRef)===null||n===void 0||n.focus()}else{var i;tt(!!((i=this._trigger)!==null&&i!==void 0&&i.focus),"[Drilldown] Could not focus the trigger."),this._trigger.focus()}}focused(){return this.shown?Du(this._drilldownRef):Du(this._trigger)}focusOption(e){const n=this._containerElement,i=n==null?void 0:n.querySelector(`[id="${e}"]`);i==null||i.focus()}handleGroupOptionSelected(e,n){this.setState(i=>{var r;const s=n.props,o=s.id,a=s.value,l=n.groupProps,u=l.id,c=l.selectableType;let d=new Map(i.selectedGroupOptionsMap[u]);return c==="multiple"&&(!((r=i.selectedGroupOptionsMap[u])===null||r===void 0)&&r.has(o))?d.delete(o):c==="multiple"?d.set(o,a):c==="single"&&(d=new Map,d.set(o,a)),{...i,selectedGroupOptionsMap:{...i.selectedGroupOptionsMap,[u]:d}}},()=>{const i=n.props.value,r=n.groupProps,s=r.id,o=r.onSelect,a=this.props.onSelect;n.groupProps;const l=Le(n,gJ),u=[...this.state.selectedGroupOptionsMap[s].values()];typeof o=="function"&&o(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this}),typeof a=="function"&&a(e,{value:u,isSelected:u.includes(i),selectedOption:l,drilldown:this})})}renderList(e,n){const i=this.currentPage,r=this.headerChildren;if(!i||this.containsDuplicateChild(i.children))return null;const s=[...r,...i.children];let o=!1;return s.map((a,l)=>{if(Qe(a,[U0])){const u=l===0,c=l===s.length-1,d=o,h=!a.props.withoutSeparators&&!u&&!d,f=!a.props.withoutSeparators&&!c;return o=f,this.renderGroup(a,e,n,h,f)}else return Qe(a,[bd])?o?null:(o=!0,this.renderSeparator(a)):Qe(a,[Wr])?(o=!1,this.renderOption(a,e,n)):null})}renderSeparator(e){const n=e.props,i=n.id,r=n.themeOverride,s=Le(n,bJ);return C($i.Separator,Object.assign({},s,{id:i,key:i,role:"separator",themeOverride:r}))}renderOption(e,n,i,r){var s,o,a,l,u;const c=this.props.styles;let d=!1;const h=e.props,f=h.id,m=h.children,b=h.href,y=h.as,O=h.role,v=h.subPageId,S=h.disabled,_=h.renderLabelInfo,k=h.renderBeforeLabel,x=h.renderAfterLabel,w=h.beforeLabelContentVAlign,M=h.afterLabelContentVAlign,H=h.description,I=h.descriptionRole,z=h.elementRef,U=h.themeOverride;if(!f)return Be(!1,"Drilldown.Option without id won't be rendered. It is needed to internally track the options."),null;let X={...De(e.props,[...Wr.allowedProps,...$i.Item.allowedProps]),...n({id:f,...O&&!["gridcell","option","row","tab","columnheader","rowheader","treeitem"].includes(O)&&{"aria-selected":void 0}}),themeOverride:U,renderBeforeLabel:k,renderAfterLabel:x,beforeLabelContentVAlign:w,afterLabelContentVAlign:M,description:H,descriptionRole:I,as:y,role:O,elementRef:z,variant:"default",tabIndex:-1};const J={groupProps:r},re=f!==this._headerBackId&&(this.props.disabled||((s=this.currentPage)===null||s===void 0?void 0:s.disabled)||(r==null?void 0:r.disabled)||S);re&&(X.variant="disabled",X={...X,...i()}),f!==this._headerTitleId&&(this._activeOptionsMap[f]={...e,...J});const Z=O!==Wr.defaultProps.role?O:void 0;v&&(X.renderAfterLabel=PR||(PR=C(Ka,null)),X["aria-haspopup"]=!0,X.role=Z||"button",Be(!x,`The prop "renderAfterLabel" is reserved on item with id: "${f}". When it has "subPageId" provided, a navigation arrow will render after the label.`)),f===this._headerBackId&&(X.renderBeforeLabel=IR||(IR=C(Mh,null)));const ne=typeof e.props.selected=="boolean";if((r!=null&&r.selectableType||ne)&&r){if(ne)d=!!e.props.selected;else{var ee;d=!!(!((ee=this.state.selectedGroupOptionsMap[r.id])===null||ee===void 0)&&ee.has(f))}X["aria-checked"]=d,X.renderBeforeLabel=C(cc,{style:{opacity:d?1:0}}),Be(!k,`The prop "renderBeforeLabel" is reserved on item with id: "${f}". When this option is a selectable member of a Drilldown.Group, selection indicator will render before the label.`),r.selectableType==="single"&&(X.role=Z||"menuitemradio"),r.selectableType==="multiple"&&(X.role=Z||"menuitemcheckbox")}f===this.state.highlightedOptionId&&(X.variant="highlighted",re&&(X.variant="highlighted-disabled")),b&&(v?Be(!1,`Drilldown.Option with id "${f}" has subPageId, so it will ignore the "href" property.`):r!=null&&r.selectableType?Be(!1,`Drilldown.Option with id "${f}" is in a selectable group, so it will ignore the "href" property.`):X.href=b);const fe=lt(m,{id:f,variant:X.variant,isSelected:d});if(!fe)return Be(!1,`There are no "children" prop provided for option with id: "${f}", so it won't be rendered.`),null;const P={variant:X.variant,vAlign:M,as:y,role:X.role,isSelected:d};typeof X.renderBeforeLabel=="function"&&!((o=X.renderBeforeLabel)!==null&&o!==void 0&&(a=o.prototype)!==null&&a!==void 0&&a.isReactComponent)&&(X.renderBeforeLabel=X.renderBeforeLabel.bind(null,P)),typeof X.renderAfterLabel=="function"&&!((l=X.renderAfterLabel)!==null&&l!==void 0&&(u=l.prototype)!==null&&u!==void 0&&u.isReactComponent)&&(X.renderAfterLabel=X.renderAfterLabel.bind(null,P));const Ae=_&<(_,P),_e={start:"flex-start",center:"center",end:"flex-end"},$=`${f}__label`,$e=`${f}__info`,Fe=e.props["aria-labelledby"]||$,Xe=e.props["aria-describedby"]||(Ae?$e:void 0);return C($i.Item,Object.assign({},X,{key:f,"aria-labelledby":Fe,"aria-describedby":Xe}),C("div",{css:c==null?void 0:c.optionContainer,role:"none"},C("span",{css:c==null?void 0:c.optionContent,role:"none",id:$},fe),Ae?C("span",{css:c==null?void 0:c.optionLabelInfo,role:"presentation",style:{alignSelf:_e[M]}},C("span",{id:$e},Ae)):null))}renderGroup(e,n,i,r,s){const o=e.props,a=o.id,l=o.children,u=o.renderGroupTitle,c=o.themeOverride,d=o.role,h=o.as,f=o.elementRef;if(!l)return null;const m=[];return r&&m.push($R||($R=C($i.Separator,null))),m.push(C($i,{id:a,key:a,role:d,as:h||this.props.as,renderLabel:u,elementRef:f,themeOverride:c},this.getChildrenArray(l).map(b=>Qe(b,[bd])?this.renderSeparator(b):Qe(b,[Wr])?this.renderOption(b,n,i,e.props):null))),s&&m.push(DR||(DR=C($i.Separator,null))),m}renderPage(){const e=this.props,n=e.styles,i=e.overflowY,r=e.overflowX,s=e.height,o=e.width,a=e.minHeight,l=e.minWidth,u=e.maxHeight,c=e.maxWidth,d=e.role,h=e.as,f=e.label;return this.currentPage?C(rN,{isShowingOptions:this.shown,highlightedOptionId:this.state.highlightedOptionId,selectedOptionId:this.selectedGroupOptionIdsArray,onRequestShowOptions:this.show,onRequestHideOptions:this.hide,onRequestSelectOption:this.handleOptionSelect,onRequestHighlightOption:this.handleOptionHighlight,onRequestHighlightFirstOption:m=>{const b=this.activeOptionIds[0];this.handleOptionHighlight(m,{id:b})},onRequestHighlightLastOption:m=>{const b=this.activeOptionIds[this.activeOptionIds.length-1];this.handleOptionHighlight(m,{id:b})}},({getTriggerProps:m,getListProps:b,getOptionProps:y,getDisabledOptionProps:O})=>C(Oe,Object.assign({as:"div",elementRef:this.handleDrilldownRef,tabIndex:0,css:n==null?void 0:n.drilldown,position:"relative",borderRadius:"small",width:o,minWidth:c,maxWidth:c,role:d,"aria-label":f,"aria-labelledby":this.currentPageAriaLabel},m({id:this._id,"aria-haspopup":!1,"aria-expanded":void 0,onKeyDown:this.handleKeyDown,onBlur:v=>{const S=v.currentTarget,_=v.relatedTarget,k=Kd(S,_);(!_||_===this._drilldownRef||_!==S&&!k)&&this.setState({highlightedOptionId:void 0})},onMouseLeave:()=>{this.setState({highlightedOptionId:void 0})}})),C(Oe,{as:"div",overflowY:i,overflowX:r,height:s,width:o,minHeight:a,minWidth:l,maxHeight:u,maxWidth:c,css:n==null?void 0:n.container,borderRadius:"small",role:"presentation",elementRef:v=>{this._containerElement=v}},C($i,Object.assign({},b(),{role:"presentation",as:h}),this.renderList(y,O))))):null}render(){this._activeOptionsMap={};const e=this.props,n=e.show,i=e.defaultShow,r=e.placement,s=e.withArrow,o=e.shouldContainFocus,a=e.shouldReturnFocus,l=e.trigger,u=e.mountNode,c=e.constrain,d=e.positionTarget,h=e.positionContainerDisplay,f=e.popoverRef,m=e.disabled,b=e.onDismiss,y=e.onFocus,O=e.onMouseOver,v=e.offsetX,S=e.offsetY;return l?C(g1,{isShowingContent:n,defaultIsShowingContent:i,shouldCloseOnDocumentClick:!0,onHideContent:(_,{documentClick:k})=>{typeof b=="function"&&b(_,k),this.reset(),this.handleToggle(_,!1)},onShowContent:_=>this.handleToggle(_,!0),mountNode:u,placement:r,withArrow:s,positionTarget:d,positionContainerDisplay:h,constrain:c,shouldContainFocus:o,shouldReturnFocus:a,id:this._id,on:["click"],onFocus:y,onMouseOver:O,offsetX:v,offsetY:S,elementRef:_=>{this.handleRef(_)},ref:_=>{this._popover=_,typeof f=="function"&&f(_)},renderTrigger:Vt(l,{ref:_=>{this._trigger=_},"aria-haspopup":this.props.role,id:this._triggerId,disabled:!!(l.props.disabled||m),"aria-disabled":l.props.disabled||m?"true":void 0})},this.renderPage()):this.renderPage()}},Fr.displayName="Drilldown",Fr.componentId="Drilldown",Fr.propTypes=fJ,Fr.allowedProps=pJ,Fr.defaultProps={disabled:!1,rotateFocus:!0,as:"ul",role:"menu",overflowX:"auto",overflowY:"auto",placement:"bottom center",defaultShow:!1,shouldHideOnSelect:!0,shouldContainFocus:!1,shouldReturnFocus:!0,withArrow:!0,offsetX:0,offsetY:0},Fr.Group=U0,Fr.Option=Wr,Fr.Page=hc,Fr.Separator=bd,Fr))||Qc)||Qc)||Qc);const OJ=(t,e)=>{const n=e.size,i={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}};return{select:{label:"select",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color},icon:{label:"select__icon",...i[n]},assistiveText:{label:"select__assistiveText",display:"none"}}},yJ=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,smallIconSize:n==null?void 0:n.fontSizeXSmall,mediumIconSize:n==null?void 0:n.fontSizeSmall,largeIconSize:n==null?void 0:n.fontSizeMedium,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},vJ={id:p.string.isRequired,isHighlighted:p.bool,isSelected:p.bool,isDisabled:p.bool,renderBeforeLabel:p.oneOfType([p.node,p.func]),renderAfterLabel:p.oneOfType([p.node,p.func]),children:p.node},SJ=["id","isHighlighted","isSelected","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let ns=class extends T.Component{render(){return null}};ns.displayName="Option";ns.componentId="Select.Option";ns.allowedProps=SJ;ns.propTypes=vJ;ns.defaultProps={isHighlighted:!1,isSelected:!1,isDisabled:!1};const wJ={renderLabel:p.oneOfType([p.node,p.func]).isRequired,children:_t.oneOf([ns])},_J=["renderLabel","children"];let wr=class extends T.Component{render(){return null}};wr.displayName="Group";wr.componentId="Select.Group";wr.allowedProps=_J;wr.propTypes=wJ;wr.defaultProps={};const kJ={renderLabel:p.oneOfType([p.node,p.func]).isRequired,inputValue:p.string,id:p.string,size:p.oneOf(["small","medium","large"]),assistiveText:p.string,placeholder:p.string,interaction:p.oneOf(["enabled","disabled","readonly"]),isRequired:p.bool,isInline:p.bool,width:p.string,htmlSize:p.number,visibleOptionsCount:p.number,optionsMaxHeight:p.string,optionsMaxWidth:p.string,messages:p.arrayOf(zo.message),placement:hn.placement,constrain:hn.constrain,mountNode:hn.mountNode,onFocus:p.func,onBlur:p.func,onInputChange:p.func,isShowingOptions:p.bool,onRequestShowOptions:p.func,onRequestHideOptions:p.func,onRequestHighlightOption:p.func,onRequestSelectOption:p.func,inputRef:p.func,listRef:p.func,renderBeforeInput:p.oneOfType([p.node,p.func]),renderAfterInput:p.oneOfType([p.node,p.func]),children:_t.oneOf([wr,ns]),shouldNotWrap:p.bool,scrollToHighlightedOption:p.bool},xJ=["renderLabel","inputValue","isShowingOptions","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","htmlSize","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onFocus","onBlur","onInputChange","onRequestShowOptions","onRequestHideOptions","onRequestHighlightOption","onRequestSelectOption","inputRef","listRef","renderBeforeInput","renderAfterInput","children","shouldNotWrap","scrollToHighlightedOption"],EJ=["id","renderLabel","children"],CJ=["renderLabel","inputValue","placeholder","isRequired","shouldNotWrap","size","isInline","width","htmlSize","messages","renderBeforeInput","renderAfterInput","onFocus","onBlur","onInputChange","onRequestHideOptions"],TJ=["ref"];var LR,MR,NR,zc,fo,BR,QR,zR,HR;const sN=T.memo(function(e){const n=e.optionsItemProps,i=e.children;return C($i.Item,Object.assign({as:"li"},n),i)},(t,e)=>t.selectOption.props.isHighlighted===e.selectOption.props.isHighlighted&&t.selectOption.props.isSelected===e.selectOption.props.isSelected&&t.selectOption.props.isDisabled===e.selectOption.props.isDisabled&&t.selectOption.props.children===e.selectOption.props.children&&t.selectOption.props.id===e.selectOption.props.id&&t.selectOption.props.renderBeforeLabel===e.selectOption.props.renderBeforeLabel&&t.selectOption.props.renderAfterLabel===e.selectOption.props.renderAfterLabel&&t.children===e.children);sN.displayName="Item";let Rg=(LR=Kt(),MR=de(OJ,yJ),NR=Ne(),LR(zc=MR(zc=NR(zc=(fo=class oN extends T.Component{constructor(...e){super(...e),this.state={hasInputRef:!1},this.ref=null,this._input=null,this._defaultId=this.props.deterministicId(),this._inputContainer=null,this._listView=null,this._optionIds=[],this._optionHeight=36,this.handleInputRef=n=>{var i,r;this.state.hasInputRef||this.setState({hasInputRef:!0}),this._input=n,(i=(r=this.props).inputRef)===null||i===void 0||i.call(r,n)},this.handleListRef=n=>{var i,r;(i=(r=this.props).listRef)===null||i===void 0||i.call(r,n),n&&n.querySelector('[role="option"]')&&(this._optionHeight=n.querySelector('[role="option"]').offsetHeight)},this.handleInputContainerRef=n=>{this._inputContainer=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n),this.props.scrollToHighlightedOption&&requestAnimationFrame(()=>this.scrollToOption(this.highlightedOptionId))}focus(){this._input&&this._input.focus()}get childrenArray(){return T.Children.toArray(this.props.children)}getGroupChildrenArray(e){return T.Children.toArray(e.props.children)}get focused(){return this._input?qs(this._input):!1}get id(){return this.props.id||this._defaultId}get width(){return this._inputContainer?this._inputContainer.offsetWidth:void 0}get interaction(){return Co({props:this.props})}get highlightedOptionId(){let e;return this.childrenArray.forEach(n=>{Qe(n,[wr])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isHighlighted&&(e=i.props.id)}):n.props.isHighlighted&&(e=n.props.id)}),e}get selectedOptionId(){const e=[];if(this.childrenArray.forEach(n=>{Qe(n,[wr])?this.getGroupChildrenArray(n).forEach(i=>{i.props.isSelected&&e.push(i.props.id)}):n.props.isSelected&&e.push(n.props.id)}),e.length===1)return e[0];if(e.length!==0)return e}scrollToOption(e){if(this._listView){const n=this._listView.querySelector(`[id="${e}"]`);if(!n)return;const i=n.parentNode,r=sn(this._listView).top,s=sn(i).top,o=r+this._listView.clientHeight,a=s+(i?i.clientHeight:0);a>o?this._listView.scrollTop+=a-o:s{i==null||i(o);const a=this.selectedOptionId;a&&!Array.isArray(a)&&this.highlightOption(o,a)},onRequestHideOptions:o=>{r==null||r(o)},onRequestHighlightOption:(o,{id:a,direction:l})=>{if(!n)return;const u=this.highlightedOptionId;let c=this._optionIds.indexOf(a)>-1?a:void 0;if(!c)if(!u)c=this._optionIds[0];else{const d=this._optionIds.indexOf(u);c=d>-1?this._optionIds[d+l]:void 0}c&&this.highlightOption(o,c)},onRequestHighlightFirstOption:o=>{this.highlightOption(o,this._optionIds[0])},onRequestHighlightLastOption:o=>{this.highlightOption(o,this._optionIds[this._optionIds.length-1])},onRequestSelectOption:(o,{id:a})=>{a&&this._optionIds.indexOf(a)!==-1&&(s==null||s(o,{id:a}))}}:{}}renderOption(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,s=e.props,o=s.id,a=s.isDisabled,l=s.isHighlighted,u=s.isSelected,c=s.renderBeforeLabel,d=s.renderAfterLabel,h=s.children,f=b=>{var y;return typeof b=="function"&&!(b!=null&&(y=b.prototype)!==null&&y!==void 0&&y.isReactComponent)?b.bind(null,{id:o,isDisabled:a,isSelected:u,isHighlighted:l,children:h}):b};let m={...De(e.props,[...ns.allowedProps,...$i.Item.allowedProps]),...i({id:o}),renderBeforeLabel:f(c),renderAfterLabel:f(d)};return u?m.variant="selected":l&&(m.variant="highlighted"),a?(m.variant="disabled",m={...m,...r()}):this._optionIds.push(o),C(sN,{optionsItemProps:m,selectOption:e},h)}renderGroup(e,n){const i=n.getOptionProps,r=n.getDisabledOptionProps,s=n.isFirstChild,o=n.isLastChild,a=n.afterGroup,l=e.props,u=l.id,c=l.renderLabel,d=l.children,h=Le(l,EJ),f=[];return!s&&!a&&f.push(BR||(BR=C($i.Separator,null))),f.push(C($i,Object.assign({id:u,as:"ul",role:"group",renderLabel:c},De(h,[...$i.allowedProps,...wr.allowedProps])),T.Children.map(d,m=>this.renderOption(m,{getOptionProps:i,getDisabledOptionProps:r})))),o||f.push(QR||(QR=C($i.Separator,null))),f}renderList(e){const n=e.getListProps,i=e.getOptionProps,r=e.getDisabledOptionProps,s=this.props,o=s.isShowingOptions,a=s.optionsMaxWidth,l=s.optionsMaxHeight,u=s.visibleOptionsCount,c=s.children;let d=!1;const h=o?{display:"block",overflowY:"auto",maxHeight:l||this._optionHeight*u,maxWidth:a||this.width,background:"primary",elementRef:f=>this._listView=f}:{maxHeight:0};return C(Oe,h,C($i,n({as:"ul",elementRef:this.handleListRef}),o?T.Children.map(c,(f,m)=>{if(!(!f||!Qe(f,[wr,ns]))){if(Qe(f,[ns]))return d=!1,this.renderOption(f,{getOptionProps:i,getDisabledOptionProps:r});if(Qe(f,[wr])){const b=d;return d=!0,this.renderGroup(f,{getOptionProps:i,getDisabledOptionProps:r,isFirstChild:m===0,isLastChild:m===T.Children.count(c)-1,afterGroup:b})}}}):null))}renderIcon(){const e=this.props,n=e.styles,i=e.isShowingOptions;return C("span",{css:n==null?void 0:n.icon},i?zR||(zR=C(sc,{inline:!1})):HR||(HR=C(rc,{inline:!1})))}renderInput(e){const n=e.getInputProps,i=e.getTriggerProps,r=this.props,s=r.renderLabel,o=r.inputValue,a=r.placeholder,l=r.isRequired,u=r.shouldNotWrap,c=r.size,d=r.isInline,h=r.width,f=r.htmlSize,m=r.messages,b=r.renderBeforeInput,y=r.renderAfterInput,O=r.onFocus,v=r.onBlur,S=r.onInputChange,_=r.onRequestHideOptions,k=Le(r,CJ),x=this.interaction,w=De(k,oN.allowedProps),M=i({...w}),H=M.ref,I=Le(M,TJ),z=typeof S<"u",U=z?{}:{role:AX()?"button":"combobox",title:o,"aria-autocomplete":void 0,"aria-readonly":!0};w.autoComplete&&(U.autoComplete=w.autoComplete);const X={id:this.id,renderLabel:s,placeholder:a,size:c,width:h,htmlSize:f,messages:m,value:o,inputRef:ht(H,this.handleInputRef),inputContainerRef:this.handleInputContainerRef,interaction:x==="enabled"&&!z?"readonly":x,isRequired:l,shouldNotWrap:u,display:d?"inline-block":"block",renderBeforeInput:b,renderAfterInput:y||this.renderIcon(),onChange:typeof S=="function"?S:o?()=>{}:void 0,onFocus:O,onBlur:ht(v,_),...U};return C(vx,Object.assign({},I,n(X)))}render(){const e=this.props,n=e.constrain,i=e.placement,r=e.mountNode,s=e.assistiveText,o=e.isShowingOptions,a=e.styles;this._optionIds=[];const l=this.highlightedOptionId,u=this.selectedOptionId;return C(rN,Object.assign({highlightedOptionId:l,isShowingOptions:o,selectedOptionId:u},this.getEventHandlers()),({getRootProps:c,getInputProps:d,getTriggerProps:h,getListProps:f,getOptionProps:m,getDisabledOptionProps:b,getDescriptionProps:y})=>C("span",Object.assign({},c({css:a==null?void 0:a.select}),{ref:O=>this.ref=O}),this.renderInput({getInputProps:d,getTriggerProps:h}),C("span",Object.assign({},y(),{css:a==null?void 0:a.assistiveText}),s),C(g1,{constrain:n,placement:i,mountNode:r,positionTarget:this._inputContainer,isShowingContent:o,shouldReturnFocus:!1,withArrow:!1},this.renderList({getListProps:f,getOptionProps:m,getDisabledOptionProps:b}))))}},fo.displayName="Select",fo.componentId="Select",fo.allowedProps=xJ,fo.propTypes=kJ,fo.defaultProps={inputValue:"",isShowingOptions:!1,size:"medium",interaction:void 0,isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",shouldNotWrap:!1,scrollToHighlightedOption:!1},fo.Option=ns,fo.Group=wr,fo))||zc)||zc)||zc);const AJ={expanded:nc(p.bool,"onToggle","defaultExpanded"),defaultExpanded:p.bool,onToggle:p.func,children:p.func,render:p.func},RJ=["expanded","defaultExpanded","onToggle","children","render"];var UR,FR,Hc;const PJ=({expanded:t})=>({expanded:!t});let VR=(UR=Kt(),UR(FR=(Hc=class extends T.Component{constructor(e){super(e),this._contentId=void 0,this.handleToggle=n=>{this.isControlled()||this.setState(PJ),this.props.onToggle(n,!this.expanded)},this.state={expanded:this.isControlled(e)?e.expanded:e.defaultExpanded},this._contentId=e.deterministicId()}get expanded(){return this.isControlled()?this.props.expanded:this.state.expanded}isControlled(e=this.props){return typeof e.expanded=="boolean"}static getDerivedStateFromProps(e,n){return typeof e.expanded=="boolean"&&e.expanded!==n.expanded?{expanded:e.expanded}:null}render(){const e=this.props,n=e.children,i=e.render,r=i===void 0?n:i;return typeof r=="function"?r({expanded:this.expanded,getToggleProps:(s={})=>({"aria-controls":this._contentId,"aria-expanded":this.expanded,onClick:ht(this.handleToggle,s.onClick),...s}),getDetailsProps:()=>({id:this._contentId})}):null}},Hc.displayName="Expandable",Hc.propTypes=AJ,Hc.allowedProps=RJ,Hc.defaultProps={defaultExpanded:!1,onToggle:function(){},children:null},Hc))||FR);const IJ=(t,e)=>{const n=e.overlay,i=e.withBlur,r=e.withGrayscale,s=e.constrain,o=s==="cover",a=s==="contain",l={transition:`all ${t.effectTransitionDuration}`},u=()=>{const f=[];return i&&f.push(`blur(${t.imageBlurAmount})`),r&&f.push("grayscale(1)"),f.length>0?{...l,filter:f.join(" ")}:{filter:"none"}},c={width:"100%",height:"100%"},d={objectFit:"cover",...c},h={objectFit:"contain",...c,...n&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...n&&{backgroundColor:n.color,opacity:n.opacity*.1,mixBlendMode:n.blend?n.blend:void 0}},container:{label:"img__container",...n&&{position:"relative",overflow:"hidden"},...o&&c,...a&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...u(),...n&&{display:"block"},...o&&d,...a&&h}}},$J=()=>({...{effectTransitionDuration:"1s",imageBlurAmount:"0.25em"}}),DJ={src:p.string.isRequired,alt:p.string,display:p.oneOf(["inline-block","block"]),loading:p.oneOf(["eager","lazy"]),margin:pt.spacing,overlay:p.shape({color:p.string.isRequired,opacity:p.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:p.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:p.bool,withBlur:p.bool,constrain:p.oneOf(["cover","contain"]),elementRef:p.func,height:p.oneOfType([p.string,p.number]),width:p.oneOfType([p.string,p.number])},LJ=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],MJ=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var WR,jR,Pg,Ql;let NJ=(WR=de(IJ,$J),jR=Ne(),WR(Pg=jR(Pg=(Ql=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.src,i=e.alt,r=e.margin,s=e.display,o=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const a=e.width,l=e.height;e.elementRef;const u=e.styles,c=e.loading,d=Le(e,MJ),h={alt:i||""},f={css:u==null?void 0:u.img,src:n,loading:c},m={...Ft(d),width:a,height:l,margin:r,display:s,elementRef:this.handleRef};if(o){const b={...m};return C(Oe,Object.assign({},b,{as:"span",css:u==null?void 0:u.container}),C("img",Object.assign({},f,h)),o&&C("span",{css:u==null?void 0:u.overlay}))}else return C(Oe,Object.assign({},m,f,h,{as:"img"}))}},Ql.displayName="Img",Ql.componentId="Img",Ql.propTypes=DJ,Ql.allowedProps=LJ,Ql.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},Ql))||Pg)||Pg);const BJ=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,s=i!=="none",o=r!=="none";tt(!(s&&o),"[InlineList] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginInlineStart:t.spacingXXXSmall,marginInlineEnd:t.spacingXXXSmall},"xx-small":{marginInlineStart:t.spacingXXSmall,marginInlineEnd:t.spacingXXSmall},"x-small":{marginInlineStart:t.spacingXSmall,marginInlineEnd:t.spacingXSmall},small:{marginInlineStart:t.spacingSmall,marginInlineEnd:t.spacingSmall},medium:{marginInlineStart:t.spacingMedium,marginInlineEnd:t.spacingMedium},large:{marginInlineStart:t.spacingLarge,marginInlineEnd:t.spacingLarge},"x-large":{marginInlineStart:t.spacingXLarge,marginInlineEnd:t.spacingXLarge},"xx-large":{marginInlineStart:t.spacingXXLarge,marginInlineEnd:t.spacingXXLarge},none:{}},u={none:{marginInlineStart:t.noneSpacing,marginInlineEnd:t.noneSpacing},pipe:{marginInlineStart:t.pipeSpacing,marginInlineEnd:t.pipeSpacing,"&::after":{content:'"\\007C"'}},slash:{marginInlineStart:t.slashSpacing,marginInlineEnd:t.slashSpacing,"&::after":{content:'"\\002F"'}},arrow:{marginInlineStart:t.arrowSpacing,marginInlineEnd:t.arrowSpacing,"&::after":{content:'"\\003E"'}}};return{inlineListItem:{label:"inlineListItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,verticalAlign:"middle",boxSizing:"border-box",lineHeight:t.lineHeight,color:t.color,...o&&!s&&l[r],...a[n],"&:first-of-type":{marginInlineStart:0},"&:last-of-type":{marginInlineEnd:0}},delimiter:{label:"inlineListItem__delimiter",...u[i],"[class$=-inlineListItem]:last-of-type > &:last-child::after":{content:"none"}}}},QJ=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.key,s={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,fontSizeSmall:i==null?void 0:i.fontSizeSmall,fontSizeMedium:i==null?void 0:i.fontSizeMedium,fontSizeLarge:i==null?void 0:i.fontSizeLarge,color:e==null?void 0:e.textDark,lineHeight:i==null?void 0:i.lineHeightCondensed,noneSpacing:n==null?void 0:n.xSmall,pipeSpacing:n==null?void 0:n.xSmall,slashSpacing:n==null?void 0:n.xSmall,arrowSpacing:n==null?void 0:n.xSmall,marginBottomDefault:n==null?void 0:n.xxxSmall,spacingXXXSmall:n==null?void 0:n.xxxSmall,spacingXXSmall:n==null?void 0:n.xxSmall,spacingXSmall:n==null?void 0:n.xSmall,spacingSmall:n==null?void 0:n.small,spacingMedium:n==null?void 0:n.medium,spacingLarge:n==null?void 0:n.large,spacingXLarge:n==null?void 0:n.xLarge,spacingXXLarge:n==null?void 0:n.xxLarge},...s[r]}},zJ={children:p.oneOfType([p.node,p.func]).isRequired,delimiter:p.oneOf(["none","pipe","slash","arrow"]),size:p.oneOf(["small","medium","large"]),margin:pt.spacing,padding:pt.spacing,spacing:p.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:p.func},HJ=["children","delimiter","size","margin","padding","spacing","elementRef"],UJ=["delimiter","size","margin","padding","elementRef","children","spacing","styles"];var XR,ZR,Ig,zl;let aN=(XR=de(BJ,QJ),ZR=Ne(),XR(Ig=ZR(Ig=(zl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children;e.spacing;const s=e.styles,o=Le(e,UJ);return C(Oe,Object.assign({},Ft(o),{css:s==null?void 0:s.inlineListItem,as:"li",margin:n,padding:i,display:"inline-block",maxWidth:"100%",elementRef:this.handleRef}),r,C("span",{css:s==null?void 0:s.delimiter,"aria-hidden":"true"}))}},zl.displayName="InlineListItem",zl.componentId="InlineList.Item",zl.propTypes=zJ,zl.allowedProps=HJ,zl.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},zl))||Ig)||Ig);const FJ={children:_t.oneOf([aN]),as:p.oneOf(["ul","ol"]),margin:pt.spacing,size:p.oneOf(["small","medium","large"]),delimiter:p.oneOf(["none","pipe","slash","arrow"]),itemSpacing:p.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:p.func},VJ=["children","as","margin","size","delimiter","itemSpacing","elementRef"],WJ=["as","margin","elementRef"];var qR,YR,Hl;let Of=(qR=Ne(),qR(YR=(Hl=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return Vt(e,{delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.elementRef;const r=Le(e,WJ);return F.createElement(Oe,Object.assign({},Ft(r),{as:n,margin:i,padding:"0",elementRef:this.handleRef,display:"block"}),this.renderChildren())}},Hl.displayName="InlineList",Hl.propTypes=FJ,Hl.allowedProps=VJ,Hl.defaultProps={itemSpacing:"none",as:"ul",margin:"none",delimiter:"none",size:"medium"},Hl.Item=aN,Hl))||YR);const jJ=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,s=i!=="none",o=r!=="none";tt(!(s&&o),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const a={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...a[n],...o&&!s&&l[r],...s&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},XJ=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,s=t.key,o={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:i==null?void 0:i.xxxSmall,spacingXXSmall:i==null?void 0:i.xxSmall,spacingXSmall:i==null?void 0:i.xSmall,spacingSmall:i==null?void 0:i.small,spacingMedium:i==null?void 0:i.medium,spacingLarge:i==null?void 0:i.large,spacingXLarge:i==null?void 0:i.xLarge,spacingXXLarge:i==null?void 0:i.xxLarge,delimiterDashedBorder:`${e==null?void 0:e.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${e==null?void 0:e.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...o[s]}},ZJ={children:p.oneOfType([p.node,p.func]).isRequired,delimiter:p.oneOf(["none","dashed","solid"]),size:p.oneOf(["small","medium","large"]),margin:pt.spacing,padding:pt.spacing,spacing:p.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:p.func},qJ=["children","delimiter","size","margin","padding","spacing","elementRef"],YJ=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var GR,KR,$g,Ul;let lN=(GR=de(jJ,XJ),KR=Ne(),GR($g=KR($g=(Ul=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children,s=e.styles,o=Le(e,YJ);return C(Oe,Object.assign({},Ft(o),{css:s==null?void 0:s.listItem,as:"li",margin:n,padding:i,maxWidth:"100%",elementRef:this.handleRef}),r)}},Ul.displayName="ListItem",Ul.componentId="List.Item",Ul.propTypes=ZJ,Ul.allowedProps=qJ,Ul.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},Ul))||$g)||$g);const GJ=(t,e)=>{const n=e.isUnstyled,r=e.as==="ol";return{list:{label:"list",paddingInlineStart:t.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${t.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:t.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:t.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},KJ=t=>{const e=t.spacing,n=t.typography;return{...{listPadding:e==null?void 0:e.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:e==null?void 0:e.xSmall}}},JJ={children:_t.oneOf([lN]),as:p.oneOf(["ul","ol"]),delimiter:p.oneOf(["none","dashed","solid"]),isUnstyled:p.bool,margin:pt.spacing,size:p.oneOf(["small","medium","large"]),itemSpacing:p.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:p.func},eee=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],tee=["as","margin","isUnstyled","elementRef","styles"];var JR,eP,Dg,Ko;let yf=(JR=de(GJ,KJ),eP=Ne(),JR(Dg=eP(Dg=(Ko=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){return T.Children.map(this.props.children,e=>{if(e)return Vt(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,s=Le(e,tee);return C(Oe,Object.assign({},Ft(s),{css:r==null?void 0:r.list,as:n,margin:i,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},Ko.displayName="List",Ko.componentId="List",Ko.propTypes=JJ,Ko.allowedProps=eee,Ko.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},Ko.Item=lN,Ko))||Dg)||Dg);const nee=(t,e)=>{const n=e.itemSpacing,i=e.fixMenuTriggerWidth;return{truncateList:{label:"truncateList",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},listItem:{label:"truncateList__listItem",...{minWidth:"0.0625rem",flexShrink:0,flexGrow:0},"& + &":{paddingInlineStart:n}},menuTrigger:{label:"truncateList__menuTrigger",maxWidth:"100%",...i&&{width:i},paddingInlineStart:n,"&:first-of-type":{paddingInlineStart:0}}}},iee={children:p.node,visibleItemsCount:p.number,onUpdate:p.func,renderHiddenItemMenu:p.func,itemSpacing:p.string,fixMenuTriggerWidth:p.string,debounce:p.number,elementRef:p.func},tP=["children","renderHiddenItemMenu","visibleItemsCount","itemSpacing","fixMenuTriggerWidth","debounce","onUpdate","elementRef"];var nP,iP,Lg,Fl;let uN=(nP=de(nee,null),iP=Ne(),nP(Lg=iP(Lg=(Fl=class extends T.Component{constructor(e){super(e),this.ref=null,this._menuTriggerRef=null,this._debouncedHandleResize=void 0,this._resizeListener=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.measureItems=()=>{const n=this.props,i=n.fixMenuTriggerWidth,r=n.itemSpacing,s=mi(r),o=mi(i||this.state.menuTriggerWidth);let a=0;if(this.ref){const l=sn(this.ref),u=l.width,c=ls(this.ref),d=c.paddingInlineStart,h=c.paddingInlineEnd,f=u-mi(d)-mi(h),m=Array.from(this.ref.getElementsByTagName("li")).map(y=>sn(y).width);let b=0;for(let y=0;y{this.setState({isMeasuring:!0},()=>{const n=this.measureItems(),i=n.visibleItemsCount;typeof this.props.onUpdate=="function"&&this.props.onUpdate({visibleItemsCount:i}),this.setState({isMeasuring:!1})})},this.state={isMeasuring:!1,menuTriggerWidth:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=sn(this.ref),r=i.width;this._debouncedHandleResize=f1(this.handleResize,this.props.debounce,{leading:!0,trailing:!0}),this._resizeListener=new ResizeObserver(o=>{for(const l of o){const u=l.contentRect.width;if(r!==u){var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)}}});const s=this.props.fixMenuTriggerWidth?mi(this.props.fixMenuTriggerWidth):this.calcMenuTriggerWidth();this.setState({menuTriggerWidth:s},()=>{var o,a;(o=this._resizeListener)===null||o===void 0||o.observe(this.ref),(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}componentDidUpdate(e,n){var i,r;if((i=(r=this.props).makeStyles)===null||i===void 0||i.call(r),e.fixMenuTriggerWidth!==this.props.fixMenuTriggerWidth||e.itemSpacing!==this.props.itemSpacing){var s;(s=this._debouncedHandleResize)===null||s===void 0||s.call(this)}if(this.ref&&n.isMeasuring&&n.isMeasuring!==this.state.isMeasuring){const o=this.calcMenuTriggerWidth();o&&this.state.menuTriggerWidth!==o&&this.setState({menuTriggerWidth:o},()=>{var a;(a=this._debouncedHandleResize)===null||a===void 0||a.call(this)})}}componentWillUnmount(){this._resizeListener&&this._resizeListener.disconnect(),this._debouncedHandleResize&&this._debouncedHandleResize.cancel()}get childrenArray(){return T.Children.toArray(this.props.children)}get visibleChildren(){const e=this.props.visibleItemsCount,n=this.state,i=n.isMeasuring;if(typeof n.menuTriggerWidth>"u")return[];const s=typeof e>"u"?this.childrenArray:this.childrenArray.splice(0,e);return i?this.childrenArray:s}get hiddenChildren(){return this.state.isMeasuring?[]:this.childrenArray.splice(this.visibleChildren.length,this.childrenArray.length)}calcMenuTriggerWidth(){const e=this.props.fixMenuTriggerWidth;if(!this._menuTriggerRef)return 0;if(e)return mi(e);const n=this._menuTriggerRef.children;let i=0;return Array.from(n).forEach(r=>{i+=sn(r).width}),i}render(){const e=this.props,n=e.styles,i=e.className,r=e.style,s=e.renderHiddenItemMenu,o=this.visibleChildren,a=this.hiddenChildren;return C("ul",Object.assign({ref:this.handleRef},De(this.props,tP),{className:i,style:r,css:n==null?void 0:n.truncateList}),o.map((l,u)=>C("li",{key:u,css:n==null?void 0:n.listItem},l)),typeof s=="function"&&a&&a.length>0&&C("li",{key:"menuTrigger",css:[n==null?void 0:n.listItem,n==null?void 0:n.menuTrigger],ref:l=>{this._menuTriggerRef=l}},s(a)))}},Fl.displayName="TruncateList",Fl.componentId="TruncateList",Fl.propTypes=iee,Fl.allowedProps=tP,Fl.defaultProps={itemSpacing:"0",debounce:300},Fl))||Lg)||Lg);const ree=(t,e)=>{const n=e.disabled,i=e.variant,r=e.context,s=e.size,o=e.inline,a=f=>`[class$=-radioInput__input]:${f} + [class$=-radioInput__control] &`,l={success:{backgroundColor:t.toggleBackgroundSuccess},danger:{backgroundColor:t.toggleBackgroundDanger},warning:{backgroundColor:t.toggleBackgroundWarning},off:{backgroundColor:t.toggleBackgroundOff}},u={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:t.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${t.borderWidth} solid ${t.borderColor}`,background:t.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[a("hover")]:{borderColor:t.hoverBorderColor},[a("focus")]:{background:t.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:t.simpleFacadeSmallSize,height:t.simpleFacadeSmallSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetSmall} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},medium:{width:t.simpleFacadeMediumSize,height:t.simpleFacadeMediumSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetMedium} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}},large:{width:t.simpleFacadeLargeSize,height:t.simpleFacadeLargeSize,[a("checked")]:{background:t.background,boxShadow:`inset 0 0 0 ${t.simpleCheckedInsetLarge} ${t.hoverBorderColor}`,borderColor:t.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:t.toggleShadow,borderRadius:t.toggleBorderRadius,...l[r],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${t.toggleBorderRadius} + 0.0625rem)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[a("checked")]:{visibility:"visible"},[a("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},c={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:t.toggleSmallHeight},medium:{padding:"0 0.875rem",height:t.toggleMediumHeight},large:{padding:"0 1rem",height:t.toggleLargeHeight}}},d={simple:{base:{},small:{fontSize:t.simpleFontSizeSmall},medium:{fontSize:t.simpleFontSizeMedium},large:{fontSize:t.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[a("checked")]:{color:t.toggleHandleText},[a("focus")]:{textDecoration:"underline"}},small:{fontSize:t.toggleSmallFontSize,height:t.toggleSmallHeight,svg:{fontSize:`calc(${t.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:t.toggleMediumFontSize,height:t.toggleMediumHeight,svg:{fontSize:`calc(${t.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:t.toggleLargeFontSize,height:t.toggleLargeHeight,svg:{fontSize:`calc(${t.toggleLargeFontSize} + 0.375rem)`}}}},h={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...n&&{opacity:.5},...o&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...n&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...h,'&:is(input)[type="radio"]':h,'&:-webkit-any(input)[type="radio"]':h},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...c[i].base,...c[i][s]},facade:{label:"radioInput__facade",...u[i].base,...u[i][s]},label:{label:"radioInput__label",flex:"1 1 auto",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...d[i].base,...d[i][s],cursor:"default"}}},see=t=>{const e=t.spacing,n=t.borders,i=t.colors,r=t.forms,s=t.shadows,o=t.typography,a=t.key,l={canvas:{focusBorderColor:t["ic-brand-primary"],hoverBorderColor:t["ic-brand-font-color-dark"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:i==null?void 0:i.backgroundDarkest}};return{...{labelColor:i==null?void 0:i.textDarkest,labelFontFamily:o==null?void 0:o.fontFamily,labelFontWeight:o==null?void 0:o.fontWeightNormal,labelLineHeight:o==null?void 0:o.lineHeightCondensed,background:i==null?void 0:i.backgroundLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:i==null?void 0:i.borderMedium,hoverBorderColor:i==null?void 0:i.borderDarkest,controlSize:"0.1875rem",focusBorderColor:i==null?void 0:i.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:o==null?void 0:o.fontSizeSmall,simpleFontSizeMedium:o==null?void 0:o.fontSizeMedium,simpleFontSizeLarge:o==null?void 0:o.fontSizeLarge,simpleFacadeMarginEnd:e==null?void 0:e.xSmall,toggleBorderRadius:n==null?void 0:n.radiusSmall,toggleBorderWidth:n==null?void 0:n.widthLarge,toggleBackgroundSuccess:i==null?void 0:i.backgroundSuccess,toggleBackgroundOff:i==null?void 0:i.backgroundDark,toggleBackgroundDanger:i==null?void 0:i.backgroundDanger,toggleBackgroundWarning:i==null?void 0:i.backgroundWarning,toggleHandleText:i==null?void 0:i.textLightest,toggleSmallHeight:r==null?void 0:r.inputHeightSmall,toggleMediumHeight:r==null?void 0:r.inputHeightMedium,toggleLargeHeight:r==null?void 0:r.inputHeightLarge,toggleShadow:s==null?void 0:s.depth1,toggleSmallFontSize:o==null?void 0:o.fontSizeXSmall,toggleMediumFontSize:o==null?void 0:o.fontSizeSmall,toggleLargeFontSize:o==null?void 0:o.fontSizeMedium},...l[a]}},oee={label:p.node.isRequired,value:p.oneOfType([p.string,p.number]),id:p.string,name:p.string,checked:p.bool,disabled:p.bool,readOnly:p.bool,variant:p.oneOf(["simple","toggle"]),size:p.oneOf(["small","medium","large"]),context:p.oneOf(["success","warning","danger","off"]),inline:p.bool,onClick:p.func,onChange:p.func},aee=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var rP,sP,oP,Uc,Vl;let lu=(rP=Kt(),sP=de(ree,see),oP=Ne(),rP(Uc=sP(Uc=oP(Uc=(Vl=class cN extends T.Component{constructor(e){super(e),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(n)},this.handleChange=n=>{if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(n)},typeof e.checked>"u"&&(this.state={checked:!1}),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}focus(){var e;(e=this._input)===null||e===void 0||e.focus()}get id(){return this.props.id||this._defaultId}get focused(){return qs(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.label,s=e.value,o=e.name,a=e.styles,l=De(this.props,cN.allowedProps);return C("div",{css:a==null?void 0:a.radioInput,ref:u=>{this.ref=u}},C("input",Object.assign({},l,{id:this.id,ref:u=>{this._input=u},value:s,name:o,checked:this.checked,type:"radio",css:a==null?void 0:a.input,disabled:n||i,"aria-disabled":n||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),C("label",{css:a==null?void 0:a.control,htmlFor:this.id},C("span",{css:a==null?void 0:a.facade,"aria-hidden":"true"}),C("span",{css:a==null?void 0:a.label},r)))}},Vl.displayName="RadioInput",Vl.componentId="RadioInput",Vl.allowedProps=aee,Vl.propTypes=oee,Vl.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},Vl))||Uc)||Uc)||Uc);const lee={name:p.string.isRequired,description:p.node.isRequired,defaultValue:p.oneOfType([p.string,p.number]),value:nc(p.oneOfType([p.string,p.number])),onChange:p.func,disabled:p.bool,readOnly:p.bool,messages:p.arrayOf(zo.message),children:p.node,variant:p.oneOf(["simple","toggle"]),size:p.oneOf(["small","medium","large"]),layout:p.oneOf(["stacked","columns","inline"])},uee=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var aP,lP,Mg,Wl;let Vy=(aP=Kt(),lP=Ne(),aP(Mg=lP(Mg=(Wl=class dN extends T.Component{constructor(e){super(e),this.ref=null,this._messagesId=void 0,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=n.target.value;if(this.props.disabled||this.props.readOnly){n.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:i}),typeof this.props.onChange=="function"&&this.props.onChange(n,i)},typeof e.value>"u"&&(this.state={value:e.defaultValue}),this._messagesId=e.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const e=this.props,n=e.children,i=e.name,r=e.variant,s=e.size,o=e.disabled,a=e.readOnly;return T.Children.map(n,(l,u)=>{if(Qe(l,[lu])){const c=this.value===l.props.value,d=!this.value&&u===0;return Vt(l,{name:i,disabled:o||l.props.disabled,variant:r,size:s,checked:c,onChange:this.handleChange,readOnly:a||l.props.readOnly,width:l.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:c||d?0:-1,label:l.props.label})}else return l})}render(){const e=this.props,n=e.variant,i=e.layout,r=e.description;return F.createElement(fw,Object.assign({},De(this.props,dN.allowedProps),Qo(this.props,fw.allowedProps),{description:r,layout:i==="columns"&&n==="toggle"?"stacked":i,vAlign:n==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:n==="toggle"?"none":"small",startAt:n==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},Wl.displayName="RadioInputGroup",Wl.componentId="RadioInputGroup",Wl.allowedProps=uee,Wl.propTypes=lee,Wl.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},Wl))||Mg)||Mg);function cee(t,e){const n={};return Object.keys(t).forEach(i=>{const r=t[i],s=r.minWidth,o=r.maxWidth,a=r.minHeight,l=r.maxHeight;n[i]={minWidth:s&&mi(s,e)||0,maxWidth:o&&mi(o,e)||1/0,minHeight:a&&mi(a,e)||0,maxHeight:l&&mi(l,e)||1/0}}),function({width:i,height:r}){const s={};return Object.entries(n).forEach(([o,a])=>{const l=a.minWidth,u=a.maxWidth,c=a.minHeight,d=a.maxHeight;s[o]=l<=i&&i<=u&&c<=r&&r<=d}),s}}const dee=(t,e,n)=>{const i=typeof e=="function"?e():e,r=sn(i),s=r.width,o=r.height;let a=[];const l=d=>{const h=hN(t,i,a,d);h&&(a=h,n(a))},u=f1(l,100,{leading:!1,trailing:!0}),c=new ResizeObserver(d=>{for(const h of d){const f=h.contentRect,m=f.width,b=f.height;s!==m&&u({width:m,height:b})}});return c.observe(i),l({width:s,height:o}),{remove(){c&&c.disconnect(),u&&u.cancel()}}};function hN(t,e,n=[],i){const r=at(e);let s=i||sn(r),o=s.width,a=s.height;o=Math.floor(o),a=Math.floor(a);const l=cee(t,r)({width:o,height:a}),u=Object.keys(l).filter(c=>l[c]).map(c=>c);return n.length!==u.length||n.filter(c=>u.indexOf(c)===-1).length>0?u:null}function fN(t,e){const n=Object.keys(t);if(n.length>4)throw new Error("Expected maximum 4 keys in query object.");let i="";const r="and";for(const s of n){const o=["minHeight","maxHeight","minWidth","maxWidth"];if(o.indexOf(s)===-1)throw new Error(`Invalid key \`${s}\` in query object. Valid keys should consist of one of the following: ${o.join(", ")} (case sensitive)`);const a=t[s];if(typeof a!="string"&&typeof a!="number")throw new Error("The value of the query object must be a string or number.");if(!a)throw new Error("No value supplied for query object");i+=`(${hee(s)}: ${mi(a,e)}px) ${r} `}return i.slice(0,-r.length-2)}function hee(t){const e=t.toLowerCase();return e.slice(0,3)+"-"+e.slice(3)}const fee=(t,e,n,i=_X)=>{const r=typeof e=="function"?e():e,s=l=>{const u=Object.keys(l).filter(c=>l[c].matches).map(c=>c);n(u)},o={},a=()=>{s(o)};return Object.keys(t).forEach(l=>{const u=i(fN(t[l],r),r);u&&(u.addListener(a),o[l]=u)}),s(o),{remove(){o&&Object.keys(o).forEach(l=>{o[l].removeListener(a)})}}},pee={validQuery(t,e,n){try{return fN(t[e]),null}catch(i){return new Error(`Invalid query prop supplied to \`${n}\`. ${i.message}`)}}},mee={match:p.oneOf(["element","media"]),query:p.objectOf(pee.validQuery).isRequired,props:p.objectOf(p.object),render:p.func,children:p.func,display:p.oneOf(["inline","block","inline-block","flex","inline-flex"]),elementRef:p.func},gee=["match","query","props","render","children","display","elementRef"];class Im extends T.Component{constructor(...e){super(...e),this.ref=null,this._matchListener=null,this.state={matches:[],hasRendered:!1},this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.updateMatches=(n,i)=>{this.setState({matches:n},()=>{typeof i=="function"&&i()})}}componentDidMount(){if(tt(!!(this.props.render||this.props.children),"[Responsive] must have either a `render` prop or `children` prop."),this.props.match==="element"){const e=hN(this.props.query,this)||[];this.setState({matches:e,hasRendered:!0})}else this.setState({hasRendered:!0});this._matchListener=this.addMatchListener(this.props.query,this.updateMatches)}componentWillUnmount(){this.removeMatchListener()}componentDidUpdate(e){const n=this.props,i=n.match,r=n.query;(i!==e.match||!u1(r,e.query))&&(this.removeMatchListener(),this._matchListener=this.addMatchListener(r,this.updateMatches,i))}addMatchListener(e,n,i=this.props.match){return(i==="element"?dee:fee)(e,()=>at(this),n)}removeMatchListener(){this._matchListener&&this._matchListener.remove()}mergeProps(e,n){if(!n)return null;const i={};return e.forEach(r=>{const s=n[r];Object.keys(s).forEach(o=>{const a=i[o];Be(!(o in i),[`[Responsive] The prop \`${o}\` is defined at 2 or more breakpoints`,`which are currently applied at the same time. Its current value, \`${a}\`,`,`will be overwritten as \`${s[o]}\`.`].join(" ")),i[o]=s[o]})}),i}render(){const e=this.state,n=e.matches,i=e.hasRendered,r=this.props,s=r.props,o=r.render,a=r.children,l=r.display;let u;return i&&(u=a||o),F.createElement("div",{ref:this.handleRef,style:{display:l}},u&&u(this.mergeProps(n,s),n))}}Im.displayName="Responsive";Im.allowedProps=gee;Im.propTypes=mee;Im.defaultProps={children:null,match:"element",props:null};const bee={id:p.string.isRequired,value:p.oneOfType([p.string,p.number]).isRequired,isDisabled:p.bool,renderBeforeLabel:p.oneOfType([p.node,p.func]),renderAfterLabel:p.oneOfType([p.node,p.func]),children:p.string},Oee=["id","value","isDisabled","renderBeforeLabel","renderAfterLabel","children"];let is=class extends T.Component{render(){return null}};is.displayName="Option";is.componentId="SimpleSelect.Option";is.allowedProps=Oee;is.propTypes=bee;is.defaultProps={isDisabled:!1};const yee={renderLabel:p.oneOfType([p.node,p.func]).isRequired,children:_t.oneOf([is])},vee=["renderLabel","children"];class $s extends T.Component{render(){return null}}$s.displayName="Group";$s.componentId="SimpleSelect.Group";$s.allowedProps=vee;$s.propTypes=yee;$s.defaultProps={};const See={renderLabel:p.oneOfType([p.node,p.func]).isRequired,value:p.oneOfType([p.string,p.number]),defaultValue:p.string,id:p.string,size:p.oneOf(["small","medium","large"]),assistiveText:p.string,placeholder:p.string,interaction:p.oneOf(["enabled","disabled","readonly"]),isRequired:p.bool,isInline:p.bool,width:p.string,visibleOptionsCount:p.number,optionsMaxHeight:p.string,optionsMaxWidth:p.string,messages:p.arrayOf(zo.message),placement:hn.placement,constrain:hn.constrain,mountNode:hn.mountNode,onChange:p.func,onFocus:p.func,onBlur:p.func,onShowOptions:p.func,onHideOptions:p.func,inputRef:p.func,listRef:p.func,renderEmptyOption:p.oneOfType([p.node,p.func]),renderBeforeInput:p.oneOfType([p.node,p.func]),renderAfterInput:p.oneOfType([p.node,p.func]),children:_t.oneOf([$s,is])},wee=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","visibleOptionsCount","optionsMaxHeight","optionsMaxWidth","messages","placement","constrain","mountNode","onChange","onFocus","onBlur","onShowOptions","onHideOptions","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","children"],_ee=["id","value","children","renderBeforeLabel","renderAfterLabel"],kee=["id","renderLabel","children"],xee=["renderLabel","value","defaultValue","id","size","assistiveText","placeholder","interaction","isRequired","isInline","width","optionsMaxWidth","optionsMaxHeight","visibleOptionsCount","messages","placement","constrain","mountNode","inputRef","listRef","renderEmptyOption","renderBeforeInput","renderAfterInput","onFocus","onBlur","onShowOptions","onHideOptions","children"];var uP,cP,Ng,po;let dP=(uP=Kt(),cP=Ne(),uP(Ng=cP(Ng=(po=class extends T.Component{constructor(e){super(e),this.ref=null,this._emptyOptionId=void 0,this.getOption=(i,r)=>{const s=T.Children.toArray(this.props.children);let o;for(let a=0;a{this.ref=i},this.handleBlur=i=>{this.setState({highlightedOptionId:void 0}),typeof this.props.onBlur=="function"&&this.props.onBlur(i)},this.handleShowOptions=i=>{this.setState({isShowingOptions:!0}),typeof this.props.onShowOptions=="function"&&this.props.onShowOptions(i)},this.handleHideOptions=i=>{this.setState(r=>{const s=this.getOption("id",r.selectedOptionId);return{isShowingOptions:!1,highlightedOptionId:void 0,inputValue:s?s.props.children:""}}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)},this.handleHighlightOption=(i,{id:r})=>{if(r===this._emptyOptionId)return;const s=this.getOption("id",r),o=s==null?void 0:s.props.children,a=i.type==="keydown"?o:this.state.inputValue;this.setState({highlightedOptionId:r,inputValue:a})},this.handleSelectOption=(i,{id:r})=>{if(r===this._emptyOptionId){this.setState({isShowingOptions:!1});return}const s=this.getOption("id",r),o=s&&s.props.value;this.isControlled?this.setState({isShowingOptions:!1}):this.setState(a=>({isShowingOptions:!1,selectedOptionId:r,inputValue:s?s.props.children:a.inputValue})),s&&typeof this.props.onChange=="function"&&this.props.onChange(i,{value:o,id:r}),typeof this.props.onHideOptions=="function"&&this.props.onHideOptions(i)};const n=this.getInitialOption(e);this.state={inputValue:n?n.props.children:"",isShowingOptions:!1,highlightedOptionId:void 0,selectedOptionId:n?n.props.id:void 0},this._emptyOptionId=e.deterministicId("Select-EmptyOption")}get _select(){return this.ref}focus(){this.ref&&this.ref.focus()}get focused(){return this.ref?this.ref.focused:!1}get id(){return this.ref?this.ref.id:void 0}get isControlled(){return typeof this.props.value<"u"}get interaction(){return Co({props:this.props})}componentDidUpdate(e){if(this.props.value!==e.value){let n=this.getOption("value",this.props.value);typeof this.props.value>"u"&&(n=this.getOption("value",e.value)),this.setState({inputValue:n?n.props.children:"",selectedOptionId:n?n.props.id:""})}}getInitialOption(e){const n=e.value,i=e.defaultValue,r=n||i;return typeof r=="string"||typeof r=="number"?this.getOption("value",r):this.getFirstOption()}getOptionLabelById(e){const n=this.getOption("id",e);return n?n.props.children:""}getFirstOption(){const e=T.Children.toArray(this.props.children);let n;for(let i=0;iQe(n,[is])?this.renderOption(n):Qe(n,[$s])?this.renderGroup(n):null).filter(n=>!!n),e.length===0?this.renderEmptyOption():e}renderEmptyOption(){return F.createElement(Rg.Option,{id:this._emptyOptionId,isHighlighted:!1,isSelected:!1},lt(this.props.renderEmptyOption))}renderOption(e){const n=e.props,i=n.id,r=n.value,s=n.children,o=n.renderBeforeLabel,a=n.renderAfterLabel,l=Le(n,_ee),u=e.props.isDisabled,c=i===this.state.selectedOptionId,d=i===this.state.highlightedOptionId,h=f=>{var m;return typeof f=="function"&&!(f!=null&&(m=f.prototype)!==null&&m!==void 0&&m.isReactComponent)?f.bind(null,{id:i,isDisabled:u,isSelected:c,isHighlighted:d,children:s}):f};return F.createElement(Rg.Option,Object.assign({id:i,value:r,key:e.key||i,isHighlighted:i===this.state.highlightedOptionId,isSelected:i===this.state.selectedOptionId,isDisabled:e.props.isDisabled,renderBeforeLabel:h(o),renderAfterLabel:h(a)},Ft(l)),s)}renderGroup(e){const n=e.props,i=n.id,r=n.renderLabel,s=n.children,o=Le(n,kee);return F.createElement(Rg.Group,Object.assign({renderLabel:r,key:e.key||i},Ft(o)),T.Children.map(s,a=>this.renderOption(a)))}render(){const e=this.props,n=e.renderLabel;e.value,e.defaultValue;const i=e.id,r=e.size,s=e.assistiveText,o=e.placeholder;e.interaction;const a=e.isRequired,l=e.isInline,u=e.width,c=e.optionsMaxWidth,d=e.optionsMaxHeight,h=e.visibleOptionsCount,f=e.messages,m=e.placement,b=e.constrain,y=e.mountNode,O=e.inputRef,v=e.listRef;e.renderEmptyOption;const S=e.renderBeforeInput,_=e.renderAfterInput,k=e.onFocus;e.onBlur,e.onShowOptions,e.onHideOptions,e.children;const x=Le(e,xee);return F.createElement(Rg,Object.assign({renderLabel:n,inputValue:this.state.inputValue,isShowingOptions:this.state.isShowingOptions,id:i,size:r,assistiveText:s,placeholder:o,interaction:this.interaction,isRequired:a,isInline:l,width:u,optionsMaxWidth:c,optionsMaxHeight:d,visibleOptionsCount:h,messages:f,placement:m,constrain:b,mountNode:y,ref:this.handleRef,inputRef:O,listRef:v,renderBeforeInput:S,renderAfterInput:_,onFocus:k,onBlur:this.handleBlur,onRequestShowOptions:this.handleShowOptions,onRequestHideOptions:this.handleHideOptions,onRequestHighlightOption:this.handleHighlightOption,onRequestSelectOption:this.handleSelectOption},Ft(x)),this.renderChildren())}},po.displayName="SimpleSelect",po.componentId="SimpleSelect",po.Option=is,po.Group=$s,po.allowedProps=wee,po.propTypes=See,po.defaultProps={size:"medium",isRequired:!1,isInline:!1,visibleOptionsCount:8,placement:"bottom stretch",constrain:"window",renderEmptyOption:"---"},po))||Ng)||Ng);class ut{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Jd(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Rs.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Jd(this,e,n);let i=[];return this.decompose(e,n,i,0),Rs.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new dp(this),s=new dp(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new dp(this,e)}iterRange(e,n=this.length){return new pN(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new mN(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ut.empty:e.length<=32?new tn(e):Rs.from(tn.split(e,[]))}}class tn extends ut{constructor(e,n=Eee(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new Cee(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new tn(hP(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=F0(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new tn(a,o.length+s.length));else{let l=a.length>>1;i.push(new tn(a.slice(0,l)),new tn(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof tn))return super.replace(e,n,i);[e,n]=Jd(this,e,n);let r=F0(this.text,F0(i.text,hP(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new tn(r,s):Rs.from(tn.split(r,[]),s)}sliceString(e,n=this.length,i=` -`){[e,n]=Jd(this,e,n);let r="";for(let s=0,o=0;s<=n&&oe&&o&&(r+=i),es&&(r+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new tn(i,r)),i=[],r=-1);return r>-1&&n.push(new tn(i,r)),n}}class Rs extends ut{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s=o){let u=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!u?i.push(a):a.decompose(e-o,n-o,i,u)}o=l+1}}replace(e,n,i){if([e,n]=Jd(this,e,n),i.lines=s&&n<=a){let l=o.replace(e-s,n-s,i),u=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new Rs(c,this.length-(n-e)+i.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){[e,n]=Jd(this,e,n);let r="";for(let s=0,o=0;se&&s&&(r+=i),eo&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Rs))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],u=e.children[s];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let f of e)i+=f.lines;if(i<32){let f=[];for(let m of e)m.flatten(f);return new tn(f,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,u=-1,c=[];function d(f){let m;if(f.lines>s&&f instanceof Rs)for(let b of f.children)d(b);else f.lines>o&&(l>o||!l)?(h(),a.push(f)):f instanceof tn&&l&&(m=c[c.length-1])instanceof tn&&f.lines+m.lines<=32?(l+=f.lines,u+=f.length+1,c[c.length-1]=new tn(m.text.concat(f.text),m.length+1+f.length)):(l+f.lines>r&&h(),l+=f.lines,u+=f.length+1,c.push(f))}function h(){l!=0&&(a.push(c.length==1?c[0]:Rs.from(c,u)),u=-1,l=c.length=0)}for(let f of e)d(f);return h(),a.length==1?a[0]:new Rs(a,n)}}ut.empty=new tn([""],0);function Eee(t){let e=-1;for(let n of t)e+=n.length+1;return e}function F0(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s=n&&(l>i&&(a=a.slice(0,i-r)),r0?1:(e instanceof tn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof tn?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof tn){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof tn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class pN{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new dp(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class mN{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ut.prototype[Symbol.iterator]=function(){return this.iter()},dp.prototype[Symbol.iterator]=pN.prototype[Symbol.iterator]=mN.prototype[Symbol.iterator]=function(){return this});let Cee=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function Jd(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let $d="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;t<$d.length;t++)$d[t]+=$d[t-1];function Tee(t){for(let e=1;e<$d.length;e+=2)if($d[e]>t)return $d[e-1]<=t;return!1}function fP(t){return t>=127462&&t<=127487}const pP=8205;function Zn(t,e,n=!0,i=!0){return(n?gN:Aee)(t,e,i)}function gN(t,e,n){if(e==t.length)return e;e&&bN(t.charCodeAt(e))&&ON(t.charCodeAt(e-1))&&e--;let i=Un(t,e);for(e+=Er(i);e=0&&fP(Un(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Aee(t,e,n){for(;e>0;){let i=gN(t,e-2,n);if(i=56320&&t<57344}function ON(t){return t>=55296&&t<56320}function Un(t,e){let n=t.charCodeAt(e);if(!ON(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return bN(i)?(n-55296<<10)+(i-56320)+65536:n}function Sx(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Er(t){return t<65536?1:2}const gw=/\r\n?|\n/;var Wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Wn||(Wn={}));class Us{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return s+(e-r);s+=a}else{if(i!=Wn.Simple&&u>=e&&(i==Wn.TrackDel&&re||i==Wn.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&a>=e)return rn?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Us(e)}static create(e){return new Us(e)}}class vn extends Us{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return bw(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return Ow(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length0&&xa(i,n,s.text),s.forward(c),a+=c}let u=e[o++];for(;a>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(c=!1){if(!c&&!r.length)return;oh||d<0||h>n)throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`);let m=f?typeof f=="string"?ut.of(f.split(i||gw)):f:ut.empty,b=m.length;if(d==h&&b==0)return;do&&ei(r,d-o,-1),ei(r,h-d,b),xa(s,r,m),o=h}}return u(e),l(!a),a}static empty(e){return new vn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ra&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function xa(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,u,s,c,d),r=u,s=c}}}function Ow(t,e,n,i=!1){let r=[],s=i?[]:null,o=new Zp(t),a=new Zp(e);for(let l=-1;;)if(o.ins==-1&&a.ins==-1){let u=Math.min(o.len,a.len);ei(r,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let u=0,c=o.len;for(;c;)if(a.ins==-1){let d=Math.min(c,a.len);u+=d,c-=d,a.forward(d)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>u),s.forward2(l),o.forward(l)}}}}class Zp{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?ut.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ut.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class yu{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new yu(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Y.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Y.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Y.range(e.anchor,e.head)}static create(e,n,i){return new yu(e,n,i)}}class Y{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Y.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y(e.ranges.map(n=>yu.fromJSON(n)),e.main)}static single(e,n=e){return new Y([Y.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;rs.head?Y.range(l,a):Y.range(a,l))}}return new Y(e,n)}}function vN(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let wx=0;class he{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=wx++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:_x),!!e.static,e.enables)}of(e){return new V0([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new V0(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new V0(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function _x(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class V0{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=wx++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||c.push(e[d.id]);return{create(d){return d.values[o]=i(d),1},update(d,h){if(l&&h.docChanged||u&&(h.docChanged||h.selection)||yw(d,c)){let f=i(d);if(a?!mP(f,d.values[o],r):!r(f,d.values[o]))return d.values[o]=f,1}return 0},reconfigure:(d,h)=>{let f,m=h.config.address[s];if(m!=null){let b=Wb(h,m);if(this.dependencies.every(y=>y instanceof he?h.facet(y)===d.facet(y):y instanceof In?h.field(y,!1)==d.field(y,!1):!0)||(a?mP(f=i(d),b,r):r(f=i(d),b)))return d.values[o]=b,0}else f=i(d);return d.values[o]=f,1}}}}function mP(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let u=[];for(let c=0;ci===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(gP).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,gP.of({field:this,create:e})]}get extension(){return this}}const cu={lowest:4,low:3,default:2,high:1,highest:0};function vf(t){return e=>new SN(e,t)}const Ho={highest:vf(cu.highest),high:vf(cu.high),default:vf(cu.default),low:vf(cu.low),lowest:vf(cu.lowest)};class SN{constructor(e,n){this.inner=e,this.prec=n}}class b1{of(e){return new vw(this,e)}reconfigure(e){return b1.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class vw{constructor(e,n){this.compartment=e,this.inner=n}}class Vb{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let h of Pee(e,n,o))h instanceof In?r.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let a=Object.create(null),l=[],u=[];for(let h of r)a[h.id]=u.length<<1,u.push(f=>h.slot(f));let c=i==null?void 0:i.config.facets;for(let h in s){let f=s[h],m=f[0].facet,b=c&&c[h]||[];if(f.every(y=>y.type==0))if(a[m.id]=l.length<<1|1,_x(b,f))l.push(i.facet(m));else{let y=m.combine(f.map(O=>O.value));l.push(i&&m.compare(y,i.facet(m))?i.facet(m):y)}else{for(let y of f)y.type==0?(a[y.id]=l.length<<1|1,l.push(y.value)):(a[y.id]=u.length<<1,u.push(O=>y.dynamicSlot(O)));a[m.id]=u.length<<1,u.push(y=>Ree(y,m,f))}}let d=u.map(h=>h(a));return new Vb(e,o,d,a,l,s)}}function Pee(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let u=i[l].indexOf(o);u>-1&&i[l].splice(u,1),o instanceof vw&&n.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let u of o)s(u,a);else if(o instanceof vw){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),s(u,a)}else if(o instanceof SN)s(o.inner,o.prec);else if(o instanceof In)i[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof V0)i[a].push(o),o.facet.extensions&&s(o.facet.extensions,cu.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,a)}}return s(t,cu.default),i.reduce((o,a)=>o.concat(a))}function hp(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function Wb(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const wN=he.define(),Sw=he.define({combine:t=>t.some(e=>e),static:!0}),_N=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),kN=he.define(),xN=he.define(),EN=he.define(),CN=he.define({combine:t=>t.length?t[0]:!1});class Uo{constructor(e,n){this.type=e,this.value=n}static define(){return new Iee}}class Iee{of(e){return new Uo(this,e)}}class $ee{constructor(e){this.map=e}of(e){return new ze(this,e)}}class ze{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ze(this.type,n)}is(e){return this.type==e}static define(e={}){return new $ee(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}ze.reconfigure=ze.define();ze.appendConfig=ze.define();class fn{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&vN(i,n.newLength),s.some(a=>a.type==fn.time)||(this.annotations=s.concat(fn.time.of(Date.now())))}static create(e,n,i,r,s,o){return new fn(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(fn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}fn.time=Uo.define();fn.userEvent=Uo.define();fn.addToHistory=Uo.define();fn.remote=Uo.define();function Dee(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i=t[i]))s=t[i++],o=t[i++];else if(r=0;r--){let s=i[r](t);s instanceof fn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof fn?t=s[0]:t=AN(e,Dd(s),!1)}return t}function Mee(t){let e=t.startState,n=e.facet(EN),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=TN(i,ww(e,s,t.changes.newLength),!0))}return i==t?t:fn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const Nee=[];function Dd(t){return t==null?Nee:Array.isArray(t)?t:[t]}var Ut=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Ut||(Ut={}));const Bee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _w;try{_w=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Qee(t){if(_w)return _w.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||Bee.test(n)))return!0}return!1}function zee(t){return e=>{if(!/\S/.test(e))return Ut.Space;if(Qee(e))return Ut.Word;for(let n=0;n-1)return Ut.Word;return Ut.Other}}class qe{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;ar.set(u,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(ze.reconfigure)?(n=null,i=a.value):a.is(ze.appendConfig)&&(n=null,i=Dd(i).concat(a.value));let s;n?s=e.startState.values.slice():(n=Vb.resolve(i,r,this),s=new qe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(Sw)?e.newSelection:e.newSelection.asSingle();new qe(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Y.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Dd(i.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return qe.create({doc:e.doc,selection:Y.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=Vb.resolve(e.extensions||[],new Map),i=e.doc instanceof ut?e.doc:ut.of((e.doc||"").split(n.staticFacet(qe.lineSeparator)||gw)),r=e.selection?e.selection instanceof Y?e.selection:Y.single(e.selection.anchor,e.selection.head):Y.single(0);return vN(r,i.length),n.staticFacet(Sw)||(r=r.asSingle()),new qe(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||` -`}get readOnly(){return this.facet(CN)}phrase(e,...n){for(let i of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(wN))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return zee(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=Zn(n,o,!1);if(s(n.slice(l,o))!=Ut.Word)break;o=l}for(;at.length?t[0]:4});qe.lineSeparator=_N;qe.readOnly=CN;qe.phrases=he.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});qe.languageData=wN;qe.changeFilter=kN;qe.transactionFilter=xN;qe.transactionExtender=EN;b1.reconfigure=ze.define();function Js(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],a=i[s];if(a===void 0)i[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Nu{eq(e){return this==e}range(e,n=e){return kw.create(e,n,this)}}Nu.prototype.startSide=Nu.prototype.endSide=0;Nu.prototype.point=!1;Nu.prototype.mapMode=Wn.TrackDel;let kw=class RN{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new RN(e,n,i)}};function xw(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class kx{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,u=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return u>=0?o:a;u>=0?a=l:o=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sf||h==f&&u.startSide>0&&u.endSide<=0)continue;(f-h||u.endSide-u.startSide)<0||(o<0&&(o=h),u.point&&(a=Math.max(a,f-h)),i.push(u),r.push(h-o),s.push(f-o))}return{mapped:i.length?new kx(r,s,i,a):null,pos:o}}}class ot{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new ot(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(xw)),this.isEmpty)return n.length?ot.of(n):this;let a=new PN(this,null,-1).goto(0),l=0,u=[],c=new Fa;for(;a.value||l=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||sa.to||s=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return qp.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return qp.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=s),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=s),l=bP(o,a,i),u=new Sf(o,l,s),c=new Sf(a,l,s);i.iterGaps((d,h,f)=>OP(u,d,c,h,f,r)),i.empty&&i.length==0&&OP(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),o=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=bP(s,o),l=new Sf(s,a,0).goto(i),u=new Sf(o,a,0).goto(i);for(;;){if(l.to!=u.to||!Ew(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,s=-1){let o=new Sf(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let u=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),d=o.pointFroma&&(r.span(a,u,o.active,l),l=o.openEnd(u));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new Fa;for(let r of e instanceof kw?[e]:n?Hee(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return ot.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=ot.empty;r=r.nextLayer)n=new ot(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}ot.empty=new ot([],[],null,-1);function Hee(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(xw);e=i}return t}ot.empty.nextLayer=ot.empty;class Fa{finishChunk(e){this.chunks.push(new kx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Fa)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(ot.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=ot.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function bP(t,e,n){let i=new Map;for(let s of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new PN(o,n,i,s));return r.length==1?r[0]:new qp(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)Wy(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)Wy(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Wy(this.heap,0)}}}function Wy(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Sf{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=qp.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Bg(this.active,e),Bg(this.activeTo,e),Bg(this.activeRank,e),this.minActive=yP(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;Qg(this.active,n,i),Qg(this.activeTo,n,r),Qg(this.activeRank,n,s),e&&Qg(e,n,this.cursor.from),this.minActive=yP(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Bg(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function OP(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,a=i,l=i-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,d=Math.min(c,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Ew(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,d,t.point,n.point):d>a&&!Ew(t.active,n.active)&&s.compareRange(a,d,t.active,n.active),c>o)break;a=c,u<=0&&t.next(),u>=0&&n.next()}}function Ew(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function yP(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=Zn(t,r)}return i===!0?-1:t.length}const Tw="ͼ",vP=typeof Symbol>"u"?"__"+Tw:Symbol.for(Tw),Aw=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),SP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Va{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,u){let c=[],d=/^@(\w+)\b/.exec(o[0]),h=d&&d[1]=="keyframes";if(d&&a==null)return l.push(o[0]+";");for(let f in a){let m=a[f];if(/&/.test(f))s(f.split(/,\s*/).map(b=>o.map(y=>b.replace(/&/,y))).reduce((b,y)=>b.concat(y)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+f+") should be a primitive value.");s(r(f),m,c,h)}else m!=null&&c.push(f.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+m+";")}(c.length||h)&&l.push((i&&!d&&!u?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=SP[vP]||1;return SP[vP]=e+1,Tw+e.toString(36)}static mount(e,n,i){let r=e[Aw],s=i&&i.nonce;r?s&&r.setNonce(s):r=new Uee(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let wP=new Map;class Uee{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=wP.get(i);if(s)return e[Aw]=s;this.sheet=new r.CSSStyleSheet,wP.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Aw]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Fee=typeof navigator<"u"&&/Mac/.test(navigator.platform),Vee=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Fn=0;Fn<10;Fn++)Wa[48+Fn]=Wa[96+Fn]=String(Fn);for(var Fn=1;Fn<=24;Fn++)Wa[Fn+111]="F"+Fn;for(var Fn=65;Fn<=90;Fn++)Wa[Fn]=String.fromCharCode(Fn+32),Yp[Fn]=String.fromCharCode(Fn);for(var jy in Wa)Yp.hasOwnProperty(jy)||(Yp[jy]=Wa[jy]);function Wee(t){var e=Fee&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Vee&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Yp:Wa)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function jb(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Rw(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function jee(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function W0(t,e){if(!e.anchorNode)return!1;try{return Rw(t,e.anchorNode)}catch{return!1}}function Gp(t){return t.nodeType==3?Qu(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function fp(t,e,n,i){return n?_P(t,e,n,i,-1)||_P(t,e,n,i,1):!1}function Bu(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Xb(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function _P(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:Do(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Bu(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?Do(t):0}else return!1}}function Do(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function xx(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Xee(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function IN(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function Zee(t,e,n,i,r,s,o,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let h,f=c==l.body,m=1,b=1;if(f)h=Xee(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let v=c.getBoundingClientRect();({scaleX:m,scaleY:b}=IN(c,v)),h={left:v.left,right:v.left+c.clientWidth*m,top:v.top,bottom:v.top+c.clientHeight*b}}let y=0,O=0;if(r=="nearest")e.top0&&e.bottom>h.bottom+O&&(O=e.bottom-h.bottom+O+o)):e.bottom>h.bottom&&(O=e.bottom-h.bottom+o,n<0&&e.top-O0&&e.right>h.right+y&&(y=e.right-h.right+y+s)):e.right>h.right&&(y=e.right-h.right+s,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class Yee{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Do(n):0),i,Math.min(e.focusOffset,i?Do(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Fc=null;function $N(t){if(t.setActive)return t.setActive();if(Fc)return t.focus(Fc);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Fc==null?{get preventScroll(){return Fc={preventScroll:!0},!0}}:void 0),!Fc){Fc=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function MN(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Do(n)}else if(n.parentNode&&!Xb(n))i=Bu(n),n=n.parentNode;else return null}}function NN(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return d.domBoundsAround(e,n,u);if(h>=e&&r==-1&&(r=l,s=u),u>n&&d.dom.parentNode==this.dom){o=l,a=c;break}c=h,u=h+d.breakAfter}return{from:s,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Ex){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function QN(t,e,n,i,r,s,o,a,l){let{children:u}=t,c=u.length?u[e]:null,d=s.length?s[s.length-1]:null,h=d?d.breakAfter:o;if(!(e==i&&c&&!o&&!h&&s.length<2&&c.merge(n,r,s.length?d:null,n==0,a,l))){if(i0&&(!o&&s.length&&c.merge(n,c.length,s[0],!1,a,0)?c.breakAfter=s.shift().breakAfter:(n2);var me={mac:TP||/Mac/.test(ir.platform),windows:/Win/.test(ir.platform),linux:/Linux|X11/.test(ir.platform),ie:O1,ie_version:HN?Pw.documentMode||6:$w?+$w[1]:Iw?+Iw[1]:0,gecko:EP,gecko_version:EP?+(/Firefox\/(\d+)/.exec(ir.userAgent)||[0,0])[1]:0,chrome:!!Xy,chrome_version:Xy?+Xy[1]:0,ios:TP,android:/Android\b/.test(ir.userAgent),webkit:CP,safari:UN,webkit_version:CP?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Pw.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const Jee=256;class ds extends kt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof ds)||this.length-(n-e)+i.length>Jee||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new ds(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ti(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return ete(this.dom,e,n)}}class Lo extends kt{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(DN(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,o){return i&&(!(i instanceof Lo&&i.mark.eq(this.mark))||e&&s<=0||ne&&n.push(i=e&&(r=s),i=l,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Lo(this.mark,n,o)}domAtPos(e){return FN(this,e)}coordsAt(e,n){return WN(this,e,n)}}function ete(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,o=0;e==0&&n<0||e==i&&n>=0?me.chrome||me.gecko||(e?(r--,o=1):s=0)?0:a.length-1];return me.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),o?xx(l,o<0):l||null}class Ea extends kt{static create(e,n,i){return new Ea(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Ea.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,o){return i&&(!(i instanceof Ea)||!this.widget.compare(i.widget)||e>0&&s<=0||n0)?ti.before(this.dom):ti.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?r.length-1:0;s=r[a],!(e>0?a==0:a==r.length-1||s.top0?ti.before(this.dom):ti.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ut.empty}get isHidden(){return!0}}ds.prototype.children=Ea.prototype.children=eh.prototype.children=Ex;function FN(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;rs&&e0;s--){let o=i[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=r;s0&&e instanceof Lo&&r.length&&(i=r[r.length-1])instanceof Lo&&i.mark.eq(e.mark)?VN(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function WN(t,e,n){let i=null,r=-1,s=null,o=-1;function a(u,c){for(let d=0,h=0;d=c&&(f.children.length?a(f,c-h):(!s||s.isHidden&&n>0)&&(m>c||h==m&&f.getSide()>0)?(s=f,o=c-h):(h-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Lw(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function nte(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Cx(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){VN(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=Dw(n,this.attrs||{})),i&&(this.attrs=Dw({class:i},this.attrs||{}))}domAtPos(e){return FN(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(DN(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Lw(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&kt.get(r)instanceof Lo;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=kt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!me.ios||!this.children.some(s=>s instanceof ds))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof ds)||/[^ -~]/.test(i.text))return null;let r=Gp(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=WN(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=n){if(s instanceof On)return s;if(o>n)break}r=o+s.breakAfter}return null}}class Na extends kt{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,o){return i&&(!(i instanceof Na)||!this.widget.compare(i.widget)||e>0&&s<=0||n0}}class Fo{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var _i=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(_i||(_i={}));class Ce extends Nu{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new $m(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new ja(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=jN(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new ja(e,i,r,n,e.widget||null,!0)}static line(e){return new Dm(e)}static set(e,n=!1){return ot.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ce.none=ot.empty;class $m extends Ce{constructor(e){let{start:n,end:i}=jN(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof $m&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Cx(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}$m.prototype.point=!1;class Dm extends Ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Dm&&this.spec.class==e.spec.class&&Cx(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Dm.prototype.mapMode=Wn.TrackBefore;Dm.prototype.point=!0;class ja extends Ce{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?Wn.TrackBefore:Wn.TrackAfter:Wn.TrackDel}get type(){return this.startSide!=this.endSide?_i.WidgetRange:this.startSide<=0?_i.WidgetBefore:_i.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ja&&ite(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}ja.prototype.point=!0;function jN(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function ite(t,e){return t==e||!!(t&&e&&t.compare(e))}function Mw(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class pp{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Na&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new On),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(zg(new eh(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Na)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(zg(new ds(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof ja){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof ja)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Na(i.widget||th.block,a,i));else{let l=Ea.create(i.widget||th.inline,a,a?0:i.startSide),u=this.atCursorPos&&!l.isEditable&&s<=r.length&&(e0),c=!l.isEditable&&(er.length||i.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(d.append(zg(new eh(1),r),s),s=r.length+Math.max(0,s-r.length)),d.append(zg(l,r),s),this.atCursorPos=c,this.pendingBuffer=c?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let o=new pp(e,n,i,s);return o.openEnd=ot.spans(r,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function zg(t,e){for(let n of e)t=new Lo(n,[t],t.length);return t}class th extends Fo{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}th.inline=new th("span");th.block=new th("div");var $t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}($t||($t={}));const zu=$t.LTR,Tx=$t.RTL;function XN(t){let e=[];for(let n=0;n=n){if(a.level==i)return o;(s<0||(r!=0?r<0?a.fromn:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function qN(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;b-=3)if(ws[b+1]==-f){let y=ws[b+2],O=y&2?r:y&4?y&1?s:r:0;O&&(wt[d]=wt[ws[b]]=O),a=b;break}}else{if(ws.length==189)break;ws[a++]=d,ws[a++]=h,ws[a++]=l}else if((m=wt[d])==2||m==1){let b=m==r;l=b?0:1;for(let y=a-3;y>=0;y-=3){let O=ws[y+2];if(O&2)break;if(b)ws[y+2]|=2;else{if(O&4)break;ws[y+2]|=4}}}}}function ute(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,a=rl;)m==y&&(m=n[--b].from,y=b?n[b-1].to:t),wt[--m]=f;l=c}else s=u,l++}}}function Bw(t,e,n,i,r,s,o){let a=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;ll&&o.push(new Ca(l,b.from,f));let y=b.direction==zu!=!(f%2);Qw(t,y?i+1:i,r,b.inner,b.from,b.to,o),l=b.to}m=b.to}else{if(m==n||(c?wt[m]!=a:wt[m]==a))break;m++}h?Bw(t,l,m,i+1,r,h,o):le;){let c=!0,d=!1;if(!u||l>s[u-1].to){let b=wt[l-1];b!=a&&(c=!1,d=b==16)}let h=!c&&a==1?[]:null,f=c?i:i+1,m=l;e:for(;;)if(u&&m==s[u-1].to){if(d)break e;let b=s[--u];if(!c)for(let y=b.from,O=u;;){if(y==e)break e;if(O&&s[O-1].to==y)y=s[--O].from;else{if(wt[y-1]==a)break e;break}}if(h)h.push(b);else{b.towt.length;)wt[wt.length]=256;let i=[],r=e==zu?0:1;return Qw(t,r,r,n,0,t.length,i),i}function YN(t){return[new Ca(0,t,0)]}let GN="";function dte(t,e,n,i,r){var s;let o=i.head-t.from,a=Ca.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[a],u=l.side(r,n);if(o==u){let h=a+=r?1:-1;if(h<0||h>=e.length)return null;l=e[a=h],o=l.side(!r,n),u=l.side(r,n)}let c=Zn(t.text,o,l.forward(r,n));(cl.to)&&(c=u),GN=t.text.slice(Math.min(o,c),Math.max(o,c));let d=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return d&&c==u&&d.level+(r?0:1)t.some(e=>e)}),sB=he.define({combine:t=>t.some(e=>e)}),oB=he.define();class Md{constructor(e,n="nearest",i="nearest",r=5,s=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Md(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Md(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Hg=ze.define({map:(t,e)=>t.map(e)});function Ni(t,e,n){let i=t.facet(tB);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const y1=he.define({combine:t=>t.length?t[0]:!0});let fte=0;const Hf=he.define();class mn{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=s(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:o}=n||{};return new mn(fte++,e,i,r,a=>{let l=[Hf.of(a)];return o&&l.push(Kp.of(u=>{let c=u.plugin(a);return c?o(c):Ce.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return mn.define(i=>new e(i),n)}}class Zy{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Ni(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Ni(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Ni(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const aB=he.define(),Ax=he.define(),Kp=he.define(),lB=he.define(),Rx=he.define(),uB=he.define();function RP(t,e){let n=t.state.facet(uB);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return ot.spans(i,e.from,e.to,{point(){},span(s,o,a,l){let u=s-e.from,c=o-e.from,d=r;for(let h=a.length-1;h>=0;h--,l--){let f=a[h].spec.bidiIsolate,m;if(f==null&&(f=hte(e.text,u,c)),l>0&&d.length&&(m=d[d.length-1]).to==u&&m.direction==f)m.to=c,d=m.inner;else{let b={from:u,to:c,direction:f,inner:[]};d.push(b),d=b.inner}}}}),r}const cB=he.define();function dB(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(cB)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Uf=he.define();class Pr{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new Pr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAc)break;s+=2}if(!l)return i;new Pr(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,a=l.toB}}}class Zb{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=vn.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,a,l)=>r.push(new Pr(s,o,a,l))),this.changedRanges=r}static create(e,n,i){return new Zb(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class PP extends kt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new On],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Pr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!vte(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?mte(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;i=new Pr(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(me.ie||me.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=Ote(o,a,e.changes);return i=Pr.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=me.chrome||me.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[o]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:d}=a,h,f,m,b;if(i&&i.range.fromBc){let _=pp.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=pp.build(this.view.state.doc,i.range.toB,d,this.decorations,this.dynamicDecorationMap);f=_.breakAtStart,m=_.openStart,b=k.openEnd;let x=this.compositionView(i);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),_.content.length&&x.merge(0,0,_.content[_.content.length-1],!0,0,_.openEnd)&&_.content.pop(),h=_.content.concat(x).concat(k.content)}else({content:h,breakAtStart:f,openStart:m,openEnd:b}=pp.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:O}=s.findPos(u,1),{i:v,off:S}=s.findPos(l,-1);QN(this,v,S,y,O,h,f,m,b)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new ds(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Lo(r,[n],n.length);let i=new On;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=kt.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&W0(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(me.gecko&&a.empty&&!this.hasComposition&&pte(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new ti(d,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!fp(l.node,l.offset,c.anchorNode,c.anchorOffset)||!fp(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,a))&&(this.view.observer.ignore(()=>{me.android&&me.chrome&&this.dom.contains(c.focusNode)&&yte(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=jb(this.view.root);if(d)if(a.empty){if(me.gecko){let h=gte(l.node,l.offset);if(h&&h!=3){let f=(h==1?MN:NN)(l.node,l.offset);f&&(l=new ti(f.node,f.offset))}}d.collapse(l.node,l.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(h)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ti(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ti(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&fp(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=jb(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=On.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let s=kt.get(n.childNodes[r]);s instanceof On&&(i=s.domAtPos(s.length))}return i?new ti(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=kt.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;o--){let a=this.children[o],l=s-a.breakAfter,u=l-a.length;if(le||a.covers(1))&&(!i||a instanceof On&&!(i instanceof On&&n>=0))&&(i=a,r=u),s=u}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof On))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=l}if(!(r instanceof ds))return null;let s=Zn(r.text,i);if(s==i)return null;let o=Qu(r.dom,i,s).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==$t.LTR;for(let u=0,c=0;cr)break;if(u>=i){let f=d.dom.getBoundingClientRect();if(n.push(f.height),o){let m=d.dom.lastChild,b=m?Gp(m):[];if(b.length){let y=b[b.length-1],O=l?y.right-f.left:f.right-y.left;O>a&&(a=O,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?$t.RTL:$t.LTR}measureTextSize(){for(let s of this.children)if(s instanceof On){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Gp(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new BN(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Ce.replace({widget:new IP(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return Ce.set(e)}updateDeco(){let e=0,n=this.view.state.facet(Kp).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(lB).map((s,o)=>{let a=typeof s=="function";return a&&(i=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(ot.join(r))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=dB(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;Zee(this.view.scrollDOM,o,n.head{ie.from&&(n=!0)}),n}function Ste(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return Y.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,a=s;n<0?o=Zn(r.text,s,!1):a=Zn(r.text,s);let l=i(r.text.slice(o,a));for(;o>0;){let u=Zn(r.text,o,!1);if(i(r.text.slice(u,o))!=l)break;o=u}for(;at?e.left-t:Math.max(0,t-e.right)}function _te(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function qy(t,e){return t.tope.top+1}function $P(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Hw(t,e,n){let i,r,s,o,a=!1,l,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let b=Gp(m);for(let y=0;yS||o==S&&s>v){i=m,r=O,s=v,o=S;let _=S?n0?y0)}v==0?n>O.bottom&&(!c||c.bottomO.top)&&(u=m,d=O):c&&qy(c,O)?c=DP(c,O.bottom):d&&qy(d,O)&&(d=$P(d,O.top))}}if(c&&c.bottom>=n?(i=l,r=c):d&&d.top<=n&&(i=u,r=d),!i)return{node:t,offset:0};let h=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return LP(i,h,n);if(a&&i.contentEditable!="false")return Hw(i,h,n);let f=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:f}}function LP(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,o=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,f=h;if((me.chrome||me.gecko)&&Qu(t,a).getBoundingClientRect().left==c.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),s=d}}}return{node:t,offset:r>-1?r:o>0?t.nodeValue.length:0}}function fB(t,e,n,i=-1){var r,s;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,h=d-a;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let _=t.viewState.heightOracle.textHeight/2,k=!1;l=t.elementAtHeight(h),l.type!=_i.Text;)for(;h=i>0?l.bottom+_:l.top-_,!(h>=0&&h<=u);){if(k)return n?null:0;k=!0,i=-i}d=a+h;let f=l.from;if(ft.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:MP(t,o,l,c,d);let m=t.dom.ownerDocument,b=t.root.elementFromPoint?t.root:m,y=b.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(o.left+1,Math.min(o.right-1,c)),y=b.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let O,v=-1;if(y&&((r=t.docView.nearest(y))===null||r===void 0?void 0:r.isEditable)!=!1){if(m.caretPositionFromPoint){let _=m.caretPositionFromPoint(c,d);_&&({offsetNode:O,offset:v}=_)}else if(m.caretRangeFromPoint){let _=m.caretRangeFromPoint(c,d);_&&({startContainer:O,startOffset:v}=_,(!t.contentDOM.contains(O)||me.safari&&kte(O,v,c)||me.chrome&&xte(O,v,c))&&(O=void 0))}}if(!O||!t.docView.dom.contains(O)){let _=On.find(t.docView,f);if(!_)return h>l.top+l.height/2?l.to:l.from;({node:O,offset:v}=Hw(_.dom,c,d))}let S=t.docView.nearest(O);if(!S)return null;if(S.isWidget&&((s=S.dom)===null||s===void 0?void 0:s.nodeType)==1){let _=S.dom.getBoundingClientRect();return e.y<_.top||e.y<=_.bottom&&e.x<=(_.left+_.right)/2?S.posAtStart:S.posAtEnd}else return S.localPosFromDOM(O,v)+S.posAtStart}function MP(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+Cw(o,s,t.state.tabSize)}function kte(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return Qu(t,i-1,i).getBoundingClientRect().left>n}function xte(t,e,n){if(e!=0)return!1;for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():Qu(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function Uw(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==_i.Text))return i}return n}function Ete(t,e,n,i){let r=Uw(t,e.head),s=!i||r.type!=_i.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==$t.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return Y.cursor(l,n?-1:1)}return Y.cursor(n?r.to:r.from,n?-1:1)}function NP(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let a=e,l=null;;){let u=dte(r,s,o,a,n),c=GN;if(!u){if(r.number==(n?t.state.doc.lines:1))return a;c=` -`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return u;l=i(c)}a=u}}function Cte(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==Ut.Space&&(r=o),r==o}}function Tte(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return Y.cursor(r,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),c=t.documentTop;if(u)o==null&&(o=u.left-l.left),a=s<0?u.top:u.bottom;else{let f=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-f.from))),a=(s<0?f.top:f.bottom)+c}let d=l.left+o,h=i??t.viewState.heightOracle.textHeight>>1;for(let f=0;;f+=10){let m=a+(h+f)*s,b=fB(t,{x:d,y:m},!1,s);if(ml.bottom||(s<0?br)){let y=t.docView.coordsForChar(b),O=!y||m{if(e>s&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:Y.cursor(i,inull),me.gecko&&Wte(e.contentDOM.ownerDocument)}handleEvent(e){!Nte(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Rte(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=i[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()i.keyCode==e.keyCode))&&!e.ctrlKey||Pte.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function BP(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){Ni(n.state,r)}}}function Rte(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let s in r.domEventHandlers){let o=r.domEventHandlers[s];o&&n(s).handlers.push(BP(i.value,o))}if(r&&r.domEventObservers)for(let s in r.domEventObservers){let o=r.domEventObservers[s];o&&n(s).observers.push(BP(i.value,o))}}for(let i in hs)n(i).handlers.push(hs[i]);for(let i in Lr)n(i).observers.push(Lr[i]);return e}const pB=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Pte="dthko",mB=[16,17,18,20,91,92,224,225],Ug=6;function Fg(t){return Math.max(0,t)*.7+8}function Ite(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class $te{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=qee(e.contentDOM),this.atoms=e.state.facet(Rx).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(qe.allowMultipleSelections)&&Dte(e,n),this.dragging=Mte(e,n)&&yB(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Ite(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,s=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},o=dB(this.view);e.clientX-o.left<=s.left+Ug?i=-Fg(s.left-e.clientX):e.clientX+o.right>=s.right-Ug&&(i=Fg(e.clientX-s.right)),e.clientY-o.top<=s.top+Ug?r=-Fg(s.top-e.clientY):e.clientY+o.bottom>=s.bottom-Ug&&(r=Fg(e.clientY-s.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function Dte(t,e){let n=t.state.facet(KN);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function Lte(t,e){let n=t.state.facet(JN);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function Mte(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=jb(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Nte(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=kt.get(n))&&i.ignoreEvent(e))return!1;return!0}const hs=Object.create(null),Lr=Object.create(null),gB=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function Bte(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),bB(t,n.value)},50)}function bB(t,e){let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(Fw!=null&&n.selection.ranges.every(l=>l.empty)&&Fw==s.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:Y.cursor(u.from+d.length)}})}else o?i=n.changeByRange(l=>{let u=s.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Y.cursor(l.from+u.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Lr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};hs.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);Lr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Lr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};hs.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(eB))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=Hte(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new $te(t,e,n,i)),i&&t.observer.ignore(()=>$N(t.contentDOM));let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function QP(t,e,n,i){if(i==1)return Y.cursor(e,n);if(i==2)return Ste(t.state,e,n);{let r=On.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return at>=e.top&&t<=e.bottom,zP=(t,e,n)=>OB(e,n)&&t>=n.left&&t<=n.right;function Qte(t,e,n,i){let r=On.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&zP(n,i,o))return-1;let a=r.coordsAt(s,1);return a&&zP(n,i,a)?1:o&&OB(i,o)?-1:1}function HP(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:Qte(t,n,e.clientX,e.clientY)}}const zte=me.ie&&me.ie_version<=11;let UP=null,FP=0,VP=0;function yB(t){if(!zte)return t.detail;let e=UP,n=VP;return UP=t,VP=Date.now(),FP=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(FP+1)%3:1}function Hte(t,e){let n=HP(t,e),i=yB(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,a){let l=HP(t,s),u,c=QP(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let d=QP(t,n.pos,n.bias,i),h=Math.min(d.from,c.from),f=Math.max(d.to,c.to);c=h1&&(u=Ute(r,l.pos))?u:a?r.addRange(c):Y.create([c])}}}function Ute(t,e){for(let n=0;n=e)return Y.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}hs.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=Y.range(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};hs.dragend=t=>(t.inputState.draggedContent=null,!1);function WP(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&Lte(t,e)?{from:s.from,to:s.to}:null,a={from:r,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}hs.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&WP(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return WP(t,e,i,!0),!0}return!1};hs.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=gB?null:e.clipboardData;return n?(bB(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Bte(t),!1)};function Fte(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function Vte(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let Fw=null;hs.copy=hs.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=Vte(t.state);if(!n&&!r)return!1;Fw=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=gB?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(Fte(t,n),!1)};const vB=Uo.define();function SB(t,e){let n=[];for(let i of t.facet(iB)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:vB.of(!0)}):null}function wB(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=SB(t.state,e);n?t.dispatch(n):t.update([])}},10)}Lr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),wB(t)};Lr.blur=t=>{t.observer.clearSelectionRange(),wB(t)};Lr.compositionstart=Lr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};Lr.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};Lr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};hs.beforeinput=(t,e)=>{var n;let i;if(me.chrome&&me.android&&(i=pB.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Lr.compositionend(t,e),20),!1};const jP=new Set;function Wte(t){jP.has(t)||(jP.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const XP=["pre-wrap","normal","pre-line","break-spaces"];class jte{constructor(e){this.lineWrapping=e,this.doc=ut.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return XP.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>X0&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return ki.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:d}=r[a],h=s.lineAt(l,It.ByPosNoHeight,i.setDoc(n),0,0),f=h.to>=u?h:s.lineAt(u,It.ByPosNoHeight,i,0,0);for(d+=f.to-u,u=f.to;a>0&&h.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,ls*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(s>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,s-=a.size}else break;else if(r=s&&o(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ji extends _B{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Ps(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ji||r instanceof Qn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Qn?r=new Ji(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ki.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Qn extends ki{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:a}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let s=i[i.length-1];s instanceof Qn?i[i.length-1]=new Qn(s.length+r):i.push(null,new Qn(r-1))}if(e>0){let s=i[0];s instanceof Qn?i[0]=new Qn(e+s.length):i.unshift(new Qn(e-1),null)}return ki.of(i)}decomposeLeft(e,n){n.push(new Qn(e-1),null)}decomposeRight(e,n){n.push(null,new Qn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new Qn(r.from-n-1).updateHeight(e,n));a<=s&&r.more;){let c=e.doc.lineAt(a).length;o.length&&o.push(null);let d=r.heights[r.index++];l==-1?l=d:Math.abs(d-l)>=X0&&(l=-2);let h=new Ji(c,d);h.outdated=!1,o.push(h),a+=c+1}a<=s&&o.push(null,new Qn(s-a).updateHeight(e,a));let u=ki.of(o);return(l<0||Math.abs(u.height-this.height)>=X0||Math.abs(l-this.heightMetrics(e,n).perLine)>=X0)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Zte extends ki{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return ea))return u;let c=n==It.ByPosNoHeight?It.ByPosNoHeight:It.ByPos;return l?u.join(this.right.lineAt(a,c,i,o,a)):this.left.lineAt(a,c,i,r,s).join(u)}forEachLine(e,n,i,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,o);else{let u=this.lineAt(l,It.ByPos,i,r,s);e=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,a,l,o)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of i)s.push(a);if(e>0&&ZP(s,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?ki.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,i,r):o.updateHeight(e,a,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function ZP(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Qn&&(i=t[e+1])instanceof Qn&&t.splice(e-1,3,new Qn(n.length+1+i.length))}const qte=5;class Px{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ji?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ji(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=qte)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ji(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Qn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ji)return e;let n=new Ji(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ji)&&!this.isCovered?this.nodes.push(new Ji(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let h=c.getBoundingClientRect();s=Math.max(s,h.left),o=Math.min(o,h.right),a=Math.max(a,h.top),l=u==t.parentNode?h.bottom:Math.min(l,h.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Jte(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Gy{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new jte(n),this.stateDeco=e.facet(Kp).filter(i=>typeof i!="function"),this.heightMap=ki.empty().applyChanges(this.stateDeco,ut.empty,this.heightOracle.setDoc(e.doc),[new Pr(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ce.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new Vg(s,o))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?YP:new ine(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Ff(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Kp).filter(c=>typeof c!="function");let r=e.changedRanges,s=Pr.extendWithRanges(r,Yte(i,this.stateDeco,e?e.changes:vn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=o&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(sB)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?$t.RTL:$t.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:_,scaleY:k}=IN(n,a);(_>.005&&Math.abs(this.scaleX-_)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=_,this.scaleY=k,u|=8,o=l=!0)}let d=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=h)&&(this.paddingTop=d,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let f=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=LN(e.scrollDOM);let m=(this.printing?Jte:Kte)(n,this.paddingTop),b=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let v=a.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let _=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(_)&&(o=!0),o||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:k,charWidth:x,textHeight:w}=e.docView.measureTextSize();o=k>0&&r.refresh(s,k,x,w,v/x,_),o&&(e.docView.minWidth=0,u|=8)}b>0&&y>0?c=Math.max(b,y):b<0&&y<0&&(c=Math.min(b,y)),r.heightChanged=!1;for(let k of this.viewports){let x=k.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?ki.empty().applyChanges(this.stateDeco,ut.empty,this.heightOracle,[new Pr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new Xte(k.from,x))}r.heightChanged&&(u|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Vg(r.lineAt(o-i*1e3,It.ByHeight,s,0,0).from,r.lineAt(a+(1-i)*1e3,It.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=r.lineAt(u,It.ByPos,s,0,0),h;n.y=="center"?h=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=a+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s>1,o=r<<1;if(this.defaultTextDirection!=$t.LTR&&!i)return[];let a=[],l=(u,c,d,h)=>{if(c-uu&&yy.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)y.fromO));if(!b){if(cy.from<=c&&y.to>=c)){let y=n.moveToLineBoundary(Y.cursor(c),!1,!0).head;y>u&&(c=y)}b=new Gy(u,c,this.gapSize(d,u,c,h))}a.push(b)};for(let u of this.viewportLines){if(u.lengthu.from&&l(u.from,h,u,c),fn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];ot.spans(e,this.viewport.from,this.viewport.to,{span(r,s){n.push({from:r,to:s})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,s)=>r.from!=n[s].from||r.to!=n[s].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ff(this.heightMap.lineAt(e,It.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Ff(this.heightMap.lineAt(this.scaler.fromDOM(e),It.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ff(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Vg{constructor(e,n){this.from=e,this.to=n}}function tne(t,e,n){let i=[],r=t,s=0;return ot.spans(n,t,e,{span(){},point(o,a){o>r&&(i.push({from:r,to:o}),s+=o-r),r=a}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(i<=a)return s+i;i-=a}}function jg(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function nne(t,e){for(let n of t)if(e(n))return n}const YP={toDOM(t){return t},fromDOM(t){return t},scale:1};class ine{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let u=n.lineAt(a,It.ByPos,e,0,0).top,c=n.lineAt(l,It.ByPos,e,0,0).bottom;return r+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=nFf(r,e)):t._content)}const Xg=he.define({combine:t=>t.join(" ")}),Vw=he.define({combine:t=>t.indexOf(!0)>-1}),Ww=Va.newName(),kB=Va.newName(),xB=Va.newName(),EB={"&light":"."+kB,"&dark":"."+xB};function jw(t,e,n){return new Va(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const rne=jw("."+Ww,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},EB),Vf="￿";class sne{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(qe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Vf}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let o=r.nextSibling;if(o==n)break;let a=kt.get(r),l=kt.get(o);(a&&l?a.breakAfter:(a?a.breakAfter:Xb(r))||Xb(o)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&this.lineBreak(),r=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=r.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let n=kt.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(one(e,i.node,i.offset)?n:0))}}function one(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=s||o?[]:cne(e),l=new sne(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=dne(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!Rw(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!Rw(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if((me.ios||me.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=r.from,u=null;(s===8||me.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(me.mac||me.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=Y.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ut.of([" "])}):me.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=Y.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ut.of([" "])}),n){if(me.ios&&t.inputState.flushIOSKey(n)||me.android&&(n.to==r.to&&(n.from==r.from||n.from==r.from-1&&t.state.sliceDoc(n.from,r.from)==" ")&&n.insert.length==1&&n.insert.lines==2&&Ld(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||s==8&&n.insert.lengthr.head)&&Ld(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&Ld(t.contentDOM,"Delete",46)))return!0;let o=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=lne(t,n,i));return t.state.facet(nB).some(u=>u(t,n.from,n.to,o,l))||t.dispatch(l()),!0}else if(i&&!i.main.eq(r)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function lne(t,e,n){let i,r=t.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=r.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&hB(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-m}}else c=t.state.doc.lineAt(s.head);let h=s.to-e.to,f=s.to-s.from;i=r.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:a,range:l||m.map(a)};let b=m.to-h,y=b-u.length;if(m.to-m.from!=f||t.state.sliceDoc(y,b)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let O=r.changes({from:y,to:b,insert:e.insert}),v=m.to-s.to;return{changes:O,range:l?Y.range(Math.max(0,l.anchor+v),Math.max(0,l.head+v)):m.map(O)}})}else i={changes:a,selection:l&&r.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:o,scrollIntoView:!0})}function une(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function cne(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new GP(n,i)),(r!=n||s!=i)&&e.push(new GP(r,s))),e}function dne(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?Y.single(n+e,i+e):null}const hne={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ky=me.ie&&me.ie_version<=11;class fne{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Yee,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ky&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(y1)?i.root.activeElement!=this.dom:!W0(i.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!i.state.selection.main.empty&&r.focusNode&&fp(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=jb(e.root);if(!n)return!1;let i=me.safari&&e.root.nodeType==11&&jee(this.dom.ownerDocument)==this.dom&&pne(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=W0(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ld(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&W0(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new ane(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=CB(this.view,n);return this.view.state==i&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=KP(n,e.previousSibling||e.target.previousSibling,-1),r=KP(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function KP(t,e,n){for(;e;){let i=kt.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function JP(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return fp(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function pne(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return JP(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?JP(t,n):null}class ce{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Gee(e.parent)||document,this.viewState=new qP(e.state||qe.create(e)),e.scrollTo&&e.scrollTo.is(Hg)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Hf).map(i=>new Zy(i));for(let i of this.plugins)i.update(this);this.observer=new fne(this),this.inputState=new Ate(this),this.inputState.ensureHandlers(this.plugins),this.docView=new PP(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof fn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let h of e){if(h.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=h.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(h=>h.annotation(vB))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=SB(s,o),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(s);r=Zb.create(this,s,e),r.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(d&&(d=d.map(h.changes)),h.scrollIntoView){let{main:f}=h.state.selection;d=new Md(f.empty?f:Y.cursor(f.head,f.head>f.anchor?-1:1))}for(let f of h.effects)f.is(Hg)&&(d=f.value.clip(this.state))}this.viewState.update(r,d),this.bidiCache=qb.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Uf)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Xg)!=r.state.facet(Xg)&&(this.viewState.mustMeasureContent=!0),(n||i||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let h of this.state.facet(zw))try{h(r)}catch(f){Ni(this.state,f,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!CB(this,c)&&u.force&&Ld(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new qP(e),this.plugins=e.facet(Hf).map(i=>new Zy(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new PP(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Hf),i=e.state.facet(Hf);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new Zy(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(LN(i))s=-1,o=this.viewState.heightMap.height;else{let f=this.viewState.scrollAnchorAt(r);s=f.from,o=f.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(f=>{try{return f.read(this)}catch(m){return Ni(this.state,m),e3}}),d=Zb.create(this,this.state,[]),h=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),h=this.docView.update(d),h&&this.docViewUpdate());for(let f=0;f1||m<-1){r=r+m,i.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(zw))a(n)}get themeClasses(){return Ww+" "+(this.state.facet(Vw)?xB:kB)+" "+this.state.facet(Xg)}updateAttrs(){let e=t3(this,aB,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(y1)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),t3(this,Ax,n);let i=this.observer.ignore(()=>{let r=Lw(this.contentDOM,this.contentAttrs,n),s=Lw(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(ce.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Uf);let e=this.state.facet(ce.cspNonce);Va.mount(this.root,this.styleModules.concat(rne).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Yy(this,e,NP(this,e,n,i))}moveByGroup(e,n){return Yy(this,e,NP(this,e,n,i=>Cte(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return Y.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return Ete(this,e,n,i)}moveVertically(e,n,i){return Yy(this,e,Tte(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),fB(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[Ca.find(s,e-r.from,-1,n)];return xx(i,o.dir==$t.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(rB)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>mne)return YN(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||qN(s.isolates,i=RP(this,e))))return s.order;i||(i=RP(this,e));let r=cte(e.text,n,i);return this.bidiCache.push(new qb(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{$N(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Hg.of(new Md(typeof e=="number"?Y.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Hg.of(new Md(Y.cursor(i.from),"start","start",i.top-e,n,!0))}static domEventHandlers(e){return mn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return mn.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=Va.newName(),r=[Xg.of(i),Uf.of(jw(`.${i}`,e))];return n&&n.dark&&r.push(Vw.of(!0)),r}static baseTheme(e){return Ho.lowest(Uf.of(jw("."+Ww,e,EB)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&kt.get(i)||kt.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}ce.styleModule=Uf;ce.inputHandler=nB;ce.scrollHandler=oB;ce.focusChangeEffect=iB;ce.perLineTextDirection=rB;ce.exceptionSink=tB;ce.updateListener=zw;ce.editable=y1;ce.mouseSelectionStyle=eB;ce.dragMovesSelection=JN;ce.clickAddsSelectionRange=KN;ce.decorations=Kp;ce.outerDecorations=lB;ce.atomicRanges=Rx;ce.bidiIsolatedRanges=uB;ce.scrollMargins=cB;ce.darkTheme=Vw;ce.cspNonce=he.define({combine:t=>t.length?t[0]:""});ce.contentAttributes=Ax;ce.editorAttributes=aB;ce.lineWrapping=ce.contentAttributes.of({class:"cm-lineWrapping"});ce.announce=ze.define();const mne=4096,e3={};class qb{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:$t.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&Dw(o,n)}return n}const gne=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function bne(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,a;for(let l=0;li.concat(r),[]))),n}function yne(t,e,n){return AB(TB(t.state),e,t,n)}let Sa=null;const vne=4e3;function Sne(t,e=gne){let n=Object.create(null),i=Object.create(null),r=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,u,c)=>{var d,h;let f=n[o]||(n[o]=Object.create(null)),m=a.split(/ (?!$)/).map(O=>bne(O,e));for(let O=1;O{let _=Sa={view:S,prefix:v,scope:o};return setTimeout(()=>{Sa==_&&(Sa=null)},vne),!0}]})}let b=m.join(" ");r(b,!1);let y=f[b]||(f[b]={preventDefault:!1,stopPropagation:!1,run:((h=(d=f._any)===null||d===void 0?void 0:d.run)===null||h===void 0?void 0:h.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let d in c)c[d].run.push(o.any)}let l=o[e]||o.key;if(l)for(let u of a)s(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}function AB(t,e,n,i){let r=Wee(e),s=Un(r,0),o=Er(s)==r.length&&r!=" ",a="",l=!1,u=!1,c=!1;Sa&&Sa.view==n&&Sa.scope==i&&(a=Sa.prefix+" ",mB.indexOf(e.keyCode)<0&&(u=!0,Sa=null));let d=new Set,h=y=>{if(y){for(let O of y.run)if(!d.has(O)&&(d.add(O),O(n,e)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},f=t[i],m,b;return f&&(h(f[a+Zg(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&(m=Wa[e.keyCode])&&m!=r?(h(f[a+Zg(m,e,!0)])||e.shiftKey&&(b=Yp[e.keyCode])!=r&&b!=m&&h(f[a+Zg(b,e,!1)]))&&(l=!0):o&&e.shiftKey&&h(f[a+Zg(r,e,!0)])&&(l=!0),!l&&h(f._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class Mm{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=RB(e);return[new Mm(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return wne(e,n,i)}}function RB(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==$t.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function i3(t,e,n){let i=Y.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:_i.Text}}function wne(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==$t.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=RB(t),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=a.right-(c?parseInt(c.paddingRight):0),f=Uw(t,i),m=Uw(t,r),b=f.type==_i.Text?f:null,y=m.type==_i.Text?m:null;if(b&&(t.lineWrapping||f.widgetLineBreaks)&&(b=i3(t,i,b)),y&&(t.lineWrapping||m.widgetLineBreaks)&&(y=i3(t,r,y)),b&&y&&b.from==y.from)return v(S(n.from,n.to,b));{let k=b?S(n.from,null,b):_(f,!1),x=y?S(null,n.to,y):_(m,!0),w=[];return(b||f).to<(y||m).from-(b&&y?1:0)||f.widgetLineBreaks>1&&k.bottom+t.defaultLineHeight/2U&&J.from=Z)break;P>re&&z(Math.max(fe,re),k==null&&fe<=U,Math.min(P,Z),x==null&&P>=X,ee.dir)}if(re=ne.to+1,re>=Z)break}return I.length==0&&z(U,k==null,X,x==null,t.textDirection),{top:M,bottom:H,horizontal:I}}function _(k,x){let w=a.top+(x?k.top:k.bottom);return{top:w,bottom:w,horizontal:[]}}}function _ne(t,e){return t.constructor==e.constructor&&t.eq(e)}class kne{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Z0)!=e.state.facet(Z0)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Z0);for(;n!_ne(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Z0=he.define();function PB(t){return[mn.define(e=>new kne(e,t)),Z0.of(t)]}const IB=!me.ios,Jp=he.define({combine(t){return Js(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function xne(t={}){return[Jp.of(t),Ene,Cne,Tne,sB.of(!0)]}function $B(t){return t.startState.facet(Jp)!=t.state.facet(Jp)}const Ene=PB({above:!0,markers(t){let{state:e}=t,n=e.facet(Jp),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty?!s||IB:n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:Y.cursor(r.head,r.head>r.anchor?-1:1);for(let l of Mm.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=$B(t);return n&&r3(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){r3(e.state,t)},class:"cm-cursorLayer"});function r3(t,e){e.style.animationDuration=t.facet(Jp).cursorBlinkRate+"ms"}const Cne=PB({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Mm.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||$B(t)},class:"cm-selectionLayer"}),Xw={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};IB&&(Xw[".cm-line"].caretColor="transparent !important",Xw[".cm-content"]={caretColor:"transparent !important"});const Tne=Ho.highest(ce.theme(Xw)),DB=ze.define({map(t,e){return t==null?null:e.mapPos(t)}}),Wf=In.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(DB)?i.value:n,t)}}),Ane=mn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Wf);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wf)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wf),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wf)!=t&&this.view.dispatch({effects:DB.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Rne(){return[Wf,Ane]}function s3(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)r(o+a.index,a)}function Pne(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class Ine{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,u,c)=>r(c,u,u+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,u,c)=>{let d=i(a,l,u);d&&c(u,u+a[0].length,d)};else if(i)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new Fa,i=n.add.bind(n);for(let{from:r,to:s}of Pne(e,this.maxLength))s3(e.state.doc,this.regexp,r,s,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>e.view.viewport.from&&a1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),a=Math.min(s.to,r);if(a>o){let l=e.state.doc.lineAt(o),u=l.tol.from;o--)if(this.boundary.test(l.text[o-1-l.from])){c=o;break}for(;ah.push(O.range(b,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(f=this.regexp.exec(l.text))&&f.indexthis.addMatch(y,e,b,m));n=n.update({filterFrom:c,filterTo:d,filter:(b,y)=>bd,add:h})}}return n}}const Zw=/x/.unicode!=null?"gu":"g",$ne=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Zw),Dne={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Jy=null;function Lne(){var t;if(Jy==null&&typeof document<"u"&&document.body){let e=document.body.style;Jy=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Jy||!1}const q0=he.define({combine(t){let e=Js(t,{render:null,specialChars:$ne,addSpecialChars:null});return(e.replaceTabs=!Lne())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Zw)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Zw)),e}});function Mne(t={}){return[q0.of(t),Nne()]}let o3=null;function Nne(){return o3||(o3=mn.fromClass(class{constructor(t){this.view=t,this.decorations=Ce.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(q0)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Ine({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=Un(e[0],0);if(s==9){let o=r.lineAt(i),a=n.state.tabSize,l=cs(o.text,a,i-o.from);return Ce.replace({widget:new Hne((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Ce.replace({widget:new zne(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(q0);t.startState.facet(q0)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Bne="•";function Qne(t){return t>=32?Bne:t==10?"␤":String.fromCharCode(9216+t)}class zne extends Fo{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Qne(this.code),i=e.state.phrase("Control character")+" "+(Dne[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Hne extends Fo{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Une(){return Vne}const Fne=Ce.line({class:"cm-activeLine"}),Vne=mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(Fne.range(r.from)),e=r.from)}return Ce.set(n)}},{decorations:t=>t.decorations}),qw=2e3;function Wne(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>qw||n.off>qw||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=a&&s.push(Y.range(u.from+o,u.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=Cw(u.text,o,t.tabSize,!0);if(c<0)s.push(Y.cursor(u.to));else{let d=Cw(u.text,a,t.tabSize);s.push(Y.range(u.from+c,u.from+d))}}}return s}function jne(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function a3(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>qw?-1:r==i.length?jne(t,e.clientX):cs(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function Xne(t,e){let n=a3(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let a=a3(t,r);if(!a)return i;let l=Wne(t.state,n,a);return l.length?o?Y.create(l.concat(i.ranges)):Y.create(l):i}}:null}function Zne(t){let e=n=>n.altKey&&n.button==0;return ce.mouseSelectionStyle.of((n,i)=>e(i)?Xne(n,i):null)}const qne={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Yne={style:"cursor: crosshair"};function Gne(t={}){let[e,n]=qne[t.key||"Alt"],i=mn.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,ce.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?Yne:null})]}const wf="-10000px";class LB{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;ln[u]=l),n.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function Kne(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const ev=he.define({combine:t=>{var e,n,i;return{position:me.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Kne}}}),l3=new WeakMap,Ix=mn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(ev);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new LB(t,$x,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(ev);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=wf,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(me.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==wf&&r.style.left=="0px"){let s=r.getBoundingClientRect();i=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,s)=>{let o=this.manager.tooltipViews[s];return o.getCoords?o.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(ev).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||d.rightMath.min(n.right,i.right)+.1){c.style.top=wf;continue}let f=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=f?7:0,b=h.right-h.left,y=(e=l3.get(u))!==null&&e!==void 0?e:h.bottom-h.top,O=u.offset||eie,v=this.view.textDirection==$t.LTR,S=h.width>i.right-i.left?v?i.left:i.right-h.width:v?Math.min(d.left-(f?14:0)+O.x,i.right-b):Math.max(i.left,d.left-b+(f?14:0)-O.x),_=this.above[a];!l.strictSide&&(_?d.top-(h.bottom-h.top)-O.yi.bottom)&&_==i.bottom-d.bottom>d.top-i.top&&(_=this.above[a]=!_);let k=(_?d.top-i.top:i.bottom-d.bottom)-m;if(kS&&M.topx&&(x=_?M.top-y-2-m:M.bottom+m+2);if(this.position=="absolute"?(c.style.top=(x-t.parent.top)/s+"px",c.style.left=(S-t.parent.left)/r+"px"):(c.style.top=x/s+"px",c.style.left=S/r+"px"),f){let M=d.left+(v?O.x:-O.x)-(S+14-7);f.style.left=M/r+"px"}u.overlap!==!0&&o.push({left:S,top:x,right:w,bottom:x+y}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=wf}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Jne=ce.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),eie={x:0,y:0},$x=he.define({enables:[Ix,Jne]}),Yb=he.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class v1{static create(e){return new v1(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new LB(e,Yb,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const tie=$x.compute([Yb],t=>{let e=t.facet(Yb);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:v1.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class nie{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(c=>c.from<=r&&c.to>=r),u=l&&l.dir==$t.RTL?-1:1;s=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Ni(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Ix),n=e?e.manager.tooltips.findIndex(i=>i.create==v1.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!iie(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!rie(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const qg=4;function iie(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-qg&&e.clientX<=n.right+qg&&e.clientY>=n.top-qg&&e.clientY<=n.bottom+qg}function rie(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rightr||Math.min(o.bottom,a)=e&&l<=n}function sie(t,e={}){let n=ze.define(),i=In.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of r){let l=s.changes.mapPos(a.pos,-1,Wn.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),a);u.pos=l,u.end!=null&&(u.end=s.changes.mapPos(u.end)),o.push(u)}}r=o}for(let o of s.effects)o.is(n)&&(r=o.value),o.is(oie)&&(r=[]);return r},provide:r=>Yb.from(r)});return[i,mn.define(r=>new nie(r,t,i,n,e.hoverTime||300)),tie]}function MB(t,e){let n=t.plugin(Ix);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const oie=ze.define(),u3=he.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function em(t,e){let n=t.plugin(NB),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const NB=mn.fromClass(class{constructor(t){this.input=t.state.facet(tm),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(u3);this.top=new Yg(t,!0,e.topContainer),this.bottom=new Yg(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(u3);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Yg(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Yg(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(tm);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?s:o).push(c)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ce.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Yg{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=c3(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=c3(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function c3(t){let e=t.nextSibling;return t.remove(),e}const tm=he.define({enables:NB});class Mo extends Nu{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Mo.prototype.elementClass="";Mo.prototype.toDOM=void 0;Mo.prototype.mapMode=Wn.TrackBefore;Mo.prototype.startSide=Mo.prototype.endSide=-1;Mo.prototype.point=!0;const Y0=he.define(),aie={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>ot.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},mp=he.define();function lie(t){return[BB(),mp.of(Object.assign(Object.assign({},aie),t))]}const d3=he.define({combine:t=>t.some(e=>e)});function BB(t){return[uie]}const uie=mn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(mp).map(e=>new f3(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(d3),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(d3)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=ot.iter(this.view.state.facet(Y0),this.view.viewport.from),i=[],r=this.gutters.map(s=>new cie(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==_i.Text&&o){Yw(n,i,a.from);for(let l of r)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==_i.Text){Yw(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(mp),n=t.state.facet(mp),i=t.docChanged||t.heightChanged||t.viewportChanged||!ot.eq(t.startState.facet(Y0),t.state.facet(Y0),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new f3(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ce.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==$t.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function h3(t){return Array.isArray(t)?t:[t]}function Yw(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class cie{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=ot.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let a=new QB(e,o,s,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];Yw(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class f3{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=h3(n.markers(e)),n.initialSpacer&&(this.spacer=new QB(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=h3(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!ot.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class QB{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),die(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=ss(a,l,u)||o(a,l,u):o}return i}})}});class tv extends Mo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function nv(t,e){return t.state.facet(Od).formatNumber(e,t.state)}const fie=mp.compute([Od],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(hie)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new tv(nv(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Od)!=e.state.facet(Od),initialSpacer(e){return new tv(nv(e,p3(e.state.doc.lines)))},updateSpacer(e,n){let i=nv(n.view,p3(n.view.state.doc.lines));return i==e.number?e:new tv(i)},domEventHandlers:t.facet(Od).domEventHandlers}));function pie(t={}){return[Od.of(t),BB(),fie]}function p3(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(mie.range(r)))}return ot.of(e)});function bie(){return gie}const zB=1024;let Oie=0;class Cr{constructor(e,n){this.from=e,this.to=n}}class Pe{constructor(e={}){this.id=Oie++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=gn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Pe.closedBy=new Pe({deserialize:t=>t.split(" ")});Pe.openedBy=new Pe({deserialize:t=>t.split(" ")});Pe.group=new Pe({deserialize:t=>t.split(" ")});Pe.isolate=new Pe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Pe.contextHash=new Pe({perNode:!0});Pe.lookAhead=new Pe({perNode:!0});Pe.mounted=new Pe({perNode:!0});class nm{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Pe.mounted.id]}}const yie=Object.create(null);class gn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):yie,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new gn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Pe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(Pe.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}gn.none=new gn("",Object.create(null),0,8);class Hh{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|At.IncludeAnonymous);;){let u=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Mx(gn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Ke(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Ke(gn.none,n,i,r)))}static build(e){return _ie(e)}}Ke.empty=new Ke(gn.none,[],[],0);class Dx{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Dx(this.buffer,this.index)}}class Xa{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return gn.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return a}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function im(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=u;e+=n){let c=a[e],d=l[e]+o.from;if(HB(r,i,d,d+c.length)){if(c instanceof Xa){if(s&At.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,i-d,r);if(h>-1)return new Ds(new vie(o,c,e,d),null,h)}else if(s&At.IncludeAnonymous||!c.type.isAnonymous||Lx(c)){let h;if(!(s&At.IgnoreMounts)&&(h=nm.get(c))&&!h.overlay)return new oi(h.tree,d,e,o);let f=new oi(c,d,e,o);return s&At.IncludeAnonymous||!f.type.isAnonymous?f:f.nextChild(n<0?c.children.length-1:0,n,i,r)}}}if(s&At.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&At.IgnoreOverlays)&&(r=nm.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:a}of r.overlay)if((n>0?o<=s:o=s:a>s))return new oi(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function g3(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Gw(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class vie{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Ds extends UB{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Ds(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&At.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Ds(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ds(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Ds(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new Ke(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function FB(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;sn.from||o.to=e){let a=new oi(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(im(a,e,n,!1))}}return r?FB(r):i}class Gb{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof oi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof oi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&At.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&At.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&At.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let a=i._tree.children[s];if(this.mode&At.IncludeAnonymous||a instanceof Xa||!a.type.isAnonymous||Lx(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return Gw(this.node,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Lx(t){return t.children.some(e=>e instanceof Xa||!e.type.isAnonymous||Lx(e))}function _ie(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=zB,reused:s=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new Dx(n,n.length):n,l=i.types,u=0,c=0;function d(k,x,w,M,H,I){let{id:z,start:U,end:X,size:J}=a,re=c;for(;J<0;)if(a.next(),J==-1){let P=s[z];w.push(P),M.push(U-k);return}else if(J==-3){u=z;return}else if(J==-4){c=z;return}else throw new RangeError(`Unrecognized record size: ${J}`);let Z=l[z],ne,ee,fe=U-k;if(X-U<=r&&(ee=y(a.pos-x,H))){let P=new Uint16Array(ee.size-ee.skip),Ae=a.pos-ee.size,_e=P.length;for(;a.pos>Ae;)_e=O(ee.start,P,_e);ne=new Xa(P,X-ee.start,i),fe=ee.start-k}else{let P=a.pos-J;a.next();let Ae=[],_e=[],$=z>=o?z:-1,$e=0,Fe=X;for(;a.pos>P;)$>=0&&a.id==$&&a.size>=0?(a.end<=Fe-r&&(m(Ae,_e,U,$e,a.end,Fe,$,re),$e=Ae.length,Fe=a.end),a.next()):I>2500?h(U,P,Ae,_e):d(U,P,Ae,_e,$,I+1);if($>=0&&$e>0&&$e-1&&$e>0){let Xe=f(Z);ne=Mx(Z,Ae,_e,0,Ae.length,0,X-U,Xe,Xe)}else ne=b(Z,Ae,_e,X-U,re-X)}w.push(ne),M.push(fe)}function h(k,x,w,M){let H=[],I=0,z=-1;for(;a.pos>x;){let{id:U,start:X,end:J,size:re}=a;if(re>4)a.next();else{if(z>-1&&X=0;J-=3)U[re++]=H[J],U[re++]=H[J+1]-X,U[re++]=H[J+2]-X,U[re++]=re;w.push(new Xa(U,H[2]-X,i)),M.push(X-k)}}function f(k){return(x,w,M)=>{let H=0,I=x.length-1,z,U;if(I>=0&&(z=x[I])instanceof Ke){if(!I&&z.type==k&&z.length==M)return z;(U=z.prop(Pe.lookAhead))&&(H=w[I]+z.length+U)}return b(k,x,w,M,H)}}function m(k,x,w,M,H,I,z,U){let X=[],J=[];for(;k.length>M;)X.push(k.pop()),J.push(x.pop()+w-H);k.push(b(i.types[z],X,J,I-H,U-I)),x.push(H-w)}function b(k,x,w,M,H=0,I){if(u){let z=[Pe.contextHash,u];I=I?[z].concat(I):[z]}if(H>25){let z=[Pe.lookAhead,H];I=I?[z].concat(I):[z]}return new Ke(k,x,w,M,I)}function y(k,x){let w=a.fork(),M=0,H=0,I=0,z=w.end-r,U={size:0,start:0,skip:0};e:for(let X=w.pos-k;w.pos>X;){let J=w.size;if(w.id==x&&J>=0){U.size=M,U.start=H,U.skip=I,I+=4,M+=4,w.next();continue}let re=w.pos-J;if(J<0||re=o?4:0,ne=w.start;for(w.next();w.pos>re;){if(w.size<0)if(w.size==-3)Z+=4;else break e;else w.id>=o&&(Z+=4);w.next()}H=ne,M+=J,I+=Z}return(x<0||M==k)&&(U.size=M,U.start=H,U.skip=I),U.size>4?U:void 0}function O(k,x,w){let{id:M,start:H,end:I,size:z}=a;if(a.next(),z>=0&&M4){let X=a.pos-(z-4);for(;a.pos>X;)w=O(k,x,w)}x[--w]=U,x[--w]=I-k,x[--w]=H-k,x[--w]=M}else z==-3?u=M:z==-4&&(c=M);return w}let v=[],S=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,v,S,-1,0);let _=(e=t.length)!==null&&e!==void 0?e:v.length?S[0]+v[0].length:0;return new Ke(l[t.topID],v.reverse(),S.reverse(),_)}const b3=new WeakMap;function G0(t,e){if(!t.isAnonymous||e instanceof Xa||e.type!=t)return 1;let n=b3.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Ke)){n=1;break}n+=G0(t,i)}b3.set(e,n)}return n}function Mx(t,e,n,i,r,s,o,a,l){let u=0;for(let m=i;m=c)break;x+=w}if(S==_+1){if(x>c){let w=m[_];f(w.children,w.positions,0,w.children.length,b[_]+v);continue}d.push(m[_])}else{let w=b[S-1]+m[S-1].length-k;d.push(Mx(t,m,b,_,S,k,w,null,l))}h.push(k+v-s)}}return f(e,n,i,r,0),(a||l)(d,h,o)}class VB{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Ds?this.setBuffer(e.context.buffer,e.index,n):e instanceof oi&&this.map.set(e.tree,n)}get(e){return e instanceof Ds?this.getBuffer(e.context.buffer,e.index):e instanceof oi?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class To{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new To(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a=i)for(;o&&o.from=h.from||d<=h.to||u){let f=Math.max(h.from,l)-u,m=Math.min(h.to,d)-u;h=f>=m?null:new To(f,m,h.tree,h.offset+u,a>0,!!c)}if(h&&r.push(h),o.to>d)break;o=snew Cr(r.from,r.to)):[new Cr(0,0)]:[new Cr(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}};class kie{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function WB(t){return(e,n,i,r)=>new Eie(e,t,n,i,r)}class O3{constructor(e,n,i,r,s){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=s}}function y3(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class xie{constructor(e,n,i,r,s,o,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const Kw=new Pe({perNode:!0});class Eie{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Ke(i.type,i.children,i.positions,i.length,i.propValues.concat([[Kw,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Pe.mounted.id]=new nm(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let d=c.from+u.pos,h=c.to+u.pos;d>=r.from&&h<=r.to&&!n.ranges.some(f=>f.fromd)&&n.ranges.push({from:d,to:h})}}a=!1}else if(i&&(o=Cie(i.ranges,r.from,r.to)))a=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew Cr(d.from-r.from,d.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):a=!1}}else n&&(l=n.predicate(r))&&(l===!0&&(l=new Cr(r.from,r.to)),l.fromnew Cr(c.from-n.start,c.to-n.start)),n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function Cie(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function v3(t,e,n,i,r,s){if(e=e&&n.enter(i,1,At.IgnoreOverlays|At.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Ke)n=n.children[0];else break}return!1}}let Aie=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(Kw))!==null&&n!==void 0?n:i.to,this.inner=new S3(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(Kw))!==null&&e!==void 0?e:n.to,this.inner=new S3(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(Pe.mounted);if(o&&o.parser==n)for(let a=this.fragI;a=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:o})}}}return r}};function w3(t,e){let n=null,i=e;for(let r=1,s=0;r=a)break;l.to<=o||(n||(i=n=e.slice()),l.froma&&n.splice(s+1,0,new Cr(a,l.to))):l.to>a?n[s--]=new Cr(a,l.to):n.splice(s--,1))}}return i}function Rie(t,e,n,i){let r=0,s=0,o=!1,a=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:o?t[r].to:t[r].from,d=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let h=Math.max(l,n),f=Math.min(c,d,i);hnew Cr(h.from+i,h.to+i)),d=Rie(e,c,l,u);for(let h=0,f=l;;h++){let m=h==d.length,b=m?u:d[h].from;if(b>f&&n.push(new To(f,b,r.tree,-o,s.from>=f||s.openStart,s.to<=b||s.openEnd)),m)break;f=d[h].to}}else n.push(new To(l,u,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let Pie=0;class Gr{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=Pie++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Gr([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new Kb;return n=>n.modified.indexOf(e)>-1?n:Kb.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let Iie=0;class Kb{constructor(){this.instances=[],this.id=Iie++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&$ie(n,a.modified));if(i)return i;let r=[],s=new Gr(r,e,n);for(let a of n)a.instances.push(s);let o=Die(n);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(Kb.get(a,l));return s}}function $ie(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function Die(t){let e=[[]];for(let n=0;ni.length-n.length)}function fc(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,a=r;for(let d=0;;){if(a=="..."&&d>0&&d+3==r.length){o=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!h)throw new RangeError("Invalid path: "+r);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),d+=h[0].length,d==r.length)break;let f=r[d++];if(d==r.length&&f=="!"){o=0;break}if(f!="/")throw new RangeError("Invalid path: "+r);a=r.slice(d)}let l=s.length-1,u=s[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new Jb(i,o,l>0?s.slice(0,l):null);e[u]=c.sort(e[u])}}return jB.add(e)}const jB=new Pe;class Jb{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let a of s)for(let l of a.set){let u=n[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:i}}function Lie(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Mie(t,e,n,i=0,r=t.length){let s=new Nie(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class Nie{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(s=this.highlighters.filter(f=>!f.scope||f.scope(o)));let u=r,c=Bie(e)||Jb.empty,d=Lie(s,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(n,a),u),c.opaque)return;let h=e.tree&&e.tree.prop(Pe.mounted);if(h&&h.overlay){let f=e.node.enter(h.overlay[0].from+a,1),m=this.highlighters.filter(y=>!y.scope||y.scope(h.tree.type)),b=e.firstChild();for(let y=0,O=a;;y++){let v=y=S||!e.nextSibling())););if(!v||S>i)break;O=v.to+a,O>n&&(this.highlightRange(f.cursor(),Math.max(n,v.from+a),Math.min(i,O),"",m),this.startSpan(Math.min(i,O),u))}b&&e.parent()}else if(e.firstChild()){h&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function Bie(t){let e=t.type.prop(jB);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ue=Gr.define,Kg=ue(),ma=ue(),k3=ue(ma),x3=ue(ma),ga=ue(),Jg=ue(ga),iv=ue(ga),xs=ue(),jl=ue(xs),_s=ue(),ks=ue(),Jw=ue(),_f=ue(Jw),e0=ue(),R={comment:Kg,lineComment:ue(Kg),blockComment:ue(Kg),docComment:ue(Kg),name:ma,variableName:ue(ma),typeName:k3,tagName:ue(k3),propertyName:x3,attributeName:ue(x3),className:ue(ma),labelName:ue(ma),namespace:ue(ma),macroName:ue(ma),literal:ga,string:Jg,docString:ue(Jg),character:ue(Jg),attributeValue:ue(Jg),number:iv,integer:ue(iv),float:ue(iv),bool:ue(ga),regexp:ue(ga),escape:ue(ga),color:ue(ga),url:ue(ga),keyword:_s,self:ue(_s),null:ue(_s),atom:ue(_s),unit:ue(_s),modifier:ue(_s),operatorKeyword:ue(_s),controlKeyword:ue(_s),definitionKeyword:ue(_s),moduleKeyword:ue(_s),operator:ks,derefOperator:ue(ks),arithmeticOperator:ue(ks),logicOperator:ue(ks),bitwiseOperator:ue(ks),compareOperator:ue(ks),updateOperator:ue(ks),definitionOperator:ue(ks),typeOperator:ue(ks),controlOperator:ue(ks),punctuation:Jw,separator:ue(Jw),bracket:_f,angleBracket:ue(_f),squareBracket:ue(_f),paren:ue(_f),brace:ue(_f),content:xs,heading:jl,heading1:ue(jl),heading2:ue(jl),heading3:ue(jl),heading4:ue(jl),heading5:ue(jl),heading6:ue(jl),contentSeparator:ue(xs),list:ue(xs),quote:ue(xs),emphasis:ue(xs),strong:ue(xs),link:ue(xs),monospace:ue(xs),strikethrough:ue(xs),inserted:ue(),deleted:ue(),changed:ue(),invalid:ue(),meta:e0,documentMeta:ue(e0),annotation:ue(e0),processingInstruction:ue(e0),definition:Gr.defineModifier(),constant:Gr.defineModifier(),function:Gr.defineModifier(),standard:Gr.defineModifier(),local:Gr.defineModifier(),special:Gr.defineModifier()};XB([{tag:R.link,class:"tok-link"},{tag:R.heading,class:"tok-heading"},{tag:R.emphasis,class:"tok-emphasis"},{tag:R.strong,class:"tok-strong"},{tag:R.keyword,class:"tok-keyword"},{tag:R.atom,class:"tok-atom"},{tag:R.bool,class:"tok-bool"},{tag:R.url,class:"tok-url"},{tag:R.labelName,class:"tok-labelName"},{tag:R.inserted,class:"tok-inserted"},{tag:R.deleted,class:"tok-deleted"},{tag:R.literal,class:"tok-literal"},{tag:R.string,class:"tok-string"},{tag:R.number,class:"tok-number"},{tag:[R.regexp,R.escape,R.special(R.string)],class:"tok-string2"},{tag:R.variableName,class:"tok-variableName"},{tag:R.local(R.variableName),class:"tok-variableName tok-local"},{tag:R.definition(R.variableName),class:"tok-variableName tok-definition"},{tag:R.special(R.variableName),class:"tok-variableName2"},{tag:R.definition(R.propertyName),class:"tok-propertyName tok-definition"},{tag:R.typeName,class:"tok-typeName"},{tag:R.namespace,class:"tok-namespace"},{tag:R.className,class:"tok-className"},{tag:R.macroName,class:"tok-macroName"},{tag:R.propertyName,class:"tok-propertyName"},{tag:R.operator,class:"tok-operator"},{tag:R.comment,class:"tok-comment"},{tag:R.meta,class:"tok-meta"},{tag:R.invalid,class:"tok-invalid"},{tag:R.punctuation,class:"tok-punctuation"}]);var rv;const Ta=new Pe;function w1(t){return he.define({combine:t?e=>e.concat(t):void 0})}const Nx=new Pe;class sr{constructor(e,n,i=[],r=""){this.data=e,this.name=r,qe.prototype.hasOwnProperty("tree")||Object.defineProperty(qe.prototype,"tree",{get(){return Et(this)}}),this.parser=n,this.extension=[Za.of(this),qe.languageData.of((s,o,a)=>{let l=E3(s,o,a),u=l.type.prop(Ta);if(!u)return[];let c=s.facet(u),d=l.type.prop(Nx);if(d){let h=l.resolve(o-l.from,a);for(let f of d)if(f.test(h,s)){let m=s.facet(f.facet);return f.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return E3(e,n,i).type.prop(Ta)==this.data}findRegions(e){let n=e.facet(Za);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Ta)==this.data){i.push({from:o,to:o+s.length});return}let a=s.prop(Pe.mounted);if(a){if(a.tree.prop(Ta)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+s.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new Hu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Et(t){let e=t.field(sr.state,!1);return e?e.tree:Ke.empty}class Qie{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let kf=null;class Uu{constructor(e,n,i=[],r,s,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new Uu(e,n,[],Ke.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Qie(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ke.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(To.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=kf;kf=this;try{return e()}finally{kf=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=C3(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,h)=>l.push({fromA:u,toA:c,fromB:d,toB:h})),i=To.applyChanges(i,l),r=Ke.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=C3(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends S1{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=kf;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Ke(gn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return kf}}function C3(t,e,n){return To.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class nh{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new nh(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=Uu.create(e.facet(Za).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new nh(i)}}sr.state=In.define({create:nh.init,update(t,e){for(let n of e.effects)if(n.is(sr.setState))return n.value;return e.startState.facet(Za)!=e.state.facet(Za)?nh.init(e.state):t.apply(e)}});let ZB=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(ZB=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const sv=typeof navigator<"u"&&(!((rv=navigator.scheduling)===null||rv===void 0)&&rv.isInputPending)?()=>navigator.scheduling.isInputPending():null,zie=mn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(sr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(sr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=ZB(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>sv&&sv()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:sr.setState.of(new nh(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Ni(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Za=he.define({combine(t){return t.length?t[0]:null},enables:t=>[sr.state,zie,ce.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class ih{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class eO{constructor(e,n,i,r,s,o=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new eO(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return r}return null}}const qB=he.define(),Uh=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Fu(t){let e=t.facet(Uh);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function rh(t,e){let n="",i=t.tabSize,r=t.facet(Uh)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s=e?Uie(t,n,e):null}function Hie(t,e,n){let i=Object.create(null),r=new Nm(t,{overrideIndentation:o=>{var a;return(a=i[o])!==null&&a!==void 0?a:-1}}),s=[];for(let o=e;o<=n;){let a=t.doc.lineAt(o);o=a.to+1;let l=_1(r,a.from);if(l==null)continue;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],c=rh(t,l);u!=c&&(i[a.from]=l,s.push({from:a.from,to:a.from+u.length,insert:c}))}return t.changes(s)}class Nm{constructor(e,n={}){this.state=e,this.options=n,this.unit=Fu(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return cs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Fh=new Pe;function Uie(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o!=i.node;o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return YB(i,t,n)}function YB(t,e,n){for(let i=t;i;i=i.next){let r=Vie(i.node);if(r)return r(Bx.create(e,n,i))}return 0}function Fie(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Vie(t){let e=t.type.prop(Fh);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Pe.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>GB(o,!0,1,void 0,s&&!Fie(o)?r.from:void 0)}return t.parent==null?Wie:null}function Wie(){return 0}class Bx extends Nm{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new Bx(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(jie(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return YB(this.context.next,this.base,this.pos)}}function jie(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Xie(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped)return l.fromGB(i,e,n,t)}function GB(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=i&&s.slice(o,o+i.length)==i||r==t.pos+o,l=e?Xie(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const qie=t=>t.baseIndent;function Nd({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const Yie=200;function Gie(){return qe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+Yie)return t;let s=n.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==a)continue;a=c.from;let d=_1(o,c.from);if(d==null)continue;let h=/^\s*/.exec(c.text)[0],f=rh(o,d);h!=f&&l.push({from:c.from,to:c.from+h.length,insert:f})}return l.length?[t,{changes:l,sequential:!0}]:t})}const KB=he.define(),pc=new Pe;function Qx(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&a.from=e&&u.to>n&&(s=u)}}return s}function Jie(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function tO(t,e,n){for(let i of t.facet(KB)){let r=i(t,e,n);if(r)return r}return Kie(t,e,n)}function JB(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const k1=ze.define({map:JB}),Bm=ze.define({map:JB});function e8(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Vu=In.define({create(){return Ce.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(k1)&&!ere(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(i8),r=i?Ce.replace({widget:new are(i(e.state,n.value))}):T3;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Bm)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,s)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,s)=>s<=i||r>=i}))}return t},provide:t=>ce.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>s)&&(r={from:s,to:o})}),r}function ere(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function t8(t,e){return t.field(Vu,!1)?e:e.concat(ze.appendConfig.of(r8()))}const tre=t=>{for(let e of e8(t)){let n=tO(t.state,e.from,e.to);if(n)return t.dispatch({effects:t8(t.state,[k1.of(n),n8(t,n)])}),!0}return!1},nre=t=>{if(!t.state.field(Vu,!1))return!1;let e=[];for(let n of e8(t)){let i=nO(t.state,n.from,n.to);i&&e.push(Bm.of(i),n8(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function n8(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return ce.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const ire=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Vu,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Bm.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},sre=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:tre},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:nre},{key:"Ctrl-Alt-[",run:ire},{key:"Ctrl-Alt-]",run:rre}],ore={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},i8=he.define({combine(t){return Js(t,ore)}});function r8(t){return[Vu,cre]}function s8(t,e){let{state:n}=t,i=n.facet(i8),r=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=nO(t.state,a.from,a.to);l&&t.dispatch({effects:Bm.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const T3=Ce.replace({widget:new class extends Fo{toDOM(t){return s8(t,null)}}});class are extends Fo{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return s8(e,this.value)}}const lre={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ov extends Mo{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function ure(t={}){let e=Object.assign(Object.assign({},lre),t),n=new ov(e,!0),i=new ov(e,!1),r=mn.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Za)!=o.state.facet(Za)||o.startState.field(Vu,!1)!=o.state.field(Vu,!1)||Et(o.startState)!=Et(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Fa;for(let l of o.viewportLineBlocks){let u=nO(o.state,l.from,l.to)?i:tO(o.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:s}=e;return[r,lie({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||ot.empty},initialSpacer(){return new ov(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let u=nO(o.state,a.from,a.to);if(u)return o.dispatch({effects:Bm.of(u)}),!0;let c=tO(o.state,a.from,a.to);return c?(o.dispatch({effects:k1.of(c)}),!0):!1}})}),r8()]}const cre=ce.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Qm{constructor(e,n){this.specs=e;let i;function r(a){let l=Va.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof sr?a=>a.prop(Ta)==o.data:o?a=>a==o:void 0,this.style=XB(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=i?new Va(i):null,this.themeType=n.themeType}static define(e,n){return new Qm(e,n||{})}}const e_=he.define(),o8=he.define({combine(t){return t.length?[t[0]]:null}});function av(t){let e=t.facet(e_);return e.length?e:t.facet(o8)}function A3(t,e){let n=[hre],i;return t instanceof Qm&&(t.module&&n.push(ce.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(o8.of(t)):i?n.push(e_.computeN([ce.darkTheme],r=>r.facet(ce.darkTheme)==(i=="dark")?[t]:[])):n.push(e_.of(t)),n}class dre{constructor(e){this.markCache=Object.create(null),this.tree=Et(e.state),this.decorations=this.buildDeco(e,av(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Et(e.state),i=av(e.state),r=i!=av(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Ce.none;let i=new Fa;for(let{from:r,to:s}of e.visibleRanges)Mie(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=Ce.mark({class:l})))},r,s);return i.finish()}}const hre=Ho.high(mn.fromClass(dre,{decorations:t=>t.decorations})),fre=Qm.define([{tag:R.meta,color:"#404740"},{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#e40"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:[R.typeName,R.namespace],color:"#085"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.invalid,color:"#f00"}]),pre=ce.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),a8=1e4,l8="()[]{}",u8=he.define({combine(t){return Js(t,{afterCursor:!0,brackets:l8,maxScanDistance:a8,renderMatch:bre})}}),mre=Ce.mark({class:"cm-matchingBracket"}),gre=Ce.mark({class:"cm-nonmatchingBracket"});function bre(t){let e=[],n=t.matched?mre:gre;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Ore=In.define({create(){return Ce.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(u8);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Ls(e.state,r.head,-1,i)||r.head>0&&Ls(e.state,r.head-1,1,i)||i.afterCursor&&(Ls(e.state,r.head,1,i)||r.headce.decorations.from(t)}),yre=[Ore,pre];function vre(t={}){return[u8.of(t),yre]}const c8=new Pe;function t_(t,e,n){let i=t.prop(e<0?Pe.openedBy:Pe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function n_(t){let e=t.type.prop(c8);return e?e(t.node):t}function Ls(t,e,n,i={}){let r=i.maxScanDistance||a8,s=i.brackets||l8,o=Et(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=t_(l.type,n,s);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return Sre(t,e,n,l,c,u,s)}}return wre(t,e,n,o,a.type,r,s)}function Sre(t,e,n,i,r,s,o){let a=i.parent,l={from:r.from,to:r.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let h=0;!c.next().done&&h<=s;){let f=c.value;n<0&&(h+=f.length);let m=e+h*n;for(let b=n>0?0:f.length-1,y=n>0?f.length:-1;b!=y;b+=n){let O=o.indexOf(f[b]);if(!(O<0||i.resolveInner(m+b,1).type!=r))if(O%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+b,to:m+b+1},matched:O>>1==l>>1};d--}}n>0&&(h+=f.length)}return c.done?{start:u,matched:!1}:null}function R3(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function _re(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||kre,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||Hx}}function kre(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const P3=new WeakMap;class iO extends sr{constructor(e){let n=w1(e.languageData),i=_re(e),r,s=new class extends S1{createParse(o,a,l){return new Ere(r,o,a,l)}};super(n,s,[qB.of((o,a)=>this.getIndent(o,a))],e.name),this.topNode=Are(n),r=this,this.streamParser=i,this.stateAfter=new Pe({perNode:!0}),this.tokenTable=e.tokenTable?new m8(i.tokenTable):Tre}static define(e){return new iO(e)}getIndent(e,n){let i=Et(e.state),r=i.resolve(n);for(;r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;let s,{overrideIndentation:o}=e.options;o&&(s=P3.get(e.state),s!=null&&s1e4)return null;for(;l=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],u=a instanceof Ke&&l=e.length)return e;!r&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(on&&zx(t,r.tree,0-r.offset,n,o),l;if(a&&(l=h8(t,r.tree,n+r.offset,a.pos+r.offset,!1)))return{state:a.state,tree:l}}return{state:t.streamParser.startState(i?Fu(i):4),tree:Ke.empty}}let Ere=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=Uu.get(),o=r[0].from,{state:a,tree:l}=xre(e,i,o,s==null?void 0:s.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let u=0;u=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` -`&&(n="");else{let i=n.indexOf(` -`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,a=this.lineAfter(o);n+=a,i=o+a.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){s=this.skipGapsTo(n,s,1),n+=s;let o=this.chunk.length;s=this.skipGapsTo(i,s,-1),i+=s,r+=this.chunk.length-o}return this.chunk.push(e,n,i,r),s}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new d8(n,e?e.state.tabSize:4,e?Fu(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=f8(s.token,o,this.state);if(a&&(r=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,4,r)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const Hx=Object.create(null),rm=[gn.none],Cre=new Hh(rm),I3=[],$3=Object.create(null),p8=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])p8[t]=g8(Hx,e);class m8{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),p8)}resolve(e){return e?this.table[e]||(this.table[e]=g8(this.extra,e)):0}}const Tre=new m8(Hx);function lv(t,e){I3.indexOf(t)>-1||(I3.push(t),console.warn(e))}function g8(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||R[u];c?typeof c=="function"?l.length?l=l.map(c):lv(u,`Modifier ${u} used at start of tag`):l.length?lv(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:lv(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),s=$3[r];if(s)return s.id;let o=$3[r]=gn.define({id:rm.length,name:i,props:[fc({[i]:n})]});return rm.push(o),o.id}function Are(t){let e=gn.define({id:rm.length,name:"Document",props:[Ta.add(()=>t)],top:!0});return rm.push(e),e}$t.RTL,$t.LTR;class Ux{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Et(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(O8(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function D3(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Rre(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Rre(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function Pre(t,e){return n=>{for(let i=Et(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class L3{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Ba(t){return t.selection.main.from}function O8(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Fx=Uo.define();function Ire(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=r&&n!=i&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,i)?{range:a}:{changes:{from:a.from+s,to:i==r.from?a.to:a.from+o,insert:e},range:Y.cursor(a.from+s+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const M3=new WeakMap;function $re(t){if(!Array.isArray(t))return t;let e=M3.get(t);return e||M3.set(t,e=b8(t)),e}const rO=ze.define(),sm=ze.define();class Dre{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=Sx(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!v||w==1&&y||_==0&&w!=0)&&(n[d]==k||i[d]==k&&(h=!0)?o[d++]=v:o.length&&(O=!1)),_=w,v+=Er(k)}return d==l&&o[0]==0&&O?this.result(-100+(h?-200:0),o,e):f==l&&m==0?this.ret(-200-e.length+(b==e.length?0:-100),[0,b]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):f==l?this.ret(-900-e.length,[m,b]):d==l?this.result(-100+(h?-200:0)+-700+(O?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let a=o+(this.astral?Er(Un(i,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-i.length,r)}}class Lre{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Mre,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>N3(e(i),n(i)),optionClass:(e,n)=>i=>N3(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function N3(t,e){return t?e?t+" "+e:t:e}function Mre(t,e,n,i,r,s){let o=t.textDirection==$t.RTL,a=o,l=!1,u="top",c,d,h=e.left-r.left,f=r.right-e.right,m=i.right-i.left,b=i.bottom-i.top;if(a&&h=b||v>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/s.offsetHeight,O=(e.right-e.left)/s.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/O}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function Nre(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;ul&&o.appendChild(document.createTextNode(a.slice(l,c)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(c,d))),h.className="cm-completionMatchedText",l=d}return ln.position-i.position).map(n=>n.render)}function uv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class Bre{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,a=e.state.facet(jn);this.optionContent=Nre(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=uv(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(jn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:sm.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:a}=i.open;(!r.open||r.open.options!=s)&&(this.range=uv(s.length,o,e.state.facet(jn).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=uv(n.options.length,n.selected,this.view.state.facet(jn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Ni(this.view.state,o,"completion info")):this.addInfoPane(s,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&zre(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(s=h,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let f=r.appendChild(document.createElement("completion-section"));f.textContent=h}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");let d=this.optionClass(a);d&&(c.className=d);for(let h of this.optionContent){let f=h(a,this.view.state,this.view,l);f&&c.appendChild(f)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew Bre(n,t,e)}function zre(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function B3(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Hre(t,e){let n=[],i=null,r=u=>{n.push(u);let{section:c}=u.completion;if(c){i||(i=[]);let d=typeof c=="string"?c:c.name;i.some(h=>h.name==d)||i.push(typeof c=="string"?{name:d}:c)}},s=e.facet(jn);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)r(new L3(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,f=s.filterStrict?new Lre(d):new Dre(d);for(let m of u.result.options)if(h=f.match(m.label)){let b=m.displayLabel?c?c(m,h.matched):[]:h.matched;r(new L3(m,u.source,b,h.score+(m.boost||0)))}}}if(i){let u=Object.create(null),c=0,d=(h,f)=>{var m,b;return((m=h.rank)!==null&&m!==void 0?m:1e9)-((b=f.rank)!==null&&b!==void 0?b:1e9)||(h.named.score-c.score||l(c.completion,d.completion))){let c=u.completion;!a||a.label!=c.label||a.detail!=c.detail||a.type!=null&&c.type!=null&&a.type!=c.type||a.apply!=c.apply||a.boost!=c.boost?o.push(u):B3(u.completion)>B3(a)&&(o[o.length-1]=u),a=u.completion}return o}class yd{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new yd(this.options,Q3(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s){let o=Hre(e,n);if(!o.length)return r&&e.some(l=>l.state==1)?new yd(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let a=n.facet(jn).selectOnOpen?0:-1;if(r&&r.selected!=a&&r.selected!=-1){let l=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:jre,above:s.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new yd(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class sO{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new sO(Vre,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(jn),s=(i.override||n.languageDataAt("autocomplete",Ba(n)).map($re)).map(a=>(this.active.find(u=>u.source==a)||new gi(a,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((a,l)=>a==this.active[l])&&(s=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!Ure(s,this.active)?o=yd.build(s,n,this.id,o,i):o&&o.disabled&&!s.some(a=>a.state==1)&&(o=null),!o&&s.every(a=>a.state!=1)&&s.some(a=>a.hasResult())&&(s=s.map(a=>a.hasResult()?new gi(a.source,0):a));for(let a of e.effects)a.is(v8)&&(o=o&&o.setSelected(a.value,this.id));return s==this.active&&o==this.open?this:new sO(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Fre}}function Ure(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Vre=[];function i_(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(Fx);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class gi{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=i_(e,n),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new gi(r.source,0));for(let s of e.effects)if(s.is(rO))r=new gi(r.source,1,s.value?Ba(e.state):-1);else if(s.is(sm))r=new gi(r.source,0);else if(s.is(y8))for(let o of s.value)o.source==r.source&&(r=o);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new gi(this.source,1)}handleChange(e){return e.changes.touchesRange(Ba(e.startState))?new gi(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new gi(this.source,this.state,e.mapPos(this.explicitPos))}}class Bd extends gi{constructor(e,n,i,r,s){super(e,2,n),this.result=i,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,n,i){var r;let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=Ba(e.state);if((this.explicitPos<0?l<=o:la||!s||n=="delete"&&Ba(e.startState)==this.from)return new gi(this.source,n=="input"&&i.activateOnTyping?1:0);let u=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return Wre(s.validFor,e.state,o,a)?new Bd(this.source,u,s,o,a):s.update&&(s=s.update(s,o,a,new Ux(e.state,l,u>=0)))?new Bd(this.source,u,s,s.from,(r=s.to)!==null&&r!==void 0?r:Ba(e.state)):new gi(this.source,1,u)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new gi(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Bd(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new gi(this.source,0)}}function Wre(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):O8(t,!0).test(r)}const y8=ze.define({map(t,e){return t.map(n=>n.map(e))}}),v8=ze.define(),Di=In.define({create(){return sO.start()},update(t,e){return t.update(e)},provide:t=>[$x.from(t,e=>e.tooltip),ce.contentAttributes.from(t,e=>e.attrs)]});function Vx(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Di).active.find(r=>r.source==e.source);return i instanceof Bd?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},Ire(t.state,n,i.from,i.to)),{annotations:Fx.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const jre=Qre(Di,Vx);function t0(t,e="option"){return n=>{let i=n.state.field(Di,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:v8.of(a)}),!0}}const Xre=t=>{let e=t.state.field(Di,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Di,!1)?(t.dispatch({effects:rO.of(!0)}),!0):!1,qre=t=>{let e=t.state.field(Di,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:sm.of(null)}),!0)};class Yre{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Gre=50,Kre=1e3,Jre=mn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Di).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Di),n=t.state.facet(jn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Di)==e)return;let i=t.transactions.some(s=>(s.selection||s.docChanged)&&!i_(s,n));for(let s=0;sGre&&Date.now()-o.time>Kre){for(let a of o.context.abortListeners)try{a()}catch(l){Ni(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(rO)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.state==1&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)i_(s,n)=="input"?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Di);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Ba(e),i=new Ux(e,n,t.explicitPos==n),r=new Yre(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:sm.of(null)}),Ni(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(jn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(jn);for(let i=0;io.source==r.active.source);if(s&&s.state==1)if(r.done==null){let o=new gi(r.active.source,0);for(let a of r.updates)o=o.update(a,n);o.state!=1&&e.push(o)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:y8.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Di,!1);if(e&&e.tooltip&&this.view.state.facet(jn).closeOnBlur){let n=e.open&&MB(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sm.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:rO.of(!1)}),20),this.composing=0}}}),ese=typeof navigator=="object"&&/Win/.test(navigator.platform),tse=Ho.highest(ce.domEventHandlers({keydown(t,e){let n=e.state.field(Di,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(ese&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Vx(e,i),!1}})),S8=ce.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class nse{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class Wx{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Wn.TrackDel),i=e.mapPos(this.to,1,Wn.TrackDel);return n==null||i==null?null:new Wx(this.field,n,i)}}class jx{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let u=o,c=/^\t*/.exec(l)[0].length;for(let d=0;dnew Wx(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",u=-1;for(let c=0;c=u&&d.field++}r.push(new nse(u,i.length,s.index,s.index+l.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,u)=>{for(let c of r)c.line==i.length&&c.from>u&&(c.from--,c.to--);return l}),i.push(o)}return new jx(i,r)}}let ise=Ce.widget({widget:new class extends Fo{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),rse=Ce.mark({class:"cm-snippetField"});class Vh{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ce.set(e.map(i=>(i.from==i.to?ise:rse).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Vh(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const zm=ze.define({map(t,e){return t&&t.map(e)}}),sse=ze.define(),om=In.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(zm))return n.value;if(n.is(sse)&&t)return new Vh(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ce.decorations.from(t,e=>e?e.deco:Ce.none)});function Xx(t,e){return Y.create(t.filter(n=>n.field==e).map(n=>Y.range(n.from,n.to)))}function ose(t){let e=jx.parse(t);return(n,i,r,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,r),l={changes:{from:r,to:s,insert:ut.of(o)},scrollIntoView:!0,annotations:i?[Fx.of(i),fn.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=Xx(a,0)),a.some(u=>u.field>0)){let u=new Vh(a,0),c=l.effects=[zm.of(u)];n.state.field(om,!1)===void 0&&c.push(ze.appendConfig.of([om,dse,hse,S8]))}n.dispatch(n.state.update(l))}}function w8(t){return({state:e,dispatch:n})=>{let i=e.field(om,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:Xx(i.ranges,r),effects:zm.of(s?null:new Vh(i.ranges,r)),scrollIntoView:!0})),!0}}const ase=({state:t,dispatch:e})=>t.field(om,!1)?(e(t.update({effects:zm.of(null)})),!0):!1,lse=w8(1),use=w8(-1),cse=[{key:"Tab",run:lse,shift:use},{key:"Escape",run:ase}],z3=he.define({combine(t){return t.length?t[0]:cse}}),dse=Ho.highest(Lm.compute([z3],t=>t.facet(z3)));function Pi(t,e){return Object.assign(Object.assign({},e),{apply:ose(t)})}const hse=ce.domEventHandlers({mousedown(t,e){let n=e.state.field(om,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:Xx(n.ranges,r.field),effects:zm.of(n.ranges.some(s=>s.field>r.field)?new Vh(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),am={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},vu=ze.define({map(t,e){let n=e.mapPos(t,-1,Wn.TrackAfter);return n??void 0}}),Zx=new class extends Nu{};Zx.startSide=1;Zx.endSide=-1;const _8=In.define({create(){return ot.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(vu)&&(t=t.update({add:[Zx.range(n.value,n.value+1)]}));return t}});function fse(){return[mse,_8]}const cv="()[]{}<>";function k8(t){for(let e=0;e{if((pse?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Er(Un(i,0))==1||e!=r.from||n!=r.to)return!1;let s=Ose(t.state,i);return s?(t.dispatch(s),!0):!1}),gse=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=x8(t,t.selection.main.head).brackets||am.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let a=yse(t.doc,o.head);for(let l of i)if(l==a&&x1(t.doc,o.head)==k8(Un(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:Y.cursor(o.head-l.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},bse=[{key:"Backspace",run:gse}];function Ose(t,e){let n=x8(t,t.selection.main.head),i=n.brackets||am.brackets;for(let r of i){let s=k8(Un(r,0));if(e==r)return s==r?wse(t,r,i.indexOf(r+r+r)>-1,n):vse(t,r,s,n.before||am.before);if(e==s&&E8(t,t.selection.main.from))return Sse(t,r,s)}return null}function E8(t,e){let n=!1;return t.field(_8).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function x1(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Er(Un(n,0)))}function yse(t,e){let n=t.sliceString(e-2,e);return Er(Un(n,0))==n.length?n:n.slice(1)}function vse(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:vu.of(o.to+e.length),range:Y.range(o.anchor+e.length,o.head+e.length)};let a=x1(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:vu.of(o.head+e.length),range:Y.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Sse(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&x1(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Y.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function wse(t,e,n,i){let r=i.stringPrefixes||am.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:vu.of(a.to+e.length),range:Y.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=x1(t.doc,l),c;if(u==e){if(H3(t,l))return{changes:{insert:e+e,from:l},effects:vu.of(l+e.length),range:Y.cursor(l+e.length)};if(E8(t,l)){let h=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:Y.cursor(l+h.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=U3(t,l-2*e.length,r))>-1&&H3(t,c))return{changes:{insert:e+e+e+e,from:l},effects:vu.of(l+e.length),range:Y.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Ut.Word&&U3(t,l,r)>-1&&!_se(t,l,e,r))return{changes:{insert:e+e,from:l},effects:vu.of(l+e.length),range:Y.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function H3(t,e){let n=Et(t).resolveInner(e+1);return n.parent&&n.from==e}function _se(t,e,n,i){let r=Et(t).resolveInner(e,-1),s=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function U3(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Ut.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=Ut.Word)return s}return-1}function kse(t={}){return[tse,Di,jn.of(t),Jre,xse,S8]}const C8=[{key:"Ctrl-Space",run:Zre},{key:"Escape",run:qre},{key:"ArrowDown",run:t0(!0)},{key:"ArrowUp",run:t0(!1)},{key:"PageDown",run:t0(!0,"page")},{key:"PageUp",run:t0(!1,"page")},{key:"Enter",run:Xre}],xse=Ho.highest(Lm.computeN([jn],t=>t.facet(jn).defaultKeymap?[C8]:[]));function Tt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class sh{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?a=>s(F3(a)):F3,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Un(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Sx(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Er(e);let r=this.normalize(n);for(let s=0,o=i;;s++){let a=r.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==r.length-1){if(l)return this.value=l,this;break}o==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=oO(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let a=new Qd(n,e.sliceString(n,i));return dv.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=oO(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Qd.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(R8.prototype[Symbol.iterator]=P8.prototype[Symbol.iterator]=function(){return this});function Ese(t){try{return new RegExp(t,qx),!0}catch{return!1}}function oO(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function r_(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=Tt("input",{class:"cm-textfield",name:"line",value:e}),i=Tt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:aO.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},Tt("label",t.state.phrase("Go to line"),": ",n)," ",Tt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,l,u,c,d]=s,h=c?+c.slice(1):0,f=u?+u:a.number;if(u&&d){let y=f/100;l&&(y=y*(l=="-"?-1:1)+a.number/o.doc.lines),f=Math.round(o.doc.lines*y)}else u&&l&&(f=f*(l=="-"?-1:1)+a.number);let m=o.doc.line(Math.max(1,Math.min(o.doc.lines,f))),b=Y.cursor(m.from+Math.max(0,Math.min(h,m.length)));t.dispatch({effects:[aO.of(!1),ce.scrollIntoView(b.from,{y:"center"})],selection:b}),t.focus()}return{dom:i}}const aO=ze.define(),V3=In.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(aO)&&(t=n.value);return t},provide:t=>tm.from(t,e=>e?r_:null)}),Cse=t=>{let e=em(t,r_);if(!e){let n=[aO.of(!0)];t.state.field(V3,!1)==null&&n.push(ze.appendConfig.of([V3,Tse])),t.dispatch({effects:n}),e=em(t,r_)}return e&&e.dom.querySelector("input").select(),!0},Tse=ce.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Ase={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Rse=he.define({combine(t){return Js(t,Ase,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Pse(t){return[Mse,Lse]}const Ise=Ce.mark({class:"cm-selectionMatch"}),$se=Ce.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function W3(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Ut.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Ut.Word)}function Dse(t,e,n,i){return t(e.sliceDoc(n,n+1))==Ut.Word&&t(e.sliceDoc(i-1,i))==Ut.Word}const Lse=mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Rse),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Ce.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ce.none;let l=n.wordAt(r.head);if(!l)return Ce.none;o=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return Ce.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(W3(o,n,r.from,r.to)&&Dse(o,n,r.from,r.to)))return Ce.none}else if(s=n.sliceDoc(r.from,r.to),!s)return Ce.none}let a=[];for(let l of t.visibleRanges){let u=new sh(n.doc,s,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!o||W3(o,n,c,d))&&(r.empty&&c<=r.from&&d>=r.to?a.push($se.range(c,d)):(c>=r.to||d<=r.from)&&a.push(Ise.range(c,d)),a.length>e.maxMatches))return Ce.none}}return Ce.set(a)}},{decorations:t=>t.decorations}),Mse=ce.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Nse=({state:t,dispatch:e})=>{let{selection:n}=t,i=Y.create(n.ranges.map(r=>t.wordAt(r.head)||Y.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function Bse(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,a=new sh(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new sh(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const Qse=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return Nse({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=Bse(t,i);return r?(e(t.update({selection:t.selection.addRange(Y.range(r.from,r.to),!1),effects:ce.scrollIntoView(r.to)})),!0):!1},mc=he.define({combine(t){return Js(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Kse(e),scrollToMatch:e=>ce.scrollIntoView(e)})}});function zse(t){return t?[mc.of(t),o_]:o_}class Yx{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Ese(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Vse(this):new Use(this)}getCursor(e,n=0,i){let r=e.doc?e:qe.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?nd(this,r,n,i):td(this,r,n,i)}}class I8{constructor(e){this.spec=e}}function td(t,e,n,i){return new sh(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?Hse(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Hse(t,e){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=td(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function nd(t,e,n,i){return new R8(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Fse(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function lO(t,e){return t.slice(Zn(t,e,!1),e)}function uO(t,e){return t.slice(e,Zn(t,e))}function Fse(t){return(e,n,i)=>!i[0].length||(t(lO(i.input,i.index))!=Ut.Word||t(uO(i.input,i.index))!=Ut.Word)&&(t(uO(i.input,i.index+i[0].length))!=Ut.Word||t(lO(i.input,i.index+i[0].length))!=Ut.Word)}class Vse extends I8{nextMatch(e,n,i){let r=nd(this.spec,e,i,e.doc.length).next();return r.done&&(r=nd(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=nd(this.spec,e,s,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=nd(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const oh=ze.define(),Gx=ze.define(),Qa=In.define({create(t){return new hv(s_(t).create(),null)},update(t,e){for(let n of e.effects)n.is(oh)?t=new hv(n.value.create(),t.panel):n.is(Gx)&&(t=new hv(t.query,n.value?Kx:null));return t},provide:t=>tm.from(t,e=>e.panel)});class hv{constructor(e,n){this.query=e,this.panel=n}}const Wse=Ce.mark({class:"cm-searchMatch"}),jse=Ce.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Xse=mn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Qa))}update(t){let e=t.state.field(Qa);(e!=t.startState.field(Qa)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ce.none;let{view:n}=this,i=new Fa;for(let r=0,s=n.visibleRanges,o=s.length;rs[r+1].from-2*250;)l=s[++r].to;t.highlight(n.state,a,l,(u,c)=>{let d=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);i.add(u,c,d?jse:Wse)})}return i.finish()}},{decorations:t=>t.decorations});function Hm(t){return e=>{let n=e.state.field(Qa,!1);return n&&n.query.spec.valid?t(e,n):L8(e)}}const lm=Hm((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=Y.single(i.from,i.to),s=t.state.facet(mc);return t.dispatch({selection:r,effects:[e2(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),D8(t),!0}),um=Hm((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=Y.single(r.from,r.to),o=t.state.facet(mc);return t.dispatch({selection:s,effects:[e2(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),D8(t),!0}),Zse=Hm((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Y.create(n.map(i=>Y.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),qse=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let a=new sh(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(o=s.length),s.push(Y.range(a.value.from,a.value.to))}return e(t.update({selection:Y.create(s,o),userEvent:"select.search.matches"})),!0},j3=Hm((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=[],a,l,u=[];if(s.from==i&&s.to==r&&(l=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:l}),s=e.nextMatch(n,s.from,s.to),u.push(ce.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),s){let c=o.length==0||o[0].from>=s.to?0:s.to-s.from-l.length;a=Y.single(s.from-c,s.to-c),u.push(e2(t,s)),u.push(n.facet(mc).scrollToMatch(a.main,t))}return t.dispatch({changes:o,selection:a,effects:u,userEvent:"input.replace"}),!0}),Yse=Hm((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ce.announce.of(i),userEvent:"input.replace.all"}),!0});function Kx(t){return t.state.facet(mc).createPanel(t)}function s_(t,e){var n,i,r,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(mc);return new Yx({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function $8(t){let e=em(t,Kx);return e&&e.dom.querySelector("[main-field]")}function D8(t){let e=$8(t);e&&e==t.root.activeElement&&e.select()}const L8=t=>{let e=t.state.field(Qa,!1);if(e&&e.panel){let n=$8(t);if(n&&n!=t.root.activeElement){let i=s_(t.state,e.query.spec);i.valid&&t.dispatch({effects:oh.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Gx.of(!0),e?oh.of(s_(t.state,e.query.spec)):ze.appendConfig.of(o_)]});return!0},Jx=t=>{let e=t.state.field(Qa,!1);if(!e||!e.panel)return!1;let n=em(t,Kx);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Gx.of(!1)}),!0},Gse=[{key:"Mod-f",run:L8,scope:"editor search-panel"},{key:"F3",run:lm,shift:um,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:lm,shift:um,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Jx,scope:"editor search-panel"},{key:"Mod-Shift-l",run:qse},{key:"Mod-Alt-g",run:Cse},{key:"Mod-d",run:Qse,preventDefault:!0}];let Kse=class{constructor(e){this.view=e;let n=this.query=e.state.field(Qa).query.spec;this.commit=this.commit.bind(this),this.searchField=Tt("input",{value:n.search,placeholder:ji(e,"Find"),"aria-label":ji(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tt("input",{value:n.replace,placeholder:ji(e,"Replace"),"aria-label":ji(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Tt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Tt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return Tt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=Tt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>lm(e),[ji(e,"next")]),i("prev",()=>um(e),[ji(e,"previous")]),i("select",()=>Zse(e),[ji(e,"all")]),Tt("label",null,[this.caseField,ji(e,"match case")]),Tt("label",null,[this.reField,ji(e,"regexp")]),Tt("label",null,[this.wordField,ji(e,"by word")]),...e.state.readOnly?[]:[Tt("br"),this.replaceField,i("replace",()=>j3(e),[ji(e,"replace")]),i("replaceAll",()=>Yse(e),[ji(e,"replace all")])],Tt("button",{name:"close",onclick:()=>Jx(e),"aria-label":ji(e,"close"),type:"button"},["×"])])}commit(){let e=new Yx({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:oh.of(e)}))}keydown(e){yne(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?um:lm)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),j3(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(oh)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(mc).top}};function ji(t,e){return t.state.phrase(e)}const n0=30,i0=/[\s\.,:;?!]/;function e2(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-n0),o=Math.min(r,n+n0),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let l=0;la.length-n0;l--)if(!i0.test(a[l-1])&&i0.test(a[l])){a=a.slice(0,l);break}}return ce.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const Jse=ce.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),o_=[Qa,Ho.low(Xse),Jse],eoe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=n2(t.state,n.from);return i.line?toe(t):i.block?ioe(t):!1};function t2(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const toe=t2(ooe,0),noe=t2(M8,0),ioe=t2((t,e)=>M8(t,e,soe(e)),0);function n2(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const xf=50;function roe(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-xf,i),o=t.sliceDoc(r,r+xf),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,u=s.length-a;if(s.slice(u-e.length,u)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let c,d;r-i<=2*xf?c=d=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+xf),d=t.sliceDoc(r-xf,r));let h=/^\s*/.exec(c)[0].length,f=/\s*$/.exec(d)[0].length,m=d.length-f-n.length;return c.slice(h,h+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:i+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:r-f-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function soe(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function M8(t,e,n=e.selection.ranges){let i=n.map(s=>n2(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>roe(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,a;or&&(s==o||o>d.from)){r=d.from;let h=/^\s*/.exec(d.text)[0].length,f=h==d.length,m=d.text.slice(h,h+u.length)==u?h:-1;hs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:u,empty:c,single:d}of i)(d||!c)&&s.push({from:a.from+u,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let u=o.from+a,c=u+l.length;o.text[c-o.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const a_=Uo.define(),aoe=Uo.define(),loe=he.define(),N8=he.define({combine(t){return Js(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),B8=In.define({create(){return Ms.empty},update(t,e){let n=e.state.facet(N8),i=e.annotation(a_);if(i){let l=Bi.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=cO(c,c.length,n.minDepth,l):c=H8(c,e.startState.selection),new Ms(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(aoe);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(fn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Bi.fromTransaction(e),o=e.annotation(fn.time),a=e.annotation(fn.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Ms(t.done.map(Bi.fromJSON),t.undone.map(Bi.fromJSON))}});function uoe(t={}){return[B8,N8.of(t),ce.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?Q8:e.inputType=="historyRedo"?l_:null;return i?(e.preventDefault(),i(n)):!1}})]}function E1(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(B8,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const Q8=E1(0,!1),l_=E1(1,!1),coe=E1(0,!0),doe=E1(1,!0);class Bi{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new Bi(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Bi(e.changes&&vn.fromJSON(e.changes),[],e.mapped&&Us.fromJSON(e.mapped),e.startSelection&&Y.fromJSON(e.startSelection),e.selectionsAfter.map(Y.fromJSON))}static fromTransaction(e,n){let i=Tr;for(let r of e.startState.facet(loe)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Bi(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Tr)}static selection(e){return new Bi(void 0,Tr,void 0,void 0,e)}}function cO(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function hoe(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l=u&&o<=c&&(i=!0)}}),i}function foe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function z8(t,e){return t.length?e.length?t.concat(e):t:e}const Tr=[],poe=200;function H8(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-poe));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),cO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Bi.selection([e])]}function moe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function fv(t,e){if(!t.length)return t;let n=t.length,i=Tr;for(;n;){let r=goe(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Bi.selection(i)]:Tr}function goe(t,e,n){let i=z8(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Tr,n);if(!t.changes)return Bi.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new Bi(r,ze.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const boe=/^(input\.type|delete)($|\.)/;class Ms{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Ms(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||boe.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):C1(n,e))}function ai(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const i2=t=>U8(t,!ai(t)),r2=t=>U8(t,ai(t));function F8(t,e){return ms(t,n=>n.empty?t.moveByGroup(n,e):C1(n,e))}const V8=t=>F8(t,!ai(t)),W8=t=>F8(t,ai(t));function yoe(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function T1(t,e,n){let i=Et(t).resolveInner(e.head),r=n?Pe.closedBy:Pe.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;yoe(t,u,r)?i=u:l=n?u.to:u.from}let s=i.type.prop(r),o,a;return s&&(o=n?Ls(t,i.from,1):Ls(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,Y.cursor(a,n?-1:1)}const j8=t=>ms(t,e=>T1(t.state,e,!ai(t))),X8=t=>ms(t,e=>T1(t.state,e,ai(t)));function Z8(t,e){return ms(t,n=>{if(!n.empty)return C1(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const q8=t=>Z8(t,!1),Y8=t=>Z8(t,!0);function G8(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):C1(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;o&&o.top>l&&o.bottomK8(t,!1),u_=t=>K8(t,!0);function el(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=Y.cursor(i.from+s))}return r}const J8=t=>ms(t,e=>el(t,e,!0)),e9=t=>ms(t,e=>el(t,e,!1)),t9=t=>ms(t,e=>el(t,e,!ai(t))),n9=t=>ms(t,e=>el(t,e,ai(t))),voe=t=>ms(t,e=>Y.cursor(t.lineBlockAt(e.head).from,1)),Soe=t=>ms(t,e=>Y.cursor(t.lineBlockAt(e.head).to,-1));function woe(t,e,n){let i=!1,r=Wh(t.selection,s=>{let o=Ls(t,s.head,-1)||Ls(t,s.head,1)||s.head>0&&Ls(t,s.head-1,1)||s.headwoe(t,e);function Mr(t,e){let n=Wh(t.state.selection,i=>{let r=e(i);return Y.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(eo(t.state,n)),!0)}function i9(t,e){return Mr(t,n=>t.moveByChar(n,e))}const s2=t=>i9(t,!ai(t)),o2=t=>i9(t,ai(t));function r9(t,e){return Mr(t,n=>t.moveByGroup(n,e))}const s9=t=>r9(t,!ai(t)),o9=t=>r9(t,ai(t)),a9=t=>Mr(t,e=>T1(t.state,e,!ai(t))),l9=t=>Mr(t,e=>T1(t.state,e,ai(t)));function u9(t,e){return Mr(t,n=>t.moveVertically(n,e))}const c9=t=>u9(t,!1),d9=t=>u9(t,!0);function h9(t,e){return Mr(t,n=>t.moveVertically(n,e,G8(t).height))}const Z3=t=>h9(t,!1),q3=t=>h9(t,!0),f9=t=>Mr(t,e=>el(t,e,!0)),p9=t=>Mr(t,e=>el(t,e,!1)),m9=t=>Mr(t,e=>el(t,e,!ai(t))),g9=t=>Mr(t,e=>el(t,e,ai(t))),koe=t=>Mr(t,e=>Y.cursor(t.lineBlockAt(e.head).from)),xoe=t=>Mr(t,e=>Y.cursor(t.lineBlockAt(e.head).to)),Y3=({state:t,dispatch:e})=>(e(eo(t,{anchor:0})),!0),G3=({state:t,dispatch:e})=>(e(eo(t,{anchor:t.doc.length})),!0),K3=({state:t,dispatch:e})=>(e(eo(t,{anchor:t.selection.main.anchor,head:0})),!0),J3=({state:t,dispatch:e})=>(e(eo(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Eoe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Coe=({state:t,dispatch:e})=>{let n=A1(t).map(({from:i,to:r})=>Y.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:Y.create(n),userEvent:"select"})),!0},Toe=({state:t,dispatch:e})=>{let n=Wh(t.selection,i=>{var r;let s=Et(t).resolveStack(i.from,1);for(let o=s;o;o=o.next){let{node:a}=o;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&(!((r=a.parent)===null||r===void 0)&&r.parent))return Y.range(a.to,a.from)}return i});return e(eo(t,n)),!0},Aoe=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=Y.create([n.main]):n.main.empty||(i=Y.create([Y.cursor(n.main.head)])),i?(e(eo(t,i)),!0):!1};function jh(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);lo&&(n="delete.forward",l=r0(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=r0(t,o,!1),a=r0(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:Y.cursor(o,or(t)))i.between(e,e,(r,s)=>{re&&(e=n?s:r)});return e}const b9=(t,e,n)=>jh(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),a,l;if(n&&!e&&r>o.from&&rb9(t,!1,!0),hO=t=>b9(t,!0,!1),O9=(t,e)=>jh(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=Zn(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),c=o(u);if(a!=null&&c!=a)break;(u!=" "||i!=n.head)&&(a=c),i=l}return i}),a2=t=>O9(t,!1),y9=t=>O9(t,!0),v9=t=>jh(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headjh(t,e=>{let n=t.lineBlockAt(e.head).from;return e.head>n?n:Math.max(0,e.head-1)}),Poe=t=>jh(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Ioe=t=>jh(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ut.of(["",""])},range:Y.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Doe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:Zn(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:Zn(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(o,r))},range:Y.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function A1(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function S9(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of A1(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)r.push(Y.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)r.push(Y.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:Y.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Loe=({state:t,dispatch:e})=>S9(t,e,!1),Moe=({state:t,dispatch:e})=>S9(t,e,!0);function w9(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of A1(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Noe=({state:t,dispatch:e})=>w9(t,e,!1),Boe=({state:t,dispatch:e})=>w9(t,e,!0),Qoe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(A1(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function zoe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Et(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(Pe.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Hoe=_9(!1),Uoe=_9(!0);function _9(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!t&&s==o&&zoe(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let u=new Nm(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=_1(u,s);for(c==null&&(c=cs(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));oa.from&&s{let r=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),o=a.to+1}let s=t.changes(r);return{changes:r,range:Y.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const k9=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Nm(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=l2(t,(s,o,a)=>{let l=_1(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let u=/^\s*/.exec(s.text)[0],c=rh(t,l);(u!=c||a.fromt.readOnly?!1:(e(t.update(l2(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Uh)})}),{userEvent:"input.indent"})),!0),E9=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(l2(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=cs(r,t.tabSize),o=0,a=rh(t,Math.max(0,s-Fu(t)));for(;o({mac:t.key,run:t.run,shift:t.shift}))),eI=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:j8,shift:a9},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:X8,shift:l9},{key:"Alt-ArrowUp",run:Loe},{key:"Shift-Alt-ArrowUp",run:Noe},{key:"Alt-ArrowDown",run:Moe},{key:"Shift-Alt-ArrowDown",run:Boe},{key:"Escape",run:Aoe},{key:"Mod-Enter",run:Uoe},{key:"Alt-l",mac:"Ctrl-l",run:Coe},{key:"Mod-i",run:Toe,preventDefault:!0},{key:"Mod-[",run:E9},{key:"Mod-]",run:x9},{key:"Mod-Alt-\\",run:k9},{key:"Shift-Mod-k",run:Qoe},{key:"Shift-Mod-\\",run:_oe},{key:"Mod-/",run:eoe},{key:"Alt-A",run:noe}].concat(Voe),Woe={key:"Tab",run:x9,shift:E9};class joe{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class du{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,s=i.facet(cm).markerFilter;s&&(r=s(r,i));let o=Ce.set(r.map(a=>a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?Ce.widget({widget:new tae(a),diagnostic:a}).range(a.from):Ce.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a,inclusive:!0}).range(a.from,a.to)),!0);return new du(o,n,ah(o))}}function ah(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new joe(r,s,o.diagnostic),!1}),i}function Xoe(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(cm).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(C9))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function Zoe(t,e){return t.field(or,!1)?e:e.concat(ze.appendConfig.of(rae))}const C9=ze.define(),u2=ze.define(),T9=ze.define(),or=In.define({create(){return new du(Ce.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=ah(n,t.selected.diagnostic,s)||ah(n,null,s)}!n.size&&r&&e.state.facet(cm).autoPanel&&(r=null),t=new du(n,r,i)}for(let n of e.effects)if(n.is(C9)){let i=e.state.facet(cm).autoPanel?n.value.length?dm.open:null:t.panel;t=du.init(n.value,i,e.state)}else n.is(u2)?t=new du(t.diagnostics,n.value?dm.open:null,t.selected):n.is(T9)&&(t=new du(t.diagnostics,t.panel,n.value));return t},provide:t=>[tm.from(t,e=>e.panel),ce.decorations.from(t,e=>e.diagnostics)]}),qoe=Ce.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function Yoe(t,e,n){let{diagnostics:i}=t.state.field(or),r=[],s=2e8,o=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eR9(t,n,!1)))}const Koe=t=>{let e=t.state.field(or,!1);(!e||!e.panel)&&t.dispatch({effects:Zoe(t.state,[u2.of(!0)])});let n=em(t,dm.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},tI=t=>{let e=t.state.field(or,!1);return!e||!e.panel?!1:(t.dispatch({effects:u2.of(!1)}),!0)},Joe=t=>{let e=t.state.field(or,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},eae=[{key:"Mod-Shift-m",run:Koe,preventDefault:!0},{key:"F8",run:Joe}],cm=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Js(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function A9(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function R9(t,e,n){var i;let r=n?A9(e.actions):[];return Tt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let f=ah(t.state.field(or).diagnostics,e);f&&s.apply(t,f.from,f.to)},{name:u}=s,c=r[o]?u.indexOf(r[o]):-1,d=c<0?u:[u.slice(0,c),Tt("u",u.slice(c,c+1)),u.slice(c+1)];return Tt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[o]})"`}.`},d)}),e.source&&Tt("div",{class:"cm-diagnosticSource"},e.source))}class tae extends Fo{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class nI{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=R9(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dm{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)tI(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=A9(s.actions);for(let a=0;a{for(let s=0;stI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(or).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=i;di&&(this.items.splice(i,u-i),r=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),s=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:a})=>{let l=a.height/this.list.offsetHeight;o.topa.bottom&&(this.list.scrollTop+=(o.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(or),i=ah(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:T9.of(i)})}static open(e){return new dm(e)}}function nae(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function s0(t){return nae(``,'width="6" height="3"')}const iae=ce.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:s0("#d11")},".cm-lintRange-warning":{backgroundImage:s0("orange")},".cm-lintRange-info":{backgroundImage:s0("#999")},".cm-lintRange-hint":{backgroundImage:s0("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),rae=[or,ce.decorations.compute([or],t=>{let{selected:e,panel:n}=t.field(or);return!e||!n||e.from==e.to?Ce.none:Ce.set([qoe.range(e.from,e.to)])}),sie(Yoe,{hideOn:Xoe}),iae];var iI={};class fO{constructor(e,n,i,r,s,o,a,l,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new fO(e,[],n,i,i,0,[],0,r?new rI(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p;this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==i)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4);this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let s=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new fO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new sae(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;sl&1&&a==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,s+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class rI{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class sae{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class pO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new pO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pO(this.stack,this.pos,this.index)}}function jf(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class K0{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const sI=new K0;class oae{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=sI,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=sI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class zd{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;P9(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}zd.prototype.contextual=zd.prototype.fallback=zd.prototype.extend=!1;class mO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?jf(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(P9(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}mO.prototype.contextual=zd.prototype.fallback=zd.prototype.extend=!1;class gs{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function P9(t,e,n,i,r,s){let o=0,a=1<0){let m=t[f];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||aae(m,e.token.value,r,s))){e.acceptToken(m);break}}let c=e.next,d=0,h=t[o+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535){o=t[u+h*3-1];continue e}for(;d>1,m=u+f+(f<<1),b=t[m],y=t[m+1]||65536;if(c=y)d=f+1;else{o=t[m+2],e.advance();continue e}}break}}function oI(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function aae(t,e,n,i){let r=oI(n,i,e);return r<0||oI(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let lae=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?aI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?aI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof Ke){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}};class uae{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new K0)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;ud.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new K0,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new K0,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;se.bufferLength*4?new lae(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!i.length){let o=r&&hae(r);if(o)return Xi&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Xi&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Xi&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?s.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Pe.contextHash)||0)==c))return e.useNode(d,h),Xi&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(d.type.id)})`),!0;if(!(d instanceof Ke)||d.children.length==0||d.positions[0]>0)break;let f=d.children[0];if(f instanceof Ke&&d.positions[0]==0)d=f;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Xi&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return lI(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Xi&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let d=a.split(),h=c;for(let f=0;d.forceReduce()&&f<10&&(Xi&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)Xi&&(h=this.stackID(d)+" -> ");for(let f of a.recoverByInsert(l))Xi&&console.log(c+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,i);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),Xi&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),lI(a,i)):(!r||r.scoret;class I9{constructor(e){this.start=e.start,this.shift=e.shift||mv,this.reduce=e.reduce||mv,this.reuse=e.reuse||mv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Wu extends S1{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)s(c,l,a[u++]);else{let d=a[u+-c];for(let h=-c;h>0;h--)s(a[u++],l,d);u++}}}this.nodeSet=new Hh(n.map((a,l)=>gn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=zB;let o=jf(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new zd(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new cae(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&i)return l;for(let u=s+(o>>1);s0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=go(this.data,s+2);else break;r=n(go(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=go(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Wu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(a=>a.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=uI(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const fae=312,cI=1,pae=2,mae=3,gae=4,bae=313,Oae=315,yae=316,vae=5,Sae=6,wae=0,c_=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$9=125,_ae=59,d_=47,kae=42,xae=43,Eae=45,Cae=60,Tae=44,Aae=63,Rae=46,Pae=new I9({start:!1,shift(t,e){return e==vae||e==Sae||e==Oae?t:e==yae},strict:!1}),Iae=new gs((t,e)=>{let{next:n}=t;(n==$9||n==-1||e.context)&&t.acceptToken(bae)},{contextual:!0,fallback:!0}),$ae=new gs((t,e)=>{let{next:n}=t,i;c_.indexOf(n)>-1||n==d_&&((i=t.peek(1))==d_||i==kae)||n!=$9&&n!=_ae&&n!=-1&&!e.context&&t.acceptToken(fae)},{contextual:!0}),Dae=new gs((t,e)=>{let{next:n}=t;if(n==xae||n==Eae){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(cI);t.acceptToken(i?cI:pae)}}else n==Aae&&t.peek(1)==Rae&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(mae))},{contextual:!0});function gv(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Lae=new gs((t,e)=>{if(t.next!=Cae||!e.dialectEnabled(wae)||(t.advance(),t.next==d_))return;let n=0;for(;c_.indexOf(t.next)>-1;)t.advance(),n++;if(gv(t.next,!0)){for(t.advance(),n++;gv(t.next,!1);)t.advance(),n++;for(;c_.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Tae)return;for(let i=0;;i++){if(i==7){if(!gv(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(gae,-n)}),Mae=fc({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case":R.controlKeyword,"in of await yield void typeof delete instanceof":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger as new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),Nae={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Bae={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Qae={__proto__:null,"<":187},zae=Wu.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EoQWO1G3oO$4tQ^O1G3qO$8xQ^O'#HpOOQU1G3t1G3tO$9VQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$9_Q^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$=fQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$=kQ07bO,5:UOOQO,5;],5;]O$=uQ`O'#IaO$>]QWO,5@[OOQ?Mr1G/o1G/oO$>eQ`O'#IgO$>oQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$>wQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$?OQ?MxO1G0jO$?ZQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$?iQ?MxO1G0jOOQO1G0Z1G0ZO$?}Q?NdO1G0jPOOO-EzO$@kQWO1G5uO$@sQWO1G6TO$@{QrO1G6UO9WQWO,5?QO$AVQ?NdO1G6RO%[Q^O1G6RO$AgQ?MxO1G6RO$AxQWO1G6QO$AxQWO1G6QO9WQWO1G6QO$BQQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$BfQWO,5?TO$)nQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%:PQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%:UQ`O1G5wO%:jQ07bO1G0wO%:tQWO1G0wOOQO1G/p1G/pO%;PQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$?}Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%;ZQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%;fQ?MxO7+&UO%;tQ?NdO7++mO%[Q^O7++mO%|O%[Q^O,5>|OOQO-E<`-E<`O%HZQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&;mQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&;rQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<tQWO7+)hO'){QWO<{AN>{O%[Q^OAN?[OOQO<]Q7[OG27QOOQO<mQ07bO7+*jOOQUG27iG27iO&:OQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'>wQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'?RQ?NdOG27QOOQ?MpG26uG26uOOQULD-TLD-TO&:OQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'AaQ07bOG27QO!(oQ^O'#DwO1PQWO'#EUO'CSQrO'#JmO'CZQMnO'#DsO'CbQ^O'#D{O'CiQrO'#CiO'FPQrO'#CiO!(oQ^O'#D}O'FaQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'HdQWO,5kOh%WOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%WO!i%cO~Oh%WO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%WO#]+zO~Oh%WOk+}O![$}O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%WO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP:kOQ:kOSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO}){O!P)|O(u%QOk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%+]O}){O!P)|Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%,OO(m$ZO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O;lO~P!1_OmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0pO!X4YO!V'cX!Y'cX~P!3^O!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O(t%OOk%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%0^O(u%QOk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%1POg(Yi!Y(Yi~P!0pO#]4lOg(Yi!Y(Yi~P!0pO!h4oO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4sO~O!Y4tO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4wOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4wO~Ob4}O%g5OO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5SO~O`5TO~Oa%lO'u%lO~P#.aO![$}O~P#.aO!Y5]O#]5_O!Z)QX~O!Z5`O~Op!nO!P5aO!_!yO!`!vO!a!vO!y:lO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5fO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5eO~P%6ZOk5kO![1aO%f5jO~Oh%WOk5kO![1aO%f5jO~Ob5rO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5tO~O`5xO~O#s5{O&W5|O~PMlO!h5}O~P%[Oa6PO~Oa6PO~P%[Ob2SO!Z6UO&f2RO~P`O!d6WO~O!d6YOh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#D_O#]6ZO!Y#ei!Z#ei~O!Y!^i!Z!^i~P#D_Oa%lO#]6dO'u%lO~Oa%lO!d#vO#]6dO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6kO(O%eO~O![']O%f6nO~Ok6rO![']O%f6nO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%+]O#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%,OO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%0^O#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%1PO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#D_OP$]OR#zO}#yO!P#{O!i#xO!m$]O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%HpO#k:tO~P%HpOP$]OR#zO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO([VO[#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~Oo#ji~P%JxOo:vO~P%JxOP$]OR#zOo:vO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO#o:wO([VO#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O[#ji#O#ji#p#ji#q#ji#r#ji#s#ji~P%MQO[;SO#O:xO#p:xO#q:xO#r;RO#s:xO~P%MQOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w:{O~P& iO#w#ji~P& iOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#w#ji(t#ji(u#ji~P&#qO#w:{O(t#|O(u#}O~P&#qOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO#w:{O#y:}O([VO(t#|O(u#}O~O#z#ji#}#ji(m#ji!Y#ji!Z#ji~P&&POa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mOk < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:Pae,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Mae],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-Nae[t]||-1},{term:338,get:t=>Bae[t]||-1},{term:92,get:t=>Qae[t]||-1}],tokenPrec:14793}),D9=[Pi("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Pi("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Pi("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Pi("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Pi("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Pi(`try { - \${} -} catch (\${error}) { - \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),Pi("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Pi(`if (\${}) { - \${} -} else { - \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),Pi(`class \${name} { - constructor(\${params}) { - \${} - } -}`,{label:"class",detail:"definition",type:"keyword"}),Pi('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Pi('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Hae=D9.concat([Pi("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Pi("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Pi("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),dI=new VB,L9=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ef(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const Uae=["FunctionDeclaration"],Fae={FunctionDeclaration:Ef("function"),ClassDeclaration:Ef("class"),ClassExpression:()=>!0,EnumDeclaration:Ef("constant"),TypeAliasDeclaration:Ef("type"),NamespaceDeclaration:Ef("namespace"),VariableDefinition(t,e){t.matchContext(Uae)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function M9(t,e){let n=dI.get(e);if(n)return n;let i=[],r=!0;function s(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(At.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let a=Fae[o.name];if(a&&a(o,s)||L9.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of M9(t,o.node))i.push(a);return!1}}),dI.set(e,i),i}const hI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,N9=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Vae(t){let e=Et(t.state).resolveInner(t.pos,-1);if(N9.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&hI.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)L9.has(r.name)&&(i=i.concat(M9(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:hI}}const Fs=Hu.define({name:"javascript",parser:zae.configure({props:[Fh.add({IfStatement:Nd({except:/^\s*({|else\b)/}),TryStatement:Nd({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:qie,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Zie({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Nd({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),pc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Qx,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),B9={test:t=>/^JSX/.test(t.name),facet:w1({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Q9=Fs.configure({dialect:"ts"},"typescript"),z9=Fs.configure({dialect:"jsx",props:[Nx.add(t=>t.isTop?[B9]:void 0)]}),H9=Fs.configure({dialect:"jsx ts",props:[Nx.add(t=>t.isTop?[B9]:void 0)]},"typescript");let U9=t=>({label:t,type:"keyword"});const F9="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(U9),Wae=F9.concat(["declare","implements","private","protected","public"].map(U9));function h_(t={}){let e=t.jsx?t.typescript?H9:z9:t.typescript?Q9:Fs,n=t.typescript?Hae.concat(Wae):D9.concat(F9);return new ih(e,[Fs.data.of({autocomplete:Pre(N9,b8(n))}),Fs.data.of({autocomplete:Vae}),t.jsx?Zae:[]])}function jae(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function fI(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const Xae=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Zae=ce.inputHandler.of((t,e,n,i,r)=>{if((Xae?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Fs.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u;let{head:c}=l,d=Et(o).resolveInner(c-1,-1),h;if(d.name=="JSXStartTag"&&(d=d.parent),!(o.doc.sliceString(c-1,c)!=i||d.name=="JSXAttributeValue"&&d.to>c)){if(i==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(i=="/"&&d.name=="JSXStartCloseTag"){let f=d.parent,m=f.parent;if(m&&f.from==c-2&&((h=fI(o.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let b=`${h}>`;return{range:Y.cursor(c+b.length,-1),changes:{from:c,insert:b}}}}else if(i==">"){let f=jae(d);if(f&&f.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(h=fI(o.doc,f,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),qae=54,Yae=1,Gae=55,Kae=2,Jae=56,ele=3,pI=4,tle=5,gO=6,V9=7,W9=8,j9=9,X9=10,nle=11,ile=12,rle=13,bv=57,sle=14,mI=58,Z9=20,ole=22,q9=23,ale=24,f_=26,Y9=27,lle=28,ule=31,cle=34,dle=36,hle=37,fle=0,ple=1,mle={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},gle={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},gI={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function ble(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function G9(t){return t==9||t==10||t==13||t==32}let bI=null,OI=null,yI=0;function p_(t,e){let n=t.pos+e;if(yI==n&&OI==t)return bI;let i=t.peek(e);for(;G9(i);)i=t.peek(++e);let r="";for(;ble(i);)r+=String.fromCharCode(i),i=t.peek(++e);return OI=t,yI=n,bI=r?r.toLowerCase():i==Ole||i==yle?void 0:null}const K9=60,bO=62,c2=47,Ole=63,yle=33,vle=45;function vI(t,e){this.name=t,this.parent=e}const Sle=[gO,X9,V9,W9,j9],wle=new I9({start:null,shift(t,e,n,i){return Sle.indexOf(e)>-1?new vI(p_(i,1)||"",t):t},reduce(t,e){return e==Z9&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==gO||r==dle?new vI(p_(i,1)||"",t):t},strict:!1}),_le=new gs((t,e)=>{if(t.next!=K9){t.next<0&&e.context&&t.acceptToken(bv);return}t.advance();let n=t.next==c2;n&&t.advance();let i=p_(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?sle:gO);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(nle);if(r&&gle[r])return t.acceptToken(bv,-2);if(e.dialectEnabled(fle))return t.acceptToken(ile);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(rle)}else{if(i=="script")return t.acceptToken(V9);if(i=="style")return t.acceptToken(W9);if(i=="textarea")return t.acceptToken(j9);if(mle.hasOwnProperty(i))return t.acceptToken(X9);r&&gI[r]&&gI[r][i]?t.acceptToken(bv,-1):t.acceptToken(gO)}},{contextual:!0}),kle=new gs(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(mI);break}if(t.next==vle)e++;else if(t.next==bO&&e>=2){n>=3&&t.acceptToken(mI,-2);break}else e=0;t.advance()}});function xle(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const Ele=new gs((t,e)=>{if(t.next==c2&&t.peek(1)==bO){let n=e.dialectEnabled(ple)||xle(e.context);t.acceptToken(n?tle:pI,2)}else t.next==bO&&t.acceptToken(pI,1)});function d2(t,e,n){let i=2+t.length;return new gs(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(s==0&&r.next==K9||s==1&&r.next==c2||s>=2&&so?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const Cle=d2("script",qae,Yae),Tle=d2("style",Gae,Kae),Ale=d2("textarea",Jae,ele),Rle=fc({"Text RawText":R.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":R.angleBracket,TagName:R.tagName,"MismatchedCloseTag/TagName":[R.tagName,R.invalid],AttributeName:R.attributeName,"AttributeValue UnquotedAttributeValue":R.attributeValue,Is:R.definitionOperator,"EntityReference CharacterReference":R.character,Comment:R.blockComment,ProcessingInst:R.processingInstruction,DoctypeDecl:R.documentMeta}),Ple=Wu.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:wle,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Rle],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=a.type.id;if(u==lle)return Ov(a,l,n);if(u==ule)return Ov(a,l,i);if(u==cle)return Ov(a,l,r);if(u==Z9&&s.length){let c=a.node,d=c.firstChild,h=d&&SI(d,l),f;if(h){for(let m of s)if(m.tag==h&&(!m.attrs||m.attrs(f||(f=J9(d,l))))){let b=c.lastChild,y=b.type.id==hle?b.from:c.to;if(y>d.to)return{parser:m.parser,overlay:[{from:d.to,to:y}]}}}}if(o&&u==q9){let c=a.node,d;if(d=c.firstChild){let h=o[l.read(d.from,d.to)];if(h)for(let f of h){if(f.tagName&&f.tagName!=SI(c.parent,l))continue;let m=c.lastChild;if(m.type.id==f_){let b=m.from+1,y=m.lastChild,O=m.to-(y&&y.isError?0:1);if(O>b)return{parser:f.parser,overlay:[{from:b,to:O}]}}else if(m.type.id==Y9)return{parser:f.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const Ile=99,wI=1,$le=100,Dle=101,_I=2,t7=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Lle=58,Mle=40,n7=95,Nle=91,J0=45,Ble=46,Qle=35,zle=37,Hle=38,Ule=92,Fle=10;function hm(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function i7(t){return t>=48&&t<=57}const Vle=new gs((t,e)=>{for(let n=!1,i=0,r=0;;r++){let{next:s}=t;if(hm(s)||s==J0||s==n7||n&&i7(s))!n&&(s!=J0||r>0)&&(n=!0),i===r&&s==J0&&i++,t.advance();else if(s==Ule&&t.peek(1)!=Fle)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(s==Mle?$le:i==2&&e.canShift(_I)?_I:Dle);break}}}),Wle=new gs(t=>{if(t7.includes(t.peek(-1))){let{next:e}=t;(hm(e)||e==n7||e==Qle||e==Ble||e==Nle||e==Lle&&hm(t.peek(1))||e==J0||e==Hle)&&t.acceptToken(Ile)}}),jle=new gs(t=>{if(!t7.includes(t.peek(-1))){let{next:e}=t;if(e==zle&&(t.advance(),t.acceptToken(wI)),hm(e)){do t.advance();while(hm(t.next)||i7(t.next));t.acceptToken(wI)}}}),Xle=fc({"AtKeyword import charset namespace keyframes media supports":R.definitionKeyword,"from to selector":R.keyword,NamespaceName:R.namespace,KeyframeName:R.labelName,KeyframeRangeName:R.operatorKeyword,TagName:R.tagName,ClassName:R.className,PseudoClassName:R.constant(R.className),IdName:R.labelName,"FeatureName PropertyName":R.propertyName,AttributeName:R.attributeName,NumberLiteral:R.number,KeywordQuery:R.keyword,UnaryQueryOp:R.operatorKeyword,"CallTag ValueName":R.atom,VariableName:R.variableName,Callee:R.operatorKeyword,Unit:R.unit,"UniversalSelector NestingSelector":R.definitionOperator,MatchOp:R.compareOperator,"ChildOp SiblingOp, LogicOp":R.logicOperator,BinOp:R.arithmeticOperator,Important:R.modifier,Comment:R.blockComment,ColorLiteral:R.color,"ParenthesizedContent StringLiteral":R.string,":":R.punctuation,"PseudoOp #":R.derefOperator,"; ,":R.separator,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace}),Zle={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},qle={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},Yle={__proto__:null,not:132,only:132},Gle=Wu.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO${QdO,59}O-kQ[O'#E^O-xQWO,5;_O-xQWO,5;_POOO'#EV'#EVP.TO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.zQXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/XQ`O1G/^O/rQXO1G/aO0YQXO1G/cO0pQXO1G/dO1WQWO,59|O1]Q[O'#DSO1dQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1kQpO,59]OOQS,59_,59_O${QdO,59aO1sQWO1G/mOOQS,59c,59cO1xQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2QQ[O,59jOOQS,59j,59jO2YQWO'#DjO2eQWO,5:VO2jQWO,5:]O&`Q[O,5:XO&`Q[O'#E_O2rQWO,5;`O2}QWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3`QWO1G0OO3eQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO3pQtO1G/iOOQO,5:x,5:xO4WQ[O,5:xOOQO-E8[-E8[O4eQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO4pQXO'#ErO4wQWO,59nO4|QtO'#EXO5tQdO'#EoO6OQWO,59ZO6TQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XO6]QWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6bQWO,5:yOOQO-E8]-E8]O6pQXO1G/xOOQS7+%j7+%jO6wQYO'#CsOOQO'#EQ'#EQO7SQ`O'#EPOOQO'#EP'#EPO7_QWO'#E`O7gQdO,5:jOOQS,5:j,5:jO7rQtO'#E]O${QdO'#E]O8sQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9WQpO<OAN>OO:xQdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Wle,jle,Vle,1,2,3,4,new mO("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>Zle[t]||-1},{term:58,get:t=>qle[t]||-1},{term:101,get:t=>Yle[t]||-1}],tokenPrec:1200});let yv=null;function vv(){if(!yv&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));yv=e.sort().map(i=>({type:"property",label:i}))}return yv||[]}const kI=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),xI=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Kle=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Jo=/^(\w[\w-]*|-\w[\w-]*|)$/,Jle=/^-(-[\w-]*)?$/;function eue(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const EI=new VB,tue=["Declaration"];function nue(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function r7(t,e,n){if(e.to-e.from>4096){let i=EI.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(At.IncludeAnonymous);if(o.firstChild())do for(let a of r7(t,o.node,n))s.has(a.label)||(s.add(a.label),r.push(a));while(o.nextSibling());return EI.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(tue)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const iue=t=>e=>{let{state:n,pos:i}=e,r=Et(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:vv(),validFor:Jo};if(r.name=="ValueName")return{from:r.from,options:xI,validFor:Jo};if(r.name=="PseudoClassName")return{from:r.from,options:kI,validFor:Jo};if(t(r)||(e.explicit||s)&&eue(r,n.doc))return{from:t(r)||s?r.from:i,options:r7(n.doc,nue(r),t),validFor:Jle};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:vv(),validFor:Jo};return{from:r.from,options:Kle,validFor:Jo}}if(!e.explicit)return null;let o=r.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:kI,validFor:Jo}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:xI,validFor:Jo}:o.name=="Block"||o.name=="Styles"?{from:i,options:vv(),validFor:Jo}:null},rue=iue(t=>t.name=="VariableName"),OO=Hu.define({name:"css",parser:Gle.configure({props:[Fh.add({Declaration:Nd()}),pc.add({"Block KeyframeList":Qx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function s7(){return new ih(OO,OO.data.of({autocomplete:rue}))}const Cf=["_blank","_self","_top","_parent"],Sv=["ascii","utf-8","utf-16","latin1","latin1"],wv=["get","post","put","delete"],_v=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Zi=["true","false"],ye={},sue={a:{attrs:{href:null,ping:null,type:null,media:null,target:Cf,hreflang:null}},abbr:ye,address:ye,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ye,aside:ye,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ye,base:{attrs:{href:null,target:Cf}},bdi:ye,bdo:ye,blockquote:{attrs:{cite:null}},body:ye,br:ye,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:_v,formmethod:wv,formnovalidate:["novalidate"],formtarget:Cf,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ye,center:ye,cite:ye,code:ye,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ye,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ye,div:ye,dl:ye,dt:ye,em:ye,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ye,figure:ye,footer:ye,form:{attrs:{action:null,name:null,"accept-charset":Sv,autocomplete:["on","off"],enctype:_v,method:wv,novalidate:["novalidate"],target:Cf}},h1:ye,h2:ye,h3:ye,h4:ye,h5:ye,h6:ye,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ye,hgroup:ye,hr:ye,html:{attrs:{manifest:null}},i:ye,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:_v,formmethod:wv,formnovalidate:["novalidate"],formtarget:Cf,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ye,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ye,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ye,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Sv,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ye,noscript:ye,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ye,param:{attrs:{name:null,value:null}},pre:ye,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ye,rt:ye,ruby:ye,samp:ye,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Sv}},section:ye,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ye,source:{attrs:{src:null,type:null,media:null}},span:ye,strong:ye,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ye,summary:ye,sup:ye,table:ye,tbody:ye,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ye,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ye,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ye,time:{attrs:{datetime:null}},title:ye,tr:ye,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ye,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ye},o7={accesskey:null,class:null,contenteditable:Zi,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Zi,autocorrect:Zi,autocapitalize:Zi,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Zi,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Zi,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Zi,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Zi,"aria-hidden":Zi,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Zi,"aria-multiselectable":Zi,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Zi,"aria-relevant":null,"aria-required":Zi,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},a7="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of a7)o7[t]=null;let fm=class{constructor(e,n){this.tags=Object.assign(Object.assign({},sue),e),this.globalAttrs=Object.assign(Object.assign({},o7),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};fm.default=new fm;function lh(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function uh(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function l7(t,e,n){let i=n.tags[lh(t,uh(e))];return(i==null?void 0:i.children)||n.allTags}function h2(t,e){let n=[];for(let i=uh(e);i&&!i.type.isTop;i=uh(i.parent)){let r=lh(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const u7=/^[:\-\.\w\u00b7-\uffff]*$/;function CI(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=uh(n,!0);return{from:i,to:r,options:l7(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(h2(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function TI(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:h2(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:u7}}function oue(t,e,n,i){let r=[],s=0;for(let o of l7(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of h2(t.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function aue(t,e,n,i,r){let s=uh(n),o=s?e.tags[lh(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:u7}}function lue(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let u=t.sliceDoc(o.from,o.to),c=e.globalAttrs[u];if(!c){let d=uh(n),h=d?e.tags[lh(t.doc,d)]:null;c=(h==null?void 0:h.attrs)&&h.attrs[u]}if(c){let d=t.sliceDoc(i,r).toLowerCase(),h='"',f='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",f=t.sliceDoc(r,r+1)==d[0]?"":d[0],d=d.slice(1),i++):l=/^[^\s<>='"]*$/;for(let m of c)a.push({label:m,apply:h+m+f,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function c7(t,e){let{state:n,pos:i}=e,r=Et(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,a;s==r&&(a=r.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.fromc7(i,r)}const due=Fs.parser.configure({top:"SingleExpression"}),d7=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:Q9.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:z9.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:H9.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:due},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Fs.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:OO.parser}],h7=[{name:"style",parser:OO.parser.configure({top:"Styles"})}].concat(a7.map(t=>({name:t,parser:Fs.parser}))),f7=Hu.define({name:"html",parser:Ple.configure({props:[Fh.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),eb=f7.configure({wrap:e7(d7,h7)});function p7(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=e7((t.nestedLanguages||[]).concat(d7),(t.nestedAttributes||[]).concat(h7)));let i=n?f7.configure({wrap:n,dialect:e}):e?eb.configure({dialect:e}):eb;return new ih(i,[eb.data.of({autocomplete:cue(t)}),t.autoCloseTags!==!1?hue:[],h_().support,s7().support])}const AI=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),hue=ce.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!eb.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u,c,d;let h=o.doc.sliceString(l.from-1,l.to)==i,{head:f}=l,m=Et(o).resolveInner(f,-1),b;if(h&&i==">"&&m.name=="EndTag"){let y=m.parent;if(((c=(u=y.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(b=lh(o.doc,y.parent,f))&&!AI.has(b)){let O=f+(o.doc.sliceString(f,f+1)===">"?1:0),v=``;return{range:l,changes:{from:f,to:O,insert:v}}}}else if(h&&i=="/"&&m.name=="IncompleteCloseTag"){let y=m.parent;if(m.from==f-2&&((d=y.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(b=lh(o.doc,y,f))&&!AI.has(b)){let O=f+(o.doc.sliceString(f,f+1)===">"?1:0),v=`${b}>`;return{range:Y.cursor(f+v.length,-1),changes:{from:f,to:O,insert:v}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class yO{static create(e,n,i,r,s){let o=r+(r<<8)+e+(n<<4)|0;return new yO(e,n,i,o,s,[],[])}constructor(e,n,i,r,s,o,a){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=o,this.positions=a,this.hashProp=[[Pe.contextHash,r]]}addChild(e,n){e.prop(Pe.contextHash)!=this.hash&&(e=new Ke(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new Ke(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,o)=>new Ke(gn.none,r,s,o,this.hashProp)})}}var se;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(se||(se={}));class fue{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class pue{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return gp(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==se.OrderedList?m2:p2)(n,e,!1);return i>0&&(t.type!=se.BulletList||f2(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const m7={[se.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(it(se.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Nr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[se.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[se.OrderedList]:RI,[se.BulletList]:RI,[se.Document](){return!0}};function Nr(t){return t==32||t==9||t==10||t==13}function gp(t,e=0){for(;en&&Nr(t.charCodeAt(e-1));)e--;return e}function g7(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length||i<3?-1:1}function O7(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function p2(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Nr(t.text.charCodeAt(t.pos+1)))&&(!n||O7(e,se.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||it.pos+1||t.next!=49)?-1:i+1-t.pos}function y7(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function v7(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,w7=/\?>/,g_=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(s)return t.append(it(se.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return t.append(it(se.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?t.append(it(se.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),o=mm.test(r),a=mm.test(s),l=/\s|^$/.test(r),u=/\s|^$/.test(s),c=!u&&(!a||l||o),d=!l&&(!o||u||a),h=c&&(e==42||!d||o),f=d&&(e==42||!c||a);return t.append(new br(e==95?T7:A7,n,i,(h?1:0)|(f?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(it(se.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(it(se.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new br(id,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new br(O_,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof br&&(r.type==id||r.type==O_)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),o=t.parts[i]=Sue(t,s,r.type==id?se.Link:se.Image,r.from,n+1);if(r.type==id)for(let a=0;ae?it(se.URL,e+n,s+n):s==t.length?null:!1}}function P7(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,o=!1;s=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new br(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof br&&(n.type==id||n.type==O_))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;l--){let b=this.parts[l];if(b instanceof br&&b.side&1&&b.type==r.type&&!(s&&(r.side&1||b.side&2)&&(b.to-b.from+o)%3==0&&((b.to-b.from)%3||o%3))){a=b;break}}if(!a)continue;let u=r.type.resolve,c=[],d=a.from,h=r.to;if(s){let b=Math.min(2,a.to-a.from,o);d=a.to-b,h=r.from+b,u=b==1?"Emphasis":"StrongEmphasis"}a.type.mark&&c.push(this.elt(a.type.mark,d,a.to));for(let b=l+1;b=0;n--){let i=this.parts[n];if(i instanceof br&&i.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return gp(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?it(this.parser.getNodeType(e),n,i,r):new C7(e,n)}}function y_(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` -`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Pe.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,u=a;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=$7(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let d=new Ke(e.parser.nodeSet.types[se.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(d,n.tree),e.addNode(d,c)}if(n.type.is("Block")&&(_ue.indexOf(n.type.id)<0?(o=n.to-i,a=e.block.children.length):(o=l,a=u,l=n.to-i,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}}function $7(t,e){let n=t;for(let i=1;io0[t]),Object.keys(o0).map(t=>bue[t]),Object.keys(o0),Oue,m7,Object.keys(xv).map(t=>xv[t]),Object.keys(xv),[]);function Cue(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let o=r?r.from:n;if(o>s&&i.push({from:s,to:o}),!r)break;s=r.to}return i}function Tue(t){let{codeParser:e,htmlParser:n}=t;return{wrap:WB((r,s)=>{let o=r.type.id;if(e&&(o==se.CodeBlock||o==se.FencedCode)){let a="";if(o==se.FencedCode){let u=r.node.getChild(se.CodeInfo);u&&(a=s.read(u.from,u.to))}let l=e(a);if(l)return{parser:l,overlay:u=>u.type.id==se.CodeText}}else if(n&&(o==se.HTMLBlock||o==se.HTMLTag))return{parser:n,overlay:Cue(r.node,r.from,r.to)};return null})}}const Aue={resolve:"Strikethrough",mark:"StrikethroughMark"},Rue={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":R.strikethrough}},{name:"StrikethroughMark",style:R.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),o=/\s|^$/.test(r),a=mm.test(i),l=mm.test(r);return t.addDelimiter(Aue,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function bp(t,e,n=0,i,r=0){let s=0,o=!0,a=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+a,r+l,t.parser.parseInline(e.slice(a,l),r+a)))};for(let d=n;d-1)&&s++,o=!1,i&&(a>-1&&c(),i.push(t.elt("TableDelimiter",d+r,d+r+1))),a=l=-1):(u||h!=32&&h!=9)&&(a<0&&(a=d),l=d+1),u=!u&&h==92}return a>-1&&(s++,i&&c()),s}function DI(t,e){for(let n=e;nr instanceof LI)||!DI(e.text,e.basePos))return!1;let i=t.scanLine(t.absoluteLineEnd+1).text;return D7.test(i)&&bp(t,e.text,e.basePos)==bp(t,i,e.basePos)},before:"SetextHeading"}]};class Iue{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const $ue={defineNodes:[{name:"Task",block:!0,style:R.list},{name:"TaskMarker",style:R.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Iue:null},after:"SetextHeading"}]},MI=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,NI=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Due=/[\w-]+\.[\w-]+($|\/)/,BI=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,QI=/\/[a-zA-Z\d@.]+/gy;function zI(t,e,n,i){let r=0;for(let s=e;s-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&zI(t,e,i,")")>zI(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function HI(t,e){BI.lastIndex=e;let n=BI.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const Mue={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;MI.lastIndex=i;let r=MI.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=Lue(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+o[0].length}}else r[3]?s=HI(t.text,i):(s=HI(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(QI.lastIndex=s,r=QI.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},Nue=[Pue,$ue,Rue,Mue];function L7(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let o=[i.elt(n,s,s+1)];for(let a=s+1;a"}}}),N7=new Pe,B7=Eue.configure({props:[pc.add(t=>!t.is("Block")||t.is("Document")||v_(t)!=null||Hue(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),N7.add(v_),Fh.add({Document:()=>null}),Ta.add({Document:M7})]});function v_(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Hue(t){return t.name=="OrderedList"||t.name=="BulletList"}function Uue(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=v_(i.type))!=null&&r<=e)break;n=i}return n.to}const Fue=KB.of((t,e,n)=>{for(let i=Et(t).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:s}}return null});function g2(t){return new sr(M7,t,[Fue],"markdown")}const Vue=g2(B7),Wue=B7.configure([Nue,Que,Bue,zue,{props:[pc.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Q7=g2(Wue);function jue(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=eO.matchLanguageName(t,n,!0),i instanceof eO)return i.support?i.support.language.parser:Uu.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class l0{constructor(e,n,i,r,s,o,a){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+H7(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function z7(t,e){let n=[];for(let r=t;r&&r.name!="Document";r=r.parent)(r.name=="ListItem"||r.name=="Blockquote"||r.name=="FencedCode")&&n.push(r);let i=[];for(let r=n.length-1;r>=0;r--){let s=n[r],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="FencedCode")i.push(new l0(s,l,l,"","","",null));else if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))i.push(new l0(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let u=o[3],c=o[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new l0(s.parent,l,l+c,o[1],u,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let u=o[4],c=o[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let d=o[2];o[3]&&(d+=o[3].replace(/[xX]/," ")),i.push(new l0(s.parent,l,l+c,o[1],u,d,s))}}return i}function H7(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Ev(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let a=H7(s,e),l=+a[2];if(r>=0){if(l!=r+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(r+2+i)})}r=l}let o=s.nextSibling;if(!o)break;s=o}}function b2(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Uh)!=" ")return t;let i=cs(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const Xue=({state:t,dispatch:e})=>{let n=Et(t),{doc:i}=t,r=null,s=t.changeByRange(o=>{if(!o.empty||!Q7.isActiveAt(t,o.from))return r={range:o};let a=o.from,l=i.lineAt(a),u=z7(n.resolveInner(a,-1),i);for(;u.length&&u[u.length-1].from>a-l.from;)u.pop();if(!u.length)return r={range:o};let c=u[u.length-1];if(c.to-c.spaceAfter.length>a-l.from)return r={range:o};let d=a>=c.to-c.spaceAfter.length&&!/\S/.test(l.text.slice(c.to));if(c.item&&d){let y=c.node.firstChild,O=c.node.getChild("ListItem","ListItem");if(y.to>=a||O&&O.to0&&!/[^\s>]/.test(i.lineAt(l.from-1).text)){let v=u.length>1?u[u.length-2]:null,S,_="";v&&v.item?(S=l.from+v.from,_=v.marker(i,1)):S=l.from+(v?v.to:0);let k=[{from:S,to:a,insert:_}];return c.node.name=="OrderedList"&&Ev(c.item,i,k,-2),v&&v.node.name=="OrderedList"&&Ev(v.item,i,k),{range:Y.cursor(S+_.length),changes:k}}else{let v=FI(u,t,l);return{range:Y.cursor(a+v.length+1),changes:{from:l.from,insert:v+t.lineBreak}}}}if(c.node.name=="Blockquote"&&d&&l.from){let y=i.lineAt(l.from-1),O=/>\s*$/.exec(y.text);if(O&&O.index==c.from){let v=t.changes([{from:y.from+O.index,to:y.to},{from:l.from+c.from,to:l.to}]);return{range:o.map(v),changes:v}}}let h=[];c.node.name=="OrderedList"&&Ev(c.item,i,h);let f=c.item&&c.item.from]*/.exec(l.text)[0].length>=c.to)for(let y=0,O=u.length-1;y<=O;y++)m+=y==O&&!f?u[y].marker(i,1):u[y].blank(yl.from&&/\s/.test(l.text.charAt(b-l.from-1));)b--;return m=b2(m,t),Zue(c.node,t.doc)&&(m=FI(u,t,l)+t.lineBreak+m),h.push({from:b,to:a,insert:t.lineBreak+m}),{range:Y.cursor(b+m.length+1),changes:h}});return r?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)};function UI(t){return t.name=="QuoteMark"||t.name=="ListMark"}function Zue(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1){let n=Et(t),i=null,r=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Q7.isActiveAt(t,s.from)){let l=a.lineAt(o),u=z7(que(n,o),a);if(u.length){let c=u[u.length-1],d=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-l.from>d&&!/\S/.test(l.text.slice(d,o-l.from)))return{range:Y.cursor(l.from+d),changes:{from:l.from+d,to:o}};if(o-l.from==d&&(!c.item||l.from<=c.item.from||!/\S/.test(l.text.slice(0,c.to)))){let h=l.from+c.from;if(c.item&&c.node.from1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=P1(n,n=="("?"quote":n=="{"?"def":"string"),dh(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function ace(t){return function(e,n){return e.sol()&&e.string==t&&n.tokens.shift(),e.skipToEnd(),"string.special"}}function dh(t,e){return(e.tokens[0]||sce)(t,e)}const lce={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return dh(t,e)},languageData:{autocomplete:U7.concat(F7,V7),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var uce=["true","false","on","off","yes","no"],cce=new RegExp("\\b(("+uce.join(")|(")+"))$","i");const dce={name:"yaml",token:function(t,e){var n=t.peek(),i=e.escaped;if(e.escaped=!1,n=="#"&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---")||t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return n=="{"?e.inlinePairs++:n=="}"?e.inlinePairs--:n=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&n==",")return t.next(),"meta";if(e.inlinePairs>0&&!i&&n==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(cce))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=n=="\\",t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var VI,WI,jI;function XI({view:t,searchConfig:e}){const n=T.useState(""),i=as(n,2),r=i[0],s=i[1],o=(h,f)=>{s(f),a(f)},a=h=>{t.dispatch({effects:oh.of(new Yx({search:h}))})},l=h=>{h.key==="Enter"&&(h.shiftKey?d():c())},u=h=>{h.key==="Escape"&&Jx(t)},c=()=>{a(r),lm(t)},d=()=>{a(r),um(t)};return F.createElement(vx,{renderLabel:"",inputRef:h=>{setTimeout(()=>h==null?void 0:h.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:o,onKeyDown:l,onKeyUp:u,renderBeforeInput:VI||(VI=F.createElement(ac,{size:"x-small"})),renderAfterInput:F.createElement("span",null,F.createElement(Ub,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},WI||(WI=F.createElement(rc,null))),F.createElement(Ub,{size:"small",withBorder:!1,withBackground:!1,onClick:d,screenReaderLabel:e.prevResultLabel},jI||(jI=F.createElement(sc,null))))})}function hce(t){return t?zse({createPanel:e=>{var n;const i=document.createElement("div");return i.style.padding="8px",Number(F.version.split(".")[0])>=18?DK(()=>Promise.resolve().then(()=>pV),void 0).then(s=>{s.createRoot(i).render(n||(n=F.createElement(XI,{view:e,searchConfig:t})))}).catch(s=>{}):vm.render(F.createElement(XI,{view:e,searchConfig:t}),i),{dom:i}}}):[]}const fce=(t,e)=>{const n=e.attachment,i=e.height,r=e.width,s={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},o={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},a=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:r},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:t==null?void 0:t.borderColor,borderStyle:"solid",borderWidth:t==null?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...n&&{...o[n],...s[n]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:`${a}rem`,lineHeight:a,borderRadius:t.borderRadius,...n&&{...s[n]}},"&.cm-editor.cm-focused":{outline:`${t==null?void 0:t.borderWidth} solid ${t==null?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:R.link,textDecoration:"underline"},{tag:R.heading,textDecoration:"underline",fontWeight:"bold"},{tag:R.emphasis,fontStyle:"italic"},{tag:R.strong,fontWeight:"bold"},{tag:R.strikethrough,textDecoration:"line-through"},{tag:R.keyword,color:"#708"},{tag:[R.atom,R.bool,R.url,R.contentSeparator,R.labelName],color:"#219"},{tag:[R.literal,R.inserted],color:"#164"},{tag:[R.string,R.deleted],color:"#a11"},{tag:R.definition(R.variableName),color:"#00f"},{tag:R.local(R.variableName),color:"#30a"},{tag:R.className,color:"#167"},{tag:[R.special(R.variableName),R.macroName],color:"#256"},{tag:R.definition(R.propertyName),color:"#00c"},{tag:R.comment,color:"#940"},{tag:R.meta,color:"#757075"},{tag:[R.regexp,R.escape,R.special(R.string)],color:"#d13b00"},{tag:[R.typeName,R.namespace],color:"#008051"},{tag:R.invalid,color:"#e60000"}]}},pce=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:r==null?void 0:r.xSmall,verticalPadding:r==null?void 0:r.xxSmall}}},ZI=[{key:"ArrowLeft",run:r2,shift:o2,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:W8,shift:o9},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:X8,shift:l9},{mac:"Cmd-ArrowLeft",run:n9,shift:g9},{key:"Home",run:J8,shift:f9},{key:"ArrowRight",run:i2,shift:s2,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:V8,shift:s9},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:j8,shift:a9},{mac:"Cmd-ArrowRight",run:t9,shift:m9},{key:"End",run:e9,shift:p9},{key:"Delete",run:dO},{key:"Mod-Delete",mac:"Alt-Delete",run:a2},{key:"Backspace",run:hO,shift:hO},{key:"Mod-Backspace",mac:"Alt-Backspace",run:y9},{mac:"Mod-Delete",run:Roe},{mac:"Mod-Backspace",run:v9}],mce={label:p.string.isRequired,language:p.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:p.bool,editable:p.bool,lineNumbers:p.bool,foldGutter:p.bool,highlightActiveLineGutter:p.bool,highlightActiveLine:p.bool,lineWrapping:p.bool,autofocus:p.bool,spellcheck:p.bool,direction:p.oneOf(["ltr","rtl"]),rtlMoveVisually:p.bool,indentOnLoad:p.bool,indentWithTab:p.bool,indentUnit:p.string,defaultValue:p.string,value:nc(p.string,"onChange","defaultValue"),onChange:p.func,onFocus:p.func,onBlur:p.func,attachment:p.oneOf(["bottom","top"]),height:p.string,width:p.string,elementRef:p.func,containerRef:p.func,searchConfig:p.object},gce=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],bce=["label","styles"];var qI,YI,GI,KI,ea,Zl;let j7=(qI=Kt(),YI=de(fce,pce),GI=ss(),KI=Ne(),qI(ea=YI(ea=GI(ea=KI(ea=(Zl=class X7 extends T.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(Eo(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&k9({state:this._editorView.state,dispatch:e=>{var n;(n=this._editorView)===null||n===void 0||n.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,n){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:Hie(this._editorView.state,e,n)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:n,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...n?{selection:n}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleContainerRef=n=>{const i=this.props.containerRef;this._containerRef=n||void 0,typeof i=="function"&&i(n)},this._id=e.deterministicId()}componentDidMount(){var e,n;const i=this.props,r=i.value,s=i.defaultValue,o=i.autofocus,a=i.indentOnLoad;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const l=qe.create({doc:r||s,extensions:this.extensions});this._editorView=new ce({state:l,parent:this._containerRef}),o&&this.focus(),a&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const n=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of n)if(!u1(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(pie()),this.props.highlightActiveLine&&e.push(Une()),this.props.highlightActiveLineGutter&&e.push(bie()),this.props.foldGutter&&e.push(ure()),this.props.lineWrapping&&e.push(ce.lineWrapping),this.props.editable===!1&&e.push(ce.editable.of(!1)),this.props.readOnly&&e.push(qe.readOnly.of(!0)),this.props.spellcheck&&e.push(ce.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push(ce.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Uh.of(this.props.indentUnit)),e}get baseExtensions(){return[Mne(),uoe(),xne(),Rne(),qe.allowMultipleSelections.of(!0),A3(fre,{fallback:!0}),vre(),fse(),kse(),Zne(),Gne(),Pse(),Gie(),hce(this.props.searchConfig),Lm.of(this.keymaps)]}get keymaps(){const e=[...bse,...this.commandKeybinding,...Ooe,...sre,...C8,...eae,...this.props.searchConfig?Gse:[]];return this.props.indentWithTab&&e.push(Woe),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const n=ZI.map(r=>r.key?r.key:r.mac?r.mac:r);return[...eI.filter(r=>r.key?n.indexOf(r.key)<0:r.mac?n.indexOf(r.mac)<0:!1),...ZI]}return eI}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const n=ce.theme(e==null?void 0:e.theme),i=A3(Qm.define(e==null?void 0:e.highlightStyle));return[n,i]}get languageExtension(){switch(this.props.language){case"json":return rce();case"js":case"jsx":case"javascript":return h_({jsx:!0,typescript:!0});case"html":return p7({matchClosingTags:!0,autoCloseTags:!0});case"css":return s7();case"markdown":return Kue();case"sh":case"shell":case"bash":return iO.define(lce);case"yml":case"yaml":return iO.define(dce);default:return h_({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const n=this.props,i=n.onChange,r=n.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==r&&i(e)})}get onChangeExtension(){return qe.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const n=e.newDoc.toString();if(this.isControlled)return n!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(n),!1):!0;this.callOnChangeHandler(n)}return!0})}get focusListenerExtension(){const e=this.props,n=e.onFocus,i=e.onBlur;return ce.updateListener.of(r=>{r.focusChanged&&this._editorView&&(this.hasFocus?typeof n=="function"&&n():typeof i=="function"&&i())})}get announceLineNumberExtension(){return qe.transactionExtender.of(e=>{const n=e.selection,i=e.startState.selection.main;if(n&&n.main.empty&&i.empty){const r=e.startState.doc.lineAt(i.head),s=e.newDoc.lineAt(n.main.head);if(r.number!=s.number)return{effects:ce.announce.of(e.startState.phrase("line ")+s.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(ze.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,n=this._editorView.state.doc.toString();if(typeof e<"u"&&n!==e){let i;const r=e.length-n.length;r===1?i="input.type":r===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:n.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,n=e.label,i=e.styles,r=Le(e,bce);return C("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},Ft(De(r,X7.allowedProps))),C("label",{css:i==null?void 0:i.label,htmlFor:this._id},C(cr,null,n),C("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},Zl.displayName="SourceCodeEditor",Zl.componentId="SourceCodeEditor",Zl.propTypes=mce,Zl.allowedProps=gce,Zl.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},Zl))||ea)||ea)||ea)||ea);const Oce=(t,e)=>{const n=e.layout;return{table:{label:"table",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,...n==="fixed"&&{tableLayout:"fixed"},caption:{textAlign:"start"}}}},yce=t=>{const e=t.colors,n=t.typography,i=t.key,r={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest},...r[i]}},vce=t=>({head:{label:"head",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),Sce=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},wce=(t,e)=>{const n=e.hover,i=e.isStacked;return{row:{label:"row",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",borderBottomStyle:"solid",borderBottomWidth:"0.0625rem",borderBottomColor:t.borderColor,...n&&{borderLeft:"0.1875rem solid transparent",borderRight:"0.1875rem solid transparent","&:hover":{borderLeftColor:t.hoverBorderColor,borderRightColor:t.hoverBorderColor}},...i&&{padding:t.padding}}}},_ce=t=>{const e=t.colors,n=t.typography,i=t.spacing,r=t.key,s={canvas:{hoverBorderColor:t["ic-brand-primary"]}};return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,hoverBorderColor:e==null?void 0:e.borderBrand,padding:`${i==null?void 0:i.xSmall} 0`},...s[r]}},kce=(t,e)=>{const n=e.onRequestSort,i=e.textAlign,r={color:t.color,fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",lineHeight:t.lineHeight,padding:t.padding},s={start:{flexDirection:"row"},center:{justifyContent:"center"},end:{flexDirection:"row-reverse"}};return{colHeader:{label:"colHeader",background:t.background,verticalAlign:"middle",boxSizing:"border-box",...!n&&r,textAlign:i},button:{label:"colHeader__button",...r,display:"flex",alignItems:"center",boxSizing:"border-box",border:"none",width:"100%",height:"100%",background:"transparent",cursor:"pointer",outline:"none","&::-moz-focus-inner":{border:0},"&:focus":{outline:`${t.focusOutlineWidth} ${t.focusOutlineStyle} ${t.focusOutlineColor}`},...s[i]},buttonContent:{label:"colHeader__buttonContent",display:"flex",alignItems:"center"}}},xce=t=>{const e=t.typography,n=t.colors,i=t.borders,r=t.spacing;return{...{fontSize:e==null?void 0:e.fontSizeMedium,fontFamily:e==null?void 0:e.fontFamily,color:n==null?void 0:n.textDarkest,background:n==null?void 0:n.backgroundLightest,borderColor:n==null?void 0:n.borderMedium,lineHeight:e==null?void 0:e.lineHeightCondensed,padding:`${r==null?void 0:r.xSmall} ${r==null?void 0:r.small}`,focusOutlineColor:n==null?void 0:n.borderBrand,focusOutlineWidth:i==null?void 0:i.widthMedium,focusOutlineStyle:i==null?void 0:i.style}}},Ece={id:p.string.isRequired,stackedSortByLabel:p.string,children:p.oneOfType([p.node,p.func]),width:p.oneOfType([p.string,p.number]),textAlign:p.oneOf(["start","center","end"]),sortDirection:p.oneOf(["none","ascending","descending"]),onRequestSort:p.func,scope:p.oneOf(["row","col","rowgroup","colgroup","auto"])},Cce=["id","stackedSortByLabel","children","width","textAlign","sortDirection","onRequestSort","scope"];var JI,e$,ql,t$,n$;let hh=(JI=de(kce,xce),JI(e$=(ql=class Z7 extends T.Component{constructor(...e){super(...e),this.handleClick=n=>{const i=this.props,r=i.id,s=i.onRequestSort;s&&s(n,{id:r})}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSortArrow(){const e=this.props,n=e.sortDirection,i=e.onRequestSort;if(n==="ascending")return t$||(t$=C(Ph,null));if(n==="descending")return n$||(n$=C(Rh,null));if(i)return C(Ah,{css:{opacity:"30%"}})}render(){const e=this.props,n=e.onRequestSort,i=e.width,r=e.children,s=e.sortDirection,o=e.scope,a=e.styles;return C("th",Object.assign({},De(this.props,Z7.allowedProps),{css:a==null?void 0:a.colHeader,style:{width:i},scope:o,"aria-sort":s}),n&&C("button",{onClick:this.handleClick,css:a==null?void 0:a.button},C("div",{css:a==null?void 0:a.buttonContent},lt(r),this.renderSortArrow())),!n&&r,!n&&this.renderSortArrow())}},ql.displayName="ColHeader",ql.componentId="Table.ColHeader",ql.allowedProps=Cce,ql.propTypes=Ece,ql.defaultProps={textAlign:"start",sortDirection:"none",children:null,scope:"col"},ql))||e$);const Tce=(t,e)=>{const n=e.textAlign;return{rowHeader:{label:"rowHeader",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:"bold",color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},Ace=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},Rce={children:p.oneOfType([p.node,p.func]),isStacked:p.bool,textAlign:p.oneOf(["start","center","end"])},Pce=["children","isStacked","textAlign"];var i$,r$,Yl;let y2=(i$=de(Tce,Ace),i$(r$=(Yl=class __ extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return C(Oe,Object.assign({},Oe.omitViewProps(De(this.props,__.allowedProps),__),{as:i?"div":"th",css:r==null?void 0:r.rowHeader,scope:"row",role:i?"rowheader":void 0}),lt(n))}},Yl.displayName="RowHeader",Yl.componentId="Table.RowHeader",Yl.allowedProps=Pce,Yl.propTypes=Rce,Yl.defaultProps={textAlign:"start",children:null},Yl))||r$);const Ice=(t,e)=>{const n=e.textAlign;return{cell:{label:"cell",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background,boxSizing:"border-box",verticalAlign:"middle",lineHeight:t.lineHeight,padding:t.padding,...n&&{textAlign:n}}}},$ce=t=>{const e=t.colors,n=t.typography,i=t.spacing;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,lineHeight:n==null?void 0:n.lineHeightCondensed,padding:`${i==null?void 0:i.xSmall} ${i==null?void 0:i.small}`}}},Dce={children:p.oneOfType([p.node,p.func]),isStacked:p.bool,header:p.oneOfType([p.node,p.func]),textAlign:p.oneOf(["start","center","end"])},Lce=["children","isStacked","header","textAlign"];var s$,o$,Gl;let v2=(s$=de(Ice,$ce),s$(o$=(Gl=class k_ extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,s=e.header;return C(Oe,Object.assign({},Oe.omitViewProps(De(this.props,k_.allowedProps),k_),{as:r?"div":"td",css:i==null?void 0:i.cell,role:r?"cell":void 0}),s&<(s),s&&": ",lt(n))}},Gl.displayName="Cell",Gl.componentId="Table.Cell",Gl.allowedProps=Lce,Gl.propTypes=Dce,Gl.defaultProps={textAlign:"start",children:null},Gl))||o$);const Mce={children:_t.oneOf([hh,y2,v2]),hover:p.bool,isStacked:p.bool,headers:p.arrayOf(p.oneOfType([p.node,p.func]))},Nce=["children","hover","isStacked","headers"];var a$,l$,Kl;let ju=(a$=de(wce,_ce),a$(l$=(Kl=class x_ extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.styles,r=e.isStacked,s=e.headers;return C(Oe,Object.assign({},Oe.omitViewProps(De(this.props,x_.allowedProps),x_),{as:r?"div":"tr",css:i==null?void 0:i.row,role:r?"row":void 0}),T.Children.toArray(n).filter(Boolean).map((o,a)=>Qe(o,[hh])?o:Qe(o,[y2])?Vt(o,{key:o.props.name,isStacked:r}):Qe(o,[v2])?Vt(o,{key:o.props.name,isStacked:r,header:s&&s[a]}):null))}},Kl.displayName="Row",Kl.componentId="Table.Row",Kl.allowedProps=Nce,Kl.propTypes=Mce,Kl.defaultProps={children:null},Kl))||l$);const Bce={children:_t.oneOf([ju]),isStacked:p.bool,renderSortLabel:p.oneOfType([p.node,p.func])},Qce=["children","isStacked","renderSortLabel"];var u$,c$,Jl,d$;let tb=(u$=de(vce,Sce),u$(c$=(Jl=class q7 extends T.Component{get isSortable(){const e=T.Children.toArray(this.props.children),n=as(e,1),i=n[0];let r=!1;return i&&T.Children.forEach(i.props.children,s=>{Qe(s,[hh])&&s.props.onRequestSort&&(r=!0)}),r}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;this.isSortable&&typeof this.props.renderSortLabel>"u"&&Be(!1,"[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable."),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderSelect(){const e=this.props,n=e.children,i=e.renderSortLabel,r=T.Children.toArray(n),s=as(r,1),o=s[0];if(!Qe(o,[ju]))return null;const a=[],l={};let u,c=0;if(T.Children.forEach(o.props.children,h=>{if(c+=1,Qe(h,[hh])){const f=h.props,m=f.id,b=f.stackedSortByLabel,y=f.sortDirection,O=f.onRequestSort,v=b||m;O&&(a.push({id:m,label:v}),l[m]=O,y!=="none"&&(u=m))}}),!a.length)return null;const d=(h,{value:f})=>{f&&typeof l[f]=="function"&&l[f](h,{id:`${f}`})};return C("div",{role:"rowgroup"},C("div",{role:"row"},C("div",{role:"cell","aria-colspan":c},C(dP,{renderLabel:i?lt(i):d$||(d$=C(cr,null)),renderBeforeInput:u&&Ma,value:u,onChange:d},a.map(({id:h,label:f})=>C(dP.Option,{id:h,key:h,value:h,renderBeforeLabel:h===u?Ma:()=>C(Ma,{style:{color:"transparent"}})},f))))))}render(){const e=this.props,n=e.children,i=e.isStacked,r=e.styles;return i?this.renderSelect():C("thead",Object.assign({},De(this.props,q7.allowedProps),{css:r==null?void 0:r.head}),T.Children.map(n,s=>Qe(s,[ju])?s:null))}},Jl.displayName="Head",Jl.componentId="Table.Head",Jl.allowedProps=Qce,Jl.propTypes=Bce,Jl.defaultProps={children:null},Jl))||c$);const zce=t=>({body:{label:"body",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,color:t.color,background:t.background}}),Hce=t=>{const e=t.colors,n=t.typography;return{...{fontSize:n==null?void 0:n.fontSizeMedium,fontFamily:n==null?void 0:n.fontFamily,fontWeight:n==null?void 0:n.fontWeightNormal,color:e==null?void 0:e.textDarkest,background:e==null?void 0:e.backgroundLightest}}},Uce={children:_t.oneOf([ju]),hover:p.bool,isStacked:p.bool,headers:p.arrayOf(p.oneOfType([p.node,p.func]))},Fce=["children","hover","isStacked","headers"];var h$,f$,eu;let E_=(h$=de(zce,Hce),h$(f$=(eu=class C_ extends T.Component{componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.children,i=e.hover,r=e.isStacked,s=e.headers,o=e.styles;return C(Oe,Object.assign({},Oe.omitViewProps(De(this.props,C_.allowedProps),C_),{as:r?"div":"tbody",css:o==null?void 0:o.body,role:r?"rowgroup":void 0}),T.Children.map(n,a=>Qe(a,[ju])?Vt(a,{key:a.props.name,hover:i,isStacked:r,headers:s}):null))}},eu.displayName="Body",eu.componentId="Table.Body",eu.allowedProps=Fce,eu.propTypes=Uce,eu.defaultProps={children:null},eu))||f$);const Vce={caption:p.node.isRequired,children:_t.oneOf([tb,E_]),margin:pt.spacing,elementRef:p.func,hover:p.bool,layout:p.oneOf(["auto","fixed","stacked"])},Wce=["caption","children","margin","elementRef","hover","layout"];var p$,m$,qi;let Kn=(p$=de(Oce,yce),p$(m$=(qi=class T_ extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}getHeaders(){const e=this.props.children,n=T.Children.toArray(e),i=as(n,1),r=i[0];if(Qe(r,[tb])){const s=T.Children.toArray(r.props.children),o=as(s,1),a=o[0];if(Qe(a,[ju]))return T.Children.map(a.props.children,l=>Qe(l,[hh])?l.props.children:void 0)}}render(){const e=this.props,n=e.margin,i=e.layout,r=e.caption,s=e.children,o=e.hover,a=e.styles,l=i==="stacked",u=l?this.getHeaders():void 0;return C(Oe,Object.assign({},Oe.omitViewProps(De(this.props,T_.allowedProps),T_),{as:l?"div":"table",margin:n,elementRef:this.handleRef,css:a==null?void 0:a.table,role:l?"table":void 0,"aria-label":l?r:void 0}),!l&&C("caption",null,C(cr,null,r)),T.Children.map(s,c=>Qe(c,[tb])?Vt(c,{key:c.props.name,isStacked:l}):Qe(c,[E_])?Vt(c,{key:c.props.name,isStacked:l,hover:o,headers:u}):null))}},qi.displayName="Table",qi.componentId="Table",qi.allowedProps=Wce,qi.propTypes=Vce,qi.defaultProps={children:null,hover:!1,layout:"auto"},qi.Head=tb,qi.Body=E_,qi.Row=ju,qi.ColHeader=hh,qi.RowHeader=y2,qi.Cell=v2,qi))||m$);const jce=Kj` - to { - opacity: 1; - }`,Xce=(t,e,n)=>{const i=e.fluidWidth,r=e.iconPosition,s=e.size,o=e.variant,a=n.animate,l=r==="end"&&(o==="filled"||i),u=i?{display:"block",width:"100%"}:{},c={start:{marginInlineEnd:t.iconMargin,marginInlineStart:0},end:{marginInlineStart:t.iconMargin,marginInlineEnd:0}},d={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},h={small:{fontSize:t.smallIconSize},medium:{fontSize:t.mediumIconSize},large:{fontSize:t.largeIconSize}},f=r==="start"&&!i?{small:{paddingInlineStart:`calc(${t.smallIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},medium:{paddingInlineStart:`calc(${t.mediumIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"},large:{paddingInlineStart:`calc(${t.largeIconSize} + ${t.togglePadding})`,paddingInlineEnd:"0"}}:{small:{},medium:{},large:{}};return{toggleDetails:{label:"toggleDetails",fontFamily:t.fontFamily,fontWeight:t.fontWeight,lineHeight:t.lineHeight},summary:{label:"toggleDetails__summary",position:"relative",display:"flex",alignItems:"center",boxSizing:"border-box",textAlign:"start"},summaryText:{label:"toggleDetails__summaryText",minWidth:"0.0625rem",flexGrow:1,...l?{flex:1}:{}},toggle:{label:"toggleDetails__toggle",fontFamily:t.fontFamily,appearance:"none",cursor:"pointer",userSelect:"none",touchAction:"manipulation",position:"relative",overflow:"visible",boxSizing:"border-box",padding:"0",margin:"0",outline:"none",border:"none",background:"transparent",color:t.textColor,"&::-moz-focus-inner":{padding:"0",margin:"0"},"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",right:"-0.375rem",bottom:"-0.375rem",border:`${t.toggleBorderWidth} ${t.toggleBorderStyle} ${t.toggleFocusBorderColor}`,borderRadius:`calc(${t.toggleBorderRadius} * 1.5)`,opacity:0,pointerEvents:"none"},"&:focus":{"&::before":{opacity:1}},"&:focus, &:hover, &:active":{textDecoration:"none",color:t.textColor},textDecoration:"none",...u,...d[s]},icon:{label:"toggleDetails__icon","& > svg":{display:"block"},...c[r],...h[s]},details:{label:"toggleDetails__details",boxSizing:"border-box",paddingTop:t.togglePadding,color:t.textColor,...d[s],...f[s]},content:a?{label:"toggleDetails__content",opacity:.01,animationName:jce,animationFillMode:"forwards",animationDuration:".3s"}:{}}},Zce=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,s=t.key,o={canvas:{toggleFocusBorderColor:t["ic-brand-primary"],iconColor:t["ic-brand-font-color-dark"],textColor:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,textColor:e==null?void 0:e.textDarkest,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,smallIconSize:"0.5rem",mediumIconSize:"0.75rem",largeIconSize:"1rem",iconMargin:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textDarkest,togglePadding:n==null?void 0:n.xxSmall,toggleBorderRadius:i==null?void 0:i.radiusMedium,toggleBorderWidth:i==null?void 0:i.widthMedium,toggleBorderStyle:i==null?void 0:i.style,toggleFocusBorderColor:e==null?void 0:e.borderBrand,filledBackgroundColor:e==null?void 0:e.backgroundLight,filledBorderWidth:i==null?void 0:i.widthSmall,filledBorderStyle:i==null?void 0:i.style,filledBorderColor:e==null?void 0:e.borderMedium,filledBorderRadius:i==null?void 0:i.radiusMedium,filledPadding:n==null?void 0:n.small},...o[s]}},qce={variant:p.oneOf(["default","filled"]),summary:p.node.isRequired,expanded:nc(p.bool,"onToggle","defaultExpanded"),defaultExpanded:p.bool,onToggle:p.func,icon:p.func,iconExpanded:p.func,iconPosition:p.oneOf(["start","end"]),fluidWidth:p.bool,children:p.node,size:p.oneOf(["small","medium","large"])},Yce=["variant","summary","expanded","defaultExpanded","onToggle","icon","iconExpanded","iconPosition","fluidWidth","children","size"];var g$,b$,u0,tu;let Y7=(g$=de(Xce,Zce),b$=Ne(),g$(u0=b$(u0=(tu=class G7 extends T.Component{constructor(...e){super(...e),this.ref=null,this._button=null,this.getButtonRef=n=>this._button=n,this.handleToggle=(n,i)=>{var r,s;typeof this.props.onToggle=="function"&&this.props.onToggle(n,i),(r=(s=this.props).makeStyles)===null||r===void 0||r.call(s,{animate:!0})}}get focused(){return qs(this._button)}focus(){var e;(e=this._button)===null||e===void 0||e.focus()}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!1})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{animate:!0})}renderSummary(e){var n,i;const r=this.props,s=r.summary,o=r.iconPosition;return C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.summary},o==="start"&&this.renderIcon(e),C("span",{css:(i=this.props.styles)===null||i===void 0?void 0:i.summaryText},s),o==="end"&&this.renderIcon(e))}renderToggle(e,n){const i=this.props.variant,r={...De(this.props,G7.allowedProps),...e,children:this.renderSummary(n)},s=this.renderSummary(n);if(i==="filled")return C(bx,Object.assign({},r,{display:"block",textAlign:"start",elementRef:this.getButtonRef}),s);if(r.href){var o;return C("a",Object.assign({},r,{css:(o=this.props.styles)===null||o===void 0?void 0:o.toggle,ref:this.getButtonRef}),s)}else{var a;return C("button",Object.assign({},r,{type:"button",css:(a=this.props.styles)===null||a===void 0?void 0:a.toggle,ref:this.getButtonRef}),s)}}renderIcon(e){var n;const i=e?this.props.iconExpanded:this.props.icon;return this.props.children&&i?C("span",{css:(n=this.props.styles)===null||n===void 0?void 0:n.icon},C(i,null)):null}renderDetails(e,n){var i;const r=this.props.children,s=e?{display:"block"}:{display:"none"};return C("div",Object.assign({},n,{css:[(i=this.props.styles)===null||i===void 0?void 0:i.details,s]}),r&&e&&this.renderContent())}renderContent(){var e;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.content},this.props.children)}render(){return C(VR,Object.assign({},Qo(this.props,VR.allowedProps),{onToggle:this.handleToggle}),({expanded:e,getToggleProps:n,getDetailsProps:i})=>{var r;return C("div",{css:(r=this.props.styles)===null||r===void 0?void 0:r.toggleDetails,ref:s=>{this.ref=s}},this.renderToggle(n(),e),this.renderDetails(e,i()))})}},tu.displayName="ToggleDetails",tu.componentId="ToggleDetails",tu.allowedProps=Yce,tu.propTypes=qce,tu.defaultProps={variant:"default",size:"medium",fluidWidth:!1,icon:Ka,iconExpanded:Ga,iconPosition:"start",defaultExpanded:!1,children:null},tu))||u0)||u0);const fs=T.createContext({layout:"desktop",inverseColor:!1}),Gce=(t,e,n)=>{const i=e.status,r=e.variant,s=e.renderSubmenu,o=e.renderAvatar,a=e.customPopoverConfig,l=n.layout,u=n.inverseColor,c=l==="smallViewport",d=o?!1:i==="active"&&r==="default",h=s||a,f=`calc(${t.itemInlinePadding} - ${t.activeItemIndicatorSpacing})`;return{topNavBarItem:{label:"topNavBarItem",padding:`0 calc(${t.itemSpacing} / 2)`,height:"100%",display:"flex",justifyContent:"center",alignItems:h?"stretch":"center"},container:{label:"topNavBarItem__container",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...d&&{"&::after":{content:'""',position:"absolute",insetBlockEnd:0,insetInlineStart:f,insetInlineEnd:f,height:t.activeIndicatorWidth,background:u?t.activeIndicatorColorInverse:t.activeIndicatorColor,display:"block"}},"& a":{textDecoration:"none"}},content:{label:"topNavBarItem__content",fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,appearance:"none",border:0,outline:0,margin:0,textDecoration:"none",whiteSpace:"nowrap",display:"flex",justifyContent:"center",alignItems:"center",color:u?t.colorInverse:t.color,...d&&{fontWeight:t.activeItemFontWeight},"*":{pointerEvents:"none"}},avatarContainer:{label:"topNavBarItem__avatarContainer",display:"flex",alignItems:"center",paddingInlineEnd:`calc(${t.iconTextGap} * 1.5)`},submenuTriggerContainer:{label:"topNavBarItem__submenuTriggerContainer",height:"100%",display:"flex",alignItems:"center"},submenuIcon:{label:"topNavBarItem__submenuIcon",fontSize:"0.875em",display:"flex",alignItems:"center",paddingInlineStart:t.iconTextGap},focusOutlineOffset:c?"0.375rem":"0.625rem",itemInlinePadding:t.itemInlinePadding}},Kce=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.borders;return{...{fontSize:i==null?void 0:i.fontSizeMedium,fontFamily:i==null?void 0:i.fontFamily,fontWeight:i==null?void 0:i.fontWeightNormal,color:"inherit",colorInverse:"inherit",itemInlinePadding:n==null?void 0:n.xSmall,itemSpacing:n==null?void 0:n.xSmall,iconTextGap:n==null?void 0:n.xSmall,activeItemFontWeight:i==null?void 0:i.fontWeightBold,activeItemIndicatorSpacing:"0.25rem",activeIndicatorWidth:r==null?void 0:r.widthMedium,activeIndicatorColor:e==null?void 0:e.textLightest,activeIndicatorColorInverse:e.textDarkest}}},S2=p.oneOfType([p.string,p.shape({renderTip:p.oneOfType([p.node,p.func]).isRequired,color:p.oneOf(["primary","primary-inverse"]),placement:p.string,offsetX:p.oneOfType([p.string,p.number]),offsetY:p.oneOfType([p.string,p.number]),onShowContent:p.func,onHideContent:p.func})]),Jce={id:p.string.isRequired,as:p.elementType,children:p.node.isRequired,variant:p.oneOf(["default","button","icon","avatar"]),status:p.oneOf(["default","active","disabled"]),renderSubmenu:_t.oneOf([si]),showSubmenuChevron:p.bool,customPopoverConfig:p.object,tooltip:S2,renderAvatar:p.shape({avatarName:p.string.isRequired,avatarSrc:p.string,avatarAlt:p.string}),renderIcon:p.oneOfType([p.node,p.func]),href:p.string,onClick:p.func,onHiddenClick:p.func,onSubmenuToggle:p.func,onMouseOver:p.func,onMouseOut:p.func,onFocus:p.func,onBlur:p.func,onKeyDown:p.func,onKeyUp:p.func,elementRef:p.func,itemRef:p.func,shouldCloseOnClick:p.oneOf(["auto","always","never"])},O$=["id","as","children","variant","status","renderSubmenu","showSubmenuChevron","customPopoverConfig","tooltip","renderAvatar","renderIcon","href","onClick","onHiddenClick","onSubmenuToggle","onMouseOver","onMouseOut","onFocus","onBlur","onKeyDown","onKeyUp","elementRef","itemRef","shouldCloseOnClick"];var y$,v$,S$,Vc,ta,w$,_$;const K7=1e4,k$=K7+1,ede=K7+2;let Vs=(y$=Kt(),v$=de(Gce,Kce),S$=Ne(),y$(Vc=v$(Vc=S$(Vc=(ta=class extends T.Component{constructor(e){super(e),this.ref=null,this._itemRef=null,this._tooltipContentId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleItemRef=n=>{const i=this.props.itemRef;this._itemRef=n,typeof i=="function"&&i(n)},this.handleKeyDown=n=>{if(n.key==="ArrowDown"&&(this.shouldRenderSubmenu&&!this.state.isSubmenuOpen||this.shouldRenderPopover&&!this.state.isPopoverOpen)){var i;n.preventDefault(),(i=this._itemRef)===null||i===void 0||i.click()}n.key==="Tab"&&this.state.isPopoverOpen&&!this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!1})},this.handleMenuToggle=(n,i)=>{this.setState({isSubmenuOpen:i.shown}),typeof this.props.onSubmenuToggle=="function"&&this.props.onSubmenuToggle(n,i)},this._tooltipContentId=e.deterministicId("TopNavBarItem-tooltip"),this.state={isSubmenuOpen:!1,isPopoverOpen:!1}}componentDidMount(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&this.setState({isPopoverOpen:!!i.isShowingContent})}componentDidUpdate(){const e=this.props,n=e.makeStyles,i=e.customPopoverConfig;n==null||n(this.makeStylesVariables),i&&this.isCustomPopoverControlled&&i.isShowingContent!==this.state.isPopoverOpen&&this.setState({isPopoverOpen:!!i.isShowingContent})}get makeStylesVariables(){const e=this.context,n=e.layout,i=e.inverseColor;return{layout:n,inverseColor:i}}get shouldRenderSubmenu(){const e=this.props.renderSubmenu;return!!e&&Qe(e,[si])}get shouldRenderPopover(){const e=this.props,n=e.id,i=e.renderSubmenu,r=e.customPopoverConfig;return r?r.children?r&&i?(Be(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${n}" will ignore the "customPopoverConfig" prop.`),!1):!0:(Be(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${n}".`),!1):!1}get isCustomPopoverControlled(){const e=this.props.customPopoverConfig;return e&&typeof e.isShowingContent<"u"}get hasOpenPopover(){return this.state.isSubmenuOpen||this.state.isPopoverOpen}get isDefaultVariant(){return this.props.variant==="default"||this.props.variant==="forceIconWithLabel"}get isButtonVariant(){return this.props.variant==="button"}get isIconVariant(){return this.props.variant==="icon"}get isAvatarOnlyVariant(){return this.props.variant==="avatar"}get hasAvatar(){const e=this.props,n=e.id,i=e.renderIcon,r=e.renderAvatar,s=e.variant,o=!!r;return this.isAvatarOnlyVariant&&!o?(Be(!1,`The "renderAvatar" config is required for the 'variant="avatar"' type components, but received none for the item with id "${n}".`),!1):o&&(i||s==="icon")?(Be(!1,` components with icons cannot display avatars, so the "renderAvatar" config prop will be ignored for item with id "${n}".`),!1):o}get submenuIcon(){var e;return!(this.shouldRenderSubmenu||this.shouldRenderPopover)||!this.props.showSubmenuChevron?null:C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.submenuIcon},this.shouldRenderSubmenu&&this.state.isSubmenuOpen||this.shouldRenderPopover&&this.state.isPopoverOpen?w$||(w$=C(lc,null)):_$||(_$=C(Ga,null)))}get buttonThemeOverride(){const e=this.props.styles,n={};return(this.isDefaultVariant||this.hasAvatar)&&(n.mediumPaddingHorizontal=e==null?void 0:e.itemInlinePadding),this.hasAvatar&&(n.mediumPaddingTop="0.125rem",n.mediumPaddingBottom="0.125rem"),this.isAvatarOnlyVariant&&!this.submenuIcon&&(n.mediumPaddingHorizontal="0",n.mediumPaddingTop="0",n.mediumPaddingBottom="0"),Object.keys(n).length>0?n:void 0}get colorProps(){let e="primary-inverse",n="inverse";return this.context.inverseColor&&(e="secondary",n="info",this.isButtonVariant&&(e="primary")),{color:e,focusColor:n}}get ariaProps(){let e,n;return this.shouldRenderSubmenu&&(e="menu",n=this.state.isSubmenuOpen),this.shouldRenderPopover&&(e="true",n=this.state.isPopoverOpen),{"aria-haspopup":e,"aria-expanded":n}}get itemProps(){const e=this.props,n=e.id,i=e.as,r=e.variant,s=e.href,o=e.onClick,a=e.onMouseOver,l=e.onMouseOut,u=e.onFocus,c=e.onBlur,d=e.onKeyDown,h=e.onKeyUp,f=e.renderSubmenu,m=e.status,b=e.renderAvatar,y=e.renderIcon;let O=s,v=o,S=m;if(f&&(O&&(Be(!1,`TopNavBar.Items with submenus are not allowed to have 'href' property, but received href "${O}" for item with the id: "${n}".`),O=void 0),v&&(Be(!1,`TopNavBar.Items with submenus are not allowed to have 'onClick' property, but received onClick for item with the id: "${n}".Use the \`onSubmenuToggle\` prop instead. OnClick: ${v}`),v=void 0)),S==="active"&&!this.isDefaultVariant&&(Be(!1,`Only \`variant="default"\` components can be set to active, but item with id "${n}" has variant: "${r}".`),S="default"),this.hasAvatar){if(!(b!=null&&b.avatarName))return tt(!1,`The "avatarName" prop is required for for components with avatar, but the item with id "${n}" is missing it.`),null;S==="active"&&(Be(!1,` components with avatar cannot have "active" status, so the "active" status on the item with id "${n}" will be ignored.`),S="default")}return this.isIconVariant&&!y?(tt(!1,`The "renderIcon" prop is required for the \`variant="icon"\` type components, but the item with id "${n}" is missing it.`),null):{id:n,as:i,...this.colorProps,...this.ariaProps,size:"medium",withBorder:this.isButtonVariant,withBackground:this.isButtonVariant,interaction:S==="disabled"?"disabled":void 0,"aria-disabled":S==="disabled"?"true":void 0,shape:this.isAvatarOnlyVariant&&!this.submenuIcon?"circle":"rectangle",href:O,onClick:v,onMouseOver:a,onMouseOut:l,onFocus:u,onBlur:c,onKeyDown:ht(d,this.handleKeyDown),onKeyUp:h,renderIcon:y,themeOverride:this.buttonThemeOverride,elementRef:_=>{this.handleItemRef(_)}}}renderContent(){var e;const n=this.props,i=n.children,r=n.styles,s=this.itemProps;if(!s)return null;let o=i;this.isAvatarOnlyVariant?o=this.renderAvatar():this.isIconVariant&&(o=C(cr,null,o));const a=C(m1,Object.assign({},s,Ft(De(this.props,O$))),this.isIconVariant&&!this.submenuIcon?o:C("div",{css:r==null?void 0:r.content},this.hasAvatar&&!this.isAvatarOnlyVariant&&C("span",{css:(e=this.props.styles)===null||e===void 0?void 0:e.avatarContainer},this.renderAvatar()),o,this.submenuIcon));return C("div",{css:r==null?void 0:r.container},this.props.tooltip?this.wrapButtonInTooltip(a,i):a)}wrapButtonInTooltip(e,n){const i=this.props,r=i.tooltip,s=i.styles;if(!r)return e;let o={placement:"bottom",color:this.context.inverseColor?"primary":"primary-inverse"};typeof r=="string"?o.renderTip=r:o={...o,...r};const a=lt(o.renderTip);if(!a)return e;const l=a===n;return C(Eu,{theme:{componentOverrides:{View:{stackingTopmost:ede}}}},C(BM,Object.assign({},o,{renderTip:l?a:C("div",{id:this._tooltipContentId},a),positionContainerDisplay:"block"}),C("div",{css:s==null?void 0:s.submenuTriggerContainer},l?e:Vt(e,{"aria-describedby":this._tooltipContentId}))))}renderAvatar(){if(!this.hasAvatar)return null;const e=this.props,n=e.id,i=e.children,s=e.renderAvatar,o=s.avatarName,a=s.avatarSrc,u=s.avatarAlt||(typeof i=="string"?i:void 0);return u||Be(!1,`Please supply a label for the avatar with either the "renderAvatar.avatarAlt" or the "children" (as string) prop. It is needed for screen reader support, but missing on the item with the id: "${n}".`),o?C(Ox,{name:o,src:a,alt:u,size:"small"}):null}renderDropdownMenu(){var e,n,i;const r=this.props,s=r.id,o=r.renderSubmenu,a=r.status,l=r.styles;return!o||!this.shouldRenderSubmenu?null:(typeof o.props.show<"u"&&Be(!1,`TopNavBar.Item Drilldown submenus are controlled by the component. The "show" prop will be ignored on the submenu of the item with id: "${s}".`),o.props.trigger&&Be(!1,`TopNavBar.Item submenus have the item itself as their trigger. The "trigger" prop will be ignored on the Drilldown submenu of item with id: "${s}".`),Vt(o,{trigger:C("div",{css:l==null?void 0:l.submenuTriggerContainer},this.renderContent()),show:this.state.isSubmenuOpen,onToggle:ht((e=o.props)===null||e===void 0?void 0:e.onToggle,this.handleMenuToggle),positionContainerDisplay:"block",placement:"bottom start",withArrow:!1,minWidth:((n=o.props)===null||n===void 0?void 0:n.minWidth)||"18.5rem",maxHeight:((i=o.props)===null||i===void 0?void 0:i.maxHeight)||"calc(100vh - 10rem)",...a==="disabled"&&{disabled:!0,show:!1,onToggle:void 0}}))}renderPopover(){const e=this.props,n=e.id,i=e.customPopoverConfig,r=e.styles;if(!i||!this.shouldRenderPopover)return null;i.renderTrigger&&Be(!1,`TopNavBar.Item popovers have the item itself as their trigger. The "renderTrigger" prop will be ignored on the popover of item with id: "${n}".`);const s={placement:"bottom start",withArrow:!0,shouldReturnFocus:!0,shouldContainFocus:!1,...i,positionContainerDisplay:"block",renderTrigger:C("div",{css:r==null?void 0:r.submenuTriggerContainer},this.renderContent()),onShowContent:ht(i.onShowContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!0})}),onHideContent:ht(i.onHideContent,()=>{this.isCustomPopoverControlled||this.setState({isPopoverOpen:!1})}),isShowingContent:this.state.isPopoverOpen,"aria-expanded":void 0};return C(g1,s,i.children)}render(){const e=this.props.styles;let n;return this.shouldRenderPopover?n=C(Eu,{theme:{componentOverrides:{View:{stackingTopmost:k$}}}},this.renderPopover()):this.shouldRenderSubmenu?n=C(Eu,{theme:{componentOverrides:{View:{stackingTopmost:k$}}}},this.renderDropdownMenu()):n=this.renderContent(),C("div",{ref:this.handleRef,css:e==null?void 0:e.topNavBarItem},n)}},ta.displayName="TopNavBarItem",ta.componentId="TopNavBar.Item",ta.propTypes=Jce,ta.allowedProps=O$,ta.defaultProps={status:"default",variant:"default",showSubmenuChevron:!0,shouldCloseOnClick:"auto"},ta.contextType=fs,ta))||Vc)||Vc)||Vc);const vO=(t,e={})=>{const n=[],i=e.currentPageId,r=e.renderOptionContent,s=pM();return T.Children.forEach(t,o=>{if(!o||!Qe(o,[Vs]))return;const a=o.props,l=a.renderSubmenu,u=a.customPopoverConfig,c=a.id,d=a.children,h=a.status,f=a.variant,m=a.href,b=a.onClick,y=a.shouldCloseOnClick;let O=l,v=u,S,_;const k=[];O&&(Qe(O,[si])||(Be(!1,`The "renderSubmenu" prop accepts only Drilldown components, but the item with id "${c}" received: "${l}".`),O=void 0),O&&(_=O.props.rootPageId,k.push(...T.Children.toArray(O.props.children)))),v&&(v.children||(Be(!1,`Pass the content of the custom Popover as "customPopoverConfig.children" for the item with id: "${c}".`),v=void 0),O&&(Be(!1,`TopNavBar.Items are not allowed to have both the "renderSubmenu" and "customPopoverConfig" props. For submenus, pass a Drilldown component via the "renderSubmenu" prop, and only use "customPopoverConfig" for custom features. Item with id: "${c}" will ignore the "customPopoverConfig" prop.`),v=void 0),v&&(S=sM("TopNavBarItem__customPopoverOption",s),_=S,k.push(F.createElement(si.Page,{id:S,key:S},F.createElement(si.Option,{id:`${S}__option`},v.children)))));let x=o.props["aria-current"]||(c===i?"page":void 0);x&&(f!=="default"&&(Be(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${c}" is "${f}" variant.`),x=void 0),h==="disabled"&&(Be(!1,`Disabled items can not be set to current/active, but the item with id "${c}" is disabled.`),x=void 0)),n.push({item:o,submenuPages:k,optionData:{id:c,disabled:h==="disabled",href:m,onOptionClick:w=>{b==null||b(w)},children:typeof r=="function"?r(d,{...o.props,status:x==="page"?"active":o.props.status}):d,subPageId:_,"aria-current":x,shouldCloseOnClick:y}})}),n},w2=t=>t.map(n=>n.submenuPages).filter(n=>!!n).flat(),SO=t=>t.map(e=>{const n=e.optionData,r=e.item.props.onHiddenClick;return r&&(n.onOptionClick=r),F.createElement(si.Option,Object.assign({},n,{key:n.id,afterLabelContentVAlign:"center"}),n.children)}),tde=(t,e,n)=>{const i={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`};return{topNavBarActionItems:{label:"topNavBarActionItems",boxSizing:"border-box",listStyleType:"none",margin:"0",padding:"0",flex:"0 0",display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"flex-end",...n.layout==="smallViewport"&&{flex:"1 1",marginInlineStart:t.smallViewportActionItemContainerMargin,maxWidth:t.smallViewportActionItemContainerMaxWidth}},listItem:{label:"topNavBarActionItems__listItem",flex:"0 0"},dropdownMenuOption:{label:"topNavBarActionItems__dropdownMenuOption",...i},dropdownMenuOptionActive:{label:"topNavBarActionItems__dropdownMenuOptionActive",...i,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`}}},nde=t=>{const e=t.typography,n=t.spacing,i=t.borders;return{...{smallViewportActionItemContainerMargin:n==null?void 0:n.xxLarge,smallViewportActionItemContainerMaxWidth:"50%",smallViewportDropdownMenuActiveOptionFontWeight:e==null?void 0:e.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:i==null?void 0:i.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor"}}},ide={children:_t.oneOf([Vs]),listLabel:p.string,renderHiddenItemsMenuTriggerLabel:p.oneOfType([p.string,p.func]).isRequired,renderHiddenItemsMenuTriggerTooltip:p.oneOfType([S2,p.func]),elementRef:p.func},Tv=["children","listLabel","renderHiddenItemsMenuTriggerLabel","renderHiddenItemsMenuTriggerTooltip","elementRef"];var x$,E$,C$,Wc,na;let J7=(x$=Kt(),E$=de(tde,nde),C$=Ne(),x$(Wc=E$(Wc=C$(Wc=(na=class extends T.Component{constructor(e){super(e),this.ref=null,this._hiddenActionItemsMenuId=void 0,this._hiddenActionItemsMenuTriggerId=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles,s=i.status;return C("span",{css:s==="active"?r==null?void 0:r.dropdownMenuOptionActive:r==null?void 0:r.dropdownMenuOption},n)},this._hiddenActionItemsMenuId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenu"),this._hiddenActionItemsMenuTriggerId=e.deterministicId("TopNavBarActionItems-hiddenActionItemsMenuTrigger"),this.state={key:0,visibleActionItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i,this.makeStylesVariables),this.context.layout==="smallViewport"&&F.Children.count(e.children)!==F.Children.count(this.props.children)&&this.setState({key:this.state.key+1})}get makeStylesVariables(){return{layout:this.context.layout}}get childrenArray(){return F.Children.toArray(this.props.children).map(n=>{if(!(n!=null&&n.props))return null;const i=n.props,r=i.id,s=i.renderAvatar,o=i.renderIcon,a=i.variant;return s?(Be(!1,`Items in are not allowed to have avatars, please remove it from item with the id "${r}".`),Vt(n,{renderAvatar:void 0,variant:"default"})):this.context.layout==="smallViewport"&&a!=="icon"?o?Vt(n,{variant:a==="forceIconWithLabel"?"default":"icon"}):(tt(!1,`Items in are required to have the \`renderIcon\` prop, because only the icons are displayed due to the lack of space. Please add an icon to the item with the id "${r}".`),null):n})}renderHiddenActionItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.renderHiddenItemsMenuTriggerTooltip,s=vO(e,{renderOptionContent:this.renderOptionContent}),o=w2(s),a=SO(s),l=typeof i=="function"?i(e.length):i,u=typeof r=="function"?r(e.length):r;return C(Vs,{id:this._hiddenActionItemsMenuTriggerId,renderIcon:Ih,variant:"icon",tooltip:u,showSubmenuChevron:!1,renderSubmenu:C(si,{rootPageId:this._hiddenActionItemsMenuId},[C(si.Page,{id:this._hiddenActionItemsMenuId,key:this._hiddenActionItemsMenuId},a),...o])},l)}renderTruncatedActionItemList(){const e=this.props,n=e.listLabel,i=e.styles;return C(uN,Object.assign({},Ft(De(this.props,Tv)),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,visibleItemsCount:this.state.visibleActionItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleActionItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenActionItemsMenu(r),"aria-label":n}),this.childrenArray)}render(){const e=this.props,n=e.listLabel,i=e.styles;return this.childrenArray.length?this.context.layout==="smallViewport"?this.renderTruncatedActionItemList():C("ul",Object.assign({},De(this.props,Tv),{ref:this.handleRef,css:i==null?void 0:i.topNavBarActionItems,"aria-label":n}),this.childrenArray.map(r=>C("li",{css:i==null?void 0:i.listItem,key:r.props.id},r))):null}},na.displayName="TopNavBarActionItems",na.componentId="TopNavBar.ActionItems",na.propTypes=ide,na.allowedProps=Tv,na.defaultProps={},na.contextType=fs,na))||Wc)||Wc)||Wc);const rde=(t,e,n)=>{const i=e.iconBackground,r=n.layout==="desktop";return{topNavBarBrand:{label:"topNavBarBrand",display:"flex",alignItems:"stretch"},container:{label:"topNavBarBrand__container",display:"flex",justifyContent:"flex-start",alignItems:"stretch",border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},name:{label:"topNavBarBrand__name",display:"flex",alignItems:"center",height:t.logoHeight},iconContainer:{label:"topNavBarBrand__iconContainer",display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",padding:t.iconPadding,background:r?i:void 0},icon:{label:"topNavBarBrand__icon",display:"flex",justifyContent:"center",alignItems:"center"},focusOutlineInset:t.focusOutlineInset}},sde=t=>{const e=t.spacing;return{...{logoHeight:"2.25rem",logoPadding:e.small,iconPadding:e.small,focusOutlineInset:"-0.25rem"}}},ode={screenReaderLabel:p.string.isRequired,renderIcon:p.node,iconBackground:p.string,href:p.string,onClick:p.func,as:p.elementType,elementRef:p.func},T$=["screenReaderLabel","renderIcon","iconBackground","href","onClick","as","elementRef"];var A$,R$,c0,ia;let eQ=(A$=de(rde,sde),R$=Ne(),A$(c0=R$(c0=(ia=class tQ extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;"renderName"in this.props,"nameBackground"in this.props,(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{layout:this.context.layout}}render(){const e=this.props,n=e.screenReaderLabel,i=e.renderIcon,r=e.href,s=e.onClick,o=e.styles,a=Ei(tQ,this.props);return C("div",{ref:this.handleRef,css:o==null?void 0:o.topNavBarBrand},i&&C(Oe,Object.assign({},De(this.props,T$),{css:o==null?void 0:o.container,as:a,href:r,onClick:s,position:"relative",focusColor:this.context.inverseColor?"info":"inverse",focusPosition:"inset",borderRadius:"medium",themeOverride:{focusOutlineInset:o==null?void 0:o.focusOutlineInset}}),C(cr,null,n),i&&this.context.layout!=="smallViewport"&&C("div",{css:o==null?void 0:o.iconContainer,role:"presentation","aria-hidden":"true"},i)))}},ia.displayName="TopNavBarBrand",ia.componentId="TopNavBar.Brand",ia.propTypes=ode,ia.allowedProps=T$,ia.defaultProps={},ia.contextType=fs,ia))||c0)||c0);const nQ=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,s=t.borders;return{...{desktopFontSize:i==null?void 0:i.fontSizeMedium,desktopFontFamily:i==null?void 0:i.fontFamily,desktopFontWeight:i==null?void 0:i.fontWeightNormal,desktopBackground:e==null?void 0:e.backgroundBrandSecondary,desktopBackgroundInverse:e==null?void 0:e.backgroundLight,desktopBottomBorder:"none",desktopBottomBorderInverse:`${s==null?void 0:s.widthSmall} ${s==null?void 0:s.style} ${e==null?void 0:e.borderMedium}`,desktopHeight:"4rem",desktopZIndex:(n==null?void 0:n.topmost)+1,desktopInlinePadding:r.small,desktopBrandContainerInlineMargin:`0 ${r.medium}`,desktopMenuItemsContainerInlineMargin:`0 ${r.large}`,desktopActionItemsContainerInlineMargin:`${r.xSmall} 0`,desktopUserContainerInlineMargin:`${r.xSmall} 0`,desktopUserSeparatorGap:r==null?void 0:r.xSmall,desktopUserSeparatorHeight:"1.5rem",desktopUserSeparatorWidth:s==null?void 0:s.widthSmall,desktopUserSeparatorColor:e.borderMedium,desktopUserSeparatorColorInverse:e.borderMedium}}},iQ=t=>{const e=t.colors,n=t.stacking,i=t.typography,r=t.spacing,s=t.borders;return{...{smallViewportFontSize:i==null?void 0:i.fontSizeMedium,smallViewportFontFamily:i==null?void 0:i.fontFamily,smallViewportFontWeight:i==null?void 0:i.fontWeightNormal,smallViewportBackground:e==null?void 0:e.backgroundBrandSecondary,smallViewportBackgroundInverse:e==null?void 0:e.backgroundLight,smallViewportBottomBorder:"none",smallViewportBottomBorderInverse:`${s==null?void 0:s.widthSmall} ${s==null?void 0:s.style} ${e==null?void 0:e.borderMedium}`,smallViewportHeight:"3.5rem",smallViewportInlinePadding:"0.25rem",smallViewportZIndex:(n==null?void 0:n.topmost)+1,smallViewportTrayPosition:"fixed",smallViewportTrayFixTopPosition:void 0,smallViewportTrayZIndex:(n==null?void 0:n.topmost)+1,smallViewportDropdownMenuActiveOptionFontWeight:i==null?void 0:i.fontWeightBold,smallViewportDropdownMenuActiveOptionIndicatorSpacing:"0.25rem",smallViewportDropdownMenuActiveOptionIndicatorWidth:s==null?void 0:s.widthMedium,smallViewportDropdownMenuActiveOptionIndicatorColor:"currentColor",smallViewportAlternativeTitleInlineMargin:r==null?void 0:r.xxSmall,smallViewportAlternativeTitleBlockMargin:"0"}}},ade=t=>({...{...nQ(t),...iQ(t)}}),lde=(t,e)=>{const n=e.border,i=e.shadow,r=e.size,s=e.placement,o={borderWidth:0,borderColor:t.borderColor,borderStyle:t.borderStyle},a=i?{boxShadow:t.boxShadow}:{},l=s==="start"||s==="end"||s==="center"?{label:"tray__content",minHeight:"100vh"}:{},u={top:{insetInlineStart:0,insetInlineEnd:0,top:0},bottom:{insetInlineStart:0,insetInlineEnd:0,bottom:0},start:{top:0,bottom:0,insetInlineStart:0,insetInlineEnd:"auto"},end:{top:0,bottom:0,insetInlineEnd:0,insetInlineStart:"auto"},center:{left:0,right:0,top:0,bottom:0}},c=n?{start:{borderInlineEndWidth:t.borderWidth},end:{borderInlineStartWidth:t.borderWidth},top:{borderBottomWidth:t.borderWidth},bottom:{borderTopWidth:t.borderWidth},center:{}}:{},d={"x-small":t.xSmallWidth,small:t.smallWidth,regular:t.regularWidth,medium:t.mediumWidth,large:t.largeWidth},h=s==="start"||s==="end"?{width:d[r]}:{};return{tray:{label:"tray",backgroundColor:t.background,position:t.position,overflowY:"auto",overflowX:"hidden",boxSizing:"border-box",zIndex:t.zIndex,maxWidth:"100vw",maxHeight:"100vh",...a,...u[s],...n&&o,...n&&c[s],...h},content:{label:"tray__content",...l}}},ude=t=>{const e=t.colors,n=t.borders,i=t.shadows,r=t.breakpoints,s=t.stacking;return{...{background:e==null?void 0:e.backgroundLightest,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderStyle:n==null?void 0:n.style,boxShadow:i==null?void 0:i.depth3,xSmallWidth:r==null?void 0:r.xSmall,smallWidth:"20em",regularWidth:r==null?void 0:r.small,mediumWidth:r==null?void 0:r.medium,largeWidth:r==null?void 0:r.large,zIndex:s==null?void 0:s.topmost,position:"fixed"}}},cde={label:p.string.isRequired,children:p.node,size:p.oneOf(["x-small","small","regular","medium","large"]),placement:p.oneOf(["top","bottom","start","end","center"]),open:p.bool,defaultFocusElement:p.oneOfType([p.element,p.func]),contentRef:p.func,shouldContainFocus:p.bool,shouldReturnFocus:p.bool,shouldCloseOnDocumentClick:p.bool,onOpen:p.func,onClose:p.func,onDismiss:p.func,mountNode:p.oneOfType([zi,p.func]),insertAt:p.oneOf(["bottom","top"]),liveRegion:p.oneOfType([zi,p.arrayOf(zi),p.func]),onTransition:p.func,onEnter:p.func,onEntering:p.func,onEntered:p.func,onExit:p.func,onExiting:p.func,onExited:p.func,transitionOnMount:p.bool,transitionEnter:p.bool,transitionExit:p.bool,border:p.bool,shadow:p.bool},dde=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onTransition","onEnter","onEntering","onEntered","onExit","onExiting","onExited","transitionOnMount","transitionEnter","transitionExit","border","shadow"],hde=["label","children","size","placement","open","defaultFocusElement","contentRef","shouldContainFocus","shouldReturnFocus","shouldCloseOnDocumentClick","onOpen","onClose","onDismiss","mountNode","insertAt","liveRegion","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onTransition","transitionOnMount","transitionEnter","transitionExit","border","shadow","role"];var P$,I$,$$,jc,nu;let fde=(P$=de(lde,ude),I$=ss(),$$=Ne(),P$(jc=I$(jc=$$(jc=(nu=class rQ extends T.Component{constructor(e){var n;super(e),this.ref=null,this.dialogRef=null,this.state=void 0,this.handleTransitionComplete=i=>{this.setState({transitioning:!1})},this.handlePortalOpen=i=>{i&&(this.DOMNode=i)},this.state={transitioning:!1,open:(n=e.open)!==null&&n!==void 0?n:!1}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e,n){var i,r;if(this.props.open!==e.open){if(!this.props.open){var s;(s=this.dialogRef)===null||s===void 0||s.close()}this.setState({transitioning:!0,open:this.props.open})}(i=(r=this.props).makeStyles)===null||i===void 0||i.call(r)}get placement(){const e=this.props,n=e.placement;return e.dir===ss.DIRECTION.rtl?ew(n," "):n}get direction(){switch(this.placement){case"top":return"up";case"bottom":return"down";case"end":return"right";default:return"left"}}get transition(){return`slide-${this.direction}`}get DOMNode(){return this.ref}set DOMNode(e){this.ref=e||null}render(){var e,n;const i=this.props,r=i.label,s=i.children;i.size,i.placement;const o=i.open,a=i.defaultFocusElement,l=i.contentRef,u=i.shouldContainFocus,c=i.shouldReturnFocus,d=i.shouldCloseOnDocumentClick,h=i.onOpen,f=i.onClose,m=i.onDismiss,b=i.mountNode,y=i.insertAt,O=i.liveRegion,v=i.onEnter,S=i.onEntering,_=i.onEntered,k=i.onExit,x=i.onExiting,w=i.onExited,M=i.onTransition,H=i.transitionOnMount,I=i.transitionEnter,z=i.transitionExit;i.border,i.shadow;const U=i.role,X=Le(i,hde),J=this.state.open||this.state.transitioning;return C(xM,{open:J,onOpen:this.handlePortalOpen,insertAt:y,mountNode:b},C(zM,{in:o,type:this.transition,onTransition:M,onEnter:v,onEntering:S,onEntered:ht(this.handleTransitionComplete,_,h),onExit:k,onExiting:x,onExited:ht(this.handleTransitionComplete,w,f),transitionOnMount:H,transitionEnter:I,transitionExit:z},C("span",Object.assign({},De(X,rQ.allowedProps),{css:(e=this.props.styles)===null||e===void 0?void 0:e.tray,ref:l}),C(us,{ref:re=>this.dialogRef=re,as:"div",label:r,defaultFocusElement:a,open:!0,shouldContainFocus:u,shouldReturnFocus:c,shouldCloseOnDocumentClick:d,shouldCloseOnEscape:!0,liveRegion:O,onDismiss:m,role:U},C("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},s)))))}},nu.displayName="Tray",nu.componentId="Tray",nu.allowedProps=dde,nu.propTypes=cde,nu.defaultProps={defaultFocusElement:null,open:!1,insertAt:"bottom",shouldCloseOnDocumentClick:!1,shouldContainFocus:!0,shouldReturnFocus:!0,size:"small",placement:"start",transitionOnMount:!0,transitionEnter:!0,transitionExit:!0,shadow:!0,border:!1},nu))||jc)||jc)||jc);const pde=(t,e,n)=>{const i=n.isDropdownMenuVisible,r=n.drilldownId,s=n.trayId,o=n.menuBottomPosition,a=n.inverseColor,l=t.smallViewportTrayFixTopPosition||`${o}px`,u={display:"inline-block",padding:`0 ${t.smallViewportDropdownMenuActiveOptionIndicatorSpacing}`},c={fontSize:t.smallViewportFontSize,fontFamily:t.smallViewportFontFamily,fontWeight:t.smallViewportFontWeight,background:a?t.smallViewportBackgroundInverse:t.smallViewportBackground,borderBlockEnd:a?t.smallViewportBottomBorderInverse:t.smallViewportBottomBorder,height:t.smallViewportHeight,maxWidth:"100%",paddingBlock:0,paddingInline:t.smallViewportInlinePadding,position:"relative",zIndex:t.smallViewportZIndex,display:"flex",justifyContent:"space-between",alignItems:"stretch",overflow:"hidden"};return{topNavBarSmallViewportLayout:{label:"topNavBarSmallViewportLayout"},navbar:{label:"topNavBarSmallViewportLayout__navbar",...c},inPlaceDialogContainer:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainer",...c,alignItems:"center"},inPlaceDialogContainerContent:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerContent",flex:"1 1"},inPlaceDialogContainerButton:{label:"topNavBarSmallViewportLayout__inPlaceDialogContainerButton",flex:"0 0"},menuTriggerContainer:{label:"topNavBarSmallViewportLayout__menuTriggerContainer",display:"flex",alignItems:"stretch",justifyContent:"flex-start",flex:"1 1"},menuTrigger:{label:"topNavBarSmallViewportLayout__menuTrigger",display:"flex",alignItems:"center",justifyContent:"flex-start"},alternativeTitleContainer:{label:"topNavBarSmallViewportLayout__alternativeTitleContainer",marginBlock:t.smallViewportAlternativeTitleBlockMargin,marginInline:t.smallViewportAlternativeTitleInlineMargin},dropdownMenuOption:{label:"topNavBarSmallViewportLayout__dropdownMenuOption",...u},dropdownMenuOptionActive:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionActive",...u,fontWeight:t.smallViewportDropdownMenuActiveOptionFontWeight,paddingBlockEnd:t.smallViewportDropdownMenuActiveOptionIndicatorSpacing,borderBottom:`${t.smallViewportDropdownMenuActiveOptionIndicatorWidth} solid ${t.smallViewportDropdownMenuActiveOptionIndicatorColor}`},dropdownMenuOptionWithAvatar:{label:"topNavBarSmallViewportLayout__dropdownMenuOptionWithAvatar",...u,display:"flex",alignItems:"center"},brandContainer:{label:"topNavBarSmallViewportLayout__brandContainer",display:"flex",alignItems:"stretch"},trayContainer:{label:"topNavBarSmallViewportLayout__trayContainer",width:"100%",position:t.smallViewportTrayPosition,insetBlockStart:l,insetInlineStart:"0px",zIndex:t.smallViewportTrayZIndex,...i&&{height:`calc(100% - ${l})`}},globalStyles:{[`#${s}`]:{height:"100%"},[`#${r}`]:{height:"100%","&::before":{top:"4px",left:"4px",right:"4px",bottom:"4px",zIndex:1}}},navbarHeight:t.smallViewportHeight}},mde=t=>{const e={display:"inline-block",padding:`0 ${t.desktopSubmenuActiveOptionIndicatorSpacing}`};return{topNavBarMenuItems:{label:"topNavBarMenuItems",flex:"1 1",display:"flex",flexDirection:"row",alignItems:"stretch",padding:"0 0.125rem"},submenuOption:{label:"topNavBarMenuItems__submenuOption",...e},submenuOptionActive:{label:"topNavBarMenuItems__submenuOptionActive",...e,fontWeight:t.desktopSubmenuActiveOptionFontWeight,paddingBlockEnd:t.desktopSubmenuActiveOptionIndicatorSpacing,borderBottom:`${t.desktopSubmenuActiveOptionIndicatorWidth} solid ${t.desktopSubmenuActiveOptionIndicatorColor}`},itemSpacing:t.desktopItemSpacing}},gde=t=>{const e=t.borders,n=t.typography;return{...{desktopItemSpacing:"1rem",desktopMaxWidth:"100%",desktopSubmenuActiveOptionFontWeight:n==null?void 0:n.fontWeightBold,desktopSubmenuActiveOptionIndicatorSpacing:"0.25rem",desktopSubmenuActiveOptionIndicatorWidth:e==null?void 0:e.widthMedium,desktopSubmenuActiveOptionIndicatorColor:"currentColor"}}},bde={children:_t.oneOf([Vs]),currentPageId:p.string,renderHiddenItemsMenuTriggerLabel:p.oneOfType([p.func,p.string]).isRequired,listLabel:p.string,elementRef:p.func},D$=["children","currentPageId","renderHiddenItemsMenuTriggerLabel","listLabel","elementRef"];var L$,M$,N$,Xc,ra,B$;let sQ=(L$=Kt(),M$=de(mde,gde),N$=Ne(),L$(Xc=M$(Xc=N$(Xc=(ra=class extends T.Component{constructor(e){super(e),this._hiddenMenuItemsMenuTriggerId=void 0,this._hiddenItemsMenuId=void 0,this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.renderOptionContent=(n,i)=>{const r=this.props.styles;return C("span",{css:(i==null?void 0:i.status)==="active"?r==null?void 0:r.submenuOptionActive:r==null?void 0:r.submenuOption},n)},this._hiddenMenuItemsMenuTriggerId=e.deterministicId("TopNavBarMenuItems-hiddenMenuItemsMenuTrigger"),this._hiddenItemsMenuId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this.state={key:0,visibleItemsCount:void 0}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),F.Children.count(e.children)!==this.childrenArray.length&&this.setState({key:this.state.key+1})}get childrenArray(){return F.Children.toArray(this.props.children)}renderHiddenItemsMenu(e){const n=this.props,i=n.renderHiddenItemsMenuTriggerLabel,r=n.currentPageId;if(!e.length)return B$||(B$=C("span",null));const s=vO(e,{renderOptionContent:this.renderOptionContent,currentPageId:r}),o=w2(s),a=SO(s),l=e.find(u=>u.props.status==="active");return C(Vs,{id:this._hiddenMenuItemsMenuTriggerId,status:l?"active":"default",renderSubmenu:C(si,{rootPageId:this._hiddenItemsMenuId},[C(si.Page,{id:this._hiddenItemsMenuId,key:this._hiddenItemsMenuId},a),...o])},i(e.length))}renderChildren(){const e=this.props.currentPageId;return this.childrenArray.map(n=>{if(!n)return;const i=n.props,r=i.id,s=i.status,o=i.variant,a=i.renderSubmenu,l=i.renderAvatar,u=e===r;return l?(tt(!1,`Items in are not allowed to have avatars, but item with id: "${r}" has \`renderAvatar\` prop.`),null):u?o!=="default"?(Be(!1,`Only \`variant="default"\` items can be set to current/active, but the item with id "${r}" is "${o}" variant.`),n):s==="disabled"?(Be(!1,`Disabled items can not be set to current/active, but the item with id "${r}" is disabled.`),n):Vt(n,{status:"active","aria-current":a?void 0:"page"}):n})}render(){const e=this.props,n=e.listLabel,i=e.styles;return!this.childrenArray.length||this.context.layout==="smallViewport"?null:C(uN,Object.assign({},De(this.props,D$),{key:this.state.key,elementRef:this.handleRef,css:i==null?void 0:i.topNavBarMenuItems,visibleItemsCount:this.state.visibleItemsCount,onUpdate:({visibleItemsCount:r})=>{this.setState({visibleItemsCount:r})},renderHiddenItemMenu:r=>this.renderHiddenItemsMenu(r)},(i==null?void 0:i.itemSpacing)&&{itemSpacing:i.itemSpacing},{"aria-label":n}),this.renderChildren())}},ra.displayName="TopNavBarMenuItems",ra.componentId="TopNavBar.MenuItems",ra.propTypes=bde,ra.allowedProps=D$,ra.defaultProps={},ra.contextType=fs,ra))||Xc)||Xc)||Xc);const Ode=()=>({topNavBarUser:{label:"topNavBarUser",flex:"0 0",display:"flex"}}),yde={children:_t.oneOf([Vs]).isRequired,elementRef:p.func},Q$=["children","elementRef"];var z$,H$,d0,sa;let oQ=(z$=de(Ode,null),H$=Ne(),z$(d0=H$(d0=(sa=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get content(){const e=F.Children.toArray(this.props.children),n=["default","button","avatar"];return T.Children.map(e,i=>{const r=i.props,s=r.id,o=r.variant;return o&&!n.includes(o)?(tt(!1,`Item with id "${s}" has "${o}" variant, but only the following variants are allowed in : ${n.join(", ")}.`),null):i})}render(){const e=this.props.styles;return!this.content||this.content.length===0||this.context.layout==="smallViewport"?null:C("div",Object.assign({},De(this.props,Q$),{ref:this.handleRef,css:e==null?void 0:e.topNavBarUser}),this.content)}},sa.displayName="TopNavBarUser",sa.componentId="TopNavBar.User",sa.propTypes=yde,sa.allowedProps=Q$,sa.defaultProps={},sa.contextType=fs,sa))||d0)||d0);const vde={onClick:p.func,elementRef:p.func,children:_t.oneOf([xG])},Sde=["children","onClick","elementRef"],wde=(t,e)=>({topNavBarBreadcrumb:{label:"topNavBarBreadcrumb",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flexGrow:1,border:0,outline:0,padding:0,margin:0,appearance:"none",textDecoration:"none"},iconContainer:{label:"topNavBarBreadcrumb__iconContainer",display:"flex",justifyContent:"center",alignItems:"center"},icon:{label:"topNavBarBreadcrumb__icon",display:"flex",justifyContent:"center",alignItems:"center"},breadcrumbContainer:{label:"topNavBarBreadcrumb__breadCrumbContainer",appearance:"none",textDecoration:"none",marginLeft:"0.75rem",flexGrow:1},linkContainer:{label:"topNavBarBreadcrumb__linkContainer",marginLeft:"0.5rem"}});var U$,F$,h0,iu,V$;let aQ=(U$=de(wde,null),F$=Ne(),U$(h0=F$(h0=(iu=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,{inverseColor:this.context.inverseColor})}renderMenu(){var e;const n=this.props.onClick;return C("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},C(mo.Item,{id:"iconItem",variant:"icon",renderIcon:V$||(V$=C(oc,null)),onClick:n},"Hamburger menu"))}render(){const e=this.props,n=e.children,i=e.styles;this.context.inverseColor||tt(!1,"[TopNavBarBreadcrumb] If the inverseColor prop is not set to true, TopNavBarBreadcrumb fails to render.");const s=F.Children.toArray(n)[0].props.children,o=F.Children.toArray(s)[F.Children.count(s)-2];return this.context.inverseColor&&(this.context.layout==="desktop"?C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.iconContainer},this.renderMenu()),C("div",{css:i==null?void 0:i.breadcrumbContainer},n)):C("div",{ref:this.handleRef,css:i==null?void 0:i.topNavBarBreadcrumb},C("div",{css:i==null?void 0:i.linkContainer},C(rr,{href:o.props.href,isWithinText:!1,renderIcon:xh},o.props.children))))}},iu.displayName="TopNavBarBreadcrumb",iu.propTypes=vde,iu.allowedProps=Sde,iu.defaultProps={},iu.contextType=fs,iu))||h0)||h0);const _2={renderBrand:_t.oneOf([eQ]),renderMenuItems:_t.oneOf([sQ]),renderActionItems:_t.oneOf([J7]),renderUser:_t.oneOf([oQ]),renderBreadcrumb:_t.oneOf([aQ]),navLabel:p.string,elementRef:p.func},_de={hideActionsUserSeparator:p.bool},lQ={dropdownMenuToggleButtonLabel:p.string.isRequired,dropdownMenuToggleButtonTooltip:S2,dropdownMenuLabel:p.string,alternativeTitle:p.node,renderInPlaceDialogConfig:p.shape({open:p.bool.isRequired,onClose:p.func.isRequired,closeButtonLabel:p.string.isRequired,content:p.oneOfType([p.node,p.func]),returnFocusElement:p.func,shouldContainFocus:p.bool,shouldCloseOnDocumentClick:p.bool,shouldCloseOnEscape:p.bool}),trayMountNode:p.oneOfType([zi,p.func]),onDropdownMenuToggle:p.func,onDropdownMenuSelect:p.func},kde={..._2,smallViewportConfig:p.shape(lQ).isRequired},k2=["renderBrand","renderMenuItems","renderActionItems","renderUser","renderBreadcrumb","navLabel","elementRef"],xde=["hideActionsUserSeparator"],Ede=["dropdownMenuToggleButtonLabel","dropdownMenuToggleButtonTooltip","dropdownMenuLabel","alternativeTitle","renderInPlaceDialogConfig","trayMountNode","onDropdownMenuToggle","onDropdownMenuSelect"],Cde=[...k2,"smallViewportConfig"],Tde={..._2,...lQ},W$=[...k2,...Ede];var j$,X$,Z$,Zc,oa,q$,Y$;let Ade=(j$=Kt(),X$=de(pde,iQ),Z$=Ne(),j$(Zc=X$(Zc=Z$(Zc=(oa=class extends T.Component{constructor(e){var n;super(e),this.ref=null,this._trayContainerId=void 0,this._trayId=void 0,this._drilldownId=void 0,this._menuTriggerId=void 0,this._menuId=void 0,this._inPlaceDialogId=void 0,this._inPlaceDialogCloseButtonId=void 0,this._separatorId=void 0,this._raf=[],this.handleRef=i=>{const r=this.props.elementRef;this.ref=i,typeof r=="function"&&r(i)},this.renderOptionContent=(i,r)=>{const s=this.props.styles,o=r.status,a=r.renderAvatar;let l=i,u=o==="active"?s==null?void 0:s.dropdownMenuOptionActive:s==null?void 0:s.dropdownMenuOption;if(a){const c=a.avatarName,d=a.avatarSrc,f=a.avatarAlt||(typeof i=="string"?i:void 0);u=s==null?void 0:s.dropdownMenuOptionWithAvatar,l=C(F.Fragment,null,C(Ox,{name:c,src:d,alt:f,size:"small",margin:"0 small 0 0",role:"presentation","aria-hidden":"true"}),i)}return C("span",{css:u},l)},this._trayContainerId=e.deterministicId("TopNavBarSmallViewportLayout-trayContainer"),this._trayId=e.deterministicId("TopNavBarSmallViewportLayout-tray"),this._menuId=e.deterministicId("TopNavBarSmallViewportLayout-menu"),this._menuTriggerId=e.deterministicId("TopNavBarSmallViewportLayout-menuTrigger"),this._drilldownId=e.deterministicId("TopNavBarSmallViewportLayout-drilldown"),this._inPlaceDialogId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialog"),this._inPlaceDialogCloseButtonId=e.deterministicId("TopNavBarSmallViewportLayout-inPlaceDialogCloseButton"),this._separatorId=e.deterministicId("TopNavBarSmallViewportLayout-separator"),this.state={isDropdownMenuOpen:!1,isDropdownMenuVisible:!1,menuBottomPosition:mi(((n=e.styles)===null||n===void 0?void 0:n.navbarHeight)||0)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables),this.updateMenuBottomPosition()}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentWillUnmount(){this._raf.forEach(e=>e.cancel()),this.state.isDropdownMenuOpen&&this.toggleDropdownMenu()}get makeStylesVariables(){return{isDropdownMenuVisible:this.state.isDropdownMenuVisible,drilldownId:this._drilldownId,trayId:this._trayId,menuBottomPosition:this.state.menuBottomPosition,inverseColor:this.context.inverseColor}}hasBrandBlock(e){return!!e&&!!e.props.renderIcon}hasMenuItemsBlock(e){return!!e&&F.Children.count(e.props.children)>0}hasActionItemsBlock(e){return!!e&&F.Children.count(e.props.children)>0}hasUserBlock(e){return!!e&&F.Children.count(e.props.children)>0}get hasSubmenu(){return(this.dropdownMenuContent||[]).length>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&F.Children.count(e.props.children)>0}get isInPlaceDialogOpen(){var e;return(e=this.props.renderInPlaceDialogConfig)===null||e===void 0?void 0:e.open}get mappedUserOptions(){const e=this.props.renderUser;if(!this.hasUserBlock(e))return[];const n=F.Children.toArray(e.props.children);return vO(n,{renderOptionContent:this.renderOptionContent})}get mappedMenuItemsOptions(){const e=this.props.renderMenuItems;if(!this.hasMenuItemsBlock(e))return[];const n=F.Children.toArray(e.props.children);return vO(n,{renderOptionContent:this.renderOptionContent,currentPageId:e.props.currentPageId})}get extractDrilldownSubpages(){return w2([...this.mappedUserOptions,...this.mappedMenuItemsOptions])}updateMenuBottomPosition(){const e=sn(this.ref);this.setState({menuBottomPosition:e.top+e.height})}toggleDropdownMenu(){const e=this.props.onDropdownMenuToggle,n=this.state.isDropdownMenuOpen;n||this.updateMenuBottomPosition(),typeof e=="function"&&e(!n),this.setState({isDropdownMenuOpen:!n})}renderMenuTrigger(){const e=this.props,n=e.dropdownMenuToggleButtonLabel,i=e.dropdownMenuToggleButtonTooltip,r=e.renderBrand,s=e.alternativeTitle,o=e.styles,a=this.state.isDropdownMenuOpen;let l;const u=[o==null?void 0:o.menuTrigger,...s?[o==null?void 0:o.alternativeTitleContainer]:[]];if(!this.hasSubmenu)l=null,s&&Be(!1,"There are no menu items or user menu to display in the dropdown menu! The menu trigger and the alternative title will not display.");else{const c={id:this._menuTriggerId,onClick:()=>{this.toggleDropdownMenu()},tooltip:i,themeOverride:{itemSpacing:"0.375rem"},"aria-haspopup":"menu","aria-expanded":a},d={size:"x-small",style:{marginInlineEnd:"0.5em"}};l=C("div",{css:u},s?C(Vs,Object.assign({},c,{"aria-label":n}),C(a?lc:Ga,d),s):C(Vs,Object.assign({},c,{variant:"icon",renderIcon:a?q$||(q$=C(Lu,null)):Y$||(Y$=C(oc,null))}),n))}return C("div",{css:o==null?void 0:o.menuTriggerContainer},l,this.hasBrandBlock(r)&&!s&&C("div",{css:o==null?void 0:o.brandContainer},r))}get dropdownMenuContent(){const e=this.props,n=e.renderUser,i=e.renderMenuItems,r=this.hasMenuItemsBlock(i),s=this.hasUserBlock(n);let o=[];return s&&(o=SO(this.mappedUserOptions),r&&o.push(C(si.Separator,{id:this._separatorId,key:this._separatorId}))),r&&(o=[...o,...SO(this.mappedMenuItemsOptions)]),o.length?o:void 0}renderDropdownMenu(){const e=this.props,n=e.dropdownMenuLabel,i=e.onDropdownMenuSelect;return C(si,{id:this._drilldownId,rootPageId:this._menuId,label:n,height:"100%",width:"100%",onSelect:(r,s)=>{typeof i=="function"&&i(r,s),(s.selectedOption.props.shouldCloseOnClick==="auto"&&s.selectedOption.props.href||s.selectedOption.props.shouldCloseOnClick==="always")&&this.toggleDropdownMenu()}},[C(si.Page,{id:this._menuId,key:this._menuId},this.dropdownMenuContent),...this.extractDrilldownSubpages])}renderDropdownMenuTray(){const e=this.props.trayMountNode;return this.hasSubmenu?C(fde,{id:this._trayId,label:"",role:"none",open:this.state.isDropdownMenuOpen,transitionExit:!1,onDismiss:()=>{this.toggleDropdownMenu()},onKeyUp:n=>{n.key==="Escape"&&this.toggleDropdownMenu()},onEnter:()=>{this.setState({isDropdownMenuVisible:!0})},onExited:()=>{this.setState({isDropdownMenuVisible:!1})},shouldCloseOnDocumentClick:!0,placement:"top",shadow:!1,mountNode:e||document.getElementById(this._trayContainerId),defaultFocusElement:()=>document.getElementById(this._drilldownId),themeOverride:{position:"absolute"}},this.renderDropdownMenu()):null}renderInPlaceDialog(){const e=this.props,n=e.renderInPlaceDialogConfig,i=e.styles;if(!n)return null;const r=n.content,s=n.open,o=n.onClose,a=n.closeButtonLabel,l=n.shouldContainFocus,u=n.shouldCloseOnEscape,c=n.shouldCloseOnDocumentClick,d=n.returnFocusElement,h=()=>{typeof o=="function"&&o(),d&&this._raf.push(Eo(()=>{var m;(m=d())===null||m===void 0||m.focus()}))};return C(us,{display:"block",open:s,shouldContainFocus:l,shouldCloseOnEscape:u,shouldCloseOnDocumentClick:c,onDismiss:h},C("div",{id:this._inPlaceDialogId,css:i==null?void 0:i.inPlaceDialogContainer},C("div",{css:i==null?void 0:i.inPlaceDialogContainerContent},lt(r,{closeInPlaceDialog:h})),C("div",{css:i==null?void 0:i.inPlaceDialogContainerButton},C(Vs,{id:this._inPlaceDialogCloseButtonId,renderIcon:Lu,variant:"icon",onClick:h},a))))}render(){const e=this.props,n=e.trayMountNode,i=e.navLabel,r=e.renderActionItems,s=e.renderBreadcrumb,o=e.styles;return C("nav",Object.assign({},De(this.props,W$),{ref:this.handleRef,"aria-label":i}),C(eM,{styles:o==null?void 0:o.globalStyles}),this.hasBreadcrumbBlock&&C("div",{css:o==null?void 0:o.navbar},s),!this.hasBreadcrumbBlock&&!this.isInPlaceDialogOpen&&C("div",{css:o==null?void 0:o.navbar},this.renderMenuTrigger(),this.hasActionItemsBlock(r)&&r),!this.hasBreadcrumbBlock&&this.renderInPlaceDialog(),!this.hasBreadcrumbBlock&&!n&&C("div",{css:o==null?void 0:o.trayContainer,id:this._trayContainerId}),!this.hasBreadcrumbBlock&&this.renderDropdownMenuTray())}},oa.displayName="TopNavBarSmallViewportLayout",oa.componentId="TopNavBar.SmallViewportLayout",oa.propTypes=Tde,oa.allowedProps=W$,oa.defaultProps={},oa.contextType=fs,oa))||Zc)||Zc)||Zc);const Rde=(t,e,n)=>{const i=n.inverseColor,r=n.hasBrandBlock,s=n.hasActionItemsBlock,o=n.hasUserBlock,a=s&&o;return{topNavBarDesktopLayout:{label:"topNavBarDesktopLayout",flowMode:"logical",fontSize:t.desktopFontSize,fontFamily:t.desktopFontFamily,fontWeight:t.desktopFontWeight,background:i?t.desktopBackgroundInverse:t.desktopBackground,borderBlockEnd:i?t.desktopBottomBorderInverse:t.desktopBottomBorder,display:"flex",alignItems:"stretch",justifyContent:"space-between",height:t.desktopHeight,zIndex:t.desktopZIndex,maxWidth:"100%",overflow:"hidden",paddingInline:t.desktopInlinePadding,paddingBlock:0,...r&&{paddingInlineStart:0}},brandContainer:{label:"topNavBarDesktopLayout__brandContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopBrandContainerInlineMargin},menuItemsContainer:{label:"topNavBarDesktopLayout__menuItemsContainer",display:"flex",flexGrow:1,flexShrink:1,marginBlock:0,marginInline:t.desktopMenuItemsContainerInlineMargin,overflow:"hidden"},actionItemsContainer:{label:"topNavBarDesktopLayout__actionItemsContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopActionItemsContainerInlineMargin},spacer:{flexGrow:"1"},userContainer:{label:"topNavBarDesktopLayout__userContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,marginInline:t.desktopUserContainerInlineMargin,...a&&{position:"relative",paddingInlineStart:t.desktopUserSeparatorGap,"&::before":{content:'""',position:"absolute",insetInlineStart:0,insetBlockStart:"50%",marginBlockStart:`calc(-${t.desktopUserSeparatorHeight} / 2)`,height:t.desktopUserSeparatorHeight,width:t.desktopUserSeparatorWidth,background:i?t.desktopUserSeparatorColorInverse:t.desktopUserSeparatorColor,display:"block"}}},breadcrumbContainer:{label:"topNavBarDesktopLayout__breadcrumbContainer",display:"flex",flexGrow:0,flexShrink:0,marginBlock:0,alignItems:"center"}}},Pde={..._2,..._de},G$=[...k2,...xde];var K$,J$,f0,aa;let Ide=(K$=de(Rde,nQ),J$=Ne(),K$(f0=J$(f0=(aa=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n,this.makeStylesVariables)}get makeStylesVariables(){return{inverseColor:this.context.inverseColor,hasBrandBlock:this.hasBrandBlock,hasActionItemsBlock:this.hasActionItemsBlock,hasUserBlock:this.hasUserBlock}}get hasBrandBlock(){const e=this.props.renderBrand;return!!e&&!!e.props.renderIcon}get hasActionItemsBlock(){const e=this.props.renderActionItems;return!!e&&F.Children.count(e.props.children)>0}get hasUserBlock(){const e=this.props.renderUser;return!!e&&F.Children.count(e.props.children)>0}get hasMenuItemsBlock(){const e=this.props.renderMenuItems;return!!e&&F.Children.count(e.props.children)>0}get hasBreadcrumbBlock(){const e=this.props.renderBreadcrumb;return!!e&&F.Children.count(e.props.children)>0}render(){const e=this.props,n=e.renderBrand,i=e.renderMenuItems,r=e.renderActionItems,s=e.renderUser,o=e.renderBreadcrumb,a=e.navLabel,l=e.styles,u=!(this.hasBrandBlock||this.hasMenuItemsBlock)&&this.hasBreadcrumbBlock;return C("nav",Object.assign({},De(this.props,G$),{ref:this.handleRef,css:l==null?void 0:l.topNavBarDesktopLayout,"aria-label":a}),this.hasBrandBlock&&C("div",{css:l==null?void 0:l.brandContainer},n),this.hasMenuItemsBlock&&C("div",{css:l==null?void 0:l.menuItemsContainer},i),u&&o,C("span",{css:l==null?void 0:l.spacer}),this.hasActionItemsBlock&&C("div",{css:l==null?void 0:l.actionItemsContainer},r),this.hasUserBlock&&C("div",{css:l==null?void 0:l.userContainer},s))}},aa.displayName="TopNavBarDesktopLayout",aa.componentId="TopNavBar.DesktopLayout",aa.propTypes=Pde,aa.allowedProps=G$,aa.defaultProps={},aa.contextType=fs,aa))||f0)||f0);const $de=["smallViewportConfig","styles","makeStyles"];var e5,t5,p0,la;let n5=(e5=de(null,ade),t5=Ne(),e5(p0=t5(p0=(la=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){"desktopConfig"in this.props}get sortedThemeOverride(){const e=this.props.themeOverride;if(!e||typeof e=="function")return{desktopThemeOverride:e,smallViewportThemeOverride:e};const n={},i={};for(const r in e)if(r.startsWith("smallViewport")){const s=r;i[s]=e[s]}else if(r.startsWith("desktop")){const s=r;n[s]=e[s]}return{desktopThemeOverride:n,smallViewportThemeOverride:i}}render(){const e=this.props,n=e.smallViewportConfig;e.styles,e.makeStyles;const i=Le(e,$de);return this.context.layout==="smallViewport"?C(Ade,Object.assign({},n,i,{themeOverride:this.sortedThemeOverride.smallViewportThemeOverride,elementRef:this.handleRef})):C(Ide,Object.assign({},i,{themeOverride:this.sortedThemeOverride.desktopThemeOverride,elementRef:this.handleRef}))}},la.displayName="TopNavBarLayout",la.componentId="TopNavBar.Layout",la.propTypes=kde,la.allowedProps=Cde,la.defaultProps={smallViewportConfig:{}},la.contextType=fs,la))||p0)||p0);const Dde={children:p.func,breakpoint:p.oneOfType([p.string,p.number]),mediaQueryMatch:p.oneOf(["element","media"]),inverseColor:p.oneOfType([p.bool,p.func]),elementRef:p.func},Lde=["children","breakpoint","mediaQueryMatch","inverseColor","elementRef"];var i5,r5,fi;let mo=(i5=Ne(),i5(r5=(fi=class extends T.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}get breakpoint(){return mi(this.props.breakpoint)}render(){const e=this.props,n=e.children,i=e.mediaQueryMatch,r=e.inverseColor;return F.createElement(Im,{elementRef:this.handleRef,match:i,query:{smallViewport:{maxWidth:this.breakpoint-1},desktop:{minWidth:this.breakpoint}},render:(s,o)=>{const a=o?o[0]:"smallViewport",l=typeof r=="function"?r(a):!!r,u=n({currentLayout:a,inverseColor:l});return Qe(u,[n5])||tt(!1,"The `children` function prop of TopNavBar has to return a child of type , but it returned:",u),F.createElement(fs.Provider,{value:{layout:a,inverseColor:l}},u)}})}},fi.displayName="TopNavBar",fi.componentId="TopNavBar",fi.ActionItems=J7,fi.Brand=eQ,fi.Item=Vs,fi.Layout=n5,fi.MenuItems=sQ,fi.User=oQ,fi.Breadcrumb=aQ,fi.contextType=fs,fi.propTypes=Dde,fi.allowedProps=Lde,fi.defaultProps={breakpoint:1024,mediaQueryMatch:"media",inverseColor:!1},fi))||r5);var uQ={exports:{}},cQ={};/** - * @license React - * react-compiler-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Mde=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;cQ.c=function(t){return Mde.H.useMemoCache(t)};uQ.exports=cQ;var Vo=uQ.exports;const Nde={made_with:{EN:"Made with",ES_LA:"Hecho con",PT_BR:"Feito com",DE:"Mit"},love:{EN:"love",ES_LA:"amor",PT_BR:"amor",DE:"liebe"},by:{EN:"by",ES_LA:"por",PT_BR:"por",DE:"gemacht von"}},A_=["EN","ES_LA","PT_BR","DE"],dQ=[{lang:"English",local:"English",code:"EN"},{lang:"Spanish",local:"Español",code:"ES_LA"},{lang:"Portuguese",local:"Português",code:"PT_BR"},{lang:"German",local:"Deutsch",code:"DE"}];function Xh(t="EN"){return A_.find(e=>e.includes(t.toUpperCase()))||"EN"}function Wo(t,e="EN"){return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,i[e]||i.EN]))}function Zh(t){const e=Vo.c(9),{language:n}=t,i=n;let r;e[0]!==i?(r=Wo(Nde,i),e[0]=i,e[1]=r):r=e[1];const s=r;let o;e[2]!==s.love?(o=L.jsx(Th,{color:"primary-inverse",title:s.love}),e[2]=s.love,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=L.jsx(rr,{color:"link-inverse",href:"https://www.instructure.com",children:"Instructure"}),e[4]=a):a=e[4];let l;return e[5]!==s.made_with||e[6]!==s.by||e[7]!==o?(l=L.jsx(Oe,{id:"footer",as:"div",textAlign:"center",padding:"small",position:"absolute",insetBlockEnd:"0",margin:"0 auto",width:"100%",borderWidth:"small none none",children:L.jsxs(nn,{transform:"uppercase",letterSpacing:"expanded",color:"primary-inverse",size:"small",children:[s.made_with," ",o," ",s.by," ",a]})}),e[5]=s.made_with,e[6]=s.by,e[7]=o,e[8]=l):l=e[8],l}const Bde="isp-site",Qde="3.2.0+1717105383",zde="https://inst.bid/#/",Hde="module",Ude={dev:"vite",build:"vite build",preview:"vite build && vite preview",predeploy:"make all && pnpm build",push:'pnpm predeploy && gh-pages -t -m "Deploy v$(pnpm -s env:app)" -d dist',"push:test":"$(pnpm push) -b test-gh-pages",biome:"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",lint:"biome lint ./","lint:apply":"biome lint --apply ./",check:"biome check ./","check:apply":"biome check --apply ./",format:"biome format ./","format:apply":"biome format --write ./","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:app":"echo $npm_package_version"},Fde={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.0.1","gh-pages":"^6.1.1",react:"19.0.0-rc-f994737d14-20240522","react-dom":"19.0.0-rc-f994737d14-20240522","react-markdown":"^9.0.1","react-router-dom":"^6.23.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},Vde={"@babel/plugin-syntax-import-attributes":"^7.24.6","@biomejs/biome":"1.7.3","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.0","babel-plugin-react-compiler":"^0.0.0-experimental-487cb0e-20240529","node-jq":"^4.4.0",vite:"^5.2.12"},Wde={node:">=22.2.0",pnpm:">=9.1.4"},jde="pnpm@9.1.4+sha256.30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9",Xde={overrides:{react:"^19.0.0-rc-f994737d14-20240522","react-dom":"^19.0.0-rc-f994737d14-20240522","@instructure/ui-test-sandbox>sinon":"^17.0.1","gh-pages>globby":"11.1.0","node-jq>tempfile":"^5.0.0","bin-build>tempfile":"^5.0.0"}},Zde=["extends @instructure/browserslist-config-canvas-lms"],qde={name:Bde,version:Qde,homepage:zde,private:!0,type:Hde,scripts:Ude,dependencies:Fde,devDependencies:Vde,engines:Wde,packageManager:jde,pnpm:Xde,browserslist:Zde},Qi={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:qde.homepage.replace("/#/",""),api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},ru=`${Qi.raw}/${Qi.owner}/${Qi.repo}/${Qi.branch}/README`,er=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Parchment"],Av=[...er,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate K-12 Analytics","Elevate Data Quality","Elevate Data Sync","Learn Platform"],hQ=[{brandName:er[0],get title(){return this.brandName.toLowerCase()},route:"/",readme:`${ru}.md`,color:"#287A9F"},{brandName:er[1],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#E72429"},{brandName:er[2],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#24A159"},{brandName:er[3],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#0097D3"},{brandName:er[4],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#F76400"},{brandName:er[5],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#0077CC"},{brandName:er[6],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${ru}-${this.brandName}.md`},color:"#0093b2"}],s5=(t,e)=>{const n=document.querySelector("body");for(const i of e)i.removeAttribute("aria-current"),i.classList.remove("active");if(t!==null&&t.hash!=="#/"&&(t.setAttribute("aria-current","page"),t.classList.add("active")),n.classList.remove(...er.map(i=>i.toLowerCase())),t!=null&&t.id.length){n.classList.add(t.id);const i=er.find(r=>r.toLowerCase()===t.id);document.title=`${i} Compliance Package`}else n.classList.add("instructure"),document.title="Instructure Compliance Packages"};window.addEventListener("load",()=>{let t=document.location.href.split("#")[1];const e=document.querySelectorAll("nav a");t!==void 0&&t!=="/"&&t!==null&&(t=document.getElementById(t.split("/")[1]),s5(t,e));for(const n of e)n.onclick=()=>{s5(n,e)}});const Yde={language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},help:{EN:"Help",ES_LA:"Ayuda",PT_BR:"Ajuda",DE:"Hilfe"},toggle_menu:{EN:"Toggle menu",ES_LA:"Alternar menú",PT_BR:"Alternar menu",DE:"Menü umschalten"},main_menu:{EN:"Main menu",ES_LA:"Menú principal",PT_BR:"Menu principal",DE:"Hauptmenü"},page_navigation:{EN:"Page navigation",ES_LA:"Navegación de la página",PT_BR:"Navegação da página",DE:"Seitenavigation"},more:{EN:"More",ES_LA:"Más",PT_BR:"Mais",DE:"Mehr"},actions:{EN:"Actions",ES_LA:"Acciones",PT_BR:"Ações",DE:"Aktionen"},more_actions:{EN:"More actions",ES_LA:"Más acciones",PT_BR:"Mais ações",DE:"Mehr Aktionen"},contact_info:{EN:"Contact Information",ES_LA:"Información de Contacto",PT_BR:"Informações de Contato",DE:"Kontaktinformationen"},info_overview:{EN:"This site and its contents are maintained by Instructure, inc.",ES_LA:"Este sitio y su contenido son mantenidos por Instructure, inc.",PT_BR:"Este site e seu conteúdo são mantidos pela Instructure, inc.",DE:"Diese Website und ihre Inhalte werden von Instructure, inc. gepflegt."},current_customers:{EN:"Current customers",ES_LA:"Clientes actuales",PT_BR:"Clientes atuais",DE:"Aktuelle kunden"},contact_csm:{EN:"Reach out to your CSM.",ES_LA:"Comuníquese con su CSM.",PT_BR:"Entre em contato com seu CSM.",DE:"Kontaktieren Sie Ihren CSM."},prospects:{EN:"Prospective customers",ES_LA:"Clientes potenciales",PT_BR:"Clientes em potencial",DE:"Potenzielle Kunden"},contact_sales:{EN:"Reach out to your sales contact.",ES_LA:"Comuníquese con su contacto de ventas.",PT_BR:"Entre em contato com seu contato de vendas.",DE:"Kontaktieren Sie Ihren Vertriebskontakt."},contact_general:{EN:"For general inquiries email",ES_LA:"Para consultas generales envíe un correo electrónico a",PT_BR:"Para perguntas gerais, envie um e-mail para",DE:"Für allgemeine Anfragen senden Sie eine E-Mail an"},redirects:{EN:"Redirects",ES_LA:"Redirecciones",PT_BR:"Redirecionamentos",DE:"Weiterleitungen"},releases:{EN:"Releases",ES_LA:"Lanzamientos",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},contact:{EN:"Contact",ES_LA:"Contacto",PT_BR:"Contato",DE:"Kontakt"}};function qh(t){const e=Vo.c(23),{language:n}=t,i=n;let r;e[0]!==i?(r=Wo(Yde,i),e[0]=i,e[1]=r):r=e[1];const s=r;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=[...hQ],o.shift(),e[2]=o):o=e[2];let a;return e[3]!==s.toggle_menu||e[4]!==s.main_menu||e[5]!==s.page_navigation||e[6]!==s.more||e[7]!==s.actions||e[8]!==s.more_actions||e[9]!==s.language||e[10]!==s.help||e[11]!==s.contact_info||e[12]!==s.info_overview||e[13]!==s.current_customers||e[14]!==s.contact_csm||e[15]!==s.prospects||e[16]!==s.contact_sales||e[17]!==s.contact_general||e[18]!==s.redirects||e[19]!==s.releases||e[20]!==s.contact||e[21]!==i?(a=L.jsx(Oe,{id:"nav",as:"div",tabIndex:0,children:L.jsx(mo,{inverseColor:!0,children:()=>L.jsx(mo.Layout,{navLabel:"main",smallViewportConfig:{dropdownMenuToggleButtonLabel:s.toggle_menu,dropdownMenuLabel:s.main_menu},themeOverride:{desktopBackgroundInverse:"#FFF",smallViewportBackgroundInverse:"#FFF"},renderBrand:L.jsx(mo.Brand,{screenReaderLabel:"Instructure",renderIcon:L.jsx(Bh,{size:"small",color:"primary-inverse",height:"2.5rem",width:"2.5rem"}),iconBackground:"#287A9F",href:`#/${i==="EN"?"":i.toLowerCase().split("_")[0]}`}),renderMenuItems:L.jsx(mo.MenuItems,{listLabel:s.page_navigation,currentPageId:"",renderHiddenItemsMenuTriggerLabel:l=>`${l} ${s.more}`,children:o.map(l=>L.jsx(mo.Item,{id:l.title,href:`#${l.route}${i==="EN"?"":`/${i.toLowerCase().split("_")[0]}`}`,themeOverride:{activeIndicatorColor:l.color},children:l.brandName},l.title))}),renderActionItems:L.jsxs(mo.ActionItems,{listLabel:s.actions,renderHiddenItemsMenuTriggerLabel:l=>`${l} ${s.more_actions}`,children:[L.jsx(mo.Item,{id:"langSwitcher",showSubmenuChevron:!0,tooltip:s.language,renderIcon:L.jsx(Ch,{}),renderSubmenu:L.jsx(si,{id:"language",rootPageId:"language",children:L.jsx(si.Page,{id:"language",children:dQ.map(l=>L.jsx(si.Option,{id:l.lang,disabled:l.code===i,children:l.code===i?l.local:L.jsx(FW,{className:"lang",to:`./${l.code!=="EN"?l.code.toLowerCase().split("_")[0]:""}`,children:l.local})},l.code))})}),children:s.language}),L.jsx(mo.Item,{id:"info",showSubmenuChevron:!1,tooltip:s.help,renderIcon:L.jsx($h,{}),customPopoverConfig:{on:"click",placement:"bottom end",shouldContainFocus:!0,children:L.jsxs(Oe,{id:"help",as:"div",padding:"medium",width:"25rem",role:"dialog",tabIndex:0,"aria-label":s.contact_info,position:"relative",borderRadius:"small",children:[L.jsx(Yr,{level:"h3",children:s.contact_info}),L.jsx(nn,{children:s.info_overview}),L.jsxs(Oe,{as:"div",margin:"medium 0 0",children:[L.jsx(nn,{weight:"bold",children:s.current_customers}),L.jsx("br",{}),L.jsx(nn,{children:s.contact_csm})]}),L.jsxs(Oe,{as:"div",margin:"medium 0 0",children:[L.jsx(nn,{weight:"bold",children:s.prospects}),L.jsx("br",{}),L.jsx(nn,{children:s.contact_sales}),L.jsx("br",{}),L.jsxs(nn,{children:[s.contact_general," "]})]}),L.jsx(Oe,{as:"hr",shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary"}),L.jsxs(Of,{delimiter:"pipe",size:"small",children:[L.jsx(Of.Item,{children:L.jsx(rr,{href:`#/links${i!=="EN"?`/${i.toLowerCase().split("_")[0]}`:""}`,children:s.redirects})}),L.jsx(Of.Item,{children:L.jsx(rr,{href:`#/releases${i!=="EN"?`/${i.toLowerCase().split("_")[0]}`:""}`,children:s.releases})}),L.jsx(Of.Item,{children:L.jsx(rr,{href:`#/mdui${i!=="EN"?`/${i.toLowerCase().split("_")[0]}`:""}`,children:"MDUI"})}),L.jsx(Of.Item,{children:L.jsx(rr,{href:{EN:"https://www.instructure.com/contact-us",ES_LA:"https://www.instructure.com/es/contact-us",PT_BR:"https://www.instructure.com/pt-br/contato",DE:"https://www.instructure.com/de/contact-us"}[i],children:s.contact})})]})]})},children:s.help})]})})})}),e[3]=s.toggle_menu,e[4]=s.main_menu,e[5]=s.page_navigation,e[6]=s.more,e[7]=s.actions,e[8]=s.more_actions,e[9]=s.language,e[10]=s.help,e[11]=s.contact_info,e[12]=s.info_overview,e[13]=s.current_customers,e[14]=s.contact_csm,e[15]=s.prospects,e[16]=s.contact_sales,e[17]=s.contact_general,e[18]=s.redirects,e[19]=s.releases,e[20]=s.contact,e[21]=i,e[22]=a):a=e[22],a}const Gde={awkward:{EN:"Well, this is awkward.",ES_LA:"Esto es incómodo.",PT_BR:"Isso é constrangedor.",DE:"Das ist peinlich."},not_your_fault:{EN:"I'm not sure what happened, but I'm pretty sure it's not your fault.",ES_LA:"No estoy seguro de qué pasó, pero estoy bastante seguro de que no es tu culpa.",PT_BR:"Não tenho certeza do que aconteceu, mas tenho certeza de que não é sua culpa.",DE:"Ich bin mir nicht sicher, was passiert ist, aber ich bin mir ziemlich sicher, dass es nicht deine Schuld ist."},uhm:{EN:"Uhm...",ES_LA:"Ehm...",PT_BR:"Hã...",DE:"Ähm..."},class_dismissed:{EN:"class dismissed",ES_LA:"clase despedida",PT_BR:"classe dispensada",DE:"Klasse entlassen"}};function gm(){const t=Vo.c(24),e=_h();let n,i;t[0]!==e.language?(i=Xh(e.language),n=Wo(Gde,i),t[0]=e.language,t[1]=n,t[2]=i):(n=t[1],i=t[2]);const r=n,s=LL();console.error(s);let o=r.not_your_fault;s&&(o=` - ${s.status?`${s.status} ${s.statusText}
`:""} - ${s.message?s.message:r.not_your_fault} - `);let a;t[3]!==i?(a=L.jsx(qh,{language:i}),t[3]=i,t[4]=a):a=t[4];let l;t[5]!==o?(l=L.jsx(nn,{as:"p",children:L.jsx("i",{children:o})}),t[5]=o,t[6]=l):l=t[6];let u;t[7]!==r.class_dismissed?(u=L.jsx(rr,{href:"./#/",children:r.class_dismissed}),t[7]=r.class_dismissed,t[8]=u):u=t[8];let c;t[9]!==r.uhm||t[10]!==u?(c=L.jsxs(nn,{as:"p",children:[r.uhm," ",u,"."]}),t[9]=r.uhm,t[10]=u,t[11]=c):c=t[11];let d;t[12]!==l||t[13]!==c?(d=L.jsxs(L.Fragment,{children:[l,c]}),t[12]=l,t[13]=c,t[14]=d):d=t[14];let h;t[15]!==r.awkward||t[16]!==d?(h=L.jsx(Oe,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:L.jsx(UM,{size:"medium",heading:r.awkward,headingAs:"h1",message:d})}),t[15]=r.awkward,t[16]=d,t[17]=h):h=t[17];let f;t[18]!==i?(f=L.jsx(Zh,{language:i}),t[18]=i,t[19]=f):f=t[19];let m;return t[20]!==a||t[21]!==h||t[22]!==f?(m=L.jsxs(L.Fragment,{children:[a,h,f]}),t[20]=a,t[21]=h,t[22]=f,t[23]=m):m=t[23],m}const Kde={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"}},Jde=[{title:"CAIQ",from:"/aws/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CAIQ%20v4.0.2.pdf"},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CE%20Plus%20Certificate.pdf"},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CSA%20Star%20Level%202%20Certificate.pdf"},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf"},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf"},{title:"SOC 3 Report",from:"/aws/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20SOC%203.pdf"}],ehe=Jde.map(t=>({...t,lang:"EN"})),the={brand:"AWS",links:ehe},nhe=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],ihe=nhe.map(t=>({...t,lang:"DE"})),rhe=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/canvas-lms/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf"},{title:"Try Canvas (FFT)",from:"/try-canvas",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],she=rhe.map(t=>({...t,lang:"EN"})),ohe=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],ahe=ohe.map(t=>({...t,lang:"ES_LA"})),lhe=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],uhe=lhe.map(t=>({...t,lang:"PT_BR"})),che={brand:"Canvas",links:[...she,...ahe,...uhe,...ihe]},dhe=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-catalog.zip"},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/2023%20Instructure%20PCI%20DSS%20v3.2.1%20AOC%20SAQ-D%20Service%20Provider.pdf"},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf"},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx"},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf"},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf"},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Catalog%20Payment%20Redirector.png"},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],hhe=dhe.map(t=>({...t,lang:"EN"})),fhe={brand:"Canvas Catalog",links:hhe},phe=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],mhe=phe.map(t=>({...t,lang:"EN"})),ghe={brand:"Canvas Commons",links:mhe},bhe=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials.zip"},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],Ohe=bhe.map(t=>({...t,lang:"EN"})),yhe=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-ES_LA.zip"},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],vhe=yhe.map(t=>({...t,lang:"ES_LA"})),She=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-PT_BR.zip"},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],whe=She.map(t=>({...t,lang:"PT_BR"})),_he={brand:"Canvas Credentials",links:[...Ohe,...vhe,...whe]},khe=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],xhe=khe.map(t=>({...t,lang:"EN"})),Ehe={brand:"Canvas Data",links:xhe},Che=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],The=Che.map(t=>({...t,lang:"DE"})),Ahe=[{title:"Compliance Package",from:"/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms.zip"},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx"},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],Rhe=Ahe.map(t=>({...t,lang:"EN"})),Phe=[{title:"Compliance Package (ES-LA)",from:"/es-la/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/canvas-lms-ES_LA.zip"},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],Ihe=Phe.map(t=>({...t,lang:"ES_LA"})),$he=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms-PT_BR.zip"},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],Dhe=$he.map(t=>({...t,lang:"PT_BR"})),Lhe={brand:"Canvas LMS",links:[...Rhe,...Ihe,...Dhe,...The]},Mhe=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],Nhe=Mhe.map(t=>({...t,lang:"EN"})),Bhe={brand:"Canvas Mobile",links:Nhe},Qhe=[{title:"Compliance Package",from:"/canvas/studio/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-studio.zip"},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx"},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],zhe=Qhe.map(t=>({...t,lang:"EN"})),Hhe={brand:"Canvas Studio",links:zhe},Uhe=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],Fhe=Uhe.map(t=>({...t,lang:"EN"})),Vhe={brand:"Elevate",links:Fhe},Whe=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],jhe=Whe.map(t=>({...t,lang:"EN"})),Xhe={brand:"Elevate Data Quality",links:jhe},Zhe=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],qhe=Zhe.map(t=>({...t,lang:"EN"})),Yhe={brand:"Elevate Data Sync",links:qhe},Ghe=[{title:"Compliance Package",from:"/elevate/k12-analytics/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-k12-analytics.zip"},{title:"Home",from:"/elevate/k12-analytics",to:"https://www.instructure.com/k12/products/elevate/elevate-k12-analytics"},{title:"Release Notes",from:"/elevate/k12-analytics/releases",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics-Releases/tkb-p/v_release"},{title:"Guides",from:"/elevate/k12analytics/guides",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics/ct-p/videri"}],Khe=Ghe.map(t=>({...t,lang:"EN"})),Jhe={brand:"Elevate K-12 Analytics",links:Khe},efe=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-standards-alignment.zip"},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/elevate-standards-alignment/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],tfe=efe.map(t=>({...t,lang:"EN"})),nfe={brand:"Elevate Standards Alignment",links:tfe},ife=[{title:"Compliance Package",from:"/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact.zip"},{title:"Architecture Paper",from:"/impact/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20Architecture.pdf"},{title:"HECVAT Lite",from:"/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],rfe=ife.map(t=>({...t,lang:"EN"})),sfe=[{title:"Compliance Package",from:"/es-la/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-ES_LA.zip",lang:"ES_LA"},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20Architecture_ES.pdf"},{title:"HECVAT Lite",from:"/es-la/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],ofe=sfe.map(t=>({...t,lang:"ES_LA"})),afe=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-PT_BR.zip",lang:"PT_BR"},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20Architecture_PT.pdf"},{title:"HECVAT Lite",from:"/pt-br/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],lfe=afe.map(t=>({...t,lang:"PT_BR"})),ufe={brand:"Impact",links:[...rfe,...ofe,...lfe]},cfe=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Kontakt",from:"/kontakt",to:"https://www.instructure.com/de/contact-us"}],dfe=cfe.map(t=>({...t,lang:"DE"})),hfe=[{title:"Security White Paper",from:"/security/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Security%20Overview.pdf"},{title:"Business Continuity White Paper",from:"/bc/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf"},{title:"CAIQ",from:"/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"CSA Star Certificate",from:"/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf"},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf"},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Inc%20COI.pdf"},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Global%20COI.pdf"},{title:"ISO 27001 Certificate",from:"/iso/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf"},{title:"Quality Assurance Program",from:"/qa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Quality%20Assurance%20Program.pdf"},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],ffe=hfe.map(t=>({...t,lang:"EN"})),pfe=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],mfe=pfe.map(t=>({...t,lang:"ES_LA"})),gfe=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],bfe=gfe.map(t=>({...t,lang:"PT_BR"})),Ofe={brand:"Instructure",links:[...ffe,...mfe,...bfe,...dfe]},yfe=[{title:"Compliance Package",from:"/learnplatform/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/learnplatform.zip"},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/EdTech%20Top%2040.pdf"},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf"},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],vfe=yfe.map(t=>({...t,lang:"EN"})),Sfe={brand:"Learnplatform",links:vfe},wfe=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],_fe=wfe.map(t=>({...t,lang:"EN"})),kfe={brand:"Mastery",links:_fe},xfe=[{title:"Compliance Package",from:"/mastery/connect/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/mastery-connect.zip"},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf"},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],Efe=xfe.map(t=>({...t,lang:"EN"})),Cfe={brand:"Mastery Connect",links:Efe},Tfe=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],Afe=Tfe.map(t=>({...t,lang:"EN"})),Rfe={brand:"Mastery Item Bank",links:Afe},Pfe=[{title:"Formatives Home",from:"mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],Ife=Pfe.map(t=>({...t,lang:"EN"})),$fe={brand:"Mastery View Assessments",links:Ife},Dfe=[],Lfe=Dfe.map(t=>({...t,lang:"EN"})),Mfe={brand:"Parchment",links:Lfe},R_=[the,Ofe,che,Lhe,Bhe,Hhe,fhe,ghe,Ehe,kfe,Cfe,Rfe,$fe,_he,Sfe,Mfe,Vhe,Jhe,nfe,Xhe,Yhe,ufe];function o5(){const t=Vo.c(103),e=_h();let n,i;t[0]!==e.language?(i=Xh(e.language),n=Wo(Kde,i),t[0]=e.language,t[1]=n,t[2]=i):(n=t[1],i=t[2]);const r=n;let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=Qi.url.replace("https://",""),t[3]=s):s=t[3];const o=s;let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a={search:""},t[4]=a):a=t[4];const[l,u]=T.useState(a);let c;t[5]!==i?(c={codes:i},t[5]=i,t[6]=c):c=t[6];const[d,h]=T.useState(c),[f,m]=T.useState("all");let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b={list:Av},t[7]=b):b=t[7];const[y,O]=T.useState(b),[v,S]=T.useState("all");let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_={list:er},t[8]=_):_=t[8];const[k,x]=T.useState(_);let w;t[9]!==i?(w=R_.map(Re=>({...Re,links:Re.links.filter(vt=>vt.lang.toUpperCase()===i)})),t[9]=i,t[10]=w):w=t[10];let M;t[11]!==w?(M={list:w},t[11]=w,t[12]=M):M=t[12];const[H,I]=T.useState(M);let z;t[13]!==r.toggleShow?(z={expanded:!1,text:r.toggleShow},t[13]=r.toggleShow,t[14]=z):z=t[14];const[U,X]=T.useState(z);let J,re,Z,ne,ee,fe;if(t[15]!==d.codes||t[16]!==y.list||t[17]!==v||t[18]!==l.search||t[19]!==k.list||t[20]!==U.expanded||t[21]!==r.toggleShow||t[22]!==r.toggleHide||t[23]!==r.clearSearch){re=(ge,B)=>{u({search:B}),Re(d.codes,B,y.list,v)},fe=(ge,B)=>{const W=[];B==="all"?(W.push(...A_),ee(ge,"all")):W.push(...A_.filter(le=>le.toUpperCase().includes(B.toUpperCase()))),h({codes:W}),Re(W,l.search,y.list,v)},ee=(ge,B)=>{S(B),Re(d.codes,l.search,y.list,B)},ne=(ge,B)=>{const W=[];B==="all"?W.push(...Av):W.push(...["AWS",...Av].filter(le=>le.toLowerCase().includes(B.toLowerCase()))),m(B),O({list:W}),ee(ge,"all"),x({list:W}),Re(d.codes,l.search,W,"all")};const Re=(ge,B,W,le)=>{const ke=R_.map(Te=>({...Te,links:Te.links.filter(we=>`${`${Te.brand} ${we.title}`}`.toLowerCase().includes(B.toLowerCase())).filter(we=>ge.includes(we.lang.toUpperCase()))})).filter(Te=>Te.links.length>0).filter(Te=>W.includes(Te.brand)).filter(Te=>le!=="all"?Te.brand===k.list[0]||Te.brand===le:!0);I({list:ke})};let vt;t[30]!==U.expanded||t[31]!==r.toggleShow||t[32]!==r.toggleHide?(vt=()=>{const ge=U.expanded?r.toggleShow:r.toggleHide;X({expanded:!U.expanded,text:ge})},t[30]=U.expanded,t[31]=r.toggleShow,t[32]=r.toggleHide,t[33]=vt):vt=t[33],J=vt,Z=ge=>{if(l.search.length)return L.jsx(Ub,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:r.clearSearch,onClick:bn,children:L.jsx(Lh,{})})};const bn=ge=>{ge.stopPropagation(),re(ge,"")};t[15]=d.codes,t[16]=y.list,t[17]=v,t[18]=l.search,t[19]=k.list,t[20]=U.expanded,t[21]=r.toggleShow,t[22]=r.toggleHide,t[23]=r.clearSearch,t[24]=J,t[25]=re,t[26]=Z,t[27]=ne,t[28]=ee,t[29]=fe}else J=t[24],re=t[25],Z=t[26],ne=t[27],ee=t[28],fe=t[29];let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P=async function(vt){try{await navigator.clipboard.writeText(vt)}catch(bn){console.error(bn.message)}},t[34]=P):P=t[34];const Ae=P;let _e;t[35]!==i?(_e=L.jsx(qh,{language:i}),t[35]=i,t[36]=_e):_e=t[36];let $;t[37]!==r.header?($=L.jsx(Yr,{level:"h1",children:r.header}),t[37]=r.header,t[38]=$):$=t[38];let $e;t[39]!==r.description?($e=L.jsx(nn,{as:"p",children:r.description}),t[39]=r.description,t[40]=$e):$e=t[40];let Fe;t[41]!==J||t[42]!==U.text?(Fe=L.jsx(bx,{onClick:J,children:U.text}),t[41]=J,t[42]=U.text,t[43]=Fe):Fe=t[43];let Xe;t[44]===Symbol.for("react.memo_cache_sentinel")?(Xe=L.jsx(ac,{inline:!1}),t[44]=Xe):Xe=t[44];let Mt;t[45]!==r.search||t[46]!==r.placeholder||t[47]!==re||t[48]!==Z||t[49]!==l.search?(Mt=L.jsx(vx,{type:"search",renderLabel:r.search,placeholder:r.placeholder,onChange:re,renderBeforeInput:Xe,renderAfterInput:Z,value:l.search}),t[45]=r.search,t[46]=r.placeholder,t[47]=re,t[48]=Z,t[49]=l.search,t[50]=Mt):Mt=t[50];let on;t[51]===Symbol.for("react.memo_cache_sentinel")?(on=L.jsx(lu,{value:"all",label:"All",context:"off"},"all"),t[51]=on):on=t[51];let qn;t[52]===Symbol.for("react.memo_cache_sentinel")?(qn=["AWS",...er].map(Re=>L.jsx(lu,{value:Re,label:Re,context:"off"},Re)),t[52]=qn):qn=t[52];let kn;t[53]!==r.brands||t[54]!==ne?(kn=L.jsxs(Vy,{name:"brand",description:r.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:ne,children:[on,qn]}),t[53]=r.brands,t[54]=ne,t[55]=kn):kn=t[55];let ci;t[56]!==f||t[57]!==k||t[58]!==ee||t[59]!==v||t[60]!==r?(ci=f!=="all"&&k.list.length>1&&L.jsxs(Vy,{name:"product",description:r.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:ee,children:[L.jsx(lu,{value:"all",label:"All",context:"off",id:"allProducts",checked:v==="all"},"all"),k.list.filter(Re=>Re!==f).map(Re=>L.jsx(lu,{value:Re,label:Re,context:"off"},Re))]}),t[56]=f,t[57]=k,t[58]=ee,t[59]=v,t[60]=r,t[61]=ci):ci=t[61];let Rt;t[62]===Symbol.for("react.memo_cache_sentinel")?(Rt=L.jsx(lu,{value:"all",label:"All",context:"off"},"all"),t[62]=Rt):Rt=t[62];let di;t[63]===Symbol.for("react.memo_cache_sentinel")?(di=dQ.map(Re=>L.jsx(lu,{value:Re.code,label:Re.local,context:"off"},Re.code)),t[63]=di):di=t[63];let $n;t[64]!==r.language||t[65]!==i||t[66]!==fe?($n=L.jsxs(Vy,{name:"language",description:r.language,defaultValue:i,layout:"columns",variant:"toggle",onChange:fe,children:[Rt,di]}),t[64]=r.language,t[65]=i,t[66]=fe,t[67]=$n):$n=t[67];let Fi;t[68]!==Mt||t[69]!==kn||t[70]!==ci||t[71]!==$n?(Fi=L.jsx(Oe,{as:"div",margin:"large none none",children:L.jsx("form",{name:"searchFilters",autoComplete:"off",children:L.jsxs(fw,{label:"",description:"",layout:"stacked",children:[Mt,kn,ci,$n]})})}),t[68]=Mt,t[69]=kn,t[70]=ci,t[71]=$n,t[72]=Fi):Fi=t[72];let Jt;t[73]!==r.filters||t[74]!==J||t[75]!==U.expanded||t[76]!==Fi?(Jt=L.jsx(Y7,{id:"toggleFilters",summary:r.filters,onToggle:J,expanded:U.expanded,children:Fi}),t[73]=r.filters,t[74]=J,t[75]=U.expanded,t[76]=Fi,t[77]=Jt):Jt=t[77];let Dn;t[78]!==$||t[79]!==$e||t[80]!==Fe||t[81]!==Jt?(Dn=L.jsxs(Oe,{as:"div",margin:"none none x-large",children:[$,$e,Fe,Jt]}),t[78]=$,t[79]=$e,t[80]=Fe,t[81]=Jt,t[82]=Dn):Dn=t[82];let Ci;if(t[83]!==r.title||t[84]!==r.link||t[85]!==r.copy||t[86]!==r.copy_url||t[87]!==H.list){let Re;t[89]!==r.title||t[90]!==r.link||t[91]!==r.copy||t[92]!==r.copy_url?(Re=vt=>{if(vt.links.length){const bn=vt.brand;return L.jsxs(Oe,{as:"div",margin:"none none xx-large",children:[L.jsx(Yr,{level:er.includes(bn)?"h2":"h3",id:bn,children:bn}),L.jsxs(Kn,{hover:!0,caption:bn,children:[L.jsx(Kn.Head,{children:L.jsxs(Kn.Row,{children:[L.jsx(Kn.ColHeader,{id:"Title",width:"25%",children:r.title}),L.jsx(Kn.ColHeader,{id:"URLs",children:r.link})]})}),L.jsx(Kn.Body,{children:vt.links.map(ge=>L.jsxs(Kn.Row,{children:[L.jsx(Kn.Cell,{children:L.jsx(nn,{children:ge.title})}),L.jsxs(Kn.Cell,{children:[L.jsx(rr,{href:`https://${o}${ge.from}`,children:`${o}${ge.from}`}),"  ",L.jsx(BM,{renderTip:r.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:L.jsx(Ub,{withBackground:!1,withBorder:!1,screenReaderLabel:r.copy_url,onClick:()=>{Ae(`https://${o}${ge.from}`)},children:L.jsx(Eh,{})})}),L.jsx("br",{}),L.jsx(nn,{size:"small",color:"secondary",children:ge.to.split("?")[0]})]})]},ge.title))})]})]},bn)}return null},t[89]=r.title,t[90]=r.link,t[91]=r.copy,t[92]=r.copy_url,t[93]=Re):Re=t[93],Ci=H.list.map(Re),t[83]=r.title,t[84]=r.link,t[85]=r.copy,t[86]=r.copy_url,t[87]=H.list,t[88]=Ci}else Ci=t[88];let Vi;t[94]!==Dn||t[95]!==Ci?(Vi=L.jsxs(Oe,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[Dn,Ci]}),t[94]=Dn,t[95]=Ci,t[96]=Vi):Vi=t[96];let Ti;t[97]!==i?(Ti=L.jsx(Zh,{language:i}),t[97]=i,t[98]=Ti):Ti=t[98];let Qr;return t[99]!==_e||t[100]!==Vi||t[101]!==Ti?(Qr=L.jsxs(L.Fragment,{children:[_e,Vi,Ti]}),t[99]=_e,t[100]=Vi,t[101]=Ti,t[102]=Qr):Qr=t[102],Qr}function a5(t){const e=[],n=String(t||"");let i=n.indexOf(","),r=0,s=!1;for(;!s;){i===-1&&(i=n.length,s=!0);const o=n.slice(r,i).trim();(o||!s)&&e.push(o),r=i+1,i=n.indexOf(",",r)}return e}function fQ(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Nfe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bfe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qfe={};function l5(t,e){return(Qfe.jsx?Bfe:Nfe).test(t)}const zfe=/[ \t\n\f\r]/g;function Hfe(t){return typeof t=="object"?t.type==="text"?u5(t.value):!1:u5(t)}function u5(t){return t.replace(zfe,"")===""}class Um{constructor(e,n,i){this.property=e,this.normal=n,i&&(this.space=i)}}Um.prototype.property={};Um.prototype.normal={};Um.prototype.space=null;function pQ(t,e){const n={},i={};let r=-1;for(;++r4&&n.slice(0,4)==="data"&&jfe.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(d5,qfe);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!d5.test(s)){let o=s.replace(Xfe,Zfe);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}r=x2}return new r(i,e)}function Zfe(t){return"-"+t.toLowerCase()}function qfe(t){return t.charAt(1).toUpperCase()}const Yfe={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"},Fm=pQ([bQ,gQ,vQ,SQ,Vfe],"html"),tl=pQ([bQ,gQ,vQ,SQ,Wfe],"svg");function h5(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function wQ(t){return t.join(" ").trim()}var _Q={},f5=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Gfe=/\n/g,Kfe=/^\s*/,Jfe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,epe=/^:\s*/,tpe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,npe=/^[;\s]*/,ipe=/^\s+|\s+$/g,rpe=` -`,p5="/",m5="*",hu="",spe="comment",ope="declaration",ape=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,i=1;function r(m){var b=m.match(Gfe);b&&(n+=b.length);var y=m.lastIndexOf(rpe);i=~y?m.length-y:i+m.length}function s(){var m={line:n,column:i};return function(b){return b.position=new o(m),u(),b}}function o(m){this.start=m,this.end={line:n,column:i},this.source=e.source}o.prototype.content=t;function a(m){var b=new Error(e.source+":"+n+":"+i+": "+m);if(b.reason=m,b.filename=e.source,b.line=n,b.column=i,b.source=t,!e.silent)throw b}function l(m){var b=m.exec(t);if(b){var y=b[0];return r(y),t=t.slice(y.length),b}}function u(){l(Kfe)}function c(m){var b;for(m=m||[];b=d();)b!==!1&&m.push(b);return m}function d(){var m=s();if(!(p5!=t.charAt(0)||m5!=t.charAt(1))){for(var b=2;hu!=t.charAt(b)&&(m5!=t.charAt(b)||p5!=t.charAt(b+1));)++b;if(b+=2,hu===t.charAt(b-1))return a("End of comment missing");var y=t.slice(2,b-2);return i+=2,r(y),t=t.slice(b),i+=2,m({type:spe,comment:y})}}function h(){var m=s(),b=l(Jfe);if(b){if(d(),!l(epe))return a("property missing ':'");var y=l(tpe),O=m({type:ope,property:g5(b[0].replace(f5,hu)),value:y?g5(y[0].replace(f5,hu)):hu});return l(npe),O}}function f(){var m=[];c(m);for(var b;b=h();)b!==!1&&(m.push(b),c(m));return m}return u(),f()};function g5(t){return t?t.replace(ipe,hu):hu}var lpe=qv&&qv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_Q,"__esModule",{value:!0});var upe=lpe(ape);function cpe(t,e){var n=null;if(!t||typeof t!="string")return n;var i=(0,upe.default)(t),r=typeof e=="function";return i.forEach(function(s){if(s.type==="declaration"){var o=s.property,a=s.value;r?e(o,a,s):a&&(n=n||{},n[o]=a)}}),n}var b5=_Q.default=cpe;const dpe=b5.default||b5,$1=kQ("end"),to=kQ("start");function kQ(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function hpe(t){const e=to(t),n=$1(t);if(e&&n)return{start:e,end:n}}function Op(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?O5(t.position):"start"in t||"end"in t?O5(t):"line"in t||"column"in t?I_(t):""}function I_(t){return y5(t&&t.line)+":"+y5(t&&t.column)}function O5(t){return I_(t&&t.start)+"-"+I_(t&&t.end)}function y5(t){return t&&typeof t=="number"?t:1}class li extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?r=e:!s.cause&&e&&(o=!0,r=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?s.ruleId=i:(s.source=i.slice(0,l),s.ruleId=i.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=Op(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}li.prototype.file="";li.prototype.name="";li.prototype.reason="";li.prototype.message="";li.prototype.stack="";li.prototype.column=void 0;li.prototype.line=void 0;li.prototype.ancestors=void 0;li.prototype.cause=void 0;li.prototype.fatal=void 0;li.prototype.place=void 0;li.prototype.ruleId=void 0;li.prototype.source=void 0;const E2={}.hasOwnProperty,fpe=new Map,ppe=/[A-Z]/g,mpe=/-([a-z])/g,gpe=new Set(["table","tbody","thead","tfoot","tr"]),bpe=new Set(["td","th"]),xQ="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ope(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Epe(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=xpe(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?tl:Fm,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=EQ(r,t,void 0);return s&&typeof s!="string"?s:r.create(t,r.Fragment,{children:s||void 0},void 0)}function EQ(t,e,n){if(e.type==="element")return ype(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return vpe(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return wpe(t,e,n);if(e.type==="mdxjsEsm")return Spe(t,e);if(e.type==="root")return _pe(t,e,n);if(e.type==="text")return kpe(t,e)}function ype(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=tl,t.schema=r),t.ancestors.push(e);const s=TQ(t,e.tagName,!1),o=Cpe(t,e);let a=T2(t,e);return gpe.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Hfe(l):!0})),CQ(t,o,s,e),C2(o,a),t.ancestors.pop(),t.schema=i,t.create(e,s,o,n)}function vpe(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Om(t,e.position)}function Spe(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Om(t,e.position)}function wpe(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=tl,t.schema=r),t.ancestors.push(e);const s=e.name===null?t.Fragment:TQ(t,e.name,!0),o=Tpe(t,e),a=T2(t,e);return CQ(t,o,s,e),C2(o,a),t.ancestors.pop(),t.schema=i,t.create(e,s,o,n)}function _pe(t,e,n){const i={};return C2(i,T2(t,e)),t.create(e,t.Fragment,i,n)}function kpe(t,e){return e.value}function CQ(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function C2(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function xpe(t,e,n){return i;function i(r,s,o,a){const u=Array.isArray(o.children)?n:e;return a?u(s,o,a):u(s,o)}}function Epe(t,e){return n;function n(i,r,s,o){const a=Array.isArray(s.children),l=to(i);return e(r,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Cpe(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&E2.call(e.properties,r)){const s=Ape(t,r,e.properties[r]);if(s){const[o,a]=s;t.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bpe.has(e.tagName)?i=a:n[o]=a}}if(i){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function Tpe(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const s=i.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else Om(t,e.position);else{const r=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,s=t.evaluater.evaluateExpression(a.expression)}else Om(t,e.position);else s=i.value===null?!0:i.value;n[r]=s}return n}function T2(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:fpe;for(;++ir?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s0?(Ir(t,t.length,0,e),t):e}const w5={}.hasOwnProperty;function RQ(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function os(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Oi=nl(/[A-Za-z]/),ri=nl(/[\dA-Za-z]/),Qpe=nl(/[#-'*+\--9=?A-Z^-~]/);function wO(t){return t!==null&&(t<32||t===127)}const $_=nl(/\d/),zpe=nl(/[\dA-Fa-f]/),Hpe=nl(/[!-/:-@[-`{-~]/);function Ee(t){return t!==null&&t<-2}function xt(t){return t!==null&&(t<0||t===32)}function Ge(t){return t===-2||t===-1||t===32}const D1=nl(new RegExp("\\p{P}|\\p{S}","u")),Xu=nl(/\s/);function nl(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Gh(t){const e=[];let n=-1,i=0,r=0;for(;++n55295&&s<57344){const a=t.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),r=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(i,n),encodeURIComponent(o)),i=n+r+1,o=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function rt(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Ge(l)?(t.enter(n),a(l)):e(l)}function a(l){return Ge(l)&&s++o))return;const w=e.events.length;let M=w,H,I;for(;M--;)if(e.events[M][0]==="exit"&&e.events[M][1].type==="chunkFlow"){if(H){I=e.events[M][1].end;break}H=!0}for(O(i),x=w;xS;){const k=n[_];e.containerState=k[1],k[0].exit.call(e,t)}n.length=S}function v(){r.write([null]),s=void 0,r=void 0,e.containerState._closeFlow=void 0}}function jpe(t,e,n){return rt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _O(t){if(t===null||xt(t)||Xu(t))return 1;if(D1(t))return 2}function L1(t,e,n){const i=[];let r=-1;for(;++r1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);k5(d,-l),k5(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},s={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},o.start),t[n][1].start=Object.assign({},a.end),u=[],t[i][1].end.offset-t[i][1].start.offset&&(u=_r(u,[["enter",t[i][1],e],["exit",t[i][1],e]])),u=_r(u,[["enter",r,e],["enter",o,e],["exit",o,e],["enter",s,e]]),u=_r(u,L1(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),u=_r(u,[["exit",s,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=_r(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,Ir(t,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&Ge(x)?rt(t,v,"linePrefix",s+1)(x):v(x)}function v(x){return x===null||Ee(x)?t.check(x5,b,_)(x):(t.enter("codeFlowValue"),S(x))}function S(x){return x===null||Ee(x)?(t.exit("codeFlowValue"),v(x)):(t.consume(x),S)}function _(x){return t.exit("codeFenced"),e(x)}function k(x,w,M){let H=0;return I;function I(re){return x.enter("lineEnding"),x.consume(re),x.exit("lineEnding"),z}function z(re){return x.enter("codeFencedFence"),Ge(re)?rt(x,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):U(re)}function U(re){return re===a?(x.enter("codeFencedFenceSequence"),X(re)):M(re)}function X(re){return re===a?(H++,x.consume(re),X):H>=o?(x.exit("codeFencedFenceSequence"),Ge(re)?rt(x,J,"whitespace")(re):J(re)):M(re)}function J(re){return re===null||Ee(re)?(x.exit("codeFencedFence"),w(re)):M(re)}}}function rme(t,e,n){const i=this;return r;function r(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return i.parser.lazy[i.now().line]?n(o):e(o)}}const Iv={name:"codeIndented",tokenize:ome},sme={tokenize:ame,partial:!0};function ome(t,e,n){const i=this;return r;function r(u){return t.enter("codeIndented"),rt(t,s,"linePrefix",5)(u)}function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):Ee(u)?t.attempt(sme,o,l)(u):(t.enter("codeFlowValue"),a(u))}function a(u){return u===null||Ee(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),a)}function l(u){return t.exit("codeIndented"),e(u)}}function ame(t,e,n){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?n(o):Ee(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r):rt(t,s,"linePrefix",5)(o)}function s(o){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):Ee(o)?r(o):n(o)}}const lme={name:"codeText",tokenize:dme,resolve:ume,previous:cme};function ume(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i=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 ethis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Af(this.left,i),s.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),Af(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Af(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(o):t.interrupt(i.parser.constructs.flow,n,e)(o)}}function MQ(t,e,n,i,r,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(O){return O===60?(t.enter(i),t.enter(r),t.enter(s),t.consume(O),t.exit(s),h):O===null||O===32||O===41||wO(O)?n(O):(t.enter(i),t.enter(o),t.enter(a),t.enter("chunkString",{contentType:"string"}),b(O))}function h(O){return O===62?(t.enter(s),t.consume(O),t.exit(s),t.exit(r),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(O))}function f(O){return O===62?(t.exit("chunkString"),t.exit(a),h(O)):O===null||O===60||Ee(O)?n(O):(t.consume(O),O===92?m:f)}function m(O){return O===60||O===62||O===92?(t.consume(O),f):f(O)}function b(O){return!c&&(O===null||O===41||xt(O))?(t.exit("chunkString"),t.exit(a),t.exit(o),t.exit(i),e(O)):c999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(t.exit(s),t.enter(r),t.consume(f),t.exit(r),t.exit(i),e):Ee(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Ee(f)||a++>999?(t.exit("chunkString"),c(f)):(t.consume(f),l||(l=!Ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function BQ(t,e,n,i,r,s){let o;return a;function a(h){return h===34||h===39||h===40?(t.enter(i),t.enter(r),t.consume(h),t.exit(r),o=h===40?41:h,l):n(h)}function l(h){return h===o?(t.enter(r),t.consume(h),t.exit(r),t.exit(i),e):(t.enter(s),u(h))}function u(h){return h===o?(t.exit(s),l(o)):h===null?n(h):Ee(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),rt(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||Ee(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?d:c)}function d(h){return h===o||h===92?(t.consume(h),c):c(h)}}function yp(t,e){let n;return i;function i(r){return Ee(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):Ge(r)?rt(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const yme={name:"definition",tokenize:Sme},vme={tokenize:wme,partial:!0};function Sme(t,e,n){const i=this;let r;return s;function s(f){return t.enter("definition"),o(f)}function o(f){return NQ.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return r=os(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):n(f)}function l(f){return xt(f)?yp(t,u)(f):u(f)}function u(f){return MQ(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return t.attempt(vme,d,d)(f)}function d(f){return Ge(f)?rt(t,h,"whitespace")(f):h(f)}function h(f){return f===null||Ee(f)?(t.exit("definition"),i.parser.defined.push(r),e(f)):n(f)}}function wme(t,e,n){return i;function i(a){return xt(a)?yp(t,r)(a):n(a)}function r(a){return BQ(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Ge(a)?rt(t,o,"whitespace")(a):o(a)}function o(a){return a===null||Ee(a)?e(a):n(a)}}const _me={name:"hardBreakEscape",tokenize:kme};function kme(t,e,n){return i;function i(s){return t.enter("hardBreakEscape"),t.consume(s),r}function r(s){return Ee(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const xme={name:"headingAtx",tokenize:Cme,resolve:Eme};function Eme(t,e){let n=t.length-2,i=3,r,s;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},s={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},Ir(t,i,n-i+1,[["enter",r,e],["enter",s,e],["exit",s,e],["exit",r,e]])),t}function Cme(t,e,n){let i=0;return r;function r(c){return t.enter("atxHeading"),s(c)}function s(c){return t.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&i++<6?(t.consume(c),o):c===null||xt(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||Ee(c)?(t.exit("atxHeading"),e(c)):Ge(c)?rt(t,a,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||xt(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),u)}}const Tme=["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"],C5=["pre","script","style","textarea"],Ame={name:"htmlFlow",tokenize:$me,resolveTo:Ime,concrete:!0},Rme={tokenize:Lme,partial:!0},Pme={tokenize:Dme,partial:!0};function Ime(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function $me(t,e,n){const i=this;let r,s,o,a,l;return u;function u($){return c($)}function c($){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume($),d}function d($){return $===33?(t.consume($),h):$===47?(t.consume($),s=!0,b):$===63?(t.consume($),r=3,i.interrupt?e:P):Oi($)?(t.consume($),o=String.fromCharCode($),y):n($)}function h($){return $===45?(t.consume($),r=2,f):$===91?(t.consume($),r=5,a=0,m):Oi($)?(t.consume($),r=4,i.interrupt?e:P):n($)}function f($){return $===45?(t.consume($),i.interrupt?e:P):n($)}function m($){const $e="CDATA[";return $===$e.charCodeAt(a++)?(t.consume($),a===$e.length?i.interrupt?e:U:m):n($)}function b($){return Oi($)?(t.consume($),o=String.fromCharCode($),y):n($)}function y($){if($===null||$===47||$===62||xt($)){const $e=$===47,Fe=o.toLowerCase();return!$e&&!s&&C5.includes(Fe)?(r=1,i.interrupt?e($):U($)):Tme.includes(o.toLowerCase())?(r=6,$e?(t.consume($),O):i.interrupt?e($):U($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n($):s?v($):S($))}return $===45||ri($)?(t.consume($),o+=String.fromCharCode($),y):n($)}function O($){return $===62?(t.consume($),i.interrupt?e:U):n($)}function v($){return Ge($)?(t.consume($),v):I($)}function S($){return $===47?(t.consume($),I):$===58||$===95||Oi($)?(t.consume($),_):Ge($)?(t.consume($),S):I($)}function _($){return $===45||$===46||$===58||$===95||ri($)?(t.consume($),_):k($)}function k($){return $===61?(t.consume($),x):Ge($)?(t.consume($),k):S($)}function x($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(t.consume($),l=$,w):Ge($)?(t.consume($),x):M($)}function w($){return $===l?(t.consume($),l=null,H):$===null||Ee($)?n($):(t.consume($),w)}function M($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||xt($)?k($):(t.consume($),M)}function H($){return $===47||$===62||Ge($)?S($):n($)}function I($){return $===62?(t.consume($),z):n($)}function z($){return $===null||Ee($)?U($):Ge($)?(t.consume($),z):n($)}function U($){return $===45&&r===2?(t.consume($),Z):$===60&&r===1?(t.consume($),ne):$===62&&r===4?(t.consume($),Ae):$===63&&r===3?(t.consume($),P):$===93&&r===5?(t.consume($),fe):Ee($)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(Rme,_e,X)($)):$===null||Ee($)?(t.exit("htmlFlowData"),X($)):(t.consume($),U)}function X($){return t.check(Pme,J,_e)($)}function J($){return t.enter("lineEnding"),t.consume($),t.exit("lineEnding"),re}function re($){return $===null||Ee($)?X($):(t.enter("htmlFlowData"),U($))}function Z($){return $===45?(t.consume($),P):U($)}function ne($){return $===47?(t.consume($),o="",ee):U($)}function ee($){if($===62){const $e=o.toLowerCase();return C5.includes($e)?(t.consume($),Ae):U($)}return Oi($)&&o.length<8?(t.consume($),o+=String.fromCharCode($),ee):U($)}function fe($){return $===93?(t.consume($),P):U($)}function P($){return $===62?(t.consume($),Ae):$===45&&r===2?(t.consume($),P):U($)}function Ae($){return $===null||Ee($)?(t.exit("htmlFlowData"),_e($)):(t.consume($),Ae)}function _e($){return t.exit("htmlFlow"),e($)}}function Dme(t,e,n){const i=this;return r;function r(o){return Ee(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return i.parser.lazy[i.now().line]?n(o):e(o)}}function Lme(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(Vm,e,n)}}const Mme={name:"htmlText",tokenize:Nme};function Nme(t,e,n){const i=this;let r,s,o;return a;function a(P){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(P),l}function l(P){return P===33?(t.consume(P),u):P===47?(t.consume(P),k):P===63?(t.consume(P),S):Oi(P)?(t.consume(P),M):n(P)}function u(P){return P===45?(t.consume(P),c):P===91?(t.consume(P),s=0,m):Oi(P)?(t.consume(P),v):n(P)}function c(P){return P===45?(t.consume(P),f):n(P)}function d(P){return P===null?n(P):P===45?(t.consume(P),h):Ee(P)?(o=d,ne(P)):(t.consume(P),d)}function h(P){return P===45?(t.consume(P),f):d(P)}function f(P){return P===62?Z(P):P===45?h(P):d(P)}function m(P){const Ae="CDATA[";return P===Ae.charCodeAt(s++)?(t.consume(P),s===Ae.length?b:m):n(P)}function b(P){return P===null?n(P):P===93?(t.consume(P),y):Ee(P)?(o=b,ne(P)):(t.consume(P),b)}function y(P){return P===93?(t.consume(P),O):b(P)}function O(P){return P===62?Z(P):P===93?(t.consume(P),O):b(P)}function v(P){return P===null||P===62?Z(P):Ee(P)?(o=v,ne(P)):(t.consume(P),v)}function S(P){return P===null?n(P):P===63?(t.consume(P),_):Ee(P)?(o=S,ne(P)):(t.consume(P),S)}function _(P){return P===62?Z(P):S(P)}function k(P){return Oi(P)?(t.consume(P),x):n(P)}function x(P){return P===45||ri(P)?(t.consume(P),x):w(P)}function w(P){return Ee(P)?(o=w,ne(P)):Ge(P)?(t.consume(P),w):Z(P)}function M(P){return P===45||ri(P)?(t.consume(P),M):P===47||P===62||xt(P)?H(P):n(P)}function H(P){return P===47?(t.consume(P),Z):P===58||P===95||Oi(P)?(t.consume(P),I):Ee(P)?(o=H,ne(P)):Ge(P)?(t.consume(P),H):Z(P)}function I(P){return P===45||P===46||P===58||P===95||ri(P)?(t.consume(P),I):z(P)}function z(P){return P===61?(t.consume(P),U):Ee(P)?(o=z,ne(P)):Ge(P)?(t.consume(P),z):H(P)}function U(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(t.consume(P),r=P,X):Ee(P)?(o=U,ne(P)):Ge(P)?(t.consume(P),U):(t.consume(P),J)}function X(P){return P===r?(t.consume(P),r=void 0,re):P===null?n(P):Ee(P)?(o=X,ne(P)):(t.consume(P),X)}function J(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||xt(P)?H(P):(t.consume(P),J)}function re(P){return P===47||P===62||xt(P)?H(P):n(P)}function Z(P){return P===62?(t.consume(P),t.exit("htmlTextData"),t.exit("htmlText"),e):n(P)}function ne(P){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),ee}function ee(P){return Ge(P)?rt(t,fe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):fe(P)}function fe(P){return t.enter("htmlTextData"),o(P)}}const P2={name:"labelEnd",tokenize:Fme,resolveTo:Ume,resolveAll:Hme},Bme={tokenize:Vme},Qme={tokenize:Wme},zme={tokenize:jme};function Hme(t){let e=-1;for(;++e=3&&(u===null||Ee(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===r?(t.consume(u),i++,l):(t.exit("thematicBreakSequence"),Ge(u)?rt(t,a,"whitespace")(u):a(u))}}const Ri={name:"list",tokenize:tge,continuation:{tokenize:nge},exit:rge},Jme={tokenize:sge,partial:!0},ege={tokenize:ige,partial:!0};function tge(t,e,n){const i=this,r=i.events[i.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return a;function a(f){const m=i.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!i.containerState.marker||f===i.containerState.marker:$_(f)){if(i.containerState.type||(i.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(nb,n,u)(f):u(f);if(!i.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return n(f)}function l(f){return $_(f)&&++o<10?(t.consume(f),l):(!i.interrupt||o<2)&&(i.containerState.marker?f===i.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),u(f)):n(f)}function u(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||f,t.check(Vm,i.interrupt?n:c,t.attempt(Jme,h,d))}function c(f){return i.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return Ge(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return i.containerState.size=s+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function nge(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(Vm,r,s);function r(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,rt(t,e,"listItemIndent",i.containerState.size+1)(a)}function s(a){return i.containerState.furtherBlankLines||!Ge(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(ege,e,o)(a))}function o(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,rt(t,t.attempt(Ri,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ige(t,e,n){const i=this;return rt(t,r,"listItemIndent",i.containerState.size+1);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?e(s):n(s)}}function rge(t){t.exit(this.containerState.type)}function sge(t,e,n){const i=this;return rt(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(s){const o=i.events[i.events.length-1];return!Ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const T5={name:"setextUnderline",tokenize:age,resolveTo:oge};function oge(t,e){let n=t.length,i,r,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",s?(t.splice(r,0,["enter",o,e]),t.splice(s+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[s][1].end)):t[i][1]=o,t.push(["exit",o,e]),t}function age(t,e,n){const i=this;let r;return s;function s(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter("setextHeadingLine"),r=u,o(u)):n(u)}function o(u){return t.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===r?(t.consume(u),a):(t.exit("setextHeadingLineSequence"),Ge(u)?rt(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ee(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const lge={tokenize:uge};function uge(t){const e=this,n=t.attempt(Vm,i,t.attempt(this.parser.constructs.flowInitial,r,rt(t,t.attempt(this.parser.constructs.flow,r,t.attempt(pme,r)),"linePrefix")));return n;function i(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const cge={resolveAll:zQ()},dge=QQ("string"),hge=QQ("text");function QQ(t){return{tokenize:e,resolveAll:zQ(t==="text"?fge:void 0)};function e(n){const i=this,r=this.parser.constructs[t],s=n.attempt(r,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=r[c];let h=-1;if(d)for(;++h-1){const a=o[0];typeof a=="string"?o[0]=a.slice(i):o.shift()}s>0&&o.push(t[r].slice(0,s))}return o}function gge(t,e){let n=-1;const i=[];let r;for(;++n0){const we=le.tokenStack[le.tokenStack.length-1];(we[1]||R5).call(le,void 0,we[0])}for(W.position={start:ua(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:ua(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},Te=-1;++Te1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function Fge(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Vge(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function FQ(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function Wge(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return FQ(t,e);const r={src:Gh(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,s),t.applyData(e,s)}function jge(t,e){const n={src:Gh(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function Xge(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function Zge(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return FQ(t,e);const r={href:Gh(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function qge(t,e){const n={href:Gh(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function Yge(t,e,n){const i=t.all(e),r=n?Gge(n):VQ(e),s={},o=[];if(typeof e.checked=="boolean"){const c=i[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a1}function Kge(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=to(e.children[1]),l=$1(e.children[e.children.length-1]);a&&l&&(o.position={start:a,end:l}),r.push(o)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function i0e(t,e,n){const i=n?n.children:void 0,s=(i?i.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return s.push($5(e.slice(r),r>0,!1)),s.join("")}function $5(t,e,n){let i=0,r=t.length;if(e){let s=t.codePointAt(i);for(;s===P5||s===I5;)i++,s=t.codePointAt(i)}if(n){let s=t.codePointAt(r-1);for(;s===P5||s===I5;)r--,s=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function o0e(t,e){const n={type:"text",value:s0e(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function a0e(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const l0e={blockquote:Nge,break:Bge,code:Qge,delete:zge,emphasis:Hge,footnoteReference:Uge,heading:Fge,html:Vge,imageReference:Wge,image:jge,inlineCode:Xge,linkReference:Zge,link:qge,listItem:Yge,list:Kge,paragraph:Jge,root:e0e,strong:t0e,table:n0e,tableCell:r0e,tableRow:i0e,text:o0e,thematicBreak:a0e,toml:m0,yaml:m0,definition:m0,footnoteDefinition:m0};function m0(){}const WQ=-1,M1=0,kO=1,xO=2,I2=3,$2=4,D2=5,L2=6,jQ=7,XQ=8,D5=typeof self=="object"?self:globalThis,u0e=(t,e)=>{const n=(r,s)=>(t.set(s,r),r),i=r=>{if(t.has(r))return t.get(r);const[s,o]=e[r];switch(s){case M1:case WQ:return n(o,r);case kO:{const a=n([],r);for(const l of o)a.push(i(l));return a}case xO:{const a=n({},r);for(const[l,u]of o)a[i(l)]=i(u);return a}case I2:return n(new Date(o),r);case $2:{const{source:a,flags:l}=o;return n(new RegExp(a,l),r)}case D2:{const a=n(new Map,r);for(const[l,u]of o)a.set(i(l),i(u));return a}case L2:{const a=n(new Set,r);for(const l of o)a.add(i(l));return a}case jQ:{const{name:a,message:l}=o;return n(new D5[a](l),r)}case XQ:return n(BigInt(o),r);case"BigInt":return n(Object(BigInt(o)),r)}return n(new D5[s](o),r)};return i},L5=t=>u0e(new Map,t)(0),qc="",{toString:c0e}={},{keys:d0e}=Object,Rf=t=>{const e=typeof t;if(e!=="object"||!t)return[M1,e];const n=c0e.call(t).slice(8,-1);switch(n){case"Array":return[kO,qc];case"Object":return[xO,qc];case"Date":return[I2,qc];case"RegExp":return[$2,qc];case"Map":return[D2,qc];case"Set":return[L2,qc]}return n.includes("Array")?[kO,n]:n.includes("Error")?[jQ,n]:[xO,n]},g0=([t,e])=>t===M1&&(e==="function"||e==="symbol"),h0e=(t,e,n,i)=>{const r=(o,a)=>{const l=i.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=Rf(o);switch(a){case M1:{let c=o;switch(l){case"bigint":a=XQ,c=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return r([WQ],o)}return r([a,c],o)}case kO:{if(l)return r([l,[...o]],o);const c=[],d=r([a,c],o);for(const h of o)c.push(s(h));return d}case xO:{if(l)switch(l){case"BigInt":return r([l,o.toString()],o);case"Boolean":case"Number":case"String":return r([l,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const c=[],d=r([a,c],o);for(const h of d0e(o))(t||!g0(Rf(o[h])))&&c.push([s(h),s(o[h])]);return d}case I2:return r([a,o.toISOString()],o);case $2:{const{source:c,flags:d}=o;return r([a,{source:c,flags:d}],o)}case D2:{const c=[],d=r([a,c],o);for(const[h,f]of o)(t||!(g0(Rf(h))||g0(Rf(f))))&&c.push([s(h),s(f)]);return d}case L2:{const c=[],d=r([a,c],o);for(const h of o)(t||!g0(Rf(h)))&&c.push(s(h));return d}}const{message:u}=o;return r([a,{name:l,message:u}],o)};return s},M5=(t,{json:e,lossy:n}={})=>{const i=[];return h0e(!(e||n),!!e,new Map,i)(t),i},fh=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?L5(M5(t,e)):structuredClone(t):(t,e)=>L5(M5(t,e));function f0e(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function p0e(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function m0e(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||f0e,i=t.options.footnoteBackLabel||p0e,r=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,f);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,f),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const v=y.children[y.children.length-1];v&&v.type==="text"?v.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const O={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:t.wrap(c,!0)};t.patch(u,O),a.push(O)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...fh(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:` -`}]}}const N1=function(t){if(t==null)return y0e;if(typeof t=="function")return B1(t);if(typeof t=="object")return Array.isArray(t)?g0e(t):b0e(t);if(typeof t=="string")return O0e(t);throw new Error("Expected function, string, or object as test")};function g0e(t){const e=[];let n=-1;for(;++n":""))+")"})}return h;function h(){let f=ZQ,m,b,y;if((!e||s(l,u,c[c.length-1]||void 0))&&(f=_0e(n(l,c)),f[0]===L_))return f;if("children"in l&&l.children){const O=l;if(O.children&&f[0]!==w0e)for(b=(i?O.children.length:-1)+o,y=c.concat(O);b>-1&&b0&&n.push({type:"text",value:` -`}),n}function N5(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function B5(t,e){const n=x0e(t,e),i=n.one(t,void 0),r=m0e(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:` -`},r),s}function R0e(t,e){return t&&"run"in t?async function(n,i){const r=B5(n,{file:i,...e});await t.run(r,i)}:function(n,i){return B5(n,{file:i,...e||t})}}function Q5(t){if(t)throw t}var ib=Object.prototype.hasOwnProperty,YQ=Object.prototype.toString,z5=Object.defineProperty,H5=Object.getOwnPropertyDescriptor,U5=function(e){return typeof Array.isArray=="function"?Array.isArray(e):YQ.call(e)==="[object Array]"},F5=function(e){if(!e||YQ.call(e)!=="[object Object]")return!1;var n=ib.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&ib.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var r;for(r in e);return typeof r>"u"||ib.call(e,r)},V5=function(e,n){z5&&n.name==="__proto__"?z5(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},W5=function(e,n){if(n==="__proto__")if(ib.call(e,n)){if(H5)return H5(e,n).value}else return;return e[n]},P0e=function t(){var e,n,i,r,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});lo.length;let l;a&&o.push(r);try{l=t.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return r(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,r):l instanceof Error?r(l):s(l))}function r(o,...a){n||(n=!0,e(o,...a))}function s(o){r(null,o)}}const Es={basename:D0e,dirname:L0e,extname:M0e,join:N0e,sep:"/"};function D0e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Wm(t);let n=0,i=-1,r=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let o=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else o<0&&(s=!0,o=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(i=r):(a=-1,i=o));return n===i?i=o:i<0&&(i=t.length),t.slice(n,i)}function L0e(t){if(Wm(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function M0e(t){Wm(t);let e=t.length,n=-1,i=0,r=-1,s=0,o;for(;e--;){const a=t.codePointAt(e);if(a===47){if(o){i=e+1;break}continue}n<0&&(o=!0,n=e+1),a===46?r<0?r=e:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function N0e(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Q0e(t,e){let n="",i=0,r=-1,s=0,o=-1,a,l;for(;++o<=t.length;){if(o2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),r=o,s=0;continue}}else if(n.length>0){n="",i=0,r=o,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,o):n=t.slice(r+1,o),i=o-r-1;r=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Wm(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const z0e={cwd:H0e};function H0e(){return"/"}function B_(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function U0e(t){if(typeof t=="string")t=new URL(t);else if(!B_(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return F0e(t)}function F0e(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n0){let[f,...m]=c;const b=i[h][1];N_(b)&&N_(f)&&(f=Dv(!0,b,f)),i[h]=[u,f,...m]}}}}const X0e=new M2().freeze();function Bv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Qv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function zv(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function X5(t){if(!N_(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Z5(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function b0(t){return Z0e(t)?t:new GQ(t)}function Z0e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function q0e(t){return typeof t=="string"||Y0e(t)}function Y0e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const G0e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",q5=[],Y5={allowDangerousHtml:!0},K0e=/^(https?|ircs?|mailto|xmpp)$/i,J0e=[{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 z1(t){const e=t.allowedElements,n=t.allowElement,i=t.children||"",r=t.className,s=t.components,o=t.disallowedElements,a=t.rehypePlugins||q5,l=t.remarkPlugins||q5,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Y5}:Y5,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||ebe,f=X0e().use(Mge).use(l).use(R0e,u).use(a),m=new GQ;typeof i=="string"&&(m.value=i);for(const v of J0e)Object.hasOwn(t,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+G0e+v.id,void 0);const b=f.parse(m);let y=f.runSync(b,m);return r&&(y={type:"element",tagName:"div",properties:{className:r},children:y.type==="root"?y.children:[y]}),Q1(y,O),Ope(y,{Fragment:L.Fragment,components:s,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function O(v,S,_){if(v.type==="raw"&&_&&typeof S=="number")return c?_.children.splice(S,1):_.children[S]={type:"text",value:v.value},S;if(v.type==="element"){let k;for(k in Pv)if(Object.hasOwn(Pv,k)&&Object.hasOwn(v.properties,k)){const x=v.properties[k],w=Pv[k];(w===null||w.includes(v.tagName))&&(v.properties[k]=h(String(x||""),k,v))}}if(v.type==="element"){let k=e?!e.includes(v.tagName):o?o.includes(v.tagName):!1;if(!k&&n&&typeof S=="number"&&(k=!n(v,S,_)),k&&_&&typeof S=="number")return d&&v.children?_.children.splice(S,1,...v.children):_.children.splice(S,1),S}}}function ebe(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e<0||r>-1&&e>r||n>-1&&e>n||i>-1&&e>i||K0e.test(t.slice(0,e))?t:""}const G5=/[#.]/g;function tbe(t,e){const n=t||"",i={};let r=0,s,o;for(;r-1&&ss)return{line:o+1,column:s-(o>0?n[o-1]:0)+1,offset:s}}}function r(s){const o=s&&s.line,a=s&&s.column;if(typeof o=="number"&&typeof a=="number"&&!Number.isNaN(o)&&!Number.isNaN(a)&&o-1 in n){const l=(n[o-2]||0)+a-1||0;if(l>-1&&l=55296&&t<=57343}function Cbe(t){return t>=56320&&t<=57343}function Tbe(t,e){return(t-55296)*1024+9216+e}function rz(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function sz(t){return t>=64976&&t<=65007||Ebe.has(t)}var j;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(j=j||(j={}));const Abe=65536;class Rbe{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=Abe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:n,col:i,offset:r}=this;return{code:e,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Cbe(n))return this.pos++,this._addGap(),Tbe(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(j.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,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const i=this.html.charCodeAt(n);return i===E.CARRIAGE_RETURN?E.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,iz(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){rz(e)?this._err(j.controlCharacterInInputStream):sz(e)&&this._err(j.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const ha=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(t=>t.charCodeAt(0))),Pbe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Uv;const Ibe=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]]),$be=(Uv=String.fromCodePoint)!==null&&Uv!==void 0?Uv:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Dbe(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Ibe.get(t))!==null&&e!==void 0?e:t}var An;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(An||(An={}));const Lbe=32;var Ns;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Ns||(Ns={}));function H_(t){return t>=An.ZERO&&t<=An.NINE}function Mbe(t){return t>=An.UPPER_A&&t<=An.UPPER_F||t>=An.LOWER_A&&t<=An.LOWER_F}function Nbe(t){return t>=An.UPPER_A&&t<=An.UPPER_Z||t>=An.LOWER_A&&t<=An.LOWER_Z||H_(t)}function Bbe(t){return t===An.EQUALS||Nbe(t)}var En;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(En||(En={}));var fu;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(fu||(fu={}));class Qbe{constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i,this.state=En.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=fu.Strict}startEntity(e){this.decodeMode=e,this.state=En.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case En.EntityStart:return e.charCodeAt(n)===An.NUM?(this.state=En.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=En.NamedEntity,this.stateNamedEntity(e,n));case En.NumericStart:return this.stateNumericStart(e,n);case En.NumericDecimal:return this.stateNumericDecimal(e,n);case En.NumericHex:return this.stateNumericHex(e,n);case En.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|Lbe)===An.LOWER_X?(this.state=En.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=En.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,i,r){if(n!==i){const s=i-n;this.result=this.result*Math.pow(r,s)+parseInt(e.substr(n,s),r),this.consumed+=s}}stateNumericHex(e,n){const i=n;for(;n>14;for(;n>14,s!==0){if(o===An.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==fu.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:i}=this,r=(i[n]&Ns.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~Ns.VALUE_LENGTH:r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){var e;switch(this.state){case En.NamedEntity:return this.result!==0&&(this.decodeMode!==fu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case En.NumericDecimal:return this.emitNumericEntity(0,2);case En.NumericHex:return this.emitNumericEntity(0,3);case En.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case En.EntityStart:return 0}}}function az(t){let e="";const n=new Qbe(t,i=>e+=$be(i));return function(r,s){let o=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(o,a),n.startEntity(s);const u=n.write(r,a+1);if(u<0){o=a+n.end();break}o=a+u,a=u===0?o+1:o}const l=e+r.slice(o);return e="",l}}function lz(t,e,n,i){const r=(e&Ns.BRANCH_LENGTH)>>7,s=e&Ns.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){const l=i-s;return l<0||l>=r?-1:t[n+l]-1}let o=n,a=o+r-1;for(;o<=a;){const l=o+a>>>1,u=t[l];if(ui)a=l-1;else return t[l+r]}return-1}az(ha);az(Pbe);var q;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(q=q||(q={}));var za;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(za=za||(za={}));var tr;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(tr=tr||(tr={}));var Q;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(Q=Q||(Q={}));var g;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(g=g||(g={}));const zbe=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function Jh(t){var e;return(e=zbe.get(t))!==null&&e!==void 0?e:g.UNKNOWN}const te=g,Hbe={[q.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[q.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[q.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[q.XLINK]:new Set,[q.XML]:new Set,[q.XMLNS]:new Set};function uz(t){return t===te.H1||t===te.H2||t===te.H3||t===te.H4||t===te.H5||t===te.H6}Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;const Ube=new Map([[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 A;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(A||(A={}));const rn={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function vp(t){return t>=E.DIGIT_0&&t<=E.DIGIT_9}function Xf(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_Z}function Fbe(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_Z}function fa(t){return Fbe(t)||Xf(t)}function U_(t){return fa(t)||vp(t)}function cz(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_F}function dz(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_F}function Vbe(t){return vp(t)||cz(t)||dz(t)}function O0(t){return t+32}function hz(t){return t===E.SPACE||t===E.LINE_FEED||t===E.TABULATION||t===E.FORM_FEED}function Wbe(t){return t===E.EQUALS_SIGN||U_(t)}function t6(t){return hz(t)||t===E.SOLIDUS||t===E.GREATER_THAN_SIGN}class jbe{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=A.DATA,this.returnState=A.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Rbe(n),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(e))}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||e==null||e())}write(e,n,i){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,n){this.state=e,this._callState(n)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n0&&this._err(j.endTagWithAttributes),e.selfClosing&&this._err(j.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 Ze.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ze.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ze.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}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:Ze.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=n;return}this._createCharacterToken(e,n)}_emitCodePoint(e){const n=hz(e)?Ze.WHITESPACE_CHARACTER:e===E.NULL?Ze.NULL_CHARACTER:Ze.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ze.CHARACTER,e)}_matchNamedCharacterReference(e){let n=null,i=0,r=!1;for(let s=0,o=ha[0];s>=0&&(s=lz(ha,o,s+1,e),!(s<0));e=this._consume()){i+=1,o=ha[s];const a=o&Ns.VALUE_LENGTH;if(a){const l=(a>>14)-1;if(e!==E.SEMICOLON&&this._isCharacterReferenceInAttribute()&&Wbe(this.preprocessor.peek(1))?(n=[E.AMPERSAND],s+=l):(n=l===0?[ha[s]&~Ns.VALUE_LENGTH]:l===1?[ha[++s]]:[ha[++s],ha[++s]],i=0,r=e!==E.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(i),r&&!this.preprocessor.endOfChunkHit&&this._err(j.missingSemicolonAfterCharacterReference),this._unconsume(1),n}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case A.DATA:{this._stateData(e);break}case A.RCDATA:{this._stateRcdata(e);break}case A.RAWTEXT:{this._stateRawtext(e);break}case A.SCRIPT_DATA:{this._stateScriptData(e);break}case A.PLAINTEXT:{this._statePlaintext(e);break}case A.TAG_OPEN:{this._stateTagOpen(e);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case A.TAG_NAME:{this._stateTagName(e);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case A.BOGUS_COMMENT:{this._stateBogusComment(e);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case A.COMMENT_START:{this._stateCommentStart(e);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case A.COMMENT:{this._stateComment(e);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case A.COMMENT_END:{this._stateCommentEnd(e);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case A.DOCTYPE:{this._stateDoctype(e);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case A.CDATA_SECTION:{this._stateCdataSection(e);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case A.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case A.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case A.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case A.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case A.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case A.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case E.AMPERSAND:{this.returnState=A.DATA,this.state=A.CHARACTER_REFERENCE;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitCodePoint(e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:{this.returnState=A.RCDATA,this.state=A.CHARACTER_REFERENCE;break}case E.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Bt);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Bt);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Bt);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:{this._err(j.unexpectedNullCharacter),this._emitChars(Bt);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(fa(e))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(j.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(e);break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(j.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(fa(e))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:{this._err(j.missingEndTagName),this.state=A.DATA;break}case E.EOF:{this._err(j.eofBeforeTagName),this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:fa(e)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){fa(e)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case E.NULL:{this._err(j.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case E.EOF:{this._err(j.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Ai.SCRIPT,!1)&&t6(this.preprocessor.peek(Ai.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n1114111)this._err(j.characterReferenceOutsideUnicodeRange),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(iz(this.charRefCode))this._err(j.surrogateCharacterReference),this.charRefCode=E.REPLACEMENT_CHARACTER;else if(sz(this.charRefCode))this._err(j.noncharacterCharacterReference);else if(rz(this.charRefCode)||this.charRefCode===E.CARRIAGE_RETURN){this._err(j.controlCharacterReference);const n=Ube.get(this.charRefCode);n!==void 0&&(this.charRefCode=n)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const fz=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),n6=new Set([...fz,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),y0=new Map([[g.APPLET,q.HTML],[g.CAPTION,q.HTML],[g.HTML,q.HTML],[g.MARQUEE,q.HTML],[g.OBJECT,q.HTML],[g.TABLE,q.HTML],[g.TD,q.HTML],[g.TEMPLATE,q.HTML],[g.TH,q.HTML],[g.ANNOTATION_XML,q.MATHML],[g.MI,q.MATHML],[g.MN,q.MATHML],[g.MO,q.MATHML],[g.MS,q.MATHML],[g.MTEXT,q.MATHML],[g.DESC,q.SVG],[g.FOREIGN_OBJECT,q.SVG],[g.TITLE,q.SVG]]),Xbe=[g.H1,g.H2,g.H3,g.H4,g.H5,g.H6],Zbe=[g.TR,g.TEMPLATE,g.HTML],qbe=[g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML],Ybe=[g.TABLE,g.TEMPLATE,g.HTML],Gbe=[g.TD,g.TH];class Kbe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const i=this._indexOf(e);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(e,n,i){const r=this._indexOf(e)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==q.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(e.includes(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(e,n){const i=this._indexOfTagNames(e,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Ybe,q.HTML)}clearBackToTableBodyContext(){this.clearBackTo(qbe,q.HTML)}clearBackToTableRowContext(){this.clearBackTo(Zbe,q.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if(y0.get(i)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e],i=this.treeAdapter.getNamespaceURI(this.items[e]);if(uz(n)&&i===q.HTML)return!0;if(y0.get(n)===i)return!1}return!0}hasInListItemScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if((i===g.UL||i===g.OL)&&r===q.HTML||y0.get(i)===r)return!1}return!0}hasInButtonScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===q.HTML)return!0;if(i===g.BUTTON&&r===q.HTML||y0.get(i)===r)return!1}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML){if(i===e)return!0;if(i===g.TABLE||i===g.TEMPLATE||i===g.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===q.HTML){if(n===g.TBODY||n===g.THEAD||n===g.TFOOT)return!0;if(n===g.TABLE||n===g.HTML)return!1}}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===q.HTML){if(i===e)return!0;if(i!==g.OPTION&&i!==g.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;fz.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;n6.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&n6.has(this.currentTagId);)this.pop()}}const Fv=3;var Kr;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Kr=Kr||(Kr={}));const i6={type:Kr.Marker};class Jbe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const i=[],r=n.length,s=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[o.name,o.value]));let s=0;for(let o=0;or.get(l.name)===l.value)&&(s+=1,s>=Fv&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(i6)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Kr.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Kr.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(i6);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const n=this.entries.find(i=>i.type===Kr.Marker||this.treeAdapter.getTagName(i.element)===e);return n&&n.type===Kr.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Kr.Element&&n.element===e)}}function r6(t){return{nodeName:"#text",value:t,parentNode:null}}const rd={createDocument(){return{nodeName:"#document",mode:tr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const i=t.childNodes.indexOf(n);t.childNodes.splice(i,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,i){const r=t.childNodes.find(s=>s.nodeName==="#documentType");if(r)r.name=e,r.publicId=n,r.systemId=i;else{const s={nodeName:"#documentType",name:e,publicId:n,systemId:i,parentNode:null};rd.appendChild(t,s)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(rd.isTextNode(n)){n.value+=e;return}}rd.appendChild(t,r6(e))},insertTextBefore(t,e,n){const i=t.childNodes[t.childNodes.indexOf(n)-1];i&&rd.isTextNode(i)?i.value+=e:rd.insertBefore(t,r6(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(i=>i.name));for(let i=0;it.startsWith(n))}function sOe(t){return t.name===pz&&t.publicId===null&&(t.systemId===null||t.systemId===eOe)}function oOe(t){if(t.name!==pz)return tr.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===tOe)return tr.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),iOe.has(n))return tr.QUIRKS;let i=e===null?nOe:mz;if(s6(n,i))return tr.QUIRKS;if(i=e===null?gz:rOe,s6(n,i))return tr.LIMITED_QUIRKS}return tr.NO_QUIRKS}const o6={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aOe="definitionurl",lOe="definitionURL",uOe=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(t=>[t.toLowerCase(),t])),cOe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:q.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:q.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:q.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:q.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:q.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:q.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:q.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:q.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:q.XML}],["xml:space",{prefix:"xml",name:"space",namespace:q.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:q.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:q.XMLNS}]]),dOe=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(t=>[t.toLowerCase(),t])),hOe=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function fOe(t){const e=t.tagID;return e===g.FONT&&t.attrs.some(({name:i})=>i===za.COLOR||i===za.SIZE||i===za.FACE)||hOe.has(e)}function bz(t){for(let e=0;e0&&this._setContextModes(e,n)}onItemPop(e,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,e,this.openElements.current),n){let s,o;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,o=this.fragmentContextID):{current:s,currentTagId:o}=this.openElements,this._setContextModes(s,o)}}_setContextModes(e,n){const i=e===this.document||this.treeAdapter.getNamespaceURI(e)===q.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,q.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=rn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==q.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=rn.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=rn.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=rn.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=rn.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",i=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),e.location){const o=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));o&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,e)}}_appendElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location)}_insertElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID)}_insertFakeElement(e,n){const i=this.treeAdapter.createElement(e,q.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,q.HTML,e.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Q.HTML,q.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,g.HTML)}_appendCommentNode(e,n){const i=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_insertCharacters(e){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,e.chars,i):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(n),s=i?r.lastIndexOf(i):r.length,o=r[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:l,endCol:u,endOffset:c}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,n){for(let i=this.treeAdapter.getFirstChild(e);i;i=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(e),s=n.type===Ze.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,e.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===q.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===g.MGLYPH||e.tagID===g.MALIGNMARK)&&!this._isIntegrationPoint(i,n,q.HTML)}_processToken(e){switch(e.type){case Ze.CHARACTER:{this.onCharacter(e);break}case Ze.NULL_CHARACTER:{this.onNullCharacter(e);break}case Ze.COMMENT:{this.onComment(e);break}case Ze.DOCTYPE:{this.onDoctype(e);break}case Ze.START_TAG:{this._processStartTag(e);break}case Ze.END_TAG:{this.onEndTag(e);break}case Ze.EOF:{this.onEof(e);break}case Ze.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,i){const r=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return bOe(e,r,s,i)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===Kr.Marker||this.openElements.contains(r.element)),i=n<0?e-1:n-1;for(let r=i;r>=0;r--){const s=this.activeFormattingElements.entries[r];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case g.TR:{this.insertionMode=D.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=D.IN_TABLE;return}case g.BODY:{this.insertionMode=D.IN_BODY;return}case g.FRAMESET:{this.insertionMode=D.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(e);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?D.AFTER_HEAD:D.BEFORE_HEAD;return}case g.TD:case g.TH:{if(e>0){this.insertionMode=D.IN_CELL;return}break}case g.HEAD:{if(e>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===g.TEMPLATE)break;if(i===g.TABLE){this.insertionMode=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(e){return yz.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===q.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const i=this.treeAdapter.getNamespaceURI(e);return Hbe[i].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G1e(this,e);return}switch(this.insertionMode){case D.INITIAL:{Pf(this,e);break}case D.BEFORE_HTML:{Sp(this,e);break}case D.BEFORE_HEAD:{wp(this,e);break}case D.IN_HEAD:{_p(this,e);break}case D.IN_HEAD_NO_SCRIPT:{kp(this,e);break}case D.AFTER_HEAD:{xp(this,e);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{Sz(this,e);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Vv(this,e);break}case D.IN_TABLE_TEXT:{Cz(this,e);break}case D.IN_COLUMN_GROUP:{EO(this,e);break}case D.AFTER_BODY:{CO(this,e);break}case D.AFTER_AFTER_BODY:{sb(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Y1e(this,e);return}switch(this.insertionMode){case D.INITIAL:{Pf(this,e);break}case D.BEFORE_HTML:{Sp(this,e);break}case D.BEFORE_HEAD:{wp(this,e);break}case D.IN_HEAD:{_p(this,e);break}case D.IN_HEAD_NO_SCRIPT:{kp(this,e);break}case D.AFTER_HEAD:{xp(this,e);break}case D.TEXT:{this._insertCharacters(e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Vv(this,e);break}case D.IN_COLUMN_GROUP:{EO(this,e);break}case D.AFTER_BODY:{CO(this,e);break}case D.AFTER_AFTER_BODY:{sb(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){F_(this,e);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{F_(this,e);break}case D.IN_TABLE_TEXT:{If(this,e);break}case D.AFTER_BODY:{TOe(this,e);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{AOe(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{ROe(this,e);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(e,j.misplacedDoctype);break}case D.IN_TABLE_TEXT:{If(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,j.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?K1e(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case D.INITIAL:{Pf(this,e);break}case D.BEFORE_HTML:{POe(this,e);break}case D.BEFORE_HEAD:{$Oe(this,e);break}case D.IN_HEAD:{bs(this,e);break}case D.IN_HEAD_NO_SCRIPT:{MOe(this,e);break}case D.AFTER_HEAD:{BOe(this,e);break}case D.IN_BODY:{ui(this,e);break}case D.IN_TABLE:{ph(this,e);break}case D.IN_TABLE_TEXT:{If(this,e);break}case D.IN_CAPTION:{D1e(this,e);break}case D.IN_COLUMN_GROUP:{U2(this,e);break}case D.IN_TABLE_BODY:{F1(this,e);break}case D.IN_ROW:{V1(this,e);break}case D.IN_CELL:{N1e(this,e);break}case D.IN_SELECT:{Rz(this,e);break}case D.IN_SELECT_IN_TABLE:{Q1e(this,e);break}case D.IN_TEMPLATE:{H1e(this,e);break}case D.AFTER_BODY:{F1e(this,e);break}case D.IN_FRAMESET:{V1e(this,e);break}case D.AFTER_FRAMESET:{j1e(this,e);break}case D.AFTER_AFTER_BODY:{Z1e(this,e);break}case D.AFTER_AFTER_FRAMESET:{q1e(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?J1e(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case D.INITIAL:{Pf(this,e);break}case D.BEFORE_HTML:{IOe(this,e);break}case D.BEFORE_HEAD:{DOe(this,e);break}case D.IN_HEAD:{LOe(this,e);break}case D.IN_HEAD_NO_SCRIPT:{NOe(this,e);break}case D.AFTER_HEAD:{QOe(this,e);break}case D.IN_BODY:{U1(this,e);break}case D.TEXT:{k1e(this,e);break}case D.IN_TABLE:{ym(this,e);break}case D.IN_TABLE_TEXT:{If(this,e);break}case D.IN_CAPTION:{L1e(this,e);break}case D.IN_COLUMN_GROUP:{M1e(this,e);break}case D.IN_TABLE_BODY:{V_(this,e);break}case D.IN_ROW:{Az(this,e);break}case D.IN_CELL:{B1e(this,e);break}case D.IN_SELECT:{Pz(this,e);break}case D.IN_SELECT_IN_TABLE:{z1e(this,e);break}case D.IN_TEMPLATE:{U1e(this,e);break}case D.AFTER_BODY:{$z(this,e);break}case D.IN_FRAMESET:{W1e(this,e);break}case D.AFTER_FRAMESET:{X1e(this,e);break}case D.AFTER_AFTER_BODY:{sb(this,e);break}}}onEof(e){switch(this.insertionMode){case D.INITIAL:{Pf(this,e);break}case D.BEFORE_HTML:{Sp(this,e);break}case D.BEFORE_HEAD:{wp(this,e);break}case D.IN_HEAD:{_p(this,e);break}case D.IN_HEAD_NO_SCRIPT:{kp(this,e);break}case D.AFTER_HEAD:{xp(this,e);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{xz(this,e);break}case D.TEXT:{x1e(this,e);break}case D.IN_TABLE_TEXT:{If(this,e);break}case D.IN_TEMPLATE:{Iz(this,e);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{H2(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(e);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{vz(this,e);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{Vv(this,e);break}case D.IN_TABLE_TEXT:{Ez(this,e);break}}}}function wOe(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):kz(t,e),n}function _Oe(t,e){let n=null,i=t.openElements.stackTop;for(;i>=0;i--){const r=t.openElements.items[i];if(r===e.element)break;t._isSpecialElement(r,t.openElements.tagIDs[i])&&(n=r)}return n||(t.openElements.shortenToLength(i<0?0:i),t.activeFormattingElements.removeEntry(e)),n}function kOe(t,e,n){let i=e,r=t.openElements.getCommonAncestor(e);for(let s=0,o=r;o!==n;s++,o=r){r=t.openElements.getCommonAncestor(o);const a=t.activeFormattingElements.getElementEntry(o),l=a&&s>=vOe;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(o)):(o=xOe(t,a),i===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(i),t.treeAdapter.appendChild(o,i),i=o)}return i}function xOe(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),i=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,i),e.element=i,i}function EOe(t,e,n){const i=t.treeAdapter.getTagName(e),r=Jh(i);if(t._isElementCausesFosterParenting(r))t._fosterParentElement(n);else{const s=t.treeAdapter.getNamespaceURI(e);r===g.TEMPLATE&&s===q.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function COe(t,e,n){const i=t.treeAdapter.getNamespaceURI(n.element),{token:r}=n,s=t.treeAdapter.createElement(r.tagName,i,r.attrs);t._adoptNodes(e,s),t.treeAdapter.appendChild(e,s),t.activeFormattingElements.insertElementAfterBookmark(s,r),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,s,r.tagID)}function z2(t,e){for(let n=0;n=n;i--)t._setEndLocation(t.openElements.items[i],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const i=t.openElements.items[0],r=t.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(t._setEndLocation(i,e),t.openElements.stackTop>=1)){const s=t.openElements.items[1],o=t.treeAdapter.getNodeSourceCodeLocation(s);o&&!o.endTag&&t._setEndLocation(s,e)}}}}function ROe(t,e){t._setDocumentType(e);const n=e.forceQuirks?tr.QUIRKS:oOe(e);sOe(e)||t._err(e,j.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=D.BEFORE_HTML}function Pf(t,e){t._err(e,j.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,tr.QUIRKS),t.insertionMode=D.BEFORE_HTML,t._processToken(e)}function POe(t,e){e.tagID===g.HTML?(t._insertElement(e,q.HTML),t.insertionMode=D.BEFORE_HEAD):Sp(t,e)}function IOe(t,e){const n=e.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Sp(t,e)}function Sp(t,e){t._insertFakeRootElement(),t.insertionMode=D.BEFORE_HEAD,t._processToken(e)}function $Oe(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.HEAD:{t._insertElement(e,q.HTML),t.headElement=t.openElements.current,t.insertionMode=D.IN_HEAD;break}default:wp(t,e)}}function DOe(t,e){const n=e.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?wp(t,e):t._err(e,j.endTagWithoutMatchingOpenElement)}function wp(t,e){t._insertFakeElement(Q.HEAD,g.HEAD),t.headElement=t.openElements.current,t.insertionMode=D.IN_HEAD,t._processToken(e)}function bs(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case g.TITLE:{t._switchToTextParsing(e,rn.RCDATA);break}case g.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,rn.RAWTEXT):(t._insertElement(e,q.HTML),t.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{t._switchToTextParsing(e,rn.RAWTEXT);break}case g.SCRIPT:{t._switchToTextParsing(e,rn.SCRIPT_DATA);break}case g.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=D.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:_p(t,e)}}function LOe(t,e){switch(e.tagID){case g.HEAD:{t.openElements.pop(),t.insertionMode=D.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{_p(t,e);break}case g.TEMPLATE:{bc(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function bc(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==g.TEMPLATE&&t._err(e,j.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,j.endTagWithoutMatchingOpenElement)}function _p(t,e){t.openElements.pop(),t.insertionMode=D.AFTER_HEAD,t._processToken(e)}function MOe(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{bs(t,e);break}case g.NOSCRIPT:{t._err(e,j.nestedNoscriptInHead);break}default:kp(t,e)}}function NOe(t,e){switch(e.tagID){case g.NOSCRIPT:{t.openElements.pop(),t.insertionMode=D.IN_HEAD;break}case g.BR:{kp(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function kp(t,e){const n=e.type===Ze.EOF?j.openElementsLeftAfterEof:j.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=D.IN_HEAD,t._processToken(e)}function BOe(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.BODY:{t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=D.IN_BODY;break}case g.FRAMESET:{t._insertElement(e,q.HTML),t.insertionMode=D.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{t._err(e,j.abandonedHeadElementChild),t.openElements.push(t.headElement,g.HEAD),bs(t,e),t.openElements.remove(t.headElement);break}case g.HEAD:{t._err(e,j.misplacedStartTagForHeadElement);break}default:xp(t,e)}}function QOe(t,e){switch(e.tagID){case g.BODY:case g.HTML:case g.BR:{xp(t,e);break}case g.TEMPLATE:{bc(t,e);break}default:t._err(e,j.endTagWithoutMatchingOpenElement)}}function xp(t,e){t._insertFakeElement(Q.BODY,g.BODY),t.insertionMode=D.IN_BODY,H1(t,e)}function H1(t,e){switch(e.type){case Ze.CHARACTER:{Sz(t,e);break}case Ze.WHITESPACE_CHARACTER:{vz(t,e);break}case Ze.COMMENT:{F_(t,e);break}case Ze.START_TAG:{ui(t,e);break}case Ze.END_TAG:{U1(t,e);break}case Ze.EOF:{xz(t,e);break}}}function vz(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function Sz(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function zOe(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function HOe(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function UOe(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_FRAMESET)}function FOe(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function VOe(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),uz(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,q.HTML)}function WOe(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function jOe(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),n||(t.formElement=t.openElements.current))}function XOe(t,e){t.framesetOk=!1;const n=e.tagID;for(let i=t.openElements.stackTop;i>=0;i--){const r=t.openElements.tagIDs[i];if(n===g.LI&&r===g.LI||(n===g.DD||n===g.DT)&&(r===g.DD||r===g.DT)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r);break}if(r!==g.ADDRESS&&r!==g.DIV&&r!==g.P&&t._isSpecialElement(t.openElements.items[i],r))break}t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML)}function ZOe(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.tokenizer.state=rn.PLAINTEXT}function qOe(t,e){t.openElements.hasInScope(g.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1}function YOe(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(z2(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function GOe(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function KOe(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(g.NOBR)&&(z2(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,q.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function JOe(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function e1e(t,e){t.treeAdapter.getDocumentMode(t.document)!==tr.QUIRKS&&t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=D.IN_TABLE}function wz(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function _z(t){const e=oz(t,za.TYPE);return e!=null&&e.toLowerCase()===OOe}function t1e(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,q.HTML),_z(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function n1e(t,e){t._appendElement(e,q.HTML),e.ackSelfClosing=!0}function i1e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._appendElement(e,q.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function r1e(t,e){e.tagName=Q.IMG,e.tagID=g.IMG,wz(t,e)}function s1e(t,e){t._insertElement(e,q.HTML),t.skipNextNewLine=!0,t.tokenizer.state=rn.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=D.TEXT}function o1e(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,rn.RAWTEXT)}function a1e(t,e){t.framesetOk=!1,t._switchToTextParsing(e,rn.RAWTEXT)}function u6(t,e){t._switchToTextParsing(e,rn.RAWTEXT)}function l1e(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===D.IN_TABLE||t.insertionMode===D.IN_CAPTION||t.insertionMode===D.IN_TABLE_BODY||t.insertionMode===D.IN_ROW||t.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function u1e(t,e){t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function c1e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,q.HTML)}function d1e(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(g.RTC),t._insertElement(e,q.HTML)}function h1e(t,e){t._reconstructActiveFormattingElements(),bz(e),Q2(e),e.selfClosing?t._appendElement(e,q.MATHML):t._insertElement(e,q.MATHML),e.ackSelfClosing=!0}function f1e(t,e){t._reconstructActiveFormattingElements(),Oz(e),Q2(e),e.selfClosing?t._appendElement(e,q.SVG):t._insertElement(e,q.SVG),e.ackSelfClosing=!0}function c6(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,q.HTML)}function ui(t,e){switch(e.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{GOe(t,e);break}case g.A:{YOe(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{VOe(t,e);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{FOe(t,e);break}case g.LI:case g.DD:case g.DT:{XOe(t,e);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{wz(t,e);break}case g.HR:{i1e(t,e);break}case g.RB:case g.RTC:{c1e(t,e);break}case g.RT:case g.RP:{d1e(t,e);break}case g.PRE:case g.LISTING:{WOe(t,e);break}case g.XMP:{o1e(t,e);break}case g.SVG:{f1e(t,e);break}case g.HTML:{zOe(t,e);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{bs(t,e);break}case g.BODY:{HOe(t,e);break}case g.FORM:{jOe(t,e);break}case g.NOBR:{KOe(t,e);break}case g.MATH:{h1e(t,e);break}case g.TABLE:{e1e(t,e);break}case g.INPUT:{t1e(t,e);break}case g.PARAM:case g.TRACK:case g.SOURCE:{n1e(t,e);break}case g.IMAGE:{r1e(t,e);break}case g.BUTTON:{qOe(t,e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{JOe(t,e);break}case g.IFRAME:{a1e(t,e);break}case g.SELECT:{l1e(t,e);break}case g.OPTION:case g.OPTGROUP:{u1e(t,e);break}case g.NOEMBED:{u6(t,e);break}case g.FRAMESET:{UOe(t,e);break}case g.TEXTAREA:{s1e(t,e);break}case g.NOSCRIPT:{t.options.scriptingEnabled?u6(t,e):c6(t,e);break}case g.PLAINTEXT:{ZOe(t,e);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:c6(t,e)}}function p1e(t,e){if(t.openElements.hasInScope(g.BODY)&&(t.insertionMode=D.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function m1e(t,e){t.openElements.hasInScope(g.BODY)&&(t.insertionMode=D.AFTER_BODY,$z(t,e))}function g1e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function b1e(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(g.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(g.FORM):n&&t.openElements.remove(n))}function O1e(t){t.openElements.hasInButtonScope(g.P)||t._insertFakeElement(Q.P,g.P),t._closePElement()}function y1e(t){t.openElements.hasInListItemScope(g.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(g.LI),t.openElements.popUntilTagNamePopped(g.LI))}function v1e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function S1e(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function w1e(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function _1e(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(Q.BR,g.BR),t.openElements.pop(),t.framesetOk=!1}function kz(t,e){const n=e.tagName,i=e.tagID;for(let r=t.openElements.stackTop;r>0;r--){const s=t.openElements.items[r],o=t.openElements.tagIDs[r];if(i===o&&(i!==g.UNKNOWN||t.treeAdapter.getTagName(s)===n)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.stackTop>=r&&t.openElements.shortenToLength(r);break}if(t._isSpecialElement(s,o))break}}function U1(t,e){switch(e.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{z2(t,e);break}case g.P:{O1e(t);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{g1e(t,e);break}case g.LI:{y1e(t);break}case g.DD:case g.DT:{v1e(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{S1e(t);break}case g.BR:{_1e(t);break}case g.BODY:{p1e(t,e);break}case g.HTML:{m1e(t,e);break}case g.FORM:{b1e(t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{w1e(t,e);break}case g.TEMPLATE:{bc(t,e);break}default:kz(t,e)}}function xz(t,e){t.tmplInsertionModeStack.length>0?Iz(t,e):H2(t,e)}function k1e(t,e){var n;e.tagID===g.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function x1e(t,e){t._err(e,j.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Vv(t,e){if(yz.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=D.IN_TABLE_TEXT,e.type){case Ze.CHARACTER:{Cz(t,e);break}case Ze.WHITESPACE_CHARACTER:{Ez(t,e);break}}else jm(t,e)}function E1e(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_CAPTION}function C1e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_COLUMN_GROUP}function T1e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.COLGROUP,g.COLGROUP),t.insertionMode=D.IN_COLUMN_GROUP,U2(t,e)}function A1e(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,q.HTML),t.insertionMode=D.IN_TABLE_BODY}function R1e(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(Q.TBODY,g.TBODY),t.insertionMode=D.IN_TABLE_BODY,F1(t,e)}function P1e(t,e){t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function I1e(t,e){_z(e)?t._appendElement(e,q.HTML):jm(t,e),e.ackSelfClosing=!0}function $1e(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,q.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function ph(t,e){switch(e.tagID){case g.TD:case g.TH:case g.TR:{R1e(t,e);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{bs(t,e);break}case g.COL:{T1e(t,e);break}case g.FORM:{$1e(t,e);break}case g.TABLE:{P1e(t,e);break}case g.TBODY:case g.TFOOT:case g.THEAD:{A1e(t,e);break}case g.INPUT:{I1e(t,e);break}case g.CAPTION:{E1e(t,e);break}case g.COLGROUP:{C1e(t,e);break}default:jm(t,e)}}function ym(t,e){switch(e.tagID){case g.TABLE:{t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode());break}case g.TEMPLATE:{bc(t,e);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:jm(t,e)}}function jm(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,H1(t,e),t.fosterParentingEnabled=n}function Ez(t,e){t.pendingCharacterTokens.push(e)}function Cz(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function If(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n0&&t.openElements.currentTagId===g.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===g.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop();break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop();break}case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode());break}case g.TEMPLATE:{bc(t,e);break}}}function Q1e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t._processStartTag(e)):Rz(t,e)}function z1e(t,e){const n=e.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t.onEndTag(e)):Pz(t,e)}function H1e(t,e){switch(e.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{bs(t,e);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.tmplInsertionModeStack[0]=D.IN_TABLE,t.insertionMode=D.IN_TABLE,ph(t,e);break}case g.COL:{t.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,t.insertionMode=D.IN_COLUMN_GROUP,U2(t,e);break}case g.TR:{t.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,t.insertionMode=D.IN_TABLE_BODY,F1(t,e);break}case g.TD:case g.TH:{t.tmplInsertionModeStack[0]=D.IN_ROW,t.insertionMode=D.IN_ROW,V1(t,e);break}default:t.tmplInsertionModeStack[0]=D.IN_BODY,t.insertionMode=D.IN_BODY,ui(t,e)}}function U1e(t,e){e.tagID===g.TEMPLATE&&bc(t,e)}function Iz(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):H2(t,e)}function F1e(t,e){e.tagID===g.HTML?ui(t,e):CO(t,e)}function $z(t,e){var n;if(e.tagID===g.HTML){if(t.fragmentContext||(t.insertionMode=D.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===g.HTML){t._setEndLocation(t.openElements.items[0],e);const i=t.openElements.items[1];i&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&t._setEndLocation(i,e)}}else CO(t,e)}function CO(t,e){t.insertionMode=D.IN_BODY,H1(t,e)}function V1e(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.FRAMESET:{t._insertElement(e,q.HTML);break}case g.FRAME:{t._appendElement(e,q.HTML),e.ackSelfClosing=!0;break}case g.NOFRAMES:{bs(t,e);break}}}function W1e(t,e){e.tagID===g.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==g.FRAMESET&&(t.insertionMode=D.AFTER_FRAMESET))}function j1e(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.NOFRAMES:{bs(t,e);break}}}function X1e(t,e){e.tagID===g.HTML&&(t.insertionMode=D.AFTER_AFTER_FRAMESET)}function Z1e(t,e){e.tagID===g.HTML?ui(t,e):sb(t,e)}function sb(t,e){t.insertionMode=D.IN_BODY,H1(t,e)}function q1e(t,e){switch(e.tagID){case g.HTML:{ui(t,e);break}case g.NOFRAMES:{bs(t,e);break}}}function Y1e(t,e){e.chars=Bt,t._insertCharacters(e)}function G1e(t,e){t._insertCharacters(e),t.framesetOk=!1}function Dz(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==q.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function K1e(t,e){if(fOe(e))Dz(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),i=t.treeAdapter.getNamespaceURI(n);i===q.MATHML?bz(e):i===q.SVG&&(pOe(e),Oz(e)),Q2(e),e.selfClosing?t._appendElement(e,i):t._insertElement(e,i),e.ackSelfClosing=!0}}function J1e(t,e){if(e.tagID===g.P||e.tagID===g.BR){Dz(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const i=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(i)===q.HTML){t._endTagOutsideForeignContent(e);break}const r=t.treeAdapter.getTagName(i);if(r.toLowerCase()===e.tagName){e.tagName=r,t.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const eye=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),d6={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Lz(t,e){const n=cye(t),i=tz("type",{handlers:{root:tye,element:nye,text:iye,comment:Nz,doctype:rye,raw:oye},unknown:aye}),r={parser:n?new l6(d6):l6.getFragmentParser(void 0,d6),handle(a){i(a,r)},stitches:!1,options:e||{}};i(t,r),ef(r,to());const s=n?r.parser.document:r.parser.getFragment(),o=hbe(s,{file:r.options.file});return r.stitches&&Q1(o,"comment",function(a,l,u){const c=a;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),o.type==="root"&&o.children.length===1&&o.children[0].type===t.type?o.children[0]:o}function Mz(t,e){let n=-1;if(t)for(;++n0?{type:"text",value:x}:void 0),x===!1?h.lastIndex=_+1:(m!==_&&v.push({type:"text",value:u.value.slice(m,_)}),Array.isArray(x)?v.push(...x):x&&v.push(x),m=_+S[0].length,O=!0),!h.global)break;S=h.exec(u.value)}return O?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=f6(t,"(");let s=f6(t,")");for(;i!==-1&&r>s;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[t,n]}function zz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Xu(n)||D1(n))&&(!e||n!==47)}Hz.peek=Bye;function Tye(){return{enter:{gfmFootnoteDefinition:Rye,gfmFootnoteDefinitionLabelString:Pye,gfmFootnoteCall:Dye,gfmFootnoteCallString:Lye},exit:{gfmFootnoteDefinition:$ye,gfmFootnoteDefinitionLabelString:Iye,gfmFootnoteCall:Nye,gfmFootnoteCallString:Mye}}}function Aye(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Qye,footnoteReference:Hz}}}function Rye(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Pye(){this.buffer()}function Iye(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=os(this.sliceSerialize(t)).toLowerCase()}function $ye(t){this.exit(t)}function Dye(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Lye(){this.buffer()}function Mye(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=os(this.sliceSerialize(t)).toLowerCase()}function Nye(t){this.exit(t)}function Hz(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=r.move(n.safe(n.associationId(t),{...r.current(),before:s,after:"]"})),a(),o(),s+=r.move("]"),s}function Bye(){return"["}function Qye(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const o=n.enter("footnoteDefinition"),a=n.enter("label");return s+=r.move(n.safe(n.associationId(t),{...r.current(),before:s,after:"]"})),a(),s+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),s+=r.move(n.indentLines(n.containerFlow(t,r.current()),zye)),o(),s}function zye(t,e,n){return e===0?t:(n?"":" ")+t}const Hye=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Uz.peek=jye;function Uye(){return{canContainEols:["delete"],enter:{strikethrough:Vye},exit:{strikethrough:Wye}}}function Fye(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hye}],handlers:{delete:Uz}}}function Vye(t){this.enter({type:"delete",children:[]},t)}function Wye(t){this.exit(t)}function Uz(t,e,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let o=r.move("~~");return o+=n.containerPhrasing(t,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),s(),o}function jye(){return"~"}function Xye(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||qye,r=[],s=[],o=[],a=[];let l=0,u=-1;for(;++ul&&(l=t[u].length);++ya[y])&&(a[y]=v)}m.push(O)}s[u]=m,o[u]=b}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=O),h[c]=O),d[c]=v}s.splice(1,0,d),o.splice(1,0,h),u=-1;const f=[];for(;++u "),s.shift(2);const o=n.indentLines(n.containerFlow(t,s.current()),Gye);return r(),o}function Gye(t,e,n){return">"+(n?"":" ")+t}function Kye(t,e){return m6(t,e.inConstruct,!0)&&!m6(t,e.notInConstruct,!1)}function m6(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++io&&(o=s):s=1,r=i+e.length,i=n.indexOf(e,r);return o}function eve(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function tve(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function nve(t,e,n,i){const r=tve(n),s=t.value||"",o=r==="`"?"GraveAccent":"Tilde";if(eve(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,ive);return d(),h}const a=n.createTracker(i),l=r.repeat(Math.max(Jye(s,r)+1,3)),u=n.enter("codeFenced");let c=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${o}`);c+=a.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${o}`);c+=a.move(" "),c+=a.move(n.safe(t.meta,{before:c,after:` -`,encode:["`"],...a.current()})),d()}return c+=a.move(` -`),s&&(c+=a.move(s+` -`)),c+=a.move(l),u(),c}function ive(t,e,n){return(n?"":" ")+t}function F2(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function rve(t,e,n,i){const r=F2(n),s=r==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("[");return u+=l.move(n.safe(n.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":` -`,...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),o(),u}function sve(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}Fz.peek=ove;function Fz(t,e,n,i){const r=sve(n),s=n.enter("emphasis"),o=n.createTracker(i);let a=o.move(r);return a+=o.move(n.containerPhrasing(t,{before:a,after:r,...o.current()})),a+=o.move(r),s(),a}function ove(t,e,n){return n.options.emphasis||"*"}function ave(t,e){let n=!1;return Q1(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,L_}),!!((!t.depth||t.depth<3)&&A2(t)&&(e.options.setext||n))}function lve(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(i);if(ave(t,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...s.current(),before:` -`,after:` -`});return d(),c(),h+` -`+(r===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` -`))+1))}const o="#".repeat(r),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let u=n.containerPhrasing(t,{before:"# ",after:` -`,...s.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),l(),a(),u}Vz.peek=uve;function Vz(t){return t.value||""}function uve(){return"<"}Wz.peek=cve;function Wz(t,e,n,i){const r=F2(n),s=r==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let u=l.move("![");return u+=l.move(n.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),a()),u+=l.move(")"),o(),u}function cve(){return"!"}jz.peek=dve;function jz(t,e,n,i){const r=t.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const u=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=c,s(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function dve(){return"!"}Xz.peek=hve;function Xz(t,e,n){let i=t.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s\u007F]/.test(t.url))}qz.peek=fve;function qz(t,e,n,i){const r=F2(n),s=r==='"'?"Quote":"Apostrophe",o=n.createTracker(i);let a,l;if(Zz(t,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(t,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=c,d}a=n.enter("link"),l=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(t,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(t.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(t.url,{before:u,after:t.title?" ":")",...o.current()}))),l(),t.title&&(l=n.enter(`title${s}`),u+=o.move(" "+r),u+=o.move(n.safe(t.title,{before:u,after:r,...o.current()})),u+=o.move(r),l()),u+=o.move(")"),a(),u}function fve(t,e,n){return Zz(t,n)?"<":"["}Yz.peek=pve;function Yz(t,e,n,i){const r=t.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const u=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=c,s(),r==="full"||!u||u!==d?l+=a.move(d+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function pve(){return"["}function V2(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function mve(t){const e=V2(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gve(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Gz(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function bve(t,e,n,i){const r=n.enter("list"),s=n.bulletCurrent;let o=t.ordered?gve(n):V2(n);const a=t.ordered?o==="."?")":".":mve(n);let l=e&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Gz(n)===o&&c){let d=-1;for(;++d-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let o=s.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(i);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,a.current()),c);return l(),u;function c(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function vve(t,e,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(t,i);return s(),r(),o}const Sve=N1(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wve(t,e,n,i){return(t.children.some(function(o){return Sve(o)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function _ve(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Kz.peek=kve;function Kz(t,e,n,i){const r=_ve(n),s=n.enter("strong"),o=n.createTracker(i);let a=o.move(r+r);return a+=o.move(n.containerPhrasing(t,{before:a,after:r,...o.current()})),a+=o.move(r+r),s(),a}function kve(t,e,n){return n.options.strong||"*"}function xve(t,e,n,i){return n.safe(t.value,i)}function Eve(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Cve(t,e,n){const i=(Gz(n)+(n.options.ruleSpaces?" ":"")).repeat(Eve(n));return n.options.ruleSpaces?i.slice(0,-1):i}const Jz={blockquote:Yye,break:g6,code:nve,definition:rve,emphasis:Fz,hardBreak:g6,heading:lve,html:Vz,image:Wz,imageReference:jz,inlineCode:Xz,link:qz,linkReference:Yz,list:bve,listItem:yve,paragraph:vve,root:wve,strong:Kz,text:xve,thematicBreak:Cve};function Tve(){return{enter:{table:Ave,tableData:b6,tableHeader:b6,tableRow:Pve},exit:{codeText:Ive,table:Rve,tableData:Zv,tableHeader:Zv,tableRow:Zv}}}function Ave(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function Rve(t){this.exit(t),this.data.inTable=void 0}function Pve(t){this.enter({type:"tableRow",children:[]},t)}function Zv(t){this.exit(t)}function b6(t){this.enter({type:"tableCell",children:[]},t)}function Ive(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,$ve));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function $ve(t,e){return e==="|"?e:t}function Dve(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,m,b,y){return u(c(f,b,y),f.align)}function a(f,m,b,y){const O=d(f,b,y),v=u([O]);return v.slice(0,v.indexOf(` -`))}function l(f,m,b,y){const O=b.enter("tableCell"),v=b.enter("phrasing"),S=b.containerPhrasing(f,{...y,before:s,after:s});return v(),O(),S}function u(f,m){return Xye(f,{align:m,alignDelimiters:i,padding:n,stringLength:r})}function c(f,m,b){const y=f.children;let O=-1;const v=[],S=m.enter("table");for(;++O0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Kve={tokenize:oSe,partial:!0};function Jve(){return{document:{91:{tokenize:iSe,continuation:{tokenize:rSe},exit:sSe}},text:{91:{tokenize:nSe},93:{add:"after",tokenize:eSe,resolveTo:tSe}}}}function eSe(t,e,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const u=os(i.sliceSerialize({start:o.end,end:i.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function tSe(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function nSe(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!o||d===null||d===91||xt(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return r.includes(os(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return xt(d)||(o=!0),s++,t.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(t.consume(d),s++,u):u(d)}}function iSe(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!a||m===null||m===91||xt(m))return n(m);if(m===93){t.exit("chunkString");const b=t.exit("gfmFootnoteDefinitionLabelString");return s=os(i.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return xt(m)||(a=!0),o++,t.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(t.consume(m),o++,c):c(m)}function h(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(s)||r.push(s),rt(t,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return e(m)}}function rSe(t,e,n){return t.check(Vm,e,t.attempt(Kve,e,n))}function sSe(t){t.exit("gfmFootnoteDefinition")}function oSe(t,e,n){const i=this;return rt(t,r,"gfmFootnoteDefinitionIndent",5);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function aSe(t){let n=(t||{}).singleTilde;const i={tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,a){let l=-1;for(;++l1?l(m):(o.consume(m),d++,f);if(d<2&&!n)return l(m);const y=o.exit("strikethroughSequenceTemporary"),O=_O(m);return y._open=!O||O===2&&!!b,y._close=!b||b===2&&!!O,a(m)}}}class lSe{constructor(){this.map=[]}add(e,n,i){uSe(this,e,n,i)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let r=i.pop();for(;r;)e.push(...r),r=i.pop();this.map.length=0}}function uSe(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const J=i.events[z][1].type;if(J==="lineEnding"||J==="linePrefix")z--;else break}const U=z>-1?i.events[z][1].type:null,X=U==="tableHead"||U==="tableRow"?x:l;return X===x&&i.parser.lazy[i.now().line]?n(I):X(I)}function l(I){return t.enter("tableHead"),t.enter("tableRow"),u(I)}function u(I){return I===124||(o=!0,s+=1),c(I)}function c(I){return I===null?n(I):Ee(I)?s>1?(s=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),f):n(I):Ge(I)?rt(t,c,"whitespace")(I):(s+=1,o&&(o=!1,r+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),o=!0,c):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||xt(I)?(t.exit("data"),c(I)):(t.consume(I),I===92?h:d)}function h(I){return I===92||I===124?(t.consume(I),d):d(I)}function f(I){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(I):(t.enter("tableDelimiterRow"),o=!1,Ge(I)?rt(t,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?y(I):I===124?(o=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),b):k(I)}function b(I){return Ge(I)?rt(t,y,"whitespace")(I):y(I)}function y(I){return I===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),O):I===45?(s+=1,O(I)):I===null||Ee(I)?_(I):k(I)}function O(I){return I===45?(t.enter("tableDelimiterFiller"),v(I)):k(I)}function v(I){return I===45?(t.consume(I),v):I===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),S):(t.exit("tableDelimiterFiller"),S(I))}function S(I){return Ge(I)?rt(t,_,"whitespace")(I):_(I)}function _(I){return I===124?m(I):I===null||Ee(I)?!o||r!==s?k(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):k(I)}function k(I){return n(I)}function x(I){return t.enter("tableRow"),w(I)}function w(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),w):I===null||Ee(I)?(t.exit("tableRow"),e(I)):Ge(I)?rt(t,w,"whitespace")(I):(t.enter("data"),M(I))}function M(I){return I===null||I===124||xt(I)?(t.exit("data"),w(I)):(t.consume(I),I===92?H:M)}function H(I){return I===92||I===124?(t.consume(I),M):M(I)}}function fSe(t,e){let n=-1,i=!0,r=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,u,c,d;const h=new lSe;for(;++nn[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;t.add(m,b,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return r!==void 0&&(s.end=Object.assign({},sd(e.events,r)),t.add(r,0,[["exit",s,e]]),s=void 0),s}function y6(t,e,n,i,r){const s=[],o=sd(e.events,n);r&&(r.end=Object.assign({},o),s.push(["exit",r,e])),i.end=Object.assign({},o),s.push(["exit",i,e]),t.add(n+1,0,s)}function sd(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const pSe={tokenize:gSe};function mSe(){return{text:{91:pSe}}}function gSe(t,e,n){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return xt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return Ee(l)?e(l):Ge(l)?t.check({tokenize:bSe},e,n)(l):n(l)}}function bSe(t,e,n){return rt(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function OSe(t){return RQ([Fve(),Jve(),aSe(t),dSe(),mSe()])}const ySe={};function X1(t){const e=this,n=t||ySe,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(OSe(n)),s.push(Qve()),o.push(zve(n))}const S0=t=>T.Children.map(t.children,e=>typeof e!="string"?e:null),v6=t=>{var e;return((e=t==null?void 0:t.style)==null?void 0:e.textAlign.replace(/\b(left|right)\b/,n=>n==="left"?"start":"end"))??"start"},Z1={hr:({node:t,...e})=>L.jsx(Oe,{as:t.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...e}),a:({node:t,...e})=>L.jsx(rr,{to:t.href,...e}),button:({node:t,...e})=>L.jsx(bx,{withBackground:!1,...e}),p:({node:t,...e})=>L.jsx(nn,{as:t.tagName,...e}),em:({node:t,...e})=>L.jsx(nn,{fontStyle:"italic",...e}),strong:({node:t,...e})=>L.jsx(nn,{weight:"bold",...e}),span:({node:t,...e})=>L.jsx(nn,{as:t.tagName,...e}),code:({node:t,...e})=>L.jsx(nn,{as:t.tagName,...e}),del:({node:t,...e})=>L.jsx(nn,{as:t.tagName,...e}),blockquote:({node:t,...e})=>{var a;e={...e,children:S0(e)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,i={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},[r,s]=((a=T.Children.toArray(e.children)[0])==null?void 0:a.props.children.toString().split("--",2))??!1,o=r.match(n);return o?L.jsx(zY,{variant:i[o[1]],children:r.replace(`${o[0]}`,"")}):L.jsx(RG,{description:r,title:s,margin:"medium 0",...e,children:s?L.jsx(Ox,{name:s}):L.jsx(L.Fragment,{})})},h1:({node:t,...e})=>(e.level=t.tagName,L.jsx(Yr,{margin:"none none medium",...e})),h2:({node:t,...e})=>(e.level=t.tagName,L.jsx(Yr,{margin:"small none",...e})),h3:({node:t,...e})=>(e.level=t.tagName,L.jsx(Yr,{margin:"small none",...e})),h4:({node:t,...e})=>(e.level=t.tagName,L.jsx(Yr,{...e})),h5:({node:t,...e})=>(e.level=t.tagName,L.jsx(Yr,{...e})),h6:({node:t,...e})=>(e.level="h5",L.jsx(Yr,{as:"h6",...e})),img:({node:t,...e})=>L.jsx(NJ,{...e}),div:({node:t,...e})=>L.jsx(Oe,{as:t.tagName,...e}),pre:({node:t,...e})=>{if(t.children.length===1&&t.children[0].tagName==="code"){let n=t.children[0].children[0].value;return n.endsWith(` -`)&&(n=n.slice(0,-1)),L.jsx(j7,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:n})}return L.jsx(Oe,{as:t.tagName,...e})},ul:({node:t,...e})=>{e={...e,children:S0(e)};const{children:n,...i}=e,r=(i==null?void 0:i.className)==="contains-task-list"||!1;return L.jsx(yf,{isUnstyled:r,...i,children:T.Children.map(n,s=>{const{children:o,...a}=s.props;if(r&&o){let l;return L.jsx(yf.Item,{margin:"0 0 small small",...a,children:T.Children.map(o,u=>{var c,d,h;if(((c=u==null?void 0:u.props)==null?void 0:c.type)==="checkbox"&&(l=((d=u==null?void 0:u.props)==null?void 0:d.checked)??!1),((h=u==null?void 0:u.props)==null?void 0:h.type)!=="checkbox"&&u!==" "&&u!=="[ ]"&&u!=="[X]")return L.jsx(PK,{label:u,disabled:!0,defaultChecked:l})})},s.key)}return L.jsx(yf.Item,{...s.props},s.key)})})},ol:({node:t,...e})=>{e={...e,children:S0(e)};const{children:n,...i}=e;return L.jsx(yf,{as:t.tagName,...i,children:T.Children.map(n,r=>L.jsx(yf.Item,{...r.props},r.key))})},input:({node:t,...e})=>L.jsx(t.tagName,{...e}),details:({node:t,...e})=>{e={...e,children:S0(e)};const n=e.children.shift();return L.jsx(Y7,{summary:n,children:L.jsx(Oe,{display:"block",padding:"small",...e})})},table:({node:t,...e})=>{const{children:n,...i}=e;return L.jsx(Kn,{margin:"medium none",hover:!0,caption:"",...i,children:T.Children.map(n,r=>{const{children:s,...o}=r.props;return r.type==="thead"?L.jsx(Kn.Head,{...o,children:T.Children.map(s,a=>{const{children:l,...u}=a.props;return L.jsx(Kn.Row,{...u,children:T.Children.map(l,c=>L.jsx(Kn.ColHeader,{id:c.key,textAlign:v6(c.props),...c.props},c.key))})})}):L.jsx(Kn.Body,{...o,children:T.Children.map(s,a=>{const{children:l,...u}=a.props;return L.jsx(Kn.Row,{...u,children:T.Children.map(l,c=>L.jsx(Kn.Cell,{textAlign:v6(c.props),...c.props}))})})})})})}},lH={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"}};var S6={VITE_APP_VERSION:"3.2.0+1717105383",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function vSe(t,e,n){const i=`${Qi.api}/repos/${t}/${e}/git/trees/${n}?recursive=1`;try{return(await(await fetch(i,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:S6.GITHUB_TOKEN?`token ${S6.GITHUB_TOKEN}`:""}})).json()).tree.sort(SSe)||null}catch(r){return console.error(`Error: ${r.message}`),null}}function SSe(t,e){const n=o=>{const a=o.toLocaleUpperCase(),l=i.findIndex(u=>a.startsWith(u.toLocaleUpperCase()));return l!==-1?l:i.length},i=["Amazon Web Services","Instructure"],r=n(t.path),s=n(e.path);return r!==s?s-r:t.path.localeCompare(e.path)}function wSe(t,e,n,i,r){const o=Wo(lH,r),a=t.filter(c=>c.type==="tree"),l=t.filter(c=>c.type==="blob").filter(c=>c.path!==".gitignore");let u=`
- 🕵️ ${o.explore}\r -\r -`;for(const[c,d]of a.entries()){u+=`| ${d.path} |\r -| ---------------- |`;for(const h of l)h.path.startsWith(d.path)&&(u+=`\r -| [${h.path.replace(`${d.path}/`,"")}](${encodeURI(`${Qi.raw}/${e}/${n}/${i}/${h.path}`)}) |`);c~a.indexOf(t)).toString();if(o){const a=await vSe(r,s,o);if(a)return wSe(a,r,s,o,i)}return null}const q1=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],kSe=t=>{const e=Vo.c(9),{brand:n,branch:i,l:r}=t,[s,o]=T.useState(null);let a,l;e[0]!==n||e[1]!==i||e[2]!==r?(a=()=>{_Se(n.toLowerCase(),i,r).then(h=>o(h)).catch(h=>console.error(h))},l=[n,i,r],e[0]=n,e[1]=i,e[2]=r,e[3]=a,e[4]=l):(a=e[3],l=e[4]),T.useEffect(a,l);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=[X1,j1],e[5]=u):u=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=[W1],e[6]=c):c=e[6];let d;return e[7]!==s?(d=L.jsx(z1,{remarkPlugins:u,rehypePlugins:c,allowedElements:q1,components:Z1,children:s}),e[7]=s,e[8]=d):d=e[8],d};function w6(t){const e=Vo.c(37),{readme:n,brand:i}=t,r=_h();let s,o,a;e[0]!==r.language?(a=Xh(r.language),o=Wo(lH,a),s=a.toUpperCase(),e[0]=r.language,e[1]=s,e[2]=o,e[3]=a):(s=e[1],o=e[2],a=e[3]);const l=`.markdown .lang { display: none; } .markdown .lang.${s} { display: inherit; }`,u=n,[c,d]=T.useState(!1),[h,f]=T.useState(!1),[m,b]=T.useState(!1);let y;e[4]!==i||e[5]!==u||e[6]!==o.fetch_fail?(y=()=>{document.title=`${i} Compliance Packages`,fetch(u).then(J=>J.ok?J.text():Promise.reject(o.fetch_fail)).then(J=>{d(J)}).catch(J=>console.error(J))},e[4]=i,e[5]=u,e[6]=o.fetch_fail,e[7]=y):y=e[7],T.useEffect(y);let O,v;e[8]!==c?(O=()=>{c&&(b(Array.from(document.querySelectorAll(".contents"))),f(!0))},v=[c],e[8]=c,e[9]=O,e[10]=v):(O=e[9],v=e[10]),T.useEffect(O,v);let S;e[11]!==h||e[12]!==m||e[13]!==i||e[14]!==a?(S=h&&(m==null?void 0:m.map(J=>PO.createPortal(L.jsx(kSe,{brand:i,branch:J,l:a}),J))),e[11]=h,e[12]=m,e[13]=i,e[14]=a,e[15]=S):S=e[15];let _;e[16]!==a?(_=L.jsx(qh,{language:a}),e[16]=a,e[17]=_):_=e[17];let k;e[18]!==l?(k=L.jsx("style",{children:l}),e[18]=l,e[19]=k):k=e[19];const x=`${i.toLowerCase()} markdown`;let w;e[20]===Symbol.for("react.memo_cache_sentinel")?(w=[X1,j1],e[20]=w):w=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=[W1],e[21]=M):M=e[21];let H;e[22]!==c?(H=L.jsx(z1,{remarkPlugins:w,rehypePlugins:M,allowedElements:q1,components:Z1,children:c}),e[22]=c,e[23]=H):H=e[23];let I;e[24]!==x||e[25]!==H?(I=L.jsx(Oe,{as:"div",className:x,children:H}),e[24]=x,e[25]=H,e[26]=I):I=e[26];let z;e[27]!==k||e[28]!==I?(z=L.jsxs(Oe,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[k,I]}),e[27]=k,e[28]=I,e[29]=z):z=e[29];let U;e[30]!==a?(U=L.jsx(Zh,{language:a}),e[30]=a,e[31]=U):U=e[31];let X;return e[32]!==S||e[33]!==_||e[34]!==z||e[35]!==U?(X=L.jsxs(L.Fragment,{children:[S,_,z,U]}),e[32]=S,e[33]=_,e[34]=z,e[35]=U,e[36]=X):X=e[36],X}const xSe={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},_6=`# Markdown to Instructure UI - -> [!NOTE] -> Try editing the markdown on this page. - -This page is rendered from [github-flavored markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) and passing the content through [react-markdown](https://github.com/remarkjs/react-markdown) to [Instructure UI](https://instructure.design/). The result is accessible, well styled, and modular content created simply with markdown. - -:arrow_right: [Github](https://github.com/thedannywahl/instructure-security-package/blob/gh-pages/isp-site/src/components/mdtoui.jsx) - -
- -## Tables - -### Normal table - -| First Header | Second Header | -| ---------------- | ---------------- | -| Content Cell A1 | Content Cell B1 | -| Content Cell A2 | Content Cell B2 | - -### Table with fancy formatting - -| Command | Description | -| --- | --- | -| \`git status\` | List all *new or modified* files | -| \`git diff\` | Show file differences that **haven't been** staged | - -### Table with columnar alignment - -| Left-aligned | Center-aligned | Right-aligned | -| :--- | :---: | ---: | -| git status | git status | git status | -| git diff | git diff | git diff | - -## Details - -
CLICK ME - -#### We can hide anything - -Hello world! - -
- -## Quotes - -> Text that is a quote -- Author Name - -> Long quote w/ no attribution, and linebreaks in MD. Bacon ipsum dolor amet biltong pastrami shankle venison jowl meatloaf. -> Ham jowl leberkas salami fatback sausage chuck pancetta short loin meatball, filet mignon chislic. -> Tri-tip ham hock ball tip, frankfurter bacon buffalo hamburger chuck turkey filet mignon andouille rump ground round doner short ribs. -> Fatback short ribs bresaola, turducken ball tip drumstick meatloaf t-bone venison pork belly pig landjaeger chicken salami hamburger. -> Jowl pork shank t-bone short loin. - -### Alerts - -> [!NOTE] -> Useful information that users should know, even when skimming content. - -> [!TIP] -> Helpful advice for doing things better or more easily. - -> [!IMPORTANT] -> Key information users need to know to achieve their goal. - -> [!WARNING] -> Urgent info that needs immediate user attention to avoid problems. - -> [!CAUTION] -> Advises about risks or negative outcomes of certain actions. - -## Code - -Use \`git status\` to list all new or modified files that haven't yet been committed. - -Some basic Git commands are: -\`\`\` -git status -git add -git commit -\`\`\` - -\`\`\`javascript -const msg = \`you need to know about \${err}.\` -alert(msg) -console.warn("User alerted:", msg) -\`\`\` - -
This is some preformatted text, but it is NOT code
- -## Lists - -1. James Madison -2. James Monroe -3. John Quincy Adams - -* George Washington -* John Adams -* Thomas Jefferson - -- [x] #739 -- [ ] https://github.com/octo-org/octo-repo/issues/740 -- [ ] Add delight to the experience when all tasks are complete :tada: - -## Text - -Emoji: @octocat :+1: This PR looks great - it's ready to merge! - -Text style: *italic* **bold** ~struck~ - -# Heading 1 -## Heading 2 -### Heading 3 -#### Heading 4 -##### Heading 5 -###### Heading 6 - -**Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami. - -Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function k6(){const t=Vo.c(25),e=_h();let n,i;t[0]!==e.language?(i=Xh(e.language),n=Wo(xSe,i),t[0]=e.language,t[1]=n,t[2]=i):(n=t[1],i=t[2]);const r=n;let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{document.title="Markdown to Instructure UI"},t[3]=s):s=t[3],T.useEffect(s);const[o,a]=T.useState(`${r.loading}`);let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{a(_6)},t[4]=l):l=t[4];let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=[_6],t[5]=u):u=t[5],T.useEffect(l,u);let c;t[6]!==i?(c=L.jsx(qh,{language:i}),t[6]=i,t[7]=c):c=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=[X1,j1],t[8]=d):d=t[8];let h;t[9]===Symbol.for("react.memo_cache_sentinel")?(h=[W1],t[9]=h):h=t[9];let f;t[10]!==o?(f=L.jsx(pi.Col,{children:L.jsx(z1,{remarkPlugins:d,rehypePlugins:h,allowedElements:q1,components:Z1,children:o})}),t[10]=o,t[11]=f):f=t[11];const m=`${r.markdown_source}`;let b;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=_=>{a(_)},t[12]=b):b=t[12];let y;t[13]!==m||t[14]!==o?(y=L.jsx(pi.Col,{children:L.jsx(j7,{label:m,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:o,onChange:b})}),t[13]=m,t[14]=o,t[15]=y):y=t[15];let O;t[16]!==f||t[17]!==y?(O=L.jsx(Oe,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:L.jsx(pi,{startAt:"large",children:L.jsxs(pi.Row,{children:[f,y]})})}),t[16]=f,t[17]=y,t[18]=O):O=t[18];let v;t[19]!==i?(v=L.jsx(Zh,{language:i}),t[19]=i,t[20]=v):v=t[20];let S;return t[21]!==c||t[22]!==O||t[23]!==v?(S=L.jsxs(L.Fragment,{children:[c,O,v]}),t[21]=c,t[22]=O,t[23]=v,t[24]=S):S=t[24],S}const ESe={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function x6(t){const e=Vo.c(32),{path:n,brand:i,url:r}=t,s=_h();let o,a;e[0]!==s.language?(a=Xh(s.language),o=Wo(ESe,a),e[0]=s.language,e[1]=o,e[2]=a):(o=e[1],a=e[2]);const l=o;let u;e[3]!==r?(u=r.split("?"),e[3]=r,e[4]=u):u=e[4];const c=u[0];let d;e[5]!==r?(d=r.slice(-4),e[5]=r,e[6]=d):d=e[6];const h=d,f=n.slice(-3)==="/dl";let m;e[7]!==r?(m=()=>{window.location.href=r},e[7]=r,e[8]=m):m=e[8],T.useEffect(m);let b;e[9]!==f||e[10]!==h||e[11]!==l.youre_downloading_the||e[12]!==l.compliance_package||e[13]!==l.youre_downloading_a||e[14]!==l.didnt_work||e[15]!==l.try_again||e[16]!==l.redirecting_to||e[17]!==i||e[18]!==r||e[19]!==c?(b=()=>f?L.jsxs(Oe,{as:"div",children:[L.jsx(nn,{children:h===".zip"?`${l.youre_downloading_the} ${i} ${l.compliance_package}`:`${l.youre_downloading_a} ${i} ${l.compliance_package}`}),L.jsx("br",{}),L.jsxs(nn,{size:"x-small",children:[l.didnt_work," ",L.jsx(rr,{href:r,children:l.try_again})]})]}):L.jsx(Oe,{as:"div",children:L.jsxs(nn,{children:[l.redirecting_to," ",L.jsx(rr,{href:r,children:c})]})}),e[9]=f,e[10]=h,e[11]=l.youre_downloading_the,e[12]=l.compliance_package,e[13]=l.youre_downloading_a,e[14]=l.didnt_work,e[15]=l.try_again,e[16]=l.redirecting_to,e[17]=i,e[18]=r,e[19]=c,e[20]=b):b=e[20];const y=b;let O;e[21]!==a?(O=L.jsx(qh,{language:a}),e[21]=a,e[22]=O):O=e[22];const v=f?l.downloading:l.redirecting;let S;e[23]!==v||e[24]!==y?(S=L.jsx(Oe,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:L.jsx(UM,{size:"medium",heading:v,headingAs:"h1",message:y})}),e[23]=v,e[24]=y,e[25]=S):S=e[25];let _;e[26]!==a?(_=L.jsx(Zh,{language:a}),e[26]=a,e[27]=_):_=e[27];let k;return e[28]!==O||e[29]!==S||e[30]!==_?(k=L.jsxs(L.Fragment,{children:[O,S,_]}),e[28]=O,e[29]=S,e[30]=_,e[31]=k):k=e[31],k}const CSe={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var w0={VITE_APP_VERSION:"3.2.0+1717105383",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function TSe(t,e){const n=`${Qi.api}/repos/${t}/${e}/releases`;try{return(await(await fetch(n,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:w0!=null&&w0.VITE_GITHUB_TOKEN?`token ${w0.VITE_GITHUB_TOKEN}`:""}})).json()).map(ASe).join(`\r -\r -`).slice(0,-3)}catch(i){return console.error(`Error: ${i.message}`),null}}function ASe(t){return` -## ${t.name}\r - -${t.body}\r - ----`}async function RSe(){const t=Qi.owner,e=Qi.repo;return TSe(t,e)}function E6(){const t=Vo.c(32),e=_h();let n,i,r,s;t[0]!==e.language?(r=Xh(e.language),i=Wo(CSe,r),s=`https://github.com/${Qi.owner}/${Qi.repo}/releases.atom`,n=r.toUpperCase(),t[0]=e.language,t[1]=n,t[2]=i,t[3]=r,t[4]=s):(n=t[1],i=t[2],r=t[3],s=t[4]);const o=`.markdown .lang { display: none; } .markdown .lang.${n} { display: inherit; }`,[a,l]=T.useState(`${i.loading}`);let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{RSe().then(k=>{l(k)}).catch(k=>console.error(k))},t[5]=u):u=t[5],T.useEffect(u);let c;t[6]!==r?(c=L.jsx(qh,{language:r}),t[6]=r,t[7]=c):c=t[7];let d;t[8]!==i.subscribe?(d=L.jsx(Dh,{size:"small",color:"warning",title:i.subscribe}),t[8]=i.subscribe,t[9]=d):d=t[9];let h;t[10]!==s||t[11]!==d?(h=L.jsx(rr,{href:s,children:d}),t[10]=s,t[11]=d,t[12]=h):h=t[12];let f;t[13]!==h||t[14]!==i.releases?(f=L.jsxs(Yr,{level:"h1",children:[h," ",i.releases]}),t[13]=h,t[14]=i.releases,t[15]=f):f=t[15];let m;t[16]!==o?(m=L.jsx("style",{children:o}),t[16]=o,t[17]=m):m=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=[X1,j1],t[18]=b):b=t[18];let y;t[19]===Symbol.for("react.memo_cache_sentinel")?(y=[W1],t[19]=y):y=t[19];let O;t[20]!==a?(O=L.jsx(Oe,{as:"div",className:"markdown",children:L.jsx(z1,{remarkPlugins:b,rehypePlugins:y,allowedElements:q1,components:Z1,children:a})}),t[20]=a,t[21]=O):O=t[21];let v;t[22]!==f||t[23]!==m||t[24]!==O?(v=L.jsxs(Oe,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[f,m,O]}),t[22]=f,t[23]=m,t[24]=O,t[25]=v):v=t[25];let S;t[26]!==r?(S=L.jsx(Zh,{language:r}),t[26]=r,t[27]=S):S=t[27];let _;return t[28]!==c||t[29]!==v||t[30]!==S?(_=L.jsxs(L.Fragment,{children:[c,v,S,","]}),t[28]=c,t[29]=v,t[30]=S,t[31]=_):_=t[31],_}const Oc=[];for(const t of hQ)Oc.push({path:`${t.route}`,element:L.jsx(w6,{readme:t.readme,brand:t.brandName}),errorElement:L.jsx(gm,{}),children:[{path:":language",element:L.jsx(w6,{readme:t.readme,brand:t.brandName})}]});for(const t of R_)for(const e of t.links)Oc.push({path:e.from,element:L.jsx(x6,{path:e.from,brand:t.brand,url:e.to}),errorElement:L.jsx(gm,{}),children:[{path:":language",element:L.jsx(x6,{path:e.from,brand:t.brand,url:e.to})}]});Oc.push({path:"/links",element:L.jsx(o5,{}),errorElement:L.jsx(gm,{}),children:[{path:":language",element:L.jsx(o5,{})}]});Oc.push({path:"/mdui",element:L.jsx(k6,{}),children:[{path:":language",element:L.jsx(k6,{})}]});Oc.push({path:"/releases",element:L.jsx(E6,{}),children:[{path:":language",element:L.jsx(E6,{})}]});Oc.push({path:"*",element:L.jsx(gm,{}),children:[{path:":language",element:L.jsx(gm,{})}]});const PSe=RW(Oc);jk.createRoot(document.getElementById("root")).render(L.jsx(T.StrictMode,{children:L.jsx(Eu,{theme:mx,children:L.jsx(Oe,{as:"div",minHeight:"100vh",position:"relative",children:L.jsx(QW,{router:PSe})})})})); diff --git a/assets/index-DT1C1ZDw.js b/assets/index-DT1C1ZDw.js new file mode 100644 index 00000000..5b0dc6f8 --- /dev/null +++ b/assets/index-DT1C1ZDw.js @@ -0,0 +1,87 @@ +const __vite__fileDeps=["assets/markdownBrand-LsH9OAbQ.js","assets/RenderTopNavBar-BKjAQtrP.js","assets/mdtoui-CrW6q7x2.js","assets/index-3znfDf88.js","assets/redirectTo-_VcDkk4z.js","assets/index-BIsQGgQp.js","assets/links-BgPQ3f7b.js","assets/mdui-CVidgDKD.js","assets/releases-28YzCjnP.js","assets/error-pmzUJ_SX.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +function as(t,e){for(var a=0;an[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function a(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(l){if(l.ep)return;l.ep=!0;const i=a(l);fetch(l.href,i)}})();const Xp="modulepreload",Qp=function(t){return"/"+t},Bf={},xe=function(e,a,n){let l=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),r=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.all(a.map(u=>{if(u=Qp(u),u in Bf)return;Bf[u]=!0;const c=u.endsWith(".css"),o=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${o}`))return;const s=document.createElement("link");if(s.rel=c?"stylesheet":Xp,c||(s.as="script",s.crossOrigin=""),s.href=u,r&&s.setAttribute("nonce",r),document.head.appendChild(s),c)return new Promise((m,f)=>{s.addEventListener("load",m),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}return l.then(()=>e()).catch(i=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=i,window.dispatchEvent(r),!r.defaultPrevented)throw i})};var lT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Lh={exports:{}},wu={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zp=Symbol.for("react.transitional.element"),Kp=Symbol.for("react.fragment");function Hh(t,e,a){var n=null;if(a!==void 0&&(n=""+a),e.key!==void 0&&(n=""+e.key),"key"in e){a={};for(var l in e)l!=="key"&&(a[l]=e[l])}else a=e;return e=a.ref,{$$typeof:Zp,type:t,key:n,ref:e!==void 0?e:null,props:a}}wu.Fragment=Kp;wu.jsx=Hh;wu.jsxs=Hh;Lh.exports=wu;var ar=Lh.exports,Bh={exports:{}},X={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ns=Symbol.for("react.transitional.element"),Pp=Symbol.for("react.portal"),Jp=Symbol.for("react.fragment"),Fp=Symbol.for("react.strict_mode"),Wp=Symbol.for("react.profiler"),Ip=Symbol.for("react.consumer"),t0=Symbol.for("react.context"),e0=Symbol.for("react.forward_ref"),a0=Symbol.for("react.suspense"),n0=Symbol.for("react.memo"),kh=Symbol.for("react.lazy"),kf=Symbol.iterator;function l0(t){return t===null||typeof t!="object"?null:(t=kf&&t[kf]||t["@@iterator"],typeof t=="function"?t:null)}var jh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vh=Object.assign,Yh={};function El(t,e,a){this.props=t,this.context=e,this.refs=Yh,this.updater=a||jh}El.prototype.isReactComponent={};El.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};El.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function $h(){}$h.prototype=El.prototype;function ls(t,e,a){this.props=t,this.context=e,this.refs=Yh,this.updater=a||jh}var is=ls.prototype=new $h;is.constructor=ls;Vh(is,El.prototype);is.isPureReactComponent=!0;var jf=Array.isArray,gt={H:null,A:null,T:null},qh=Object.prototype.hasOwnProperty;function rs(t,e,a,n,l,i,r){return a=r.ref,{$$typeof:ns,type:t,key:e,ref:a!==void 0?a:null,props:r}}function i0(t,e){return rs(t.type,e,null,void 0,void 0,void 0,t.props)}function us(t){return typeof t=="object"&&t!==null&&t.$$typeof===ns}function r0(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(a){return e[a]})}var Vf=/\/+/g;function oc(t,e){return typeof t=="object"&&t!==null&&t.key!=null?r0(""+t.key):e.toString(36)}function Yf(){}function u0(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Yf,Yf):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function kn(t,e,a,n,l){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var r=!1;if(t===null)r=!0;else switch(i){case"bigint":case"string":case"number":r=!0;break;case"object":switch(t.$$typeof){case ns:case Pp:r=!0;break;case kh:return r=t._init,kn(r(t._payload),e,a,n,l)}}if(r)return l=l(t),r=n===""?"."+oc(t,0):n,jf(l)?(a="",r!=null&&(a=r.replace(Vf,"$&/")+"/"),kn(l,e,a,"",function(o){return o})):l!=null&&(us(l)&&(l=i0(l,a+(!l.key||t&&t.key===l.key?"":(""+l.key).replace(Vf,"$&/")+"/")+r)),e.push(l)),1;r=0;var u=n===""?".":n+":";if(jf(t))for(var c=0;c>>1,ct=x[lt];if(0>>1;ltl(be,L))sel(ne,be)?(x[lt]=ne,x[se]=L,lt=se):(x[lt]=be,x[Xt]=L,lt=Xt);else if(sel(ne,L))x[lt]=ne,x[se]=L,lt=se;else break t}}return V}function l(x,V){var L=x.sortIndex-V.sortIndex;return L!==0?L:x.id-V.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var r=Date,u=r.now();t.unstable_now=function(){return r.now()-u}}var c=[],o=[],s=1,m=null,f=3,p=!1,E=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;function y(x){for(var V=a(o);V!==null;){if(V.callback===null)n(o);else if(V.startTime<=x)n(o),V.sortIndex=V.expirationTime,e(c,V);else break;V=a(o)}}function w(x){if(b=!1,y(x),!E)if(a(c)!==null)E=!0,At();else{var V=a(o);V!==null&&Jt(w,V.startTime-x)}}var R=!1,D=-1,v=5,M=-1;function H(){return!(t.unstable_now()-Mx&&H());){var lt=m.callback;if(typeof lt=="function"){m.callback=null,f=m.priorityLevel;var ct=lt(m.expirationTime<=x);if(x=t.unstable_now(),typeof ct=="function"){m.callback=ct,y(x),V=!0;break e}m===a(c)&&n(c),y(x)}else n(c);m=a(c)}if(m!==null)V=!0;else{var oe=a(o);oe!==null&&Jt(w,oe.startTime-x),V=!1}}break t}finally{m=null,f=L,p=!1}V=void 0}}finally{V?Q():R=!1}}}var Q;if(typeof d=="function")Q=function(){d(z)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,Et=dt.port2;dt.port1.onmessage=z,Q=function(){Et.postMessage(null)}}else Q=function(){_(z,0)};function At(){R||(R=!0,Q())}function Jt(x,V){D=_(function(){x(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(x){x.callback=null},t.unstable_continueExecution=function(){E||p||(E=!0,At())},t.unstable_forceFrameRate=function(x){0>x||125lt?(x.sortIndex=L,e(o,x),a(c)===null&&x===a(o)&&(b?(h(D),D=-1):b=!0,Jt(w,L-lt))):(x.sortIndex=ct,e(c,x),E||p||(E=!0,At())),x},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(x){var V=f;return function(){var L=f;f=V;try{return x.apply(this,arguments)}finally{f=L}}}})(Qh);Xh.exports=Qh;var s0=Xh.exports,Zh={exports:{}},ae={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function Kh(t){var e="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ph)}catch(t){console.error(t)}}Ph(),Zh.exports=ae;var cs=Zh.exports;const Jh=Sl(cs),h0=as({__proto__:null,default:Jh},[cs]);/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xt=s0,m0=T,v0=cs;function C(t){var e="https://react.dev/errors/"+t;if(1$n||(t.current=eo[$n],eo[$n]=null,$n--)}function vt(t,e){$n++,eo[$n]=t.current,t.current=e}var Ke=ea(null),bi=ea(null),Ba=ea(null),ao=ea(null),$r={$$typeof:Ua,Provider:null,Consumer:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qr(t,e){switch(vt(Ba,e),vt(bi,t),vt(Ke,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=Gd(t),e=yy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Lt(Ke),vt(Ke,e)}function ol(){Lt(Ke),Lt(bi),Lt(Ba)}function no(t){t.memoizedState!==null&&vt(ao,t);var e=Ke.current,a=yy(e,t.type);e!==a&&(vt(bi,t),vt(Ke,a))}function Gr(t){bi.current===t&&(Lt(Ke),Lt(bi)),ao.current===t&&(Lt(ao),$r._currentValue=null)}var lo=Object.prototype.hasOwnProperty,os=xt.unstable_scheduleCallback,sc=xt.unstable_cancelCallback,w0=xt.unstable_shouldYield,A0=xt.unstable_requestPaint,Pe=xt.unstable_now,T0=xt.unstable_getCurrentPriorityLevel,ss=xt.unstable_ImmediatePriority,lm=xt.unstable_UserBlockingPriority,Xr=xt.unstable_NormalPriority,C0=xt.unstable_LowPriority,im=xt.unstable_IdlePriority,_0=xt.log,R0=xt.unstable_setDisableYieldValue,Vi=null,ye=null;function O0(t){if(ye&&typeof ye.onCommitFiberRoot=="function")try{ye.onCommitFiberRoot(Vi,t,void 0,(t.current.flags&128)===128)}catch{}}function La(t){if(typeof _0=="function"&&R0(t),ye&&typeof ye.setStrictMode=="function")try{ye.setStrictMode(Vi,t)}catch{}}var Me=Math.clz32?Math.clz32:x0,D0=Math.log,M0=Math.LN2;function x0(t){return t>>>=0,t===0?32:31-(D0(t)/M0|0)|0}var rr=128,ur=4194304;function Wl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Qr(t,e){var a=t.pendingLanes;if(a===0)return 0;var n=0,l=t.suspendedLanes;t=t.pingedLanes;var i=a&134217727;return i!==0?(a=i&~l,a!==0?n=Wl(a):(t&=i,t!==0&&(n=Wl(t)))):(a&=~l,a!==0?n=Wl(a):t!==0&&(n=Wl(t))),n===0?0:e!==0&&e!==n&&!(e&l)&&(l=n&-n,t=e&-e,l>=t||l===32&&(t&4194176)!==0)?e:n}function z0(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rm(t,e){return t.errorRecoveryDisabledLanes&e?0:(t=t.pendingLanes&-536870913,t!==0?t:t&536870912?536870912:0)}function um(){var t=rr;return rr<<=1,!(rr&4194176)&&(rr=128),t}function cm(){var t=ur;return ur<<=1,!(ur&62914560)&&(ur=4194304),t}function fc(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function N0(t,e,a){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0,e=t.entanglements;for(var l=t.expirationTimes,i=t.hiddenUpdates;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),B0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Pf={},Jf={};function k0(t){return lo.call(Jf,t)?!0:lo.call(Pf,t)?!1:B0.test(t)?Jf[t]=!0:(Pf[t]=!0,!1)}function Cr(t,e,a){if(k0(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function dc(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function aa(t,e,a,n){if(n===null)t.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+n)}}var hc;function ti(t){if(hc===void 0)try{throw Error()}catch(a){var e=a.stack.trim().match(/\n( *(at )?)/);hc=e&&e[1]||""}return` +`+hc+t}var mc=!1;function vc(t,e){if(!t||mc)return"";mc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var n={DetermineComponentFrameRoot:function(){try{if(e){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(p){var f=p}Reflect.construct(t,[],m)}else{try{m.call()}catch(p){f=p}t.call(m.prototype)}}else{try{throw Error()}catch(p){f=p}(m=t())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});try{var i=n.DetermineComponentFrameRoot(),r=i[0],u=i[1];if(r&&u){var c=r.split(` +`),o=u.split(` +`);for(l=n=0;nl||c[n]!==o[l]){var s=` +`+c[n].replace(" at new "," at ");return t.displayName&&s.includes("")&&(s=s.replace("",t.displayName)),s}while(1<=n&&0<=l);break}}}finally{mc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ti(a):""}function j0(t){switch(t.tag){case 26:case 27:case 5:return ti(t.type);case 16:return ti("Lazy");case 13:return ti("Suspense");case 19:return ti("SuspenseList");case 0:case 15:return t=vc(t.type,!1),t;case 11:return t=vc(t.type.render,!1),t;case 1:return t=vc(t.type,!0),t;default:return""}}function Ff(t){try{var e="";do e+=j0(t),t=t.return;while(t);return e}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}function Te(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function vm(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function V0(t){var e=vm(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return l.call(this)},set:function(r){n=""+r,i.call(this,r)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Zr(t){t._valueTracker||(t._valueTracker=V0(t))}function ym(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),n="";return t&&(n=vm(t)?t.checked?"true":"false":t.value),t=n,t!==a?(e.setValue(t),!0):!1}function Kr(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Y0=/[\n"\\]/g;function Oe(t){return t.replace(Y0,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function ro(t,e,a,n,l,i,r,u){t.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.type=r:t.removeAttribute("type"),e!=null?r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Te(e)):t.value!==""+Te(e)&&(t.value=""+Te(e)):r!=="submit"&&r!=="reset"||t.removeAttribute("value"),e!=null?uo(t,r,Te(e)):a!=null?uo(t,r,Te(a)):n!=null&&t.removeAttribute("value"),l==null&&i!=null&&(t.defaultChecked=!!i),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?t.name=""+Te(u):t.removeAttribute("name")}function pm(t,e,a,n,l,i,r,u){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||e!=null))return;a=a!=null?""+Te(a):"",e=e!=null?""+Te(e):a,u||e===t.value||(t.value=e),t.defaultValue=e}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=u?t.checked:!!n,t.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.name=r)}function uo(t,e,a){e==="number"&&Kr(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function tl(t,e,a,n){if(t=t.options,e){e={};for(var l=0;l=ii),ld=" ",id=!1;function Tm(t,e){switch(t){case"keyup":return vg.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Gn=!1;function pg(t,e){switch(t){case"compositionend":return Cm(e);case"keypress":return e.which!==32?null:(id=!0,ld);case"textInput":return t=e.data,t===ld&&id?null:t;default:return null}}function gg(t,e){if(Gn)return t==="compositionend"||!ys&&Tm(t,e)?(t=wm(),Rr=ms=Ha=null,Gn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:a,offset:e-t};t=n}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=sd(a)}}function Dm(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Dm(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Mm(){for(var t=window,e=Kr();e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=Kr(t.document)}return e}function ps(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function _g(t){var e=Mm(),a=t.focusedElem,n=t.selectionRange;if(e!==a&&a&&a.ownerDocument&&Dm(a.ownerDocument.documentElement,a)){if(n!==null&&ps(a)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in a)a.selectionStart=e,a.selectionEnd=Math.min(t,a.value.length);else if(t=(e=a.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var l=a.textContent.length,i=Math.min(n.start,l);n=n.end===void 0?i:Math.min(n.end,l),!t.extend&&i>n&&(l=n,n=i,i=l),l=fd(a,i);var r=fd(a,n);l&&r&&(t.rangeCount!==1||t.anchorNode!==l.node||t.anchorOffset!==l.offset||t.focusNode!==r.node||t.focusOffset!==r.offset)&&(e=e.createRange(),e.setStart(l.node,l.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(r.node,r.offset)):(e.setEnd(r.node,r.offset),t.addRange(e)))}}for(e=[],t=a;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Xn=null,so=null,ui=null,fo=!1;function dd(t,e,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fo||Xn==null||Xn!==Kr(n)||(n=Xn,"selectionStart"in n&&ps(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ui&&Ai(ui,n)||(ui=n,n=su(so,"onSelect"),0>=r,l-=r,oa=1<<32-Me(e)+l|a<M?(H=v,v=null):H=v.sibling;var z=f(h,v,y[M],w);if(z===null){v===null&&(v=H);break}t&&v&&z.alternate===null&&e(h,v),d=i(z,d,M),D===null?R=z:D.sibling=z,D=z,v=H}if(M===y.length)return a(h,v),tt&&tn(h,M),R;if(v===null){for(;MM?(H=v,v=null):H=v.sibling;var Q=f(h,v,z.value,w);if(Q===null){v===null&&(v=H);break}t&&v&&Q.alternate===null&&e(h,v),d=i(Q,d,M),D===null?R=Q:D.sibling=Q,D=Q,v=H}if(z.done)return a(h,v),tt&&tn(h,M),R;if(v===null){for(;!z.done;M++,z=y.next(),null)z=m(h,z.value,w),z!==null&&(d=i(z,d,M),D===null?R=z:D.sibling=z,D=z);return tt&&tn(h,M),R}for(v=n(v);!z.done;M++,z=y.next(),null)z=p(v,h,M,z.value,w),z!==null&&(t&&z.alternate!==null&&v.delete(z.key===null?M:z.key),d=i(z,d,M),D===null?R=z:D.sibling=z,D=z);return t&&v.forEach(function(dt){return e(h,dt)}),tt&&tn(h,M),R}function _(h,d,y,w){if(typeof y=="object"&&y!==null&&y.type===Jl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case lr:t:{for(var R=y.key,D=d;D!==null;){if(D.key===R){if(R=y.type,R===Jl){if(D.tag===7){a(h,D.sibling),d=l(D,y.props.children),d.return=h,h=d;break t}}else if(D.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ia&&bd(R)===D.type){a(h,D.sibling),d=l(D,y.props),Vl(h,D,d,y),d.return=h,h=d;break t}a(h,D);break}else e(h,D);D=D.sibling}y.type===Jl?(d=on(y.props.children,h.mode,w,y.key),d.return=h,h=d):(w=Ur(y.type,y.key,y.props,null,h.mode,w),Vl(h,d,w,y),w.return=h,h=w)}return r(h);case ir:t:{for(D=y.key;d!==null;){if(d.key===D)if(d.tag===4&&d.stateNode.containerInfo===y.containerInfo&&d.stateNode.implementation===y.implementation){a(h,d.sibling),d=l(d,y.children||[]),d.return=h,h=d;break t}else{a(h,d);break}else e(h,d);d=d.sibling}d=Hc(y,h.mode,w),d.return=h,h=d}return r(h);case Ia:return D=y._init,_(h,d,D(y._payload),w)}if(Fl(y))return E(h,d,y,w);if(Hl(y)){if(D=Hl(y),typeof D!="function")throw Error(C(150));return y=D.call(y),b(h,d,y,w)}if(typeof y.then=="function")return _(h,d,sr(y),w);if(y.$$typeof===Ua)return _(h,d,mr(h,y,w),w);fr(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,d!==null&&d.tag===6?(a(h,d.sibling),d=l(d,y),d.return=h,h=d):(a(h,d),d=Lc(y,h.mode,w),d.return=h,h=d),r(h)):a(h,d)}return function(h,d,y,w){return Ci=0,h=_(h,d,y,w),al=null,h}}var dn=Ym(!0),$m=Ym(!1),dl=ea(null),Wr=ea(0);function Sd(t,e){t=ga,vt(Wr,t),vt(dl,e),ga=t|e.baseLanes}function vo(){vt(Wr,ga),vt(dl,dl.current)}function ws(){ga=Wr.current,Lt(dl),Lt(Wr)}var We=ea(null),Je=null;function Ma(t){var e=t.alternate;vt(Mt,Mt.current&1),vt(We,t),Je===null&&(e===null||dl.current!==null||e.memoizedState!==null)&&(Je=t)}function qm(t){if(t.tag===22){if(vt(Mt,Mt.current),vt(We,t),Je===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(Je=t)}}else xa()}function xa(){vt(Mt,Mt.current),vt(We,We.current)}function fa(t){Lt(We),Je===t&&(Je=null),Lt(Mt)}var Mt=ea(0);function Ir(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var xg=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},zg=xt.unstable_scheduleCallback,Ng=xt.unstable_NormalPriority,Dt={$$typeof:Ua,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function As(){return{controller:new xg,data:new Map,refCount:0}}function qi(t){t.refCount--,t.refCount===0&&zg(Ng,function(){t.controller.abort()})}var oi=null,yo=0,hl=0,nl=null;function Ug(t,e){if(oi===null){var a=oi=[];yo=0,hl=Ps(),nl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return yo++,e.then(Ed,Ed),e}function Ed(){if(oi!==null&&--yo===0){nl!==null&&(nl.status="fulfilled");var t=oi;oi=null,hl=0,nl=null;for(var e=0;ei?i:8;var r=K.T,u={_callbacks:new Set};K.T=u,Bs(t,!1,e,a);try{var c=l();if(c!==null&&typeof c=="object"&&typeof c.then=="function"){Gm(u,c);var o=Lg(c,n);rl(t,e,o)}else rl(t,e,n)}catch(s){rl(t,e,{then:function(){},status:"rejected",reason:s})}finally{st.p=i,K.T=r}}function Yg(){}function go(t,e,a,n){if(t.tag!==5)throw Error(C(476));var l=yv(t).queue;vv(t,l,e,li,a===null?Yg:function(){return pv(t),a(n)})}function yv(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:li,baseState:li,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:li},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function pv(t){Ts();var e=yv(t).next.queue;rl(t,e,{})}function Hs(){var t=Pt($r);return t!==null?t:li}function gv(){return Ot().memoizedState}function bv(){return Ot().memoizedState}function $g(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=ma();t=ha(a);var n=ka(e,t,a);n!==null&&(ee(n,e,a),fi(n,e,a)),e={cache:As()},t.payload=e;return}e=e.return}}function qg(t,e,a){var n=ma();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Nu(t)?Sv(e,a):(a=bs(t,e,a,n),a!==null&&(ee(a,t,n),Ev(a,e,n)))}function rl(t,e,a){var n=ma(),l={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Nu(t))Sv(e,l);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var r=e.lastRenderedState,u=i(r,a);if(l.hasEagerState=!0,l.eagerState=u,ze(u,r)){Du(t,e,l,0),rt===null&&Ou();return}}catch{}finally{}a=bs(t,e,l,n),a!==null&&(ee(a,t,n),Ev(a,e,n))}}function Bs(t,e,a,n){if(Ts(),n={lane:2,revertLane:Ps(),action:n,hasEagerState:!1,eagerState:null,next:null},Nu(t)){if(e)throw Error(C(479))}else e=bs(t,a,n,2),e!==null&&ee(e,t,2)}function Nu(t){var e=t.alternate;return t===G||e!==null&&e===G}function Sv(t,e){ll=tu=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function Ev(t,e,a){if(a&4194176){var n=e.lanes;n&=t.pendingLanes,a|=n,e.lanes=a,sm(t,a)}}var Ie={readContext:Pt,use:xu,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt};Ie.useCacheRefresh=wt;Ie.useMemoCache=wt;Ie.useHostTransitionStatus=wt;Ie.useFormState=wt;Ie.useActionState=wt;Ie.useOptimistic=wt;var wn={readContext:Pt,use:xu,useCallback:function(t,e){return le().memoizedState=[t,e===void 0?null:e],t},useContext:Pt,useEffect:wd,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,zr(4194308,4,sv.bind(null,e,t),a)},useLayoutEffect:function(t,e){return zr(4194308,4,t,e)},useInsertionEffect:function(t,e){zr(4,2,t,e)},useMemo:function(t,e){var a=le();e=e===void 0?null:e;var n=t();return hn&&(La(!0),t(),La(!1)),a.memoizedState=[n,e],n},useReducer:function(t,e,a){var n=le();if(a!==void 0){var l=a(e);hn&&(La(!0),a(e),La(!1))}else l=e;return n.memoizedState=n.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},n.queue=t,t=t.dispatch=qg.bind(null,G,t),[n.memoizedState,t]},useRef:function(t){var e=le();return t={current:t},e.memoizedState=t},useState:function(t){t=po(t);var e=t.queue,a=rl.bind(null,G,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:Us,useDeferredValue:function(t,e){var a=le();return Ls(a,t,e)},useTransition:function(){var t=po(!1);return t=vv.bind(null,G,t.queue,!0,!1),le().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var n=G,l=le();if(tt){if(a===void 0)throw Error(C(407));a=a()}else{if(a=e(),rt===null)throw Error(C(349));et&60||Pm(n,e,a)}l.memoizedState=a;var i={value:a,getSnapshot:e};return l.queue=i,wd(Fm.bind(null,n,i,t),[t]),n.flags|=2048,ml(9,Jm.bind(null,n,i,a,e),{destroy:void 0},null),a},useId:function(){var t=le(),e=rt.identifierPrefix;if(tt){var a=sa,n=oa;a=(n&~(1<<32-Me(n)-1)).toString(32)+a,e=":"+e+"R"+a,a=eu++,0 title"))),Gt(l,n,a),l[Kt]=t,Ut(l),n=l;break t;case"link":var i=Pd("link","href",e).get(n+(a.href||""));if(i){for(var r=0;r<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?t.multiple=!0:n.size&&(t.size=n.size);break;default:t=typeof n.is=="string"?l.createElement(a,{is:n.is}):l.createElement(a)}}t[Kt]=e,t[te]=n;t:for(l=e.child;l!==null;){if(l.tag===5||l.tag===6)t.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break t;for(;l.sibling===null;){if(l.return===null||l.return===e)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}e.stateNode=t;t:switch(Gt(t,a,n),a){case"button":case"input":case"select":case"textarea":t=!!n.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&ia(e)}}return bt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&ia(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(C(166));if(t=Ba.current,jl(e)){if(t=e.stateNode,a=e.memoizedProps,n=null,l=Wt,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}t[Kt]=e,t=!!(t.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||vy(t.nodeValue,a)),t||fn(e)}else t=fu(t).createTextNode(n),t[Kt]=e,e.stateNode=t}return bt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=jl(e),n!==null&&n.dehydrated!==null){if(t===null){if(!l)throw Error(C(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(C(317));l[Kt]=e}else $i(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;bt(e),l=!1}else ke!==null&&(No(ke),ke=null),l=!0;if(!l)return e.flags&256?(fa(e),e):(fa(e),null)}if(fa(e),e.flags&128)return e.lanes=a,e;if(a=n!==null,t=t!==null&&t.memoizedState!==null,a){n=e.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool);var i=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==l&&(n.flags|=2048)}return a!==t&&a&&(e.child.flags|=8192),vr(e,e.updateQueue),bt(e),null;case 4:return ol(),t===null&&Js(e.stateNode.containerInfo),bt(e),null;case 10:return da(e.type),bt(e),null;case 19:if(Lt(Mt),l=e.memoizedState,l===null)return bt(e),null;if(n=(e.flags&128)!==0,i=l.rendering,i===null)if(n)Yl(l,!1);else{if(St!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(i=Ir(t),i!==null){for(e.flags|=128,Yl(l,!1),t=i.updateQueue,e.updateQueue=t,vr(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)Iv(a,t),a=a.sibling;return vt(Mt,Mt.current&1|2),e.child}t=t.sibling}l.tail!==null&&Pe()>ru&&(e.flags|=128,n=!0,Yl(l,!1),e.lanes=4194304)}else{if(!n)if(t=Ir(i),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,vr(e,t),Yl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!tt)return bt(e),null}else 2*Pe()-l.renderingStartTime>ru&&a!==536870912&&(e.flags|=128,n=!0,Yl(l,!1),e.lanes=4194304);l.isBackwards?(i.sibling=e.child,e.child=i):(t=l.last,t!==null?t.sibling=i:e.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Pe(),e.sibling=null,t=Mt.current,vt(Mt,n?t&1|2:t&1),e):(bt(e),null);case 22:case 23:return fa(e),ws(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?a&536870912&&!(e.flags&128)&&(bt(e),e.subtreeFlags&6&&(e.flags|=8192)):bt(e),a=e.updateQueue,a!==null&&vr(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==a&&(e.flags|=2048),t!==null&&Lt(cn),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),da(Dt),bt(e),null;case 25:return null}throw Error(C(156,e.tag))}function Jg(t,e){switch(Es(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return da(Dt),ol(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Gr(e),null;case 13:if(fa(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(C(340));$i()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Mt),null;case 4:return ol(),null;case 10:return da(e.type),null;case 22:case 23:return fa(e),ws(),t!==null&&Lt(cn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return da(Dt),null;case 25:return null;default:return null}}function ey(t,e){switch(Es(e),e.tag){case 3:da(Dt),ol();break;case 26:case 27:case 5:Gr(e);break;case 4:ol();break;case 13:fa(e);break;case 19:Lt(Mt);break;case 10:da(e.type);break;case 22:case 23:fa(e),ws(),t!==null&&Lt(cn);break;case 24:da(Dt)}}var Fg={getCacheForType:function(t){var e=Pt(Dt),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a}},Wg=typeof WeakMap=="function"?WeakMap:Map,at=0,rt=null,P=null,et=0,yt=0,we=null,Gs=!1,ga=0,St=0,ba=0,Cl=0,Xs=0,ie=0,vi=null,Ve=null,yl=!1,iu=!1,Qs=0,ru=1/0,Ri=null,Va=null,yr=!1,en=null,yi=0,Mo=0,xo=null,pi=0,zo=null;function ma(){if(at&2&&et!==0)return et&-et;if(Ts()!==null){var t=hl;return t!==0?t:Ps()}return dm()}function ay(){ie===0&&(ie=!(et&536870912)||tt?um():536870912);var t=We.current;return t!==null&&(t.flags|=32),ie}function ee(t,e,a){(t===rt&&yt===2||t.cancelPendingCommit!==null)&&(Cn(t,0),Ze(t,et,ie)),Xi(t,a),(!(at&2)||t!==rt)&&(t===rt&&(!(at&2)&&(Cl|=a),St===4&&Ze(t,et,ie)),re(t))}function ny(t,e){if(at&6)throw Error(C(327));var a=t.callbackNode;if(ul()&&t.callbackNode!==a)return null;var n=Qr(t,t===rt?et:0);if(n===0)return null;var l=(n&60)===0&&(n&t.expiredLanes)===0&&!e;if(e=l?ab(t,n):uu(t,n),e!==0){var i=l;do{if(e===6)Ze(t,n,0);else{if(l=t.current.alternate,i&&!Ig(l)){e=uu(t,n),i=!1;continue}if(e===2){i=n;var r=rm(t,i);if(r!==0&&(n=r,e=ly(t,i,r),i=!1,e!==2))continue}if(e===1){Cn(t,0),Ze(t,n,0);break}t.finishedWork=l,t.finishedLanes=n;t:{switch(i=t,e){case 0:case 1:throw Error(C(345));case 4:if((n&4194176)===n){Ze(i,n,ie);break t}break;case 2:Ve=null;break;case 3:case 5:break;default:throw Error(C(329))}if((n&62914560)===n&&(e=Qs+300-Pe(),10a?32:a,K.T=null,en===null)var i=!1;else{a=xo,xo=null;var r=en,u=yi;if(en=null,yi=0,at&6)throw Error(C(331));var c=at;if(at|=4,Fv(r.current),Kv(r,r.current,u,a),at=c,Qi(),ye&&typeof ye.onPostCommitFiberRoot=="function")try{ye.onPostCommitFiberRoot(Vi,r)}catch{}i=!0}return i}finally{st.p=l,K.T=n,sy(t,e)}}return!1}function kd(t,e,a){e=De(a,e),e=bo(t.stateNode,e,2),t=ka(t,e,2),t!==null&&(Xi(t,2),re(t))}function ut(t,e,a){if(t.tag===3)kd(t,t,a);else for(;e!==null;){if(e.tag===3){kd(e,t,a);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Va===null||!Va.has(n))){t=De(a,t),a=Cv(2),n=ka(e,a,2),n!==null&&(_v(a,n,e,t),Xi(n,2),re(n));break}}e=e.return}}function Bc(t,e,a){var n=t.pingCache;if(n===null){n=t.pingCache=new Wg;var l=new Set;n.set(e,l)}else l=n.get(e),l===void 0&&(l=new Set,n.set(e,l));l.has(a)||(Gs=!0,l.add(a),t=ib.bind(null,t,e,a),e.then(t,t))}function ib(t,e,a){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&a,at&2?yl=!0:at&4&&(iu=!0),Ks(),rt===t&&(et&a)===a&&(St===4||St===3&&(et&62914560)===et&&300>Pe()-Qs?!(at&2)&&Cn(t,0):Xs|=a),re(t)}function fy(t,e){e===0&&(e=cm()),t=Ga(t,e),t!==null&&(Xi(t,e),re(t))}function rb(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),fy(t,a)}function ub(t,e){var a=0;switch(t.tag){case 13:var n=t.stateNode,l=t.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(C(314))}n!==null&&n.delete(e),fy(t,a)}function Ks(){if(50"u"?null:document;function by(t,e,a){var n=_l;if(n&&typeof e=="string"&&e){var l=Oe(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),Zd.has(l)||(Zd.add(l),t={rel:t,crossOrigin:a,href:e},n.querySelector(l)===null&&(e=n.createElement("link"),Gt(e,"link",t),Ut(e),n.head.appendChild(e)))}}function Cb(t){Sa.D(t),by("dns-prefetch",t,null)}function _b(t,e){Sa.C(t,e),by("preconnect",t,e)}function Rb(t,e,a){Sa.L(t,e,a);var n=_l;if(n&&t&&e){var l='link[rel="preload"][as="'+Oe(e)+'"]';e==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+Oe(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+Oe(a.imageSizes)+'"]')):l+='[href="'+Oe(t)+'"]';var i=l;switch(e){case"style":i=pl(t);break;case"script":i=Rl(t)}Ne.has(i)||(t=ft({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Ne.set(i,t),n.querySelector(l)!==null||e==="style"&&n.querySelector(Zi(i))||e==="script"&&n.querySelector(Ki(i))||(e=n.createElement("link"),Gt(e,"link",t),Ut(e),n.head.appendChild(e)))}}function Ob(t,e){Sa.m(t,e);var a=_l;if(a&&t){var n=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+Oe(n)+'"][href="'+Oe(t)+'"]',i=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Rl(t)}if(!Ne.has(i)&&(t=ft({rel:"modulepreload",href:t},e),Ne.set(i,t),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ki(i)))return}n=a.createElement("link"),Gt(n,"link",t),Ut(n),a.head.appendChild(n)}}}function Db(t,e,a){Sa.S(t,e,a);var n=_l;if(n&&t){var l=In(n).hoistableStyles,i=pl(t);e=e||"default";var r=l.get(i);if(!r){var u={loading:0,preload:null};if(r=n.querySelector(Zi(i)))u.loading=5;else{t=ft({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Ne.get(i))&&Fs(t,a);var c=r=n.createElement("link");Ut(c),Gt(c,"link",t),c._p=new Promise(function(o,s){c.onload=o,c.onerror=s}),c.addEventListener("load",function(){u.loading|=1}),c.addEventListener("error",function(){u.loading|=2}),u.loading|=4,Lr(r,e,n)}r={type:"stylesheet",instance:r,count:1,state:u},l.set(i,r)}}}function Mb(t,e){Sa.X(t,e);var a=_l;if(a&&t){var n=In(a).hoistableScripts,l=Rl(t),i=n.get(l);i||(i=a.querySelector(Ki(l)),i||(t=ft({src:t,async:!0},e),(e=Ne.get(l))&&Ws(t,e),i=a.createElement("script"),Ut(i),Gt(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(l,i))}}function xb(t,e){Sa.M(t,e);var a=_l;if(a&&t){var n=In(a).hoistableScripts,l=Rl(t),i=n.get(l);i||(i=a.querySelector(Ki(l)),i||(t=ft({src:t,async:!0,type:"module"},e),(e=Ne.get(l))&&Ws(t,e),i=a.createElement("script"),Ut(i),Gt(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(l,i))}}function zb(t,e,a){if(e=(e=Ba.current)?du(e):null,!e)throw Error(C(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=pl(a.href),e=In(e).hoistableStyles,t=e.get(a),t||(t={type:"style",instance:null,count:0,state:null},e.set(a,t)),t):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=pl(a.href);var n=In(e).hoistableStyles,l=n.get(t);return l||(e=e.ownerDocument||e,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,l),Ne.has(t)||Nb(e,t,{rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},l.state)),l}return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=Rl(a),e=In(e).hoistableScripts,t=e.get(a),t||(t={type:"script",instance:null,count:0,state:null},e.set(a,t)),t):{type:"void",instance:null,count:0,state:null};default:throw Error(C(444,t))}}function pl(t){return'href="'+Oe(t)+'"'}function Zi(t){return'link[rel="stylesheet"]['+t+"]"}function Sy(t){return ft({},t,{"data-precedence":t.precedence,precedence:null})}function Nb(t,e,a,n){Ne.set(e,a),t.querySelector(Zi(e))||(t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),Gt(e,"link",a),Ut(e),t.head.appendChild(e)))}function Rl(t){return'[src="'+Oe(t)+'"]'}function Ki(t){return"script[async]"+t}function Kd(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Oe(a.href)+'"]');if(n)return e.instance=n,Ut(n),n;var l=ft({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Ut(n),Gt(n,"style",l),Lr(n,a.precedence,t),e.instance=n;case"stylesheet":l=pl(a.href);var i=t.querySelector(Zi(l));if(i)return e.state.loading|=4,e.instance=i,Ut(i),i;n=Sy(a),(l=Ne.get(l))&&Fs(n,l),i=(t.ownerDocument||t).createElement("link"),Ut(i);var r=i;return r._p=new Promise(function(u,c){r.onload=u,r.onerror=c}),Gt(i,"link",n),e.state.loading|=4,Lr(i,a.precedence,t),e.instance=i;case"script":return i=Rl(a.src),(l=t.querySelector(Ki(i)))?(e.instance=l,Ut(l),l):(n=a,(l=Ne.get(i))&&(n=ft({},a),Ws(n,l)),t=t.ownerDocument||t,l=t.createElement("script"),Ut(l),Gt(l,"link",n),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(C(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(n=e.instance,e.state.loading|=4,Lr(n,a.precedence,t));return e.instance}function Lr(t,e,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,i=l,r=0;r title"):null)}function Ub(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ey(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Mi=null;function Lb(){}function Hb(t,e,a){if(Mi===null)throw Error(C(475));var n=Mi;if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var l=pl(a.href),i=t.querySelector(Zi(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(n.count++,n=hu.bind(n),t.then(n,n)),e.state.loading|=4,e.instance=i,Ut(i);return}i=t.ownerDocument||t,a=Sy(a),(l=Ne.get(l))&&Fs(a,l),i=i.createElement("link"),Ut(i);var r=i;r._p=new Promise(function(u,c){r.onload=u,r.onerror=c}),Gt(i,"link",a),e.instance=i}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(n.count++,e=hu.bind(n),t.addEventListener("load",e),t.addEventListener("error",e))}}function Bb(){if(Mi===null)throw Error(C(475));var t=Mi;return t.stylesheets&&t.count===0&&$o(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Oy)}catch(t){console.error(t)}}Oy(),Gh.exports=Au;var Dy=Gh.exports;const My=Sl(Dy),iT=as({__proto__:null,default:My},[Dy]);/** + * @remix-run/router v1.16.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function pt(){return pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function yn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Kb(){return Math.random().toString(36).substr(2,8)}function ah(t,e){return{usr:t.state,key:t.key,idx:e}}function Ui(t,e,a,n){return a===void 0&&(a=null),pt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ea(e):e,{state:a,key:e&&e.key||n||Kb()})}function pn(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ea(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function Pb(t,e,a,n){n===void 0&&(n={});let{window:l=document.defaultView,v5Compat:i=!1}=n,r=l.history,u=Ct.Pop,c=null,o=s();o==null&&(o=0,r.replaceState(pt({},r.state,{idx:o}),""));function s(){return(r.state||{idx:null}).idx}function m(){u=Ct.Pop;let _=s(),h=_==null?null:_-o;o=_,c&&c({action:u,location:b.location,delta:h})}function f(_,h){u=Ct.Push;let d=Ui(b.location,_,h);a&&a(d,_),o=s()+1;let y=ah(d,o),w=b.createHref(d);try{r.pushState(y,"",w)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(w)}i&&c&&c({action:u,location:b.location,delta:1})}function p(_,h){u=Ct.Replace;let d=Ui(b.location,_,h);a&&a(d,_),o=s();let y=ah(d,o),w=b.createHref(d);r.replaceState(y,"",w),i&&c&&c({action:u,location:b.location,delta:0})}function E(_){let h=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof _=="string"?_:pn(_);return d=d.replace(/ $/,"%20"),Z(h,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,h)}let b={get action(){return u},get location(){return t(l,r)},listen(_){if(c)throw new Error("A history only accepts one active listener");return l.addEventListener(eh,m),c=_,()=>{l.removeEventListener(eh,m),c=null}},createHref(_){return e(l,_)},createURL:E,encodeLocation(_){let h=E(_);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:f,replace:p,go(_){return r.go(_)}};return b}var mt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(mt||(mt={}));const Jb=new Set(["lazy","caseSensitive","path","id","index","children"]);function Fb(t){return t.index===!0}function Xo(t,e,a,n){return a===void 0&&(a=[]),n===void 0&&(n={}),t.map((l,i)=>{let r=[...a,i],u=typeof l.id=="string"?l.id:r.join("-");if(Z(l.index!==!0||!l.children,"Cannot specify children on an index route"),Z(!n[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Fb(l)){let c=pt({},l,e(l),{id:u});return n[u]=c,c}else{let c=pt({},l,e(l),{id:u,children:void 0});return n[u]=c,l.children&&(c.children=Xo(l.children,e,r,n)),c}})}function Wn(t,e,a){a===void 0&&(a="/");let n=typeof e=="string"?Ea(e):e,l=Ol(n.pathname||"/",a);if(l==null)return null;let i=xy(t);Ib(i);let r=null;for(let u=0;r==null&&u{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:r,route:i};c.relativePath.startsWith("/")&&(Z(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let o=va([n,c.relativePath]),s=a.concat(c);i.children&&i.children.length>0&&(Z(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+o+'".')),xy(i.children,e,s,o)),!(i.path==null&&!i.index)&&e.push({path:o,score:r1(o,i.index),routesMeta:s})};return t.forEach((i,r)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,r);else for(let c of zy(i.path))l(i,r,c)}),e}function zy(t){let e=t.split("/");if(e.length===0)return[];let[a,...n]=e,l=a.endsWith("?"),i=a.replace(/\?$/,"");if(n.length===0)return l?[i,""]:[i];let r=zy(n.join("/")),u=[];return u.push(...r.map(c=>c===""?i:[i,c].join("/"))),l&&u.push(...r),u.map(c=>t.startsWith("/")&&c===""?"/":c)}function Ib(t){t.sort((e,a)=>e.score!==a.score?a.score-e.score:u1(e.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}const t1=/^:[\w-]+$/,e1=3,a1=2,n1=1,l1=10,i1=-2,nh=t=>t==="*";function r1(t,e){let a=t.split("/"),n=a.length;return a.some(nh)&&(n+=i1),e&&(n+=a1),a.filter(l=>!nh(l)).reduce((l,i)=>l+(t1.test(i)?e1:i===""?n1:l1),n)}function u1(t,e){return t.length===e.length&&t.slice(0,-1).every((n,l)=>n===e[l])?t[t.length-1]-e[e.length-1]:0}function c1(t,e){let{routesMeta:a}=t,n={},l="/",i=[];for(let r=0;r{let{paramName:f,isOptional:p}=s;if(f==="*"){let b=u[m]||"";r=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const E=u[m];return p&&!E?o[f]=void 0:o[f]=(E||"").replace(/%2F/g,"/"),o},{}),pathname:i,pathnameBase:r,pattern:t}}function s1(t,e,a){e===void 0&&(e=!1),a===void 0&&(a=!0),yn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,u,c)=>(n.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,e?void 0:"i"),n]}function f1(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return yn(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ol(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&n!=="/"?null:t.slice(a)||"/"}function d1(t,e){e===void 0&&(e="/");let{pathname:a,search:n="",hash:l=""}=typeof t=="string"?Ea(t):t;return{pathname:a?a.startsWith("/")?a:h1(a,e):e,search:v1(n),hash:y1(l)}}function h1(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function Xc(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ny(t){return t.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function nf(t,e){let a=Ny(t);return e?a.map((n,l)=>l===t.length-1?n.pathname:n.pathnameBase):a.map(n=>n.pathnameBase)}function lf(t,e,a,n){n===void 0&&(n=!1);let l;typeof t=="string"?l=Ea(t):(l=pt({},t),Z(!l.pathname||!l.pathname.includes("?"),Xc("?","pathname","search",l)),Z(!l.pathname||!l.pathname.includes("#"),Xc("#","pathname","hash",l)),Z(!l.search||!l.search.includes("#"),Xc("#","search","hash",l)));let i=t===""||l.pathname==="",r=i?"/":l.pathname,u;if(r==null)u=a;else{let m=e.length-1;if(!n&&r.startsWith("..")){let f=r.split("/");for(;f[0]==="..";)f.shift(),m-=1;l.pathname=f.join("/")}u=m>=0?e[m]:"/"}let c=d1(l,u),o=r&&r!=="/"&&r.endsWith("/"),s=(i||r===".")&&a.endsWith("/");return!c.pathname.endsWith("/")&&(o||s)&&(c.pathname+="/"),c}const va=t=>t.join("/").replace(/\/\/+/g,"/"),m1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),v1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,y1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class rf{constructor(e,a,n,l){l===void 0&&(l=!1),this.status=e,this.statusText=a||"",this.internal=l,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function uf(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Uy=["post","put","patch","delete"],p1=new Set(Uy),g1=["get",...Uy],b1=new Set(g1),S1=new Set([301,302,303,307,308]),E1=new Set([307,308]),Qc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},w1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},cf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,A1=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Ly="remix-router-transitions";function T1(t){const e=t.window?t.window:typeof window<"u"?window:void 0,a=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!a;Z(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(t.mapRouteProperties)l=t.mapRouteProperties;else if(t.detectErrorBoundary){let g=t.detectErrorBoundary;l=S=>({hasErrorBoundary:g(S)})}else l=A1;let i={},r=Xo(t.routes,l,void 0,i),u,c=t.basename||"/",o=t.unstable_dataStrategy||O1,s=pt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),m=null,f=new Set,p=null,E=null,b=null,_=t.hydrationData!=null,h=Wn(r,t.history.location,c),d=null;if(h==null){let g=Ae(404,{pathname:t.history.location.pathname}),{matches:S,route:A}=hh(r);h=S,d={[A.id]:g}}let y,w=h.some(g=>g.route.lazy),R=h.some(g=>g.route.loader);if(w)y=!1;else if(!R)y=!0;else if(s.v7_partialHydration){let g=t.hydrationData?t.hydrationData.loaderData:null,S=t.hydrationData?t.hydrationData.errors:null,A=O=>O.route.loader?typeof O.route.loader=="function"&&O.route.loader.hydrate===!0?!1:g&&g[O.route.id]!==void 0||S&&S[O.route.id]!==void 0:!0;if(S){let O=h.findIndex(N=>S[N.route.id]!==void 0);y=h.slice(0,O+1).every(A)}else y=h.every(A)}else y=t.hydrationData!=null;let D,v={historyAction:t.history.action,location:t.history.location,matches:h,initialized:y,navigation:Qc,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||d,fetchers:new Map,blockers:new Map},M=Ct.Pop,H=!1,z,Q=!1,dt=new Map,Et=null,At=!1,Jt=!1,x=[],V=[],L=new Map,lt=0,ct=-1,oe=new Map,Xt=new Set,be=new Map,se=new Map,ne=new Set,Ka=new Map,Pa=new Map,rc=!1;function Mp(){if(m=t.history.listen(g=>{let{action:S,location:A,delta:O}=g;if(rc){rc=!1;return}yn(Pa.size===0||O!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let N=Nf({currentLocation:v.location,nextLocation:A,historyAction:S});if(N&&O!=null){rc=!0,t.history.go(O*-1),Wi(N,{state:"blocked",location:A,proceed(){Wi(N,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),t.history.go(O)},reset(){let $=new Map(v.blockers);$.set(N,Gl),fe({blockers:$})}});return}return Ja(S,A)}),a){V1(e,dt);let g=()=>Y1(e,dt);e.addEventListener("pagehide",g),Et=()=>e.removeEventListener("pagehide",g)}return v.initialized||Ja(Ct.Pop,v.location,{initialHydration:!0}),D}function xp(){m&&m(),Et&&Et(),f.clear(),z&&z.abort(),v.fetchers.forEach((g,S)=>Fi(S)),v.blockers.forEach((g,S)=>zf(S))}function zp(g){return f.add(g),()=>f.delete(g)}function fe(g,S){S===void 0&&(S={}),v=pt({},v,g);let A=[],O=[];s.v7_fetcherPersist&&v.fetchers.forEach((N,$)=>{N.state==="idle"&&(ne.has($)?O.push($):A.push($))}),[...f].forEach(N=>N(v,{deletedFetchers:O,unstable_viewTransitionOpts:S.viewTransitionOpts,unstable_flushSync:S.flushSync===!0})),s.v7_fetcherPersist&&(A.forEach(N=>v.fetchers.delete(N)),O.forEach(N=>Fi(N)))}function Ml(g,S,A){var O,N;let{flushSync:$}=A===void 0?{}:A,B=v.actionData!=null&&v.navigation.formMethod!=null&&Be(v.navigation.formMethod)&&v.navigation.state==="loading"&&((O=g.state)==null?void 0:O._isRedirect)!==!0,U;S.actionData?Object.keys(S.actionData).length>0?U=S.actionData:U=null:B?U=v.actionData:U=null;let q=S.loaderData?fh(v.loaderData,S.loaderData,S.matches||[],S.errors):v.loaderData,Y=v.blockers;Y.size>0&&(Y=new Map(Y),Y.forEach((j,ht)=>Y.set(ht,Gl)));let Bt=H===!0||v.navigation.formMethod!=null&&Be(v.navigation.formMethod)&&((N=g.state)==null?void 0:N._isRedirect)!==!0;u&&(r=u,u=void 0),At||M===Ct.Pop||(M===Ct.Push?t.history.push(g,g.state):M===Ct.Replace&&t.history.replace(g,g.state));let kt;if(M===Ct.Pop){let j=dt.get(v.location.pathname);j&&j.has(g.pathname)?kt={currentLocation:v.location,nextLocation:g}:dt.has(g.pathname)&&(kt={currentLocation:g,nextLocation:v.location})}else if(Q){let j=dt.get(v.location.pathname);j?j.add(g.pathname):(j=new Set([g.pathname]),dt.set(v.location.pathname,j)),kt={currentLocation:v.location,nextLocation:g}}fe(pt({},S,{actionData:U,loaderData:q,historyAction:M,location:g,initialized:!0,navigation:Qc,revalidation:"idle",restoreScrollPosition:Lf(g,S.matches||v.matches),preventScrollReset:Bt,blockers:Y}),{viewTransitionOpts:kt,flushSync:$===!0}),M=Ct.Pop,H=!1,Q=!1,At=!1,Jt=!1,x=[],V=[]}async function _f(g,S){if(typeof g=="number"){t.history.go(g);return}let A=Qo(v.location,v.matches,c,s.v7_prependBasename,g,s.v7_relativeSplatPath,S==null?void 0:S.fromRouteId,S==null?void 0:S.relative),{path:O,submission:N,error:$}=lh(s.v7_normalizeFormMethod,!1,A,S),B=v.location,U=Ui(v.location,O,S&&S.state);U=pt({},U,t.history.encodeLocation(U));let q=S&&S.replace!=null?S.replace:void 0,Y=Ct.Push;q===!0?Y=Ct.Replace:q===!1||N!=null&&Be(N.formMethod)&&N.formAction===v.location.pathname+v.location.search&&(Y=Ct.Replace);let Bt=S&&"preventScrollReset"in S?S.preventScrollReset===!0:void 0,kt=(S&&S.unstable_flushSync)===!0,j=Nf({currentLocation:B,nextLocation:U,historyAction:Y});if(j){Wi(j,{state:"blocked",location:U,proceed(){Wi(j,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),_f(g,S)},reset(){let ht=new Map(v.blockers);ht.set(j,Gl),fe({blockers:ht})}});return}return await Ja(Y,U,{submission:N,pendingError:$,preventScrollReset:Bt,replace:S&&S.replace,enableViewTransition:S&&S.unstable_viewTransition,flushSync:kt})}function Np(){if(uc(),fe({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){Ja(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}Ja(M||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function Ja(g,S,A){z&&z.abort(),z=null,M=g,At=(A&&A.startUninterruptedRevalidation)===!0,$p(v.location,v.matches),H=(A&&A.preventScrollReset)===!0,Q=(A&&A.enableViewTransition)===!0;let O=u||r,N=A&&A.overrideNavigation,$=Wn(O,S,c),B=(A&&A.flushSync)===!0;if(!$){let j=Ae(404,{pathname:S.pathname}),{matches:ht,route:zt}=hh(O);cc(),Ml(S,{matches:ht,loaderData:{},errors:{[zt.id]:j}},{flushSync:B});return}if(v.initialized&&!Jt&&U1(v.location,S)&&!(A&&A.submission&&Be(A.submission.formMethod))){Ml(S,{matches:$},{flushSync:B});return}z=new AbortController;let U=Ln(t.history,S,z.signal,A&&A.submission),q;if(A&&A.pendingError)q=[gi($).route.id,{type:mt.error,error:A.pendingError}];else if(A&&A.submission&&Be(A.submission.formMethod)){let j=await Up(U,S,A.submission,$,{replace:A.replace,flushSync:B});if(j.shortCircuited)return;q=j.pendingActionResult,N=Zc(S,A.submission),B=!1,U=Ln(t.history,U.url,U.signal)}let{shortCircuited:Y,loaderData:Bt,errors:kt}=await Lp(U,S,$,N,A&&A.submission,A&&A.fetcherSubmission,A&&A.replace,A&&A.initialHydration===!0,B,q);Y||(z=null,Ml(S,pt({matches:$},dh(q),{loaderData:Bt,errors:kt})))}async function Up(g,S,A,O,N){N===void 0&&(N={}),uc();let $=k1(S,A);fe({navigation:$},{flushSync:N.flushSync===!0});let B,U=Ko(O,S);if(!U.route.action&&!U.route.lazy)B={type:mt.error,error:Ae(405,{method:g.method,pathname:S.pathname,routeId:U.route.id})};else if(B=(await zl("action",g,[U],O))[0],g.signal.aborted)return{shortCircuited:!0};if(rn(B)){let q;return N&&N.replace!=null?q=N.replace:q=ch(B.response.headers.get("Location"),new URL(g.url),c)===v.location.pathname+v.location.search,await xl(g,B,{submission:A,replace:q}),{shortCircuited:!0}}if(ln(B))throw Ae(400,{type:"defer-action"});if(Re(B)){let q=gi(O,U.route.id);return(N&&N.replace)!==!0&&(M=Ct.Push),{pendingActionResult:[q.route.id,B]}}return{pendingActionResult:[U.route.id,B]}}async function Lp(g,S,A,O,N,$,B,U,q,Y){let Bt=O||Zc(S,N),kt=N||$||yh(Bt),j=u||r,[ht,zt]=ih(t.history,v,A,kt,S,s.v7_partialHydration&&U===!0,s.unstable_skipActionErrorRevalidation,Jt,x,V,ne,be,Xt,j,c,Y);if(cc(J=>!(A&&A.some(Ft=>Ft.route.id===J))||ht&&ht.some(Ft=>Ft.route.id===J)),ct=++lt,ht.length===0&&zt.length===0){let J=Mf();return Ml(S,pt({matches:A,loaderData:{},errors:Y&&Re(Y[1])?{[Y[0]]:Y[1].error}:null},dh(Y),J?{fetchers:new Map(v.fetchers)}:{}),{flushSync:q}),{shortCircuited:!0}}if(!At&&(!s.v7_partialHydration||!U)){zt.forEach(Ft=>{let Se=v.fetchers.get(Ft.key),jt=Xl(void 0,Se?Se.data:void 0);v.fetchers.set(Ft.key,jt)});let J;Y&&!Re(Y[1])?J={[Y[0]]:Y[1].data}:v.actionData&&(Object.keys(v.actionData).length===0?J=null:J=v.actionData),fe(pt({navigation:Bt},J!==void 0?{actionData:J}:{},zt.length>0?{fetchers:new Map(v.fetchers)}:{}),{flushSync:q})}zt.forEach(J=>{L.has(J.key)&&Aa(J.key),J.controller&&L.set(J.key,J.controller)});let Ul=()=>zt.forEach(J=>Aa(J.key));z&&z.signal.addEventListener("abort",Ul);let{loaderResults:Ta,fetcherResults:Dn}=await Rf(v.matches,A,ht,zt,g);if(g.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",Ul),zt.forEach(J=>L.delete(J.key));let Mn=mh([...Ta,...Dn]);if(Mn){if(Mn.idx>=ht.length){let J=zt[Mn.idx-ht.length].key;Xt.add(J)}return await xl(g,Mn.result,{replace:B}),{shortCircuited:!0}}let{loaderData:xn,errors:qe}=sh(v,A,ht,Ta,Y,zt,Dn,Ka);Ka.forEach((J,Ft)=>{J.subscribe(Se=>{(Se||J.done)&&Ka.delete(Ft)})}),s.v7_partialHydration&&U&&v.errors&&Object.entries(v.errors).filter(J=>{let[Ft]=J;return!ht.some(Se=>Se.route.id===Ft)}).forEach(J=>{let[Ft,Se]=J;qe=Object.assign(qe||{},{[Ft]:Se})});let Ii=Mf(),tr=xf(ct),er=Ii||tr||zt.length>0;return pt({loaderData:xn,errors:qe},er?{fetchers:new Map(v.fetchers)}:{})}function Hp(g,S,A,O){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");L.has(g)&&Aa(g);let N=(O&&O.unstable_flushSync)===!0,$=u||r,B=Qo(v.location,v.matches,c,s.v7_prependBasename,A,s.v7_relativeSplatPath,S,O==null?void 0:O.relative),U=Wn($,B,c);if(!U){Nl(g,S,Ae(404,{pathname:B}),{flushSync:N});return}let{path:q,submission:Y,error:Bt}=lh(s.v7_normalizeFormMethod,!0,B,O);if(Bt){Nl(g,S,Bt,{flushSync:N});return}let kt=Ko(U,q);if(H=(O&&O.preventScrollReset)===!0,Y&&Be(Y.formMethod)){Bp(g,S,q,kt,U,N,Y);return}be.set(g,{routeId:S,path:q}),kp(g,S,q,kt,U,N,Y)}async function Bp(g,S,A,O,N,$,B){if(uc(),be.delete(g),!O.route.action&&!O.route.lazy){let jt=Ae(405,{method:B.formMethod,pathname:A,routeId:S});Nl(g,S,jt,{flushSync:$});return}let U=v.fetchers.get(g);wa(g,j1(B,U),{flushSync:$});let q=new AbortController,Y=Ln(t.history,A,q.signal,B);L.set(g,q);let Bt=lt,j=(await zl("action",Y,[O],N))[0];if(Y.signal.aborted){L.get(g)===q&&L.delete(g);return}if(s.v7_fetcherPersist&&ne.has(g)){if(rn(j)||Re(j)){wa(g,Ra(void 0));return}}else{if(rn(j))if(L.delete(g),ct>Bt){wa(g,Ra(void 0));return}else return Xt.add(g),wa(g,Xl(B)),xl(Y,j,{fetcherSubmission:B});if(Re(j)){Nl(g,S,j.error);return}}if(ln(j))throw Ae(400,{type:"defer-action"});let ht=v.navigation.location||v.location,zt=Ln(t.history,ht,q.signal),Ul=u||r,Ta=v.navigation.state!=="idle"?Wn(Ul,v.navigation.location,c):v.matches;Z(Ta,"Didn't find any matches after fetcher action");let Dn=++lt;oe.set(g,Dn);let Mn=Xl(B,j.data);v.fetchers.set(g,Mn);let[xn,qe]=ih(t.history,v,Ta,B,ht,!1,s.unstable_skipActionErrorRevalidation,Jt,x,V,ne,be,Xt,Ul,c,[O.route.id,j]);qe.filter(jt=>jt.key!==g).forEach(jt=>{let Ll=jt.key,Hf=v.fetchers.get(Ll),Gp=Xl(void 0,Hf?Hf.data:void 0);v.fetchers.set(Ll,Gp),L.has(Ll)&&Aa(Ll),jt.controller&&L.set(Ll,jt.controller)}),fe({fetchers:new Map(v.fetchers)});let Ii=()=>qe.forEach(jt=>Aa(jt.key));q.signal.addEventListener("abort",Ii);let{loaderResults:tr,fetcherResults:er}=await Rf(v.matches,Ta,xn,qe,zt);if(q.signal.aborted)return;q.signal.removeEventListener("abort",Ii),oe.delete(g),L.delete(g),qe.forEach(jt=>L.delete(jt.key));let J=mh([...tr,...er]);if(J){if(J.idx>=xn.length){let jt=qe[J.idx-xn.length].key;Xt.add(jt)}return xl(zt,J.result)}let{loaderData:Ft,errors:Se}=sh(v,v.matches,xn,tr,void 0,qe,er,Ka);if(v.fetchers.has(g)){let jt=Ra(j.data);v.fetchers.set(g,jt)}xf(Dn),v.navigation.state==="loading"&&Dn>ct?(Z(M,"Expected pending action"),z&&z.abort(),Ml(v.navigation.location,{matches:Ta,loaderData:Ft,errors:Se,fetchers:new Map(v.fetchers)})):(fe({errors:Se,loaderData:fh(v.loaderData,Ft,Ta,Se),fetchers:new Map(v.fetchers)}),Jt=!1)}async function kp(g,S,A,O,N,$,B){let U=v.fetchers.get(g);wa(g,Xl(B,U?U.data:void 0),{flushSync:$});let q=new AbortController,Y=Ln(t.history,A,q.signal);L.set(g,q);let Bt=lt,j=(await zl("loader",Y,[O],N))[0];if(ln(j)&&(j=await jy(j,Y.signal,!0)||j),L.get(g)===q&&L.delete(g),!Y.signal.aborted){if(ne.has(g)){wa(g,Ra(void 0));return}if(rn(j))if(ct>Bt){wa(g,Ra(void 0));return}else{Xt.add(g),await xl(Y,j);return}if(Re(j)){Nl(g,S,j.error);return}Z(!ln(j),"Unhandled fetcher deferred data"),wa(g,Ra(j.data))}}async function xl(g,S,A){let{submission:O,fetcherSubmission:N,replace:$}=A===void 0?{}:A;S.response.headers.has("X-Remix-Revalidate")&&(Jt=!0);let B=S.response.headers.get("Location");Z(B,"Expected a Location header on the redirect Response"),B=ch(B,new URL(g.url),c);let U=Ui(v.location,B,{_isRedirect:!0});if(a){let ht=!1;if(S.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if(cf.test(B)){const zt=t.history.createURL(B);ht=zt.origin!==e.location.origin||Ol(zt.pathname,c)==null}if(ht){$?e.location.replace(B):e.location.assign(B);return}}z=null;let q=$===!0?Ct.Replace:Ct.Push,{formMethod:Y,formAction:Bt,formEncType:kt}=v.navigation;!O&&!N&&Y&&Bt&&kt&&(O=yh(v.navigation));let j=O||N;if(E1.has(S.response.status)&&j&&Be(j.formMethod))await Ja(q,U,{submission:pt({},j,{formAction:B}),preventScrollReset:H});else{let ht=Zc(U,O);await Ja(q,U,{overrideNavigation:ht,fetcherSubmission:N,preventScrollReset:H})}}async function zl(g,S,A,O){try{let N=await D1(o,g,S,A,O,i,l);return await Promise.all(N.map(($,B)=>{if(L1($)){let U=$.result;return{type:mt.redirect,response:z1(U,S,A[B].route.id,O,c,s.v7_relativeSplatPath)}}return x1($)}))}catch(N){return A.map(()=>({type:mt.error,error:N}))}}async function Rf(g,S,A,O,N){let[$,...B]=await Promise.all([A.length?zl("loader",N,A,S):[],...O.map(U=>{if(U.matches&&U.match&&U.controller){let q=Ln(t.history,U.path,U.controller.signal);return zl("loader",q,[U.match],U.matches).then(Y=>Y[0])}else return Promise.resolve({type:mt.error,error:Ae(404,{pathname:U.path})})})]);return await Promise.all([vh(g,A,$,$.map(()=>N.signal),!1,v.loaderData),vh(g,O.map(U=>U.match),B,O.map(U=>U.controller?U.controller.signal:null),!0)]),{loaderResults:$,fetcherResults:B}}function uc(){Jt=!0,x.push(...cc()),be.forEach((g,S)=>{L.has(S)&&(V.push(S),Aa(S))})}function wa(g,S,A){A===void 0&&(A={}),v.fetchers.set(g,S),fe({fetchers:new Map(v.fetchers)},{flushSync:(A&&A.flushSync)===!0})}function Nl(g,S,A,O){O===void 0&&(O={});let N=gi(v.matches,S);Fi(g),fe({errors:{[N.route.id]:A},fetchers:new Map(v.fetchers)},{flushSync:(O&&O.flushSync)===!0})}function Of(g){return s.v7_fetcherPersist&&(se.set(g,(se.get(g)||0)+1),ne.has(g)&&ne.delete(g)),v.fetchers.get(g)||w1}function Fi(g){let S=v.fetchers.get(g);L.has(g)&&!(S&&S.state==="loading"&&oe.has(g))&&Aa(g),be.delete(g),oe.delete(g),Xt.delete(g),ne.delete(g),v.fetchers.delete(g)}function jp(g){if(s.v7_fetcherPersist){let S=(se.get(g)||0)-1;S<=0?(se.delete(g),ne.add(g)):se.set(g,S)}else Fi(g);fe({fetchers:new Map(v.fetchers)})}function Aa(g){let S=L.get(g);Z(S,"Expected fetch controller: "+g),S.abort(),L.delete(g)}function Df(g){for(let S of g){let A=Of(S),O=Ra(A.data);v.fetchers.set(S,O)}}function Mf(){let g=[],S=!1;for(let A of Xt){let O=v.fetchers.get(A);Z(O,"Expected fetcher: "+A),O.state==="loading"&&(Xt.delete(A),g.push(A),S=!0)}return Df(g),S}function xf(g){let S=[];for(let[A,O]of oe)if(O0}function Vp(g,S){let A=v.blockers.get(g)||Gl;return Pa.get(g)!==S&&Pa.set(g,S),A}function zf(g){v.blockers.delete(g),Pa.delete(g)}function Wi(g,S){let A=v.blockers.get(g)||Gl;Z(A.state==="unblocked"&&S.state==="blocked"||A.state==="blocked"&&S.state==="blocked"||A.state==="blocked"&&S.state==="proceeding"||A.state==="blocked"&&S.state==="unblocked"||A.state==="proceeding"&&S.state==="unblocked","Invalid blocker state transition: "+A.state+" -> "+S.state);let O=new Map(v.blockers);O.set(g,S),fe({blockers:O})}function Nf(g){let{currentLocation:S,nextLocation:A,historyAction:O}=g;if(Pa.size===0)return;Pa.size>1&&yn(!1,"A router only supports one blocker at a time");let N=Array.from(Pa.entries()),[$,B]=N[N.length-1],U=v.blockers.get($);if(!(U&&U.state==="proceeding")&&B({currentLocation:S,nextLocation:A,historyAction:O}))return $}function cc(g){let S=[];return Ka.forEach((A,O)=>{(!g||g(O))&&(A.cancel(),S.push(O),Ka.delete(O))}),S}function Yp(g,S,A){if(p=g,b=S,E=A||null,!_&&v.navigation===Qc){_=!0;let O=Lf(v.location,v.matches);O!=null&&fe({restoreScrollPosition:O})}return()=>{p=null,b=null,E=null}}function Uf(g,S){return E&&E(g,S.map(O=>Wb(O,v.loaderData)))||g.key}function $p(g,S){if(p&&b){let A=Uf(g,S);p[A]=b()}}function Lf(g,S){if(p){let A=Uf(g,S),O=p[A];if(typeof O=="number")return O}return null}function qp(g){i={},u=Xo(g,l,void 0,i)}return D={get basename(){return c},get future(){return s},get state(){return v},get routes(){return r},get window(){return e},initialize:Mp,subscribe:zp,enableScrollRestoration:Yp,navigate:_f,fetch:Hp,revalidate:Np,createHref:g=>t.history.createHref(g),encodeLocation:g=>t.history.encodeLocation(g),getFetcher:Of,deleteFetcher:jp,dispose:xp,getBlocker:Vp,deleteBlocker:zf,_internalFetchControllers:L,_internalActiveDeferreds:Ka,_internalSetRoutes:qp},D}function C1(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Qo(t,e,a,n,l,i,r,u){let c,o;if(r){c=[];for(let m of e)if(c.push(m),m.route.id===r){o=m;break}}else c=e,o=e[e.length-1];let s=lf(l||".",nf(c,i),Ol(t.pathname,a)||t.pathname,u==="path");return l==null&&(s.search=t.search,s.hash=t.hash),(l==null||l===""||l===".")&&o&&o.route.index&&!of(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n&&a!=="/"&&(s.pathname=s.pathname==="/"?a:va([a,s.pathname])),pn(s)}function lh(t,e,a,n){if(!n||!C1(n))return{path:a};if(n.formMethod&&!B1(n.formMethod))return{path:a,error:Ae(405,{method:n.formMethod})};let l=()=>({path:a,error:Ae(400,{type:"invalid-body"})}),i=n.formMethod||"get",r=t?i.toUpperCase():i.toLowerCase(),u=By(a);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Be(r))return l();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,E)=>{let[b,_]=E;return""+p+b+"="+_+` +`},""):String(n.body);return{path:a,submission:{formMethod:r,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Be(r))return l();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:a,submission:{formMethod:r,formAction:u,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return l()}}}Z(typeof FormData=="function","FormData is not available in this environment");let c,o;if(n.formData)c=Zo(n.formData),o=n.formData;else if(n.body instanceof FormData)c=Zo(n.body),o=n.body;else if(n.body instanceof URLSearchParams)c=n.body,o=oh(c);else if(n.body==null)c=new URLSearchParams,o=new FormData;else try{c=new URLSearchParams(n.body),o=oh(c)}catch{return l()}let s={formMethod:r,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Be(s.formMethod))return{path:a,submission:s};let m=Ea(a);return e&&m.search&&of(m.search)&&c.append("index",""),m.search="?"+c,{path:pn(m),submission:s}}function _1(t,e){let a=t;if(e){let n=t.findIndex(l=>l.route.id===e);n>=0&&(a=t.slice(0,n))}return a}function ih(t,e,a,n,l,i,r,u,c,o,s,m,f,p,E,b){let _=b?Re(b[1])?b[1].error:b[1].data:void 0,h=t.createURL(e.location),d=t.createURL(l),y=b&&Re(b[1])?b[0]:void 0,w=y?_1(a,y):a,R=b?b[1].statusCode:void 0,D=r&&R&&R>=400,v=w.filter((H,z)=>{let{route:Q}=H;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(i)return typeof Q.loader!="function"||Q.loader.hydrate?!0:e.loaderData[Q.id]===void 0&&(!e.errors||e.errors[Q.id]===void 0);if(R1(e.loaderData,e.matches[z],H)||c.some(At=>At===H.route.id))return!0;let dt=e.matches[z],Et=H;return rh(H,pt({currentUrl:h,currentParams:dt.params,nextUrl:d,nextParams:Et.params},n,{actionResult:_,unstable_actionStatus:R,defaultShouldRevalidate:D?!1:u||h.pathname+h.search===d.pathname+d.search||h.search!==d.search||Hy(dt,Et)}))}),M=[];return m.forEach((H,z)=>{if(i||!a.some(Jt=>Jt.route.id===H.routeId)||s.has(z))return;let Q=Wn(p,H.path,E);if(!Q){M.push({key:z,routeId:H.routeId,path:H.path,matches:null,match:null,controller:null});return}let dt=e.fetchers.get(z),Et=Ko(Q,H.path),At=!1;f.has(z)?At=!1:o.includes(z)?At=!0:dt&&dt.state!=="idle"&&dt.data===void 0?At=u:At=rh(Et,pt({currentUrl:h,currentParams:e.matches[e.matches.length-1].params,nextUrl:d,nextParams:a[a.length-1].params},n,{actionResult:_,unstable_actionStatus:R,defaultShouldRevalidate:D?!1:u})),At&&M.push({key:z,routeId:H.routeId,path:H.path,matches:Q,match:Et,controller:new AbortController})}),[v,M]}function R1(t,e,a){let n=!e||a.route.id!==e.route.id,l=t[a.route.id]===void 0;return n||l}function Hy(t,e){let a=t.route.path;return t.pathname!==e.pathname||a!=null&&a.endsWith("*")&&t.params["*"]!==e.params["*"]}function rh(t,e){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(e);if(typeof a=="boolean")return a}return e.defaultShouldRevalidate}async function uh(t,e,a){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let l=a[t.id];Z(l,"No route found in manifest");let i={};for(let r in n){let c=l[r]!==void 0&&r!=="hasErrorBoundary";yn(!c,'Route "'+l.id+'" has a static property "'+r+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+r+'" will be ignored.')),!c&&!Jb.has(r)&&(i[r]=n[r])}Object.assign(l,i),Object.assign(l,pt({},e(l),{lazy:void 0}))}function O1(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function D1(t,e,a,n,l,i,r,u){let c=n.reduce((m,f)=>m.add(f.route.id),new Set),o=new Set,s=await t({matches:l.map(m=>{let f=c.has(m.route.id);return pt({},m,{shouldLoad:f,resolve:E=>(o.add(m.route.id),f?M1(e,a,m,i,r,E,u):Promise.resolve({type:mt.data,result:void 0}))})}),request:a,params:l[0].params,context:u});return l.forEach(m=>Z(o.has(m.route.id),'`match.resolve()` was not called for route id "'+m.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),s.filter((m,f)=>c.has(l[f].route.id))}async function M1(t,e,a,n,l,i,r){let u,c,o=s=>{let m,f=new Promise((b,_)=>m=_);c=()=>m(),e.signal.addEventListener("abort",c);let p=b=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+a.route.id+"]"))):s({request:e,params:a.params,context:r},...b!==void 0?[b]:[]),E;return i?E=i(b=>p(b)):E=(async()=>{try{return{type:"data",result:await p()}}catch(b){return{type:"error",result:b}}})(),Promise.race([E,f])};try{let s=a.route[t];if(a.route.lazy)if(s){let m,[f]=await Promise.all([o(s).catch(p=>{m=p}),uh(a.route,l,n)]);if(m!==void 0)throw m;u=f}else if(await uh(a.route,l,n),s=a.route[t],s)u=await o(s);else if(t==="action"){let m=new URL(e.url),f=m.pathname+m.search;throw Ae(405,{method:e.method,pathname:f,routeId:a.route.id})}else return{type:mt.data,result:void 0};else if(s)u=await o(s);else{let m=new URL(e.url),f=m.pathname+m.search;throw Ae(404,{pathname:f})}Z(u.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+a.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:mt.error,result:s}}finally{c&&e.signal.removeEventListener("abort",c)}return u}async function x1(t){let{result:e,type:a,status:n}=t;if(ky(e)){let r;try{let u=e.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?e.body==null?r=null:r=await e.json():r=await e.text()}catch(u){return{type:mt.error,error:u}}return a===mt.error?{type:mt.error,error:new rf(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}:{type:mt.data,data:r,statusCode:e.status,headers:e.headers}}if(a===mt.error)return{type:mt.error,error:e,statusCode:uf(e)?e.status:n};if(H1(e)){var l,i;return{type:mt.deferred,deferredData:e,statusCode:(l=e.init)==null?void 0:l.status,headers:((i=e.init)==null?void 0:i.headers)&&new Headers(e.init.headers)}}return{type:mt.data,data:e,statusCode:n}}function z1(t,e,a,n,l,i){let r=t.headers.get("Location");if(Z(r,"Redirects returned/thrown from loaders/actions must have a Location header"),!cf.test(r)){let u=n.slice(0,n.findIndex(c=>c.route.id===a)+1);r=Qo(new URL(e.url),u,l,!0,r,i),t.headers.set("Location",r)}return t}function ch(t,e,a){if(cf.test(t)){let n=t,l=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=Ol(l.pathname,a)!=null;if(l.origin===e.origin&&i)return l.pathname+l.search+l.hash}return t}function Ln(t,e,a,n){let l=t.createURL(By(e)).toString(),i={signal:a};if(n&&Be(n.formMethod)){let{formMethod:r,formEncType:u}=n;i.method=r.toUpperCase(),u==="application/json"?(i.headers=new Headers({"Content-Type":u}),i.body=JSON.stringify(n.json)):u==="text/plain"?i.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?i.body=Zo(n.formData):i.body=n.formData}return new Request(l,i)}function Zo(t){let e=new URLSearchParams;for(let[a,n]of t.entries())e.append(a,typeof n=="string"?n:n.name);return e}function oh(t){let e=new FormData;for(let[a,n]of t.entries())e.append(a,n);return e}function N1(t,e,a,n,l,i){let r={},u=null,c,o=!1,s={},m=n&&Re(n[1])?n[1].error:void 0;return a.forEach((f,p)=>{let E=e[p].route.id;if(Z(!rn(f),"Cannot handle redirect results in processLoaderData"),Re(f)){let b=f.error;m!==void 0&&(b=m,m=void 0),u=u||{};{let _=gi(t,E);u[_.route.id]==null&&(u[_.route.id]=b)}r[E]=void 0,o||(o=!0,c=uf(f.error)?f.error.status:500),f.headers&&(s[E]=f.headers)}else ln(f)?(l.set(E,f.deferredData),r[E]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[E]=f.headers)):(r[E]=f.data,f.statusCode&&f.statusCode!==200&&!o&&(c=f.statusCode),f.headers&&(s[E]=f.headers))}),m!==void 0&&n&&(u={[n[0]]:m},r[n[0]]=void 0),{loaderData:r,errors:u,statusCode:c||200,loaderHeaders:s}}function sh(t,e,a,n,l,i,r,u){let{loaderData:c,errors:o}=N1(e,a,n,l,u);for(let s=0;sn.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function hh(t){let e=t.length===1?t[0]:t.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Ae(t,e){let{pathname:a,routeId:n,method:l,type:i}=e===void 0?{}:e,r="Unknown Server Error",u="Unknown @remix-run/router error";return t===400?(r="Bad Request",l&&a&&n?u="You made a "+l+' request to "'+a+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?u="defer() is not supported in actions":i==="invalid-body"&&(u="Unable to encode submission body")):t===403?(r="Forbidden",u='Route "'+n+'" does not match URL "'+a+'"'):t===404?(r="Not Found",u='No route matches URL "'+a+'"'):t===405&&(r="Method Not Allowed",l&&a&&n?u="You made a "+l.toUpperCase()+' request to "'+a+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":l&&(u='Invalid request method "'+l.toUpperCase()+'"')),new rf(t||500,r,new Error(u),!0)}function mh(t){for(let e=t.length-1;e>=0;e--){let a=t[e];if(rn(a))return{result:a,idx:e}}}function By(t){let e=typeof t=="string"?Ea(t):t;return pn(pt({},e,{hash:""}))}function U1(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function L1(t){return ky(t.result)&&S1.has(t.result.status)}function ln(t){return t.type===mt.deferred}function Re(t){return t.type===mt.error}function rn(t){return(t&&t.type)===mt.redirect}function H1(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function ky(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function B1(t){return b1.has(t.toLowerCase())}function Be(t){return p1.has(t.toLowerCase())}async function vh(t,e,a,n,l,i){for(let r=0;rm.route.id===c.route.id),s=o!=null&&!Hy(o,c)&&(i&&i[c.route.id])!==void 0;if(ln(u)&&(l||s)){let m=n[r];Z(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await jy(u,m,l).then(f=>{f&&(a[r]=f||a[r])})}}}async function jy(t,e,a){if(a===void 0&&(a=!1),!await t.deferredData.resolveData(e)){if(a)try{return{type:mt.data,data:t.deferredData.unwrappedData}}catch(l){return{type:mt.error,error:l}}return{type:mt.data,data:t.deferredData.data}}}function of(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Ko(t,e){let a=typeof e=="string"?Ea(e).search:e.search;if(t[t.length-1].route.index&&of(a||""))return t[t.length-1];let n=Ny(t);return n[n.length-1]}function yh(t){let{formMethod:e,formAction:a,formEncType:n,text:l,formData:i,json:r}=t;if(!(!e||!a||!n)){if(l!=null)return{formMethod:e,formAction:a,formEncType:n,formData:void 0,json:void 0,text:l};if(i!=null)return{formMethod:e,formAction:a,formEncType:n,formData:i,json:void 0,text:void 0};if(r!==void 0)return{formMethod:e,formAction:a,formEncType:n,formData:void 0,json:r,text:void 0}}}function Zc(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function k1(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Xl(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function j1(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ra(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function V1(t,e){try{let a=t.sessionStorage.getItem(Ly);if(a){let n=JSON.parse(a);for(let[l,i]of Object.entries(n||{}))i&&Array.isArray(i)&&e.set(l,new Set(i||[]))}}catch{}}function Y1(t,e){if(e.size>0){let a={};for(let[n,l]of e)a[n]=[...l];try{t.sessionStorage.setItem(Ly,JSON.stringify(a))}catch(n){yn(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + * React Router v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function pu(){return pu=Object.assign?Object.assign.bind():function(t){for(var e=1;e{u.current=!0}),T.useCallback(function(o,s){if(s===void 0&&(s={}),!u.current)return;if(typeof o=="number"){n.go(o);return}let m=lf(o,JSON.parse(r),i,s.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:va([e,m.pathname])),(s.replace?n.replace:n.push)(m,s.state,s)},[e,n,r,i,t])}function rT(){let{matches:t}=T.useContext(Za),e=t[t.length-1];return e?e.params:{}}function qy(t,e){let{relative:a}=e===void 0?{}:e,{future:n}=T.useContext(_n),{matches:l}=T.useContext(Za),{pathname:i}=Yu(),r=JSON.stringify(nf(l,n.v7_relativeSplatPath));return T.useMemo(()=>lf(t,JSON.parse(r),i,a==="path"),[t,r,i,a])}function X1(t,e,a,n){Pi()||Z(!1);let{navigator:l}=T.useContext(_n),{matches:i}=T.useContext(Za),r=i[i.length-1],u=r?r.params:{};r&&r.pathname;let c=r?r.pathnameBase:"/";r&&r.route;let o=Yu(),s;s=o;let m=s.pathname||"/",f=m;if(c!=="/"){let b=c.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let p=Wn(t,{pathname:f});return J1(p&&p.map(b=>Object.assign({},b,{params:Object.assign({},u,b.params),pathname:va([c,l.encodeLocation?l.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:va([c,l.encodeLocation?l.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,a,n)}function Q1(){let t=I1(),e=uf(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),a?T.createElement("pre",{style:l},a):null,null)}const Z1=T.createElement(Q1,null);class K1 extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){console.error("React Router caught the following error during render",e,a)}render(){return this.state.error!==void 0?T.createElement(Za.Provider,{value:this.props.routeContext},T.createElement(Yy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function P1(t){let{routeContext:e,match:a,children:n}=t,l=T.useContext(Vu);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),T.createElement(Za.Provider,{value:e},n)}function J1(t,e,a,n){var l;if(e===void 0&&(e=[]),a===void 0&&(a=null),n===void 0&&(n=null),t==null){var i;if((i=a)!=null&&i.errors)t=a.matches;else return null}let r=t,u=(l=a)==null?void 0:l.errors;if(u!=null){let s=r.findIndex(m=>m.route.id&&(u==null?void 0:u[m.route.id])!==void 0);s>=0||Z(!1),r=r.slice(0,Math.min(r.length,s+1))}let c=!1,o=-1;if(a&&n&&n.v7_partialHydration)for(let s=0;s=0?r=r.slice(0,o+1):r=[r[0]];break}}}return r.reduceRight((s,m,f)=>{let p,E=!1,b=null,_=null;a&&(p=u&&m.route.id?u[m.route.id]:void 0,b=m.route.errorElement||Z1,c&&(o<0&&f===0?(E=!0,_=null):o===f&&(E=!0,_=m.route.hydrateFallbackElement||null)));let h=e.concat(r.slice(0,f+1)),d=()=>{let y;return p?y=b:E?y=_:m.route.Component?y=T.createElement(m.route.Component,null):m.route.element?y=m.route.element:y=s,T.createElement(P1,{match:m,routeContext:{outlet:s,matches:h,isDataRoute:a!=null},children:y})};return a&&(m.route.ErrorBoundary||m.route.errorElement||f===0)?T.createElement(K1,{location:a.location,revalidation:a.revalidation,component:b,error:p,children:d(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):d()},null)}var Gy=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Gy||{}),gl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gl||{});function F1(t){let e=T.useContext(Vu);return e||Z(!1),e}function Xy(t){let e=T.useContext(Vy);return e||Z(!1),e}function W1(t){let e=T.useContext(Za);return e||Z(!1),e}function ff(t){let e=W1(),a=e.matches[e.matches.length-1];return a.route.id||Z(!1),a.route.id}function uT(){let t=Xy(gl.UseLoaderData),e=ff(gl.UseLoaderData);if(t.errors&&t.errors[e]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+e+")");return}return t.loaderData[e]}function I1(){var t;let e=T.useContext(Yy),a=Xy(gl.UseRouteError),n=ff(gl.UseRouteError);return e!==void 0?e:(t=a.errors)==null?void 0:t[n]}function tS(){let{router:t}=F1(Gy.UseNavigateStable),e=ff(gl.UseNavigateStable),a=T.useRef(!1);return $y(()=>{a.current=!0}),T.useCallback(function(l,i){i===void 0&&(i={}),a.current&&(typeof l=="number"?t.navigate(l):t.navigate(l,pu({fromRouteId:e},i)))},[t,e])}function eS(t){let{basename:e="/",children:a=null,location:n,navigationType:l=Ct.Pop,navigator:i,static:r=!1,future:u}=t;Pi()&&Z(!1);let c=e.replace(/^\/*/,"/"),o=T.useMemo(()=>({basename:c,navigator:i,static:r,future:pu({v7_relativeSplatPath:!1},u)}),[c,u,i,r]);typeof n=="string"&&(n=Ea(n));let{pathname:s="/",search:m="",hash:f="",state:p=null,key:E="default"}=n,b=T.useMemo(()=>{let _=Ol(s,c);return _==null?null:{location:{pathname:_,search:m,hash:f,state:p,key:E},navigationType:l}},[c,s,m,f,p,E,l]);return b==null?null:T.createElement(_n.Provider,{value:o},T.createElement(sf.Provider,{children:a,value:b}))}new Promise(()=>{});function aS(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:T.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + * React Router DOM v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Li(){return Li=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(a[l]=t[l]);return a}function lS(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function iS(t,e){return t.button===0&&(!e||e==="_self")&&!lS(t)}const rS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],uS="6";try{window.__reactRouterVersion=uS}catch{}function cS(t,e){return T1({basename:void 0,future:Li({},void 0,{v7_prependBasename:!0}),history:Zb({window:void 0}),hydrationData:oS(),routes:t,mapRouteProperties:aS,unstable_dataStrategy:void 0,window:void 0}).initialize()}function oS(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=Li({},e,{errors:sS(e.errors)})),e}function sS(t){if(!t)return null;let e=Object.entries(t),a={};for(let[n,l]of e)if(l&&l.__type==="RouteErrorResponse")a[n]=new rf(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let i=window[l.__subType];if(typeof i=="function")try{let r=new i(l.message);r.stack="",a[n]=r}catch{}}if(a[n]==null){let i=new Error(l.message);i.stack="",a[n]=i}}else a[n]=l;return a}const fS=T.createContext({isTransitioning:!1}),dS=T.createContext(new Map),hS="startTransition",ph=to[hS],mS="flushSync",gh=h0[mS];function vS(t){ph?ph(t):t()}function Ql(t){gh?gh(t):t()}class yS{constructor(){this.status="pending",this.promise=new Promise((e,a)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",a(n))}})}}function pS(t){let{fallbackElement:e,router:a,future:n}=t,[l,i]=T.useState(a.state),[r,u]=T.useState(),[c,o]=T.useState({isTransitioning:!1}),[s,m]=T.useState(),[f,p]=T.useState(),[E,b]=T.useState(),_=T.useRef(new Map),{v7_startTransition:h}=n||{},d=T.useCallback(v=>{h?vS(v):v()},[h]),y=T.useCallback((v,M)=>{let{deletedFetchers:H,unstable_flushSync:z,unstable_viewTransitionOpts:Q}=M;H.forEach(Et=>_.current.delete(Et)),v.fetchers.forEach((Et,At)=>{Et.data!==void 0&&_.current.set(At,Et.data)});let dt=a.window==null||a.window.document==null||typeof a.window.document.startViewTransition!="function";if(!Q||dt){z?Ql(()=>i(v)):d(()=>i(v));return}if(z){Ql(()=>{f&&(s&&s.resolve(),f.skipTransition()),o({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let Et=a.window.document.startViewTransition(()=>{Ql(()=>i(v))});Et.finished.finally(()=>{Ql(()=>{m(void 0),p(void 0),u(void 0),o({isTransitioning:!1})})}),Ql(()=>p(Et));return}f?(s&&s.resolve(),f.skipTransition(),b({state:v,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(u(v),o({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[a.window,f,s,_,d]);T.useLayoutEffect(()=>a.subscribe(y),[a,y]),T.useEffect(()=>{c.isTransitioning&&!c.flushSync&&m(new yS)},[c]),T.useEffect(()=>{if(s&&r&&a.window){let v=r,M=s.promise,H=a.window.document.startViewTransition(async()=>{d(()=>i(v)),await M});H.finished.finally(()=>{m(void 0),p(void 0),u(void 0),o({isTransitioning:!1})}),p(H)}},[d,r,s,a.window]),T.useEffect(()=>{s&&r&&l.location.key===r.location.key&&s.resolve()},[s,f,l.location,r]),T.useEffect(()=>{!c.isTransitioning&&E&&(u(E.state),o({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),b(void 0))},[c.isTransitioning,E]),T.useEffect(()=>{},[]);let w=T.useMemo(()=>({createHref:a.createHref,encodeLocation:a.encodeLocation,go:v=>a.navigate(v),push:(v,M,H)=>a.navigate(v,{state:M,preventScrollReset:H==null?void 0:H.preventScrollReset}),replace:(v,M,H)=>a.navigate(v,{replace:!0,state:M,preventScrollReset:H==null?void 0:H.preventScrollReset})}),[a]),R=a.basename||"/",D=T.useMemo(()=>({router:a,navigator:w,static:!1,basename:R}),[a,w,R]);return T.createElement(T.Fragment,null,T.createElement(Vu.Provider,{value:D},T.createElement(Vy.Provider,{value:l},T.createElement(dS.Provider,{value:_.current},T.createElement(fS.Provider,{value:c},T.createElement(eS,{basename:R,location:l.location,navigationType:l.historyAction,navigator:w,future:{v7_relativeSplatPath:a.future.v7_relativeSplatPath}},l.initialized||a.future.v7_partialHydration?T.createElement(gS,{routes:a.routes,future:a.future,state:l}):e))))),null)}function gS(t){let{routes:e,future:a,state:n}=t;return X1(e,void 0,n,a)}const bS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cT=T.forwardRef(function(e,a){let{onClick:n,relative:l,reloadDocument:i,replace:r,state:u,target:c,to:o,preventScrollReset:s,unstable_viewTransition:m}=e,f=nS(e,rS),{basename:p}=T.useContext(_n),E,b=!1;if(typeof o=="string"&&SS.test(o)&&(E=o,bS))try{let y=new URL(window.location.href),w=o.startsWith("//")?new URL(y.protocol+o):new URL(o),R=Ol(w.pathname,p);w.origin===y.origin&&R!=null?o=R+w.search+w.hash:b=!0}catch{}let _=$1(o,{relative:l}),h=ES(o,{replace:r,state:u,target:c,preventScrollReset:s,relative:l,unstable_viewTransition:m});function d(y){n&&n(y),y.defaultPrevented||h(y)}return T.createElement("a",Li({},f,{href:E||_,onClick:b||i?n:d,ref:a,target:c}))});var bh;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(bh||(bh={}));var Sh;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Sh||(Sh={}));function ES(t,e){let{target:a,replace:n,state:l,preventScrollReset:i,relative:r,unstable_viewTransition:u}=e===void 0?{}:e,c=q1(),o=Yu(),s=qy(t,{relative:r});return T.useCallback(m=>{if(iS(m,a)){m.preventDefault();let f=n!==void 0?n:pn(o)===pn(s);c(t,{replace:f,state:l,preventScrollReset:i,relative:r,unstable_viewTransition:u})}},[o,c,s,n,l,a,t,i,r,u])}function wS(t){if(t.sheet)return t.sheet;for(var e=0;e0?Yt(Dl,--ue):0,bl--,Rt===10&&(bl=1,qu--),Rt}function pe(){return Rt=ue2||Bi(Rt)>3?"":" "}function LS(t,e){for(;--e&&pe()&&!(Rt<48||Rt>102||Rt>57&&Rt<65||Rt>70&&Rt<97););return Ji(t,kr()+(e<6&&Fe()==32&&pe()==32))}function Jo(t){for(;pe();)switch(Rt){case t:return ue;case 34:case 39:t!==34&&t!==39&&Jo(Rt);break;case 40:t===41&&Jo(t);break;case 92:pe();break}return ue}function HS(t,e){for(;pe()&&t+Rt!==57;)if(t+Rt===84&&Fe()===47)break;return"/*"+Ji(e,ue-1)+"*"+$u(t===47?t:pe())}function BS(t){for(;!Bi(Fe());)pe();return Ji(t,ue)}function kS(t){return Fy(Vr("",null,null,null,[""],t=Jy(t),0,[0],t))}function Vr(t,e,a,n,l,i,r,u,c){for(var o=0,s=0,m=r,f=0,p=0,E=0,b=1,_=1,h=1,d=0,y="",w=l,R=i,D=n,v=y;_;)switch(E=d,d=pe()){case 40:if(E!=108&&Yt(v,m-1)==58){Po(v+=I(jr(d),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:v+=jr(d);break;case 9:case 10:case 13:case 32:v+=US(E);break;case 92:v+=LS(kr()-1,7);continue;case 47:switch(Fe()){case 42:case 47:Er(jS(HS(pe(),kr()),e,a),c);break;default:v+="/"}break;case 123*b:u[o++]=Ge(v)*h;case 125*b:case 59:case 0:switch(d){case 0:case 125:_=0;case 59+s:h==-1&&(v=I(v,/\f/g,"")),p>0&&Ge(v)-m&&Er(p>32?wh(v+";",n,a,m-1):wh(I(v," ","")+";",n,a,m-2),c);break;case 59:v+=";";default:if(Er(D=Eh(v,e,a,o,s,l,u,y,w=[],R=[],m),i),d===123)if(s===0)Vr(v,e,D,D,w,i,m,u,R);else switch(f===99&&Yt(v,3)===110?100:f){case 100:case 108:case 109:case 115:Vr(t,D,D,n&&Er(Eh(t,D,D,0,0,l,u,y,l,w=[],m),R),l,R,m,u,n?w:R);break;default:Vr(v,D,D,D,[""],R,0,u,R)}}o=s=p=0,b=h=1,y=v="",m=r;break;case 58:m=1+Ge(v),p=E;default:if(b<1){if(d==123)--b;else if(d==125&&b++==0&&NS()==125)continue}switch(v+=$u(d),d*b){case 38:h=s>0?1:(v+="\f",-1);break;case 44:u[o++]=(Ge(v)-1)*h,h=1;break;case 64:Fe()===45&&(v+=jr(pe())),f=Fe(),s=m=Ge(y=v+=BS(kr())),d++;break;case 45:E===45&&Ge(v)==2&&(b=0)}}return i}function Eh(t,e,a,n,l,i,r,u,c,o,s){for(var m=l-1,f=l===0?i:[""],p=mf(f),E=0,b=0,_=0;E0?f[h]+" "+d:I(d,/&\f/g,f[h])))&&(c[_++]=y);return Gu(t,e,a,l===0?df:u,c,o,s)}function jS(t,e,a){return Gu(t,e,a,Qy,$u(zS()),Hi(t,2,-2),0)}function wh(t,e,a,n){return Gu(t,e,a,hf,Hi(t,0,n),Hi(t,n+1,-1),n)}function cl(t,e){for(var a="",n=mf(t),l=0;l6)switch(Yt(t,e+1)){case 109:if(Yt(t,e+4)!==45)break;case 102:return I(t,/(.+:)(.+)-([^]+)/,"$1"+W+"$2-$3$1"+gu+(Yt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Po(t,"stretch")?Iy(I(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Yt(t,e+1)!==115)break;case 6444:switch(Yt(t,Ge(t)-3-(~Po(t,"!important")&&10))){case 107:return I(t,":",":"+W)+t;case 101:return I(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(Yt(t,14)===45?"inline-":"")+"box$3$1"+W+"$2$3$1"+Qt+"$2box$3")+t}break;case 5936:switch(Yt(t,e+11)){case 114:return W+t+Qt+I(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return W+t+Qt+I(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return W+t+Qt+I(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return W+t+Qt+t+t}return t}var KS=function(e,a,n,l){if(e.length>-1&&!e.return)switch(e.type){case hf:e.return=Iy(e.value,e.length);break;case Zy:return cl([Zl(e,{value:I(e.value,"@","@"+W)})],l);case df:if(e.length)return xS(e.props,function(i){switch(MS(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cl([Zl(e,{props:[I(i,/:(read-\w+)/,":"+gu+"$1")]})],l);case"::placeholder":return cl([Zl(e,{props:[I(i,/:(plac\w+)/,":"+W+"input-$1")]}),Zl(e,{props:[I(i,/:(plac\w+)/,":"+gu+"$1")]}),Zl(e,{props:[I(i,/:(plac\w+)/,Qt+"input-$1")]})],l)}return""})}},PS=[KS],JS=function(e){var a=e.key;if(a==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(b){var _=b.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var l=e.stylisPlugins||PS,i={},r,u=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(b){for(var _=b.getAttribute("data-emotion").split(" "),h=1;h<_.length;h++)i[_[h]]=!0;u.push(b)});var c,o=[QS,ZS];{var s,m=[VS,$S(function(b){s.insert(b)})],f=YS(o.concat(l,m)),p=function(_){return cl(kS(_),f)};c=function(_,h,d,y){s=d,p(_?_+"{"+h.styles+"}":h.styles),y&&(E.inserted[h.name]=!0)}}var E={key:a,sheet:new TS({key:a,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:c};return E.sheet.hydrate(u),E};function Fo(){return Fo=Object.assign?Object.assign.bind():function(t){for(var e=1;e=4;++n,l-=4)a=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,a=(a&65535)*1540483477+((a>>>16)*59797<<16),a^=a>>>24,e=(a&65535)*1540483477+((a>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(l){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var m2={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},v2=/[A-Z]|^ms/g,y2=/_EMO_([^_]+?)_([^]*?)_EMO_/g,up=function(e){return e.charCodeAt(1)===45},Oh=function(e){return e!=null&&typeof e!="boolean"},Kc=Wy(function(t){return up(t)?t:t.replace(v2,"-$&").toLowerCase()}),Dh=function(e,a){switch(e){case"animation":case"animationName":if(typeof a=="string")return a.replace(y2,function(n,l,i){return Xe={name:l,styles:i,next:Xe},l})}return m2[e]!==1&&!up(e)&&typeof a=="number"&&a!==0?a+"px":a};function ki(t,e,a){if(a==null)return"";if(a.__emotion_styles!==void 0)return a;switch(typeof a){case"boolean":return"";case"object":{if(a.anim===1)return Xe={name:a.name,styles:a.styles,next:Xe},a.name;if(a.styles!==void 0){var n=a.next;if(n!==void 0)for(;n!==void 0;)Xe={name:n.name,styles:n.styles,next:Xe},n=n.next;var l=a.styles+";";return l}return p2(t,e,a)}case"function":{if(t!==void 0){var i=Xe,r=a(t);return Xe=i,ki(t,e,r)}break}}return a}function p2(t,e,a){var n="";if(Array.isArray(a))for(var l=0;la=>{if(typeof t=="function"){const n=a.displayName||a.name,l=t(a,...e);return l.displayName=n,l}else return a}}function vp(t,e,a,n,...l){}const gn=(t,e,...a)=>vp("error",!0,t,e,...a),Io=(t,e,...a)=>vp("warn",!0,t,e,...a);var L2=function t(e,a){if(e===a)return!0;if(e&&a&&typeof e=="object"&&typeof a=="object"){if(e.constructor!==a.constructor)return!1;var n,l,i;if(Array.isArray(e)){if(n=e.length,n!=a.length)return!1;for(l=n;l--!==0;)if(!t(e[l],a[l]))return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(a).length)return!1;for(l=n;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,i[l]))return!1;for(l=n;l--!==0;){var r=i[l];if(!t(e[r],a[r]))return!1}return!0}return e!==e&&a!==a};const H2=Sl(L2),B2=Object.prototype.hasOwnProperty;function yp(t){if(typeof t!="object")return!0;for(const e in t)if(B2.call(t,e))return!1;return!0}function pp(...t){let e={};return t.forEach(a=>{e=gp(e,a)}),e}function gp(t,e){if(Pc(e)){const a=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n={...t};return a.forEach(l=>{Pc(t[l])&&Pc(e[l])?n[l]=gp(t[l],e[l]):Jc(e[l])&&Jc(t[l])?n[l]=[...new Set([...t[l],...e[l]])]:Jc(t[l])?n[l]=[...new Set([...t[l],e[l]])]:n[l]=e[l]}),n}else return{...t}}function Pc(t){return t&&(typeof t=="object"||typeof t=="function")&&!Array.isArray(t)}function Jc(t){return Array.isArray(t)}function k2(t){if(Array.isArray(t))return t}function j2(t,e){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var n,l,i,r,u=[],c=!0,o=!1;try{if(i=(a=a.call(t)).next,e===0){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=i.call(a)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(s){o=!0,l=s}finally{try{if(!c&&a.return!=null&&(r=a.return(),Object(r)!==r))return}finally{if(o)throw l}}return u}}function zh(t,e){(e==null||e>t.length)&&(e=t.length);for(var a=0,n=Array(e);a!!t&&t.ref!==void 0,G2=t=>!!t&&t.current!==void 0;function ec(t){const e=typeof t=="function"?t():t;if(e&&e===document)return document.documentElement;if(e instanceof Element||e===window||e&&typeof e.nodeType<"u")return e;if(e){const a=e;if(q2(a)){const n=G2(a.ref)?a.ref.current:a.ref;return n instanceof HTMLElement?n:ec(n)}else return a.constructor.componentId?a.constructor.componentId:a.constructor.name,Jh.findDOMNode(e)}}const ac=!!(typeof window<"u"&&window.document&&window.document.createElement);function X2(t){const e=t&&ec(t);let a;e&&"ownerDocument"in e&&(a=e.ownerDocument);const n=ac?window.document:void 0;return a||n}function Q2(t){const e=t&&ec(t),a=X2(e);return a&&a.defaultView}function Z2(t,e){let a={};if(ac){const n=t&&ec(t);if(n){const l=Q2(t);a=l?l.getComputedStyle(n,e):{}}}return a}function bp(t){return t.replace(/-([a-z])/g,e=>e[1].toUpperCase())}const K2=["borders","breakpoints","colors","forms","media","shadows","spacing","stacking","transitions","typography"],Sp=t=>{if(Array.isArray(t)||typeof t=="function")throw new Error;try{return"key"in t&&K2.every(e=>e in t)}catch{throw new Error}};function Ep(t,e,a){var n,l;return e.as&&e.as!==((n=t.defaultProps)===null||n===void 0?void 0:n.as)?e.as:typeof a=="function"?a():e.href?"a":e.to?(Io(!e.as,`[${t.displayName}] \`as\` prop should be provided when using \`to\``),"a"):typeof e.onClick=="function"?"button":((l=t.defaultProps)===null||l===void 0?void 0:l.as)||"span"}function P2(t,e,a){const n=Array.isArray(e)?e:Object.keys(e||{}),l=a?n.concat(a):n;return F2(t,l)}const J2=Object.prototype.hasOwnProperty,F2=(t,e)=>{const a={};for(const n in t)n==="theme"||n==="children"||n==="className"||n==="style"||n==="styles"||n==="makeStyles"||n==="themeOverride"||n==="deterministicId"||e.includes(n)||!J2.call(t,n)||(a[n]=t[n]);return a};var W2=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,I2=Wy(function(t){return W2.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function tE(t){const e={};return Object.keys(t).filter(a=>I2(a)&&a!=="style"&&a!=="className"&&a!=="children"&&a!=="styles"&&a!=="makeStyles"&&a!=="deterministicId").forEach(a=>{e[a]=t[a]}),e}function wp(t,e,a){const n=Array.isArray(e)?e:Object.keys(e||{}),l=a?n.concat(a):n;return eE(t,l)}function eE(t,e){const a={},n=e.length;let l=-1,i;for(;++lve.createElement(nE.Provider,{value:e},t);Tp.defaultProps={instanceCounterMap:Ap};function lE(t,e){if(t==null)return{};var a={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;a[n]=t[n]}return a}function bu(t,e){if(t==null)return{};var a,n,l=lE(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||{}.propertyIsEnumerable.call(t,a)&&(l[a]=t[a])}return l}let Kl,wr,Fc;const iE=()=>{if(Kl)return Kl;if(ac){const t=document.documentElement;return wr=t.getAttribute("dir"),Kl=wr||Z2(t).direction,Fc||(Fc=new MutationObserver(()=>{const e=t.getAttribute("dir");e&&e!==wr&&(wr=Kl=e)}),Fc.observe(t,{attributes:!0})),Kl}};function rE(t){if(ac)return iE()}const ts=T.createContext(rE()||"ltr"),nc={ltr:"ltr",rtl:"rtl"},uE=["forwardedRef"],wf=mp(t=>{class e extends ve.Component{render(){const l=this.props,i=l.forwardedRef,r=bu(l,uE);return ve.createElement(ts.Consumer,null,u=>ve.createElement(t,Object.assign({ref:i,dir:u},r)))}}e.displayName="TextDirectionContextConsumerComponent";const a=T.forwardRef((n,l)=>ve.createElement(e,Object.assign({},n,{forwardedRef:l})));return lp(a,t),a.defaultProps=t.defaultProps,a.propTypes=t.propTypes,a.allowedProps=t.allowedProps,a.originalType=t.originalType||t,a});wf.DIRECTION=nc;const cE=k.oneOf(["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"]),oE=Object.freeze({radiusSmall:"0.125rem",radiusMedium:"0.25rem",radiusLarge:"0.5rem",widthSmall:"0.0625rem",widthMedium:"0.125rem",widthLarge:"0.25rem",style:"solid"});function sE(t){const e={textDarkest:t.licorice,textDark:t.ash,textLight:t.porcelain,textLightest:t.white,textBrand:t.brand,textLink:t.link,textAlert:t.barney,textInfo:t.brand,textSuccess:t.shamrock,textDanger:t.crimson,textWarning:t.fire},a={backgroundDarkest:t.licorice,backgroundDark:t.ash,backgroundMedium:t.tiara,backgroundLight:t.porcelain,backgroundLightest:t.white,backgroundBrand:t.brand,backgroundBrandSecondary:t.oxford,backgroundAlert:t.barney,backgroundInfo:t.brand,backgroundSuccess:t.shamrock,backgroundDanger:t.crimson,backgroundWarning:t.fire},n={borderLightest:t.white,borderLight:t.porcelain,borderMedium:t.tiara,borderDark:t.ash,borderDarkest:t.licorice,borderBrand:t.brand,borderAlert:t.barney,borderInfo:t.brand,borderSuccess:t.shamrock,borderDanger:t.crimson,borderWarning:t.fire,borderDebug:t.crimson};return{...t,...e,...a,...n,values:t,text:e,background:a,border:n}}const fE={brand:"#0374B5",link:"#0374B5",electric:"#0374B5",shamrock:"#0B874B",barney:"#BF32A4",crimson:"#E0061F",fire:"#FC5E13",licorice:"#2D3B45",oxford:"#394B58",ash:"#6B7780",slate:"#8B969E",tiara:"#C7CDD1",porcelain:"#F5F5F5",white:"#FFFFFF"},dE=Object.freeze(sE(fE)),hE=Object.freeze({duration:"300ms",timing:"ease-in-out"}),mE=Object.freeze({fontFamily:'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',fontFamilyMonospace:'Menlo, Consolas, Monaco, "Andale Mono", monospace',fontSizeXSmall:"0.75rem",fontSizeSmall:"0.875rem",fontSizeMedium:"1rem",fontSizeLarge:"1.375rem",fontSizeXLarge:"1.75rem",fontSizeXXLarge:"2.375rem",fontWeightLight:300,fontWeightNormal:400,fontWeightBold:700,lineHeight:1.5,lineHeightFit:1.125,lineHeightCondensed:1.25,lineHeightDouble:2,letterSpacingNormal:0,letterSpacingCondensed:"-0.0625rem",letterSpacingExpanded:"0.0625rem"}),vE=Object.freeze({xxxSmall:"0.125rem",xxSmall:"0.375rem",xSmall:"0.5rem",small:"0.75rem",mediumSmall:"1rem",medium:"1.5rem",large:"2.25rem",xLarge:"3rem",xxLarge:"3.75rem"}),yE=Object.freeze({inputHeightSmall:"1.75rem",inputHeightMedium:"2.375rem",inputHeightLarge:"3rem"}),pE=.0625,ra={xxSmall:8,xSmall:16,small:30,medium:48,tablet:48,large:62,desktop:64,xLarge:75},Yr=Object.freeze({xxSmall:`${ra.xxSmall}em`,xSmall:`${ra.xSmall}em`,small:`${ra.small}em`,medium:`${ra.medium}em`,tablet:`${ra.tablet}em`,large:`${ra.large}em`,desktop:`${ra.desktop}em`,xLarge:`${ra.xLarge}em`,maxWidth:`${ra.large-pE}em`}),gE=Object.freeze({mediumMin:`min-width: ${Yr.medium}`,largeMin:`min-width: ${Yr.large}`,xLargeMin:`min-width: ${Yr.xLarge}`}),Hn=["0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)","0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)","0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)"],bE=Object.freeze({depth1:Hn[0],depth2:Hn[1],depth3:Hn[2],resting:Hn[0],above:Hn[1],topmost:Hn[2]}),SE=Object.freeze({topmost:9999,above:1,below:-1,deepest:-9999}),Cp={colors:dE,borders:oE,transitions:hE,typography:mE,spacing:vE,forms:yE,media:gE,breakpoints:Yr,shadows:bE,stacking:SE},EE=["key","description"],wE=["key","description","use"],AE="@@themeRegistryDefaultTheme",Su="__GLOBAL_THEME_REGISTRY__";globalThis[Su]?Af(TE(globalThis[Su])):Rp();function _p(){return{currentThemeKey:null,themes:{},registered:[]}}function TE(t){const e=_p();if(typeof t>"u")return e;let a=!0;return Object.keys(e).forEach(n=>{typeof t[n]>"u"&&(a=!1)}),gn(a,"[theme-registry] Invalid global theme registry!"),t}function lc(){return globalThis[Su]}function Af(t){globalThis[Su]=t}function Rp(){Af(_p())}function CE(){const t=lc(),e=t.currentThemeKey;if(e)return t.themes[e]}function _E(t,e){const a=lc(),n=a.themes[t];n||t!==AE&&gn(n,`[theme-registry] Could not find theme: '${t}' in the registry.`),a.currentThemeKey=t;const l=pp(n,e);return a.themes[t]=l,l}function RE(t){const e=t.key,a=t.description,n=bu(t,EE),l={key:e,description:a,...n,use(i){_E(e,(i==null?void 0:i.overrides)||{})}};return new Proxy(l,{get(i,r){i.key,i.description,i.use;const u=bu(i,wE);return r==="variables"?u:Reflect.get(i,r)}})}function OE(t){const e=lc();if(t.key&&e.themes[t.key])return e.themes[t.key];{if(!Sp(t))throw gn(!1,`[theme-registry] The theme provided to 'registerTheme' is not a valid theme object! +For it to be valid some properties have to be present, check out https://instructure.design/#canvas as a reference.`),new Error;const a=RE(t);return e.themes[a.key]=a,e.registered.push(a.key),a}}const Tf={getRegistry:lc,clearRegistry:Rp,setRegistry:Af,registerTheme:OE,getCurrentTheme:CE},de=Cp.colors,DE="canvas",ME={"ic-brand-primary":de.textBrand,"ic-brand-font-color-dark":de.textDarkest,"ic-link-color":de.textLink,"ic-link-decoration":"none","ic-brand-button--primary-bgd":de.backgroundBrand,"ic-brand-button--primary-text":de.textLightest,"ic-brand-button--secondary-bgd":de.backgroundDarkest,"ic-brand-button--secondary-text":de.textLightest,"ic-brand-global-nav-bgd":de.backgroundBrandSecondary,"ic-global-nav-link-hover":de.backgroundDarkest,"ic-brand-global-nav-ic-icon-svg-fill":de.textLightest,"ic-brand-global-nav-ic-icon-svg-fill--active":de.textBrand,"ic-brand-global-nav-menu-item__text-color":de.textLightest,"ic-brand-global-nav-menu-item__text-color--active":de.textBrand},xE={key:DE,...Cp,...ME},Cf=Tf.registerTheme(xE),zE=t=>(e={})=>{var a,n;try{if(Sp(t))return t}catch{t={}}let l;Object.keys(e).length===0?l=Tf.getCurrentTheme()||Cf:l=e;const i=l.key,r=((a=t)===null||a===void 0||(n=a.themeOverrides)===null||n===void 0?void 0:n[i])||t.themeOverrides||{};return pp(l,t,r)};function ic({children:t,theme:e={},dir:a,instanceCounterMap:n,as:l}){const i=a||T.useContext(ts);let r=ve.createElement(Tp,{instanceCounterMap:n},ve.createElement(A2,{theme:zE(e)},ve.createElement(ts.Provider,{value:i},t)));if(a){const u=Ep(ic,{as:l});r=ve.createElement(u,{dir:i},r)}return r}ic.propTypes={children:k.node,theme:k.object,dir:k.oneOf(["ltr","rtl"]),instanceCounterMap:k.instanceOf(Map),as:k.string};ic.defaultProps={theme:{},as:void 0};const NE=(t,e,a,n,l)=>{const i=e,r=a,u=n,c=u.themeOverride,o=t,s=o.componentOverrides;let m={},f={};return s&&(m=i&&s[i]||r&&s[r]||{}),c&&(typeof c=="function"?f=c(l||{},t):f=c),{...m,...f}},UE=()=>{let t=S2();if(yp(t)){const e=Tf.getCurrentTheme();if(e)return e;t=Cf}return t},Wc={styles:{},makeStyles:()=>{}},LE=mp((t,e,a)=>{const n=t.displayName||t.name,l=T.forwardRef((i,r)=>{const u=UE();i.styles&&Io(!1,`Manually passing the "styles" property is not allowed on the ${n} component. Using the default styles calculated by the @withStyle decorator instead. +`,i.styles),i.makeStyles&&Io(!1,`Manually passing the "makeStyles" property is not allowed on the ${n} component. Styles are calculated by the @withStyle decorator.`);const c={...t.defaultProps,...i,...Wc};let o=typeof a=="function"?a(u):{};const s=NE(u,n,t.componentId,c,o);o={...o,...s};const m=T.useState(e?e(o,c,{}):{}),f=$2(m,2),p=f[0],E=f[1],b=_=>{const h=e(o,c,_);H2(h,p)||E(h)};return ve.createElement(t,Object.assign({ref:r},i,{makeStyles:b,styles:p,themeOverride:s}))});return lp(l,t),l.originalType=t.originalType||t,l.propTypes=t.propTypes,l.defaultProps=t.defaultProps,l.allowedProps=t.allowedProps,l.generateComponentTheme=a,t.defaultProps={...t.defaultProps,makeStyles:Wc.makeStyles,styles:Wc.styles},l}),Rn={SHADOW_TYPES:{resting:"resting",above:"above",topmost:"topmost",none:"none"},STACKING_TYPES:{deepest:"deepest",below:"below",resting:"resting",above:"above",topmost:"topmost"},BORDER_WIDTHS:{0:"0",none:"none",small:"small",medium:"medium",large:"large"},BORDER_RADII:{0:"0",none:"none",small:"small",medium:"medium",large:"large",circle:"circle",pill:"pill"},BACKGROUNDS:{default:"default",inverse:"inverse",transparent:"transparent"},SIZES:{xSmall:"x-small",small:"small",medium:"medium",large:"large",xLarge:"x-large"},SPACING:{0:"0",none:"none",auto:"auto",xxxSmall:"xxx-small",xxSmall:"xx-small",xSmall:"x-small",small:"small",mediumSmall:"mediumSmall",medium:"medium",large:"large",xLarge:"x-large",xxLarge:"xx-large"}},HE=Rn.SHADOW_TYPES,BE=Rn.STACKING_TYPES,kE=Rn.BORDER_WIDTHS,jE=Rn.BORDER_RADII,VE=Rn.BACKGROUNDS,YE=Rn.SIZES,$E=Rn.SPACING,Bn={shadow:k.oneOf(Object.values(HE)),stacking:k.oneOf(Object.values(BE)),borderWidth:Ic(Object.values(kE)),borderRadius:Ic(Object.values(jE)),background:k.oneOf(Object.values(VE)),size:k.oneOf(Object.values(YE)),spacing:Ic(Object.values($E))};function Ic(t){return function(e,a,n,l){const i=e[a];if(typeof i>"u")return null;if(typeof i!="string")return new Error(`Invalid ${l} \`${a}\` of type \`${typeof i}\` supplied to \`${n}\`, expected a string.`);const r=i.split(" "),u=r.length;if(u>0&&u<5){for(let c=0;c{a[bp(`${t}-${String(n)}`)]=e[n]}),a}function Eu(t,e,a,n){if(!(typeof a!="string"||yp(e)))return a.split(" ").map(l=>{if(l==="auto"||l==="0")return l;if(l==="none")return"0";if(l==="circle")return"100%";if(l==="pill")return"999em";const i=bp(`${n}-${l}`),r=e[i];return gn(typeof r<"u",`[${t}] '${i}' is an invalid '${n}' value.`),r||"0"}).join(" ").trim()}function es(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===4){var a=[e[3],e[1]];e[1]=a[0],e[3]=a[1]}return e.join(" ")}function qE(t){if(typeof t!="string")return;const e=t.split(" ");if(e.length===2){var a=[e[1],e[0]];e[0]=a[0],e[1]=a[1]}if(e.length===3&&e.push(e[1]),e.length===4){var n=[e[1],e[0],e[3],e[2]];e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3]}return e.join(" ")}const GE=({borderRadius:t,borderWidth:e,dir:a,theme:n})=>{const l=a===nc.rtl;return{borderRadius:Eu("View",n,l?qE(t):t,"borderRadius"),borderWidth:Eu("View",n,l?es(e):e,"borderWidth")}},XE=({margin:t,padding:e,dir:a,theme:n})=>{const l=a===nc.rtl;return{margin:Eu("View",n,l?es(t):t,"margin"),padding:Eu("View",n,l?es(e):e,"padding")}},QE=({insetBlockStart:t,insetBlockEnd:e,insetInlineStart:a,insetInlineEnd:n,dir:l})=>{const i=l===nc.rtl;return{...{top:t,insetBlockStart:t},...{bottom:e,insetBlockEnd:e},...{left:i?n:a,right:i?a:n}}},ZE=({cursor:t,style:e})=>{const a=wp(e||{},{},["top","left","position","display","transform","overflow","minWidth","minHeight","filter","flexBasis","backgroundImage","pointerEvents"]);return t&&(a.cursor=t),a},KE=(t,e)=>typeof e!="string"?!1:e.trim().split(" ").every(a=>t===a),PE=t=>{const e="focusRing--radius",a=(t||"").trim().split(" ")[0];if(KE(a,t)){const n=l=>`${l.charAt(0).toUpperCase()}${l.slice(1)}`;if(["small","medium","large"].includes(a))return`${e}${n(a)}`;if(["circle","pill"].includes(a))return`${e}Inherit`}return`${e}None`},JE=t=>{const e=t.position,a=t.display,n=t.focusPosition,l=t.withFocusOutline;return typeof l>"u"||l&&(gn(a==="inline"||e==="relative","[View] the focus outline will only show if the `position` prop is `relative`."),gn(a!=="inline"||n==="inset","[View] when display is set to `inline` the focus outline will only show if `focusPosition` is set to `inset`.")),l},FE=t=>{const e=t.borderWidth;return e&&e!=="0"&&e!=="none"},WE=(t,e)=>{const a=t.focusColor,n=t.focusPosition,l=t.position,i=t.shouldAnimateFocus,r=t.borderRadius,u=JE(t),c=typeof u>"u",o={offset:{top:`calc(${e.focusOutlineOffset} * -1)`,left:`calc(${e.focusOutlineOffset} * -1)`,right:`calc(${e.focusOutlineOffset} * -1)`,bottom:`calc(${e.focusOutlineOffset}* -1)`},inset:{top:`calc(${e.focusOutlineInset} * -1)`,left:`calc(${e.focusOutlineInset} * -1)`,right:`calc(${e.focusOutlineInset} * -1)`,bottom:`calc(${e.focusOutlineInset} * -1)`}},s={info:e.focusColorInfo,inverse:e.focusColorInverse,success:e.focusColorSuccess,danger:e.focusColorDanger};if(l==="relative"){const m=PE(r),f={"focusRing--radiusInherit":"inherit","focusRing--radiusNone":0},p={offset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} + (${e.focusOutlineOffset} - ${e.focusOutlineWidth}))`}},inset:{"focusRing--radiusSmall":{borderRadius:`calc(${e.borderRadiusSmall} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusMedium":{borderRadius:`calc(${e.borderRadiusMedium} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`},"focusRing--radiusLarge":{borderRadius:`calc(${e.borderRadiusLarge} - (${e.focusOutlineInset} + ${e.focusOutlineWidth}))`}}};return{"&::before":{pointerEvents:"none",content:'""',position:"absolute",borderStyle:e.focusOutlineStyle,borderWidth:e.focusOutlineWidth,borderColor:s[a],opacity:0,borderRadius:f[m],...p[n][m],...o[n],...i?{transition:"all 0.2s",transform:"scale(0.95)"}:{},...u?{opacity:1,transform:"scale(1)"}:{}},"&:focus":{outline:"none","&::before":{...c?{opacity:1,transform:"scale(1)"}:{}}}}}return{"&::before":{borderStyle:"none"},outlineStyle:"none",outlineColor:s[a],...u?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{},"&:focus":{...c?{outlineWidth:e.focusOutlineWidth,outlineStyle:e.focusOutlineStyle}:{}}}},IE=(t,e)=>{const a=e.borderRadius,n=e.borderWidth,l=e.margin,i=e.padding,r=e.position,u=e.display,c=e.focusPosition,o=e.textAlign,s=e.borderColor,m=e.background,f=e.stacking,p=e.shadow,E=e.overflowY,b=e.overflowX,_=e.overscrollBehavior,h=e.insetBlockEnd,d=e.insetBlockStart,y=e.insetInlineEnd,w=e.insetInlineStart,R=e.width,D=e.height,v=e.minWidth,M=e.minHeight,H=e.maxWidth,z=e.maxHeight,Q=e.withVisualDebug,dt=e.dir,Et=GE({theme:t,borderRadius:a,borderWidth:n,dir:dt}),At=XE({margin:l,padding:i,theme:t,dir:dt}),Jt=QE({dir:dt,insetBlockEnd:h,insetBlockStart:d,insetInlineEnd:y,insetInlineStart:w}),x=r==="relative"||u==="inline"&&c==="inset",V={inline:{label:"view--inline",display:"inline"},block:{label:"view--block",display:"block"},"inline-block":{label:"view--inlineBlock",display:"inline-block",verticalAlign:"middle"},flex:{label:"view--flex",display:"flex"},"inline-flex":{label:"view--inlineFlex",display:"inline-flex",verticalAlign:"middle"},auto:{}},L={start:{textAlign:"start"},center:{textAlign:"center"},end:{textAlign:"end"}},lt={transparent:{borderColor:t.borderColorTransparent},primary:{borderColor:t.borderColorPrimary},secondary:{borderColor:t.borderColorSecondary},brand:{borderColor:t.borderColorBrand},info:{borderColor:t.borderColorInfo},success:{borderColor:t.borderColorSuccess},warning:{borderColor:t.borderColorWarning},alert:{borderColor:t.borderColorAlert},danger:{borderColor:t.borderColorDanger}},ct={transparent:{color:t.color,background:"none"},primary:{color:t.color,background:t.backgroundPrimary},secondary:{color:t.color,background:t.backgroundSecondary},"primary-inverse":{color:t.colorPrimaryInverse,background:t.backgroundPrimaryInverse},brand:{color:t.colorPrimaryInverse,background:t.backgroundBrand},info:{color:t.colorPrimaryInverse,background:t.backgroundInfo},alert:{color:t.colorPrimaryInverse,background:t.backgroundAlert},success:{color:t.colorPrimaryInverse,background:t.backgroundSuccess},danger:{color:t.colorPrimaryInverse,background:t.backgroundDanger},warning:{color:t.colorPrimaryInverse,background:t.backgroundWarning}},oe={topmost:{zIndex:t.stackingTopmost},above:{zIndex:t.stackingAbove},resting:{},below:{zIndex:t.stackingBelow},deepest:{zIndex:t.stackingDeepest}},Xt={topmost:{boxShadow:t.shadowTopmost},resting:{boxShadow:t.shadowResting},above:{boxShadow:t.shadowAbove},none:{}},be=WE(e,t);return{view:{label:"view",boxSizing:"border-box",fontFamily:t.fontFamily,maxWidth:"100%",overflow:"visible",...V[u],...m&&ct[m],...f&&oe[f],...p&&Xt[p],...o&&L[o],overflowX:b&&b!=="visible"?b:"",overflowY:E&&E!=="visible"?E:"",position:r!=="static"?r:"",overscrollBehavior:_||"auto",...Q?{outline:`0.0625rem dashed ${t.debugOutlineColor}`}:{},...FE(e)?{borderStyle:t.borderStyle,...lt[s]}:{},...x?be:{}},inlineStyles:{"&&&&&&&&&&":{...At,...Et,...Jt,width:R,height:D,minWidth:v,minHeight:M,maxWidth:H,maxHeight:z,...ZE(e)}}}},tw=t=>{const e=t.colors,a=t.typography,n=t.borders,l=t.breakpoints,i=t.spacing,r=t.shadows,u=t.stacking,c=t.key,o={canvas:{color:t["ic-brand-font-color-dark"],focusColorInfo:t["ic-brand-primary"],backgroundBrand:t["ic-brand-primary"],backgroundInfo:t["ic-brand-primary"],borderColorBrand:t["ic-brand-primary"],borderColorInfo:t["ic-brand-primary"]}};return{...{fontFamily:a==null?void 0:a.fontFamily,color:e==null?void 0:e.textDarkest,colorPrimaryInverse:e==null?void 0:e.textLightest,borderColorPrimary:e==null?void 0:e.borderMedium,borderColorSecondary:e==null?void 0:e.borderDark,borderColorSuccess:e==null?void 0:e.borderSuccess,borderColorBrand:e==null?void 0:e.borderBrand,borderColorInfo:e==null?void 0:e.borderInfo,borderColorAlert:e==null?void 0:e.borderAlert,borderColorWarning:e==null?void 0:e.borderWarning,borderColorDanger:e==null?void 0:e.borderDanger,borderColorTransparent:"transparent",debugOutlineColor:e==null?void 0:e.borderDebug,backgroundPrimary:e==null?void 0:e.backgroundLightest,backgroundSecondary:e==null?void 0:e.backgroundLight,backgroundPrimaryInverse:e==null?void 0:e.backgroundDarkest,backgroundBrand:e==null?void 0:e.backgroundBrand,backgroundInfo:e==null?void 0:e.backgroundInfo,backgroundAlert:e==null?void 0:e.backgroundAlert,backgroundSuccess:e==null?void 0:e.backgroundSuccess,backgroundDanger:e==null?void 0:e.backgroundDanger,backgroundWarning:e==null?void 0:e.backgroundWarning,arrowSize:"0.5rem",focusOutlineStyle:n==null?void 0:n.style,focusOutlineWidth:n==null?void 0:n.widthMedium,focusOutlineOffset:"0.3125rem",focusOutlineInset:"0rem",focusColorInfo:e==null?void 0:e.borderInfo,focusColorDanger:e==null?void 0:e.borderDanger,focusColorSuccess:e==null?void 0:e.borderSuccess,focusColorInverse:e==null?void 0:e.borderLightest,xSmallMaxWidth:l==null?void 0:l.xSmall,smallMaxWidth:l==null?void 0:l.small,mediumMaxWidth:l==null?void 0:l.medium,largeMaxWidth:l==null?void 0:l.large,...Pl("margin",i),...Pl("padding",i),...Pl("shadow",r),...Pl("stacking",u),...Pl("border",n)},...o[c]}},ew={as:k.elementType,elementRef:k.func,display:k.oneOf(["auto","inline","block","inline-block","flex","inline-flex"]),overflowX:k.oneOf(["auto","hidden","visible"]),overflowY:k.oneOf(["auto","hidden","visible"]),margin:Bn.spacing,padding:Bn.spacing,height:k.oneOfType([k.string,k.number]),width:k.oneOfType([k.string,k.number]),maxHeight:k.oneOfType([k.string,k.number]),maxWidth:k.oneOfType([k.string,k.number]),minHeight:k.oneOfType([k.string,k.number]),minWidth:k.oneOfType([k.string,k.number]),children:k.node,textAlign:k.oneOf(["start","center","end"]),borderWidth:Bn.borderWidth,borderRadius:Bn.borderRadius,borderColor:k.oneOf(["transparent","primary","secondary","brand","info","success","warning","alert","danger"]),background:k.oneOf(["transparent","primary","secondary","primary-inverse","brand","info","alert","success","danger","warning"]),shadow:Bn.shadow,stacking:Bn.stacking,cursor:cE,position:k.oneOf(["static","absolute","relative","sticky","fixed"]),insetInlineStart:k.string,insetInlineEnd:k.string,insetBlockStart:k.string,insetBlockEnd:k.string,withFocusOutline:k.bool,focusPosition:k.oneOf(["offset","inset"]),focusColor:k.oneOf(["info","inverse","success","danger"]),shouldAnimateFocus:k.bool,withVisualDebug:k.bool,dir:k.oneOf(Object.values(wf.DIRECTION)),overscrollBehavior:k.oneOf(["auto","contain","none"])},aw=["as","background","borderColor","borderRadius","borderWidth","children","cursor","dir","display","elementRef","focusColor","focusPosition","height","insetBlockEnd","insetBlockStart","insetInlineEnd","insetInlineStart","margin","maxHeight","maxWidth","minHeight","minWidth","overflowX","overflowY","overscrollBehavior","padding","position","shadow","shouldAnimateFocus","stacking","textAlign","width","withFocusOutline","withVisualDebug"],nw=["children","textAlign","background","display","withVisualDebug","width","height","minWidth","minHeight","maxWidth","maxHeight","overflowX","overflowY","stacking","shadow","position","focusPosition","focusColor","shouldAnimateFocus","borderColor","className","overscrollBehavior","styles","makeStyles"];var Nh,Uh,Ar,ua;let lw=(Nh=wf(),Uh=LE(IE,tw),Nh(Ar=Uh(Ar=(ua=class Op extends T.Component{get _element(){return this.ref}constructor(e){super(e),this.spanMarginVerified=void 0,this.ref=null,this.handleElementRef=a=>{typeof this.props.elementRef=="function"&&this.props.elementRef(a),this.ref=a},this.spanMarginVerified=!1}componentDidMount(){var e,a;(e=(a=this.props).makeStyles)===null||e===void 0||e.call(a)}componentDidUpdate(){var e,a;(e=(a=this.props).makeStyles)===null||e===void 0||e.call(a)}render(){const e=this.props,a=e.children;e.textAlign,e.background,e.display,e.withVisualDebug,e.width,e.height,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight,e.overflowX,e.overflowY,e.stacking,e.shadow,e.position,e.focusPosition,e.focusColor,e.shouldAnimateFocus,e.borderColor;const n=e.className;e.overscrollBehavior;const l=e.styles;e.makeStyles;const i=bu(e,nw),r=Ep(Op,this.props);return O2(r,Object.assign({},tE(i),{className:n,css:[l==null?void 0:l.view,l==null?void 0:l.inlineStyles],ref:this.handleElementRef}),a)}},ua.displayName="View",ua.componentId="View",ua.allowedProps=aw,ua.propTypes=ew,ua.defaultProps={display:"auto",overflowX:"visible",overflowY:"visible",withVisualDebug:!1,borderColor:"primary",position:"static",focusPosition:"offset",focusColor:"info",shouldAnimateFocus:!0,overscrollBehavior:"auto"},ua.omitViewProps=(t,e)=>{const a=[...ua.allowedProps,"styles","makeStyles","themeOverride"];let n=!0;try{n=!1}catch(l){if(l instanceof ReferenceError)n=!1;else throw l}return n&&Object.keys(wp(t,a)).forEach(l=>{gn(!1,`[${e.name}] prop '${l}' is not allowed.`)}),P2(t,a)},ua))||Ar)||Ar);const iw="isp-site",rw="4.0.0+1717539510",uw="https://inst.bid/#/",cw="module",ow={dev:"vite","build:ts":"tsc","build:js":"vite build",build:"pnpm biome:apply && pnpm build:ts && pnpm build:js",preview:"pnpm build && vite preview",predeploy:"make all && pnpm build",push:'pnpm predeploy && gh-pages -t -m "Deploy v$(pnpm -s env:app)" -d dist',"biome:check":"pnpm lint && pnpm check && pnpm format","biome:apply":"pnpm lint:apply && pnpm check:apply && pnpm format:apply",lint:"biome lint","lint:apply":"biome lint --write",check:"biome check","check:apply":"biome check --write",format:"biome format","format:apply":"biome format --write","env:package":"node-jq '.' package.json","env:biome":"biome rage","env:app":"echo $npm_package_version"},sw={"@instructure/browserslist-config-canvas-lms":"^2.0.0","@instructure/ui":"^9.0.1","gh-pages":"^6.1.1",react:"19.0.0-rc-f994737d14-20240522","react-dom":"19.0.0-rc-f994737d14-20240522","react-markdown":"^9.0.1","react-router-dom":"^6.23.1","rehype-raw":"^7.0.0","remark-gemoji":"^8.0.0","remark-gfm":"^4.0.0"},fw={"@babel/plugin-syntax-import-attributes":"^7.24.6","@biomejs/biome":"1.8.0","@instructure/shared-types":"^9.0.1","@octokit/types":"^13.5.0","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.0","babel-plugin-react-compiler":"0.0.0-experimental-938cd9a-20240601","node-jq":"^4.4.0",typescript:"^5.4.5",vite:"^5.2.12"},dw={node:">=22.2.0",pnpm:">=9.1.4"},hw="pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0",mw={overrides:{react:"^19.0.0-rc-f994737d14-20240522","react-dom":"^19.0.0-rc-f994737d14-20240522","@instructure/ui-test-sandbox>sinon":"^17.0.1","gh-pages>globby":"11.1.0","node-jq>tempfile":"^5.0.0","bin-build>tempfile":"^5.0.0"}},vw=["extends @instructure/browserslist-config-canvas-lms"],yw={name:iw,version:rw,homepage:uw,private:!0,type:cw,scripts:ow,dependencies:sw,devDependencies:fw,engines:dw,packageManager:hw,pnpm:mw,browserslist:vw},Tr={owner:"thedannywahl",repo:"instructure-security-package",branch:"main",url:yw.homepage.replace("/#/",""),api:"https://api.github.com",raw:"https://raw.githubusercontent.com"},Wa=`${Tr.raw}/${Tr.owner}/${Tr.repo}/${Tr.branch}/README`,Oa=["Instructure","Canvas","Mastery","Elevate","Impact","LearnPlatform","Parchment"],fT=[...Oa,"Canvas LMS","Canvas Mobile","Canvas Studio","Canvas Credentials","Canvas Catalog","Canvas Commons","Canvas Data","Mastery Connect","Mastery Item Bank","Mastery View Assessments","Elevate K-12 Analytics","Elevate Data Quality","Elevate Data Sync","Learn Platform"],pw=[{brandName:Oa[0],get title(){return this.brandName.toLowerCase()},route:"/",readme:`${Wa}.md`,color:"#287A9F"},{brandName:Oa[1],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#E72429"},{brandName:Oa[2],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#24A159"},{brandName:Oa[3],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#0097D3"},{brandName:Oa[4],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#F76400"},{brandName:Oa[5],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#0077CC"},{brandName:Oa[6],get title(){return this.brandName.toLowerCase()},get route(){return`/${this.title}`},get readme(){return`${Wa}-${this.brandName}.md`},color:"#0093b2"}],gw=[{title:"CAIQ",from:"/aws/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CAIQ%20v4.0.2.pdf"},{title:"Cyber Essentials+ Certificate",from:"/aws/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CE%20Plus%20Certificate.pdf"},{title:"CSA Star Level 2 Certificate",from:"/aws/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20CSA%20Star%20Level%202%20Certificate.pdf"},{title:"ISO 27001 Certificate",from:"/aws/iso/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%2027001%20Certificate.pdf"},{title:"ISO 9001 Certificate",from:"/aws/iso9001/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20ISO%209001%20Certificate.pdf"},{title:"SOC 3 Report",from:"/aws/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Amazon%20Web%20Services/AWS%20SOC%203.pdf"}],bw=gw.map(t=>({...t,lang:"EN"})),Sw={brand:"AWS",links:bw},Ew=[{title:"Compliance Package",from:"/canvas/catalog/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-catalog.zip"},{title:"PCI AOC SAQ",from:"/canvas/catalog/aoc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/2023%20Instructure%20PCI%20DSS%20v3.2.1%20AOC%20SAQ-D%20Service%20Provider.pdf"},{title:"Architecture Paper",from:"/canvas/catalog/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20Architecture.pdf"},{title:"HECVAT Lite",from:"/canvas/catalog/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20HECVAT%20Lite.xlsx"},{title:"PCI Shared Responsibility Matrix",from:"/canvas/catalog/pci/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20PCI%20Responsibility%20Matrix.pdf"},{title:"TX-RAMP Certification",from:"/canvas/catalog/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Canvas%20Catalog%20TX-RAMP%20Provisional%20Certificate.pdf"},{title:"Payment Redirector",from:"/canvas/catalog/payments/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-catalog/Canvas%20Catalog/Catalog%20Payment%20Redirector.png"},{title:"Home (HE)",from:"/canvas/catalog",to:"https://www.instructure.com/higher-education/products/canvas/canvas-catalog/"},{title:"Home (K12)",from:"/canvas/catalog/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-catalog/"},{title:"Guides",from:"/canvas/catalog/guides",to:"https://community.canvaslms.com/t5/Canvas-Catalog/ct-p/canvas_catalog"},{title:"Release Notes",from:"/canvas/catalog/releases",to:"https://community.canvaslms.com/t5/Catalog-Releases/ct-p/catalog_releases"},{title:"API",from:"/canvas/catalog/api",to:"https://api.catalog.instructure.com/api/docs"}],ww=Ew.map(t=>({...t,lang:"EN"})),Aw={brand:"Canvas Catalog",links:ww},Tw=[{title:"Home",from:"/canvas/commons",to:"https://lor.instructure.com/"},{title:"Guides",from:"/canvas/commons/guides",to:"https://community.canvaslms.com/t5/Canvas-Commons/tkb-p/commons"},{title:"API",from:"/canvas/commons/api",to:"https://lor.instructure.com/docs/api/"}],Cw=Tw.map(t=>({...t,lang:"EN"})),_w={brand:"Canvas Commons",links:Cw},Rw=[{title:"Compliance Package",from:"/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials.zip"},{title:"VPAT",from:"/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Architecture Paper",from:"/canvas/credentials/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"TX-RAMP Certification",from:"/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/credentials",to:"https://www.instructure.com/higher-education/products/canvas/canvas-credentials-digital-badges/"},{title:"Home (K12)",from:"/canvas/credentials/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-credentials-digital-badges/"},{title:"Guides",from:"/canvas/credentials/guides",to:"https://community.canvaslms.com/t5/Canvas-Credentials-Badges-Badgr/ct-p/canvas-credentials-badges"},{title:"Release Notes",from:"/canvas/credentials/releases",to:"https://community.canvaslms.com/t5/Badges-Credentials-Releases/tkb-p/badges-release"},{title:"API",from:"/canvas/credentials/api",to:"https://api.badgr.io/docs/v2/"}],Ow=Rw.map(t=>({...t,lang:"EN"})),Dw=[{title:"Compliance Package",from:"/es-la/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-ES_LA.zip"},{title:"VPAT",from:"/es-la/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/es-la/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-ES_LA/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],Mw=Dw.map(t=>({...t,lang:"ES_LA"})),xw=[{title:"Compliance Package",from:"/pt-br/canvas/credentials/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-credentials-PT_BR.zip"},{title:"VPAT",from:"/pt-br/canvas/credentials/vpat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20(formerly%20Badgr)%20VPAT.pdf"},{title:"Papel de Arquitectura",from:"/pt-br/canvas/credentials/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/credentials/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20HECVAT%20Full.xlsx"},{title:"Certificado de Nível 2 de TX-RAMP",from:"/pt-br/canvas/credentials/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-credentials-PT_BR/Canvas%20Credentials/Canvas%20Credentials%20TX-RAMP%20Level%202%20Certification.pdf"}],zw=xw.map(t=>({...t,lang:"PT_BR"})),Nw={brand:"Canvas Credentials",links:[...Ow,...Mw,...zw]},Uw=[{title:"Guides",from:"/canvas/data/guides",to:"https://community.canvaslms.com/t5/Canvas-Data-Users/gh-p/data"},{title:"API",from:"/canvas/data/api",to:"https://portal.inshosteddata.com/docs"}],Lw=Uw.map(t=>({...t,lang:"EN"})),Hw={brand:"Canvas Data",links:Lw},Bw=[{title:"Startseite",from:"/de/canvas/lms",to:"https://www.instructure.com/de/hochschule/produkt/canvas/canvas-lms/"},{title:"Handbücher",from:"/de/canvas/handbuch",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],kw=Bw.map(t=>({...t,lang:"DE"})),jw=[{title:"Compliance Package",from:"/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms.zip"},{title:"Architecture Paper",from:"/canvas/lms/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20K12CVAT%20Full.xlsx"},{title:"SOC 3 Report",from:"/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"TX-RAMP Level 2 Certificate",from:"/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/canvas/lms",to:"https://www.instructure.com/higher-education/products/canvas/canvas-lms/"},{title:"Home (K12)",from:"/canvas/lms/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-lms/"},{title:"VPAT",from:"/canvas/lms/vpat",to:"https://www.instructure.com/products/canvas/accessibility/"},{title:"Guides",from:"/canvas/lms/guides",to:"https://community.canvaslms.com/t5/Canvas-Guides/ct-p/canvas_guides/"},{title:"Release Notes",from:"/canvas/lms/releases",to:"https://community.canvaslms.com/t5/Canvas-Releases/tkb-p/canvas-release"},{title:"API",from:"/canvas/lms/api",to:"https://canvas.instructure.com/doc/api/index.html"}],Vw=jw.map(t=>({...t,lang:"EN"})),Yw=[{title:"Compliance Package (ES-LA)",from:"/es-la/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/canvas-lms-ES_LA.zip"},{title:"Papel de Arquitectura",from:"/es-la/canvas/lms/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20Architecture_ES.pdf"},{title:"HECVAT",from:"/es-la/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/es-la/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Informe SOC 3",from:"/es-la/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-ES_LA/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página de inicio (HE)",from:"/es-la/canvas/lms",to:"https://www.instructure.com/es/canvas/educacion-superior/"},{title:"Página de inicio (K12)",from:"/es-la/canvas/lms/basica",to:"https://www.instructure.com/es/educacion-basica/"},{title:"Guías",from:"/es-la/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de implementación",from:"/es-la/canvas/lms/publicacion",to:"https://community.canvaslms.com/t5/Espa%C3%B1ol/tkb-p/canvas-release-espanol"}],$w=Yw.map(t=>({...t,lang:"ES_LA"})),qw=[{title:"Compliance Package",from:"/pt-br/canvas/lms/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-lms-PT_BR.zip"},{title:"Papel de Arquitetura",from:"/pt-br/canvas/lms/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20Architecture_PT.pdf"},{title:"HECVAT",from:"/pt-br/canvas/lms/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20HECVAT%20Full.xlsx"},{title:"K12CVAT",from:"/pt-br/canvas/lms/k12cvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20K-12CVAT-Lite.xlsx"},{title:"Relatório SOC 3",from:"/pt-br/canvas/lms/soc/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20SOC%203.pdf"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/canvas/lms/txramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms-PT_BR/Canvas%20LMS/Canvas%20LMS%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Página inicial (HE)",from:"/canvas/lms/pt",to:"https://www.instructure.com/pt-br/canvas/ensino-superior/"},{title:"Página inicial (K12)",from:"/canvas/lms/pt/basica",to:"https://www.instructure.com/pt-br/ensino-fundamental-e-medio/"},{title:"Guias",from:"/pt-br/canvas/guias",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"},{title:"Notas de lançamento (Canvas LMS)",from:"/canvas/lms/lancamentos",to:"https://community.canvaslms.com/t5/Portugues/tkb-p/canvas-release-portugues"}],Gw=qw.map(t=>({...t,lang:"PT_BR"})),Xw={brand:"Canvas LMS",links:[...Vw,...$w,...Gw,...kw]},Qw=[{title:"Mobile Apps (Android)",from:"/canvas/mobile/android",to:"https://play.google.com/store/apps/developer?id=Instructure"},{title:"Mobile Apps (iOS)",from:"/canvas/mobile/ios",to:"https://apps.apple.com/us/developer/instructure-inc/id418441198"},{title:"Release Notes",from:"/canvas/mobile/releases",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Releases/tkb-p/CanvasMobileReleases"},{title:"Guides",from:"/canvas/mobile/guides",to:"https://community.canvaslms.com/t5/Canvas-Mobile-Users/gh-p/mobile"}],Zw=Qw.map(t=>({...t,lang:"EN"})),Kw={brand:"Canvas Mobile",links:Zw},Pw=[{title:"Compliance Package",from:"/canvas/studio/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/canvas-studio.zip"},{title:"Architecture Paper",from:"/canvas/studio/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20Architecture.pdf"},{title:"HECVAT",from:"/canvas/studio/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-studio/Canvas%20Studio/Canvas%20Studio%20HECVAT%20Lite.xlsx"},{title:"Home (HE)",from:"/canvas/studio",to:"https://www.instructure.com/higher-education/products/canvas/canvas-studio/"},{title:"Home (K12)",from:"/canvas/studio/k12",to:"https://www.instructure.com/k12/products/canvas/canvas-studio/"},{title:"VPAT",from:"/canvas/studio/vpat",to:"https://www.instructure.com/accessibility/canvas/canvas-studio-vpat/"},{title:"Guides",from:"/canvas/studio/guides",to:"https://community.canvaslms.com/t5/Canvas-Studio/ct-p/studio_guides"},{title:"Release Notes",from:"/canvas/studio/releases",to:"https://community.canvaslms.com/t5/Studio-Releases/ct-p/studio_releases"},{title:"API",from:"/canvas/studio/api",to:"https://canvas.instructuremedia.com/api/public/docs/#/"}],Jw=Pw.map(t=>({...t,lang:"EN"})),Fw={brand:"Canvas Studio",links:Jw},Ww=[{title:"Gemeinschaft",from:"/de/canvas/gemeinschaft",to:"https://community.canvaslms.com/t5/Ressourcen-auf-Deutsch-German/ct-p/german_resources"}],Iw=Ww.map(t=>({...t,lang:"DE"})),tA=[{title:"Security Audit Report",from:"/canvas/audit/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/canvas-lms/Canvas%20LMS/Canvas%20Security%20Audit%20Report.pdf"},{title:"Try Canvas (FFT)",from:"/try-canvas",to:"https://www.instructure.com/try-canvas"},{title:"Community",from:"/canvas/community",to:"https://community.canvaslms.com/t5/Canvas/ct-p/canvas"},{title:"Roadmap",from:"/canvas/roadmap",to:"https://community.canvaslms.com/t5/Canvas-Product-Roadmap/ct-p/canvas-product-roadmap"},{title:"Ideas",from:"/canvas/ideas",to:"https://community.canvaslms.com/t5/Canvas-Ideas-and-Themes/ct-p/canvas-ideas-themes?tab=identified"}],eA=tA.map(t=>({...t,lang:"EN"})),aA=[{title:"Communidad",from:"/es-la/canvas/lms/communidad",to:"https://community.canvaslms.com/t5/Recursos-en-Espa%C3%B1ol-Spanish/ct-p/espanol_resources"}],nA=aA.map(t=>({...t,lang:"ES_LA"})),lA=[{title:"Comunidade",from:"/pt-br/canvas/comunidade",to:"https://community.canvaslms.com/t5/Recursos-em-Portugu%C3%AAs-Portuguese/ct-p/portuguese_resources"}],iA=lA.map(t=>({...t,lang:"PT_BR"})),rA={brand:"Canvas",links:[...eA,...nA,...iA,...Iw]},uA=[{title:"Home",from:"/elevate/dataquality",to:"https://www.instructure.com/k12/products/elevate/elevate-data-quality/"},{title:"Guides",from:"/elevate/dataquality/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Quality/ct-p/certify"}],cA=uA.map(t=>({...t,lang:"EN"})),oA={brand:"Elevate Data Quality",links:cA},sA=[{title:"Guides",from:"/elevate/datasync/guides",to:"https://community.canvaslms.com/t5/Elevate-Data-Sync/ct-p/elevate_data_sync"}],fA=sA.map(t=>({...t,lang:"EN"})),dA={brand:"Elevate Data Sync",links:fA},hA=[{title:"Compliance Package",from:"/elevate/k12-analytics/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-k12-analytics.zip"},{title:"Home",from:"/elevate/k12-analytics",to:"https://www.instructure.com/k12/products/elevate/elevate-k12-analytics"},{title:"Release Notes",from:"/elevate/k12-analytics/releases",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics-Releases/tkb-p/v_release"},{title:"Guides",from:"/elevate/k12analytics/guides",to:"https://community.canvaslms.com/t5/Elevate-K-12-Analytics/ct-p/videri"}],mA=hA.map(t=>({...t,lang:"EN"})),vA={brand:"Elevate K-12 Analytics",links:mA},yA=[{title:"Compliance Package",from:"/elevate/standards-alignment/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/elevate-standards-alignment.zip"},{title:"HECVAT Lite",from:"/elevate/standards-alignment/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/elevate-standards-alignment/Elevate%20Standards%20Alignment/Elevate%20Standards%20Alignment%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/elevate/standards-alignment",to:"https://www.instructure.com/corporate-education/products/elevate/elevate-standards-alignment"},{title:"Release Notes",from:"/elevate/standards-alignment/releases",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/esa_releases"},{title:"Guides",from:"/elevate/standards-alignment/guides",to:"https://community.canvaslms.com/t5/Elevate-Standards-Alignment/tkb-p/ab_basics"}],pA=yA.map(t=>({...t,lang:"EN"})),gA={brand:"Elevate Standards Alignment",links:pA},bA=[{title:"Community",from:"/elevate/community",to:"https://community.canvaslms.com/t5/Elevate/ct-p/elevate"},{title:"Roadmap",from:"/elevate/roadmap",to:"https://community.canvaslms.com/t5/Elevate-Product-Roadmap/ct-p/elevate-product-roadmap"}],SA=bA.map(t=>({...t,lang:"EN"})),EA={brand:"Elevate",links:SA},wA=[{title:"Compliance Package",from:"/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact.zip"},{title:"Architecture Paper",from:"/impact/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20Architecture.pdf"},{title:"HECVAT Lite",from:"/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"TX-RAMP Level 2 Certification",from:"/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"},{title:"Home (HE)",from:"/impact/he",to:"https://www.instructure.com/higher-education/products/impact/"},{title:"Home (K12)",from:"/impact/k12",to:"https://www.instructure.com/k12/products/impact/"},{title:"Community",from:"/impact/community",to:"https://community.canvaslms.com/t5/Impact/ct-p/impact"},{title:"Guides",from:"/impact/guides",to:"https://community.canvaslms.com/t5/Impact-Guides/tkb-p/impact_guides"},{title:"Release Notes",from:"/impact/releases",to:"https://community.canvaslms.com/t5/Impact-Releases/ct-p/impact_releases"}],AA=wA.map(t=>({...t,lang:"EN"})),TA=[{title:"Compliance Package",from:"/es-la/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-ES_LA.zip"},{title:"Papel de Arquitectura",from:"/es-la/impact/arquitectura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20Architecture_ES.pdf"},{title:"HECVAT Lite",from:"/es-la/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nivel 2 de TX-RAMP",from:"/es-la/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-ES_LA/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],CA=TA.map(t=>({...t,lang:"ES_LA"})),_A=[{title:"Compliance Package",from:"/pt-br/impact/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/impact-PT_BR.zip"},{title:"Papel de Arquitetura",from:"/pt-br/impact/arquitetura/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20Architecture_PT.pdf"},{title:"HECVAT Lite",from:"/pt-br/impact/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20HECVAT%20Lite.xlsx"},{title:"Certificado de Nível 2 do TX-RAMP",from:"/pt-br/impact/tx-ramp/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/impact-PT_BR/Impact/Impact%20TX-RAMP%20Level%202%20Certification.pdf"}],RA=_A.map(t=>({...t,lang:"PT_BR"})),OA={brand:"Impact",links:[...AA,...CA,...RA]},DA=[{title:"Startseite",from:"/de/home",to:"https://www.instructure.com/de"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Kontakt",from:"/kontakt",to:"https://www.instructure.com/de/contact-us"}],MA=DA.map(t=>({...t,lang:"DE"})),xA=[{title:"Security White Paper",from:"/security/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Security%20Overview.pdf"},{title:"Business Continuity White Paper",from:"/bc/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20Business%20Continuity%20%26%20Disaster%20Recovery.pdf"},{title:"CAIQ",from:"/caiq/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"CSA Star Certificate",from:"/csa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20CSA%20STAR%20Certificate.pdf"},{title:"Cyber Essentials+ Certificate",from:"/ce/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Cyber%20Essentials%20Plus.pdf"},{title:"Environmental, Social, and Governance Report",from:"/esg/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20ESG%20Report%20FY2023.pdf"},{title:"Instructure, Inc. Certificate of Insurance",from:"/coi/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Inc%20COI.pdf"},{title:"Instructure Global Certificate of Insurance",from:"/coi-global/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Global%20COI.pdf"},{title:"ISO 27001 Certificate",from:"/iso/dl",to:"https://github.com/thedannywahl/instructure-security-package/raw/main/Instructure/Instructure%20ISO%2027001%20Compliance%20Certificate.pdf"},{title:"Quality Assurance Program",from:"/qa/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/canvas-lms/Instructure/Instructure%20Quality%20Assurance%20Program.pdf"},{title:"Home",from:"/home",to:"https://www.instructure.com/"},{title:"Roadmap",from:"/roadmap",to:"https://community.canvaslms.com/t5/Instructure-Roadmap/ct-p/instructure-roadmap/"},{title:"Accessibility",from:"/a11y",to:"https://www.instructure.com/accessibility/"},{title:"Contact",from:"/contact",to:"https://www.instructure.com/contact-us/"},{title:"Privacy",from:"/privacy",to:"https://www.instructure.com/canvas/privacy/"},{title:"Security",from:"/security",to:"https://www.instructure.com/products/canvas/security/"},{title:"Trust Center",from:"/trust",to:"https://www.instructure.com/trust-center/"},{title:"Community",from:"/community",to:"https://community.canvaslms.com/"},{title:"Terms & Conditions",from:"/tos",to:"https://www.instructure.com/policies/master-terms-conditions/"},{title:"Global Terms & Conditions",from:"/tos/global",to:"https://www.instructure.com/policies/global/master-terms-and-conditions/"},{title:"Acceptable Use Policy",from:"/aup",to:"https://www.instructure.com/policies/acceptable-use/"},{title:"Data Privacy Addendum",from:"/dpa",to:"https://www.instructure.com/policies/data-processing/"},{title:"Investor Relations",from:"/investors",to:"https://ir.instructure.com/overview/default.aspx"},{title:"Status",from:"/status",to:"https://status.instructure.com/"},{title:"CSA Star Registration",from:"/csa",to:"https://cloudsecurityalliance.org/star/registry/instructure/"},{title:"1EdTech Registrations",from:"/1edtech",to:"https://site.imsglobal.org/certifications?query=instructure"},{title:"Our Story",from:"/story",to:"https://www.instructure.com/about/our-story"},{title:"Study Hall",from:"/resources",to:"https://www.instructure.com/resources/"},{title:"EduAppCenter",from:"/apps",to:"https://www.eduappcenter.com/"},{title:"ESG Report (online)",from:"/esg",to:"https://instructure.com/esg-report"}],zA=xA.map(t=>({...t,lang:"EN"})),NA=[{title:"Página de inicio",from:"/es-la/home",to:"https://www.instructure.com/es/"},{title:"Contáctenos",from:"/es-la/contactenos",to:"https://www.instructure.com/es/contactenos/"},{title:"Privacidad",from:"/es-la/privicidad",to:"https://www.instructure.com/es/canvas/privacidad/"},{title:"Seguridad",from:"/es-la/seguridad",to:"https://www.instructure.com/es/canvas/seguridad/"},{title:"Nuestra Historia",from:"/es-la/historia",to:"https://www.instructure.com/es/sobre/nuestra-historia"}],UA=NA.map(t=>({...t,lang:"ES_LA"})),LA=[{title:"Pagina inicial",from:"/pt-br/home",to:"https://www.instructure.com/pt-br/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Contato",from:"/pt-br/contato",to:"https://www.instructure.com/pt-br/contato/"},{title:"Privacidade",from:"/pt-br/privacidade",to:"https://www.instructure.com/pt-br/canvas/privacidade/"},{title:"Segurança",from:"/pt-br/seguranca",to:"https://www.instructure.com/pt-br/canvas/seguranca/"},{title:"Nossa História",from:"/pt-br/historia",to:"https://www.instructure.com/pt-br/sobre/nossa-historia"}],HA=LA.map(t=>({...t,lang:"PT_BR"})),BA={brand:"Instructure",links:[...zA,...UA,...HA,...MA]},kA=[{title:"Compliance Package",from:"/learnplatform/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/learnplatform.zip"},{title:"EdTech Top 40 Report",from:"/learnplatform/top40/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/EdTech%20Top%2040.pdf"},{title:"Architecture Paper",from:"/learnplatform/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20Architecture%20Overview.pdf"},{title:"HECVAT Lite",from:"/learnplatform/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/learnplatform/LearnPlatform/LearnPlatform%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/learnplatform",to:"https://www.instructure.com/k12/products/learnplatform/"},{title:"Terms of Service",from:"/learnplatform/tos",to:"https://www.instructure.com/policies/learnplatform-terms-of-service/"},{title:"Privacy",from:"/learnplatform/privacy",to:"https://www.instructure.com/policies/privacy-learnplatform/"},{title:"Data Processing Agreement",from:"/learnplatform/dpa",to:"https://www.instructure.com/policies/learnplatform-data-processing-agreement/"},{title:"Statement of Neutrality",from:"/learnplatform/neutrality",to:"https://www.instructure.com/policies/learnplatform-neutrality/"}],jA=kA.map(t=>({...t,lang:"EN"})),VA={brand:"Learnplatform",links:jA},YA=[{title:"Compliance Package",from:"/mastery/connect/dl",to:"https://github.com/thedannywahl/instructure-security-package/archive/refs/heads/mastery-connect.zip"},{title:"Architecture Paper",from:"/mastery/connect/architecture/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20Architecture.pdf"},{title:"HECVAT Lite",from:"/mastery/connect/hecvat/dl",to:"https://raw.githubusercontent.com/thedannywahl/instructure-security-package/mastery-connect/Mastery%20Connect/Mastery%20Connect%20HECVAT%20Lite.xlsx"},{title:"Home",from:"/mastery/connect",to:"https://www.instructure.com/k12/products/mastery/mastery-connect"},{title:"Guides",from:"/mastery/connect/guides",to:"https://community.canvaslms.com/t5/Mastery-Connect/ct-p/masteryconnect"},{title:"Release Notes",from:"/mastery/connect/releases",to:"https://community.canvaslms.com/t5/Mastery-Connect-Releases/tkb-p/masteryconnect"},{title:"API",from:"/mastery/connect/api",to:"https://docs.google.com/document/d/19TxyeRzF6nyJDY6ej2dZozbE87JdUygw"},{title:"Mobile App (Android)",from:"/mastery/connect/android",to:"https://play.google.com/store/apps/dev?id=8869528477632015729&hl=EN&gl=US"},{title:"Mobile App (iOS)",from:"/canvas/lms/ios",to:"https://apps.apple.com/us/developer/masteryconnect/id413937396"}],$A=YA.map(t=>({...t,lang:"EN"})),qA={brand:"Mastery Connect",links:$A},GA=[{title:"Home",from:"/mastery/itembank",to:"https://www.instructure.com/k12/products/mastery/mastery-item-bank/"},{title:"Guides",from:"/mastery/itembank/guides",to:"https://community.canvaslms.com/t5/Mastery-Item-Bank/ct-p/mastery-item-bank/"}],XA=GA.map(t=>({...t,lang:"EN"})),QA={brand:"Mastery Item Bank",links:XA},ZA=[{title:"Formatives Home",from:"mastery/view/formative",to:"https://www.instructure.com/k12/products/mastery/mastery-view-formative-assessments/"},{title:"Predictives Home",from:"/mastery/view/predictive",to:"https://www.instructure.com/k12/products/mastery/mastery-view-predictive-assessments/"}],KA=ZA.map(t=>({...t,lang:"EN"})),PA={brand:"Mastery View Assessments",links:KA},JA=[{title:"Community",from:"/mastery/community",to:"https://community.canvaslms.com/t5/Mastery/ct-p/mastery"},{title:"Roadmap",from:"/mastery/roadmap",to:"https://community.canvaslms.com/t5/Mastery-Product-Roadmap/ct-p/mastery-product-roadmap"}],FA=JA.map(t=>({...t,lang:"EN"})),WA={brand:"Mastery",links:FA},IA=[],tT=IA.map(t=>({...t,lang:"EN"})),eT={brand:"Parchment",links:tT},aT=[Sw,BA,rA,Xw,Kw,Fw,Aw,_w,Hw,WA,qA,QA,PA,Nw,VA,eT,EA,vA,gA,oA,dA,OA],On=[];for(const t of pw)On.push({path:`${t.route}`,lazy:()=>xe(()=>import("./markdownBrand-LsH9OAbQ.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:t.readme,brand:t.brandName}),children:[{path:":language",lazy:()=>xe(()=>import("./markdownBrand-LsH9OAbQ.js"),__vite__mapDeps([0,1,2,3])),loader:()=>({readme:t.readme,brand:t.brandName})}]});for(const t of aT)for(const e of t.links)On.push({path:e.from,lazy:()=>xe(()=>import("./redirectTo-_VcDkk4z.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:e.from,brand:t.brand,url:e.to}),children:[{path:":language",lazy:()=>xe(()=>import("./redirectTo-_VcDkk4z.js"),__vite__mapDeps([4,1,5])),loader:()=>({path:e.from,brand:t.brand,url:e.to})}]});On.push({path:"/links",lazy:()=>xe(()=>import("./links-BgPQ3f7b.js"),__vite__mapDeps([6,1,3])),children:[{path:":language",lazy:()=>xe(()=>import("./links-BgPQ3f7b.js"),__vite__mapDeps([6,1,3]))}]});On.push({path:"/mdui",lazy:()=>xe(()=>import("./mdui-CVidgDKD.js"),__vite__mapDeps([7,1,2,3])),children:[{path:":language",lazy:()=>xe(()=>import("./mdui-CVidgDKD.js"),__vite__mapDeps([7,1,2,3]))}]});On.push({path:"/releases",lazy:()=>xe(()=>import("./releases-28YzCjnP.js"),__vite__mapDeps([8,1,2,3])),children:[{path:":language",lazy:()=>xe(()=>import("./releases-28YzCjnP.js"),__vite__mapDeps([8,1,2,3]))}]});On.push({path:"*",lazy:()=>xe(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([9,1,5])),children:[{path:":language",lazy:()=>xe(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([9,1,5]))}]});const nT=cS(On),Dp=document.getElementById("root");if(!Dp)throw new Error("Root element not found");My.createRoot(Dp).render(ar.jsx(ve.StrictMode,{children:ar.jsx(ic,{theme:Cf,children:ar.jsx(lw,{as:"div",minHeight:"100vh",position:"relative",children:ar.jsx(pS,{router:nT})})})}));export{uf as A,ec as B,ac as C,X2 as D,Z2 as E,Q2 as F,mp as G,lp as H,nE as I,oT as J,ic as K,aT as L,aE as M,pw as N,cT as O,k as P,ve as R,Bn as T,lw as V,xe as _,rT as a,cs as b,iT as c,O2 as d,Oa as e,fT as f,Tr as g,bu as h,tE as i,ar as j,gn as k,Jh as l,$2 as m,H2 as n,P2 as o,wp as p,lT as q,T as r,Sl as s,wf as t,uT as u,Io as v,LE as w,Ep as x,sT as y,I1 as z}; diff --git a/assets/index-CJ_Q_-5o.css b/assets/index-DXft5ptw.css similarity index 97% rename from assets/index-CJ_Q_-5o.css rename to assets/index-DXft5ptw.css index 60838015..9a88bedf 100644 --- a/assets/index-CJ_Q_-5o.css +++ b/assets/index-DXft5ptw.css @@ -1 +1 @@ -body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}@media only screen and (min-width: 1009px){#root{background-image:url(/assets/banner-Dl8io6Qq.webp);background-position:0% 8rem;background-size:120rem auto;background-repeat:no-repeat}#root>div{padding-bottom:8rem}#main{background:#fff;margin-top:3rem;padding:3rem;box-shadow:0 1.25rem 3rem .66rem #143d5026;border-radius:2rem}}#footer{background-color:#287a9f}.active:after{content:"";position:absolute;inset-block-end:0;inset-inline-start:.5rem;inset-inline-end:.5rem;height:.125rem;background-color:#287a9f;display:block}.canvas .active:after,.canvas [class$=topNavBarBrand__iconContainer],.canvas #footer{background-color:#e72429}.canvas [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M958.568 277.97C1100.42 277.97 1216.48 171.94 1233.67 34.3881 1146.27 12.8955 1054.57 0 958.568 0 864.001 0 770.867 12.8955 683.464 34.3881 700.658 171.94 816.718 277.97 958.568 277.97ZM35.8207 682.031C173.373 699.225 279.403 815.285 279.403 957.136 279.403 1098.99 173.373 1215.05 35.8207 1232.24 12.8953 1144.84 1.43262 1051.7 1.43262 957.136 1.43262 862.569 12.8953 769.434 35.8207 682.031ZM528.713 957.142C528.713 1005.41 489.581 1044.55 441.31 1044.55 393.038 1044.55 353.907 1005.41 353.907 957.142 353.907 908.871 393.038 869.74 441.31 869.74 489.581 869.74 528.713 908.871 528.713 957.142ZM1642.03 957.136C1642.03 1098.99 1748.06 1215.05 1885.61 1232.24 1908.54 1144.84 1920 1051.7 1920 957.136 1920 862.569 1908.54 769.434 1885.61 682.031 1748.06 699.225 1642.03 815.285 1642.03 957.136ZM1567.51 957.142C1567.51 1005.41 1528.38 1044.55 1480.11 1044.55 1431.84 1044.55 1392.71 1005.41 1392.71 957.142 1392.71 908.871 1431.84 869.74 1480.11 869.74 1528.38 869.74 1567.51 908.871 1567.51 957.142ZM958.568 1640.6C816.718 1640.6 700.658 1746.63 683.464 1884.18 770.867 1907.11 864.001 1918.57 958.568 1918.57 1053.14 1918.57 1146.27 1907.11 1233.67 1884.18 1216.48 1746.63 1100.42 1640.6 958.568 1640.6ZM1045.98 1480.11C1045.98 1528.38 1006.85 1567.51 958.575 1567.51 910.304 1567.51 871.172 1528.38 871.172 1480.11 871.172 1431.84 910.304 1392.71 958.575 1392.71 1006.85 1392.71 1045.98 1431.84 1045.98 1480.11ZM1045.98 439.877C1045.98 488.148 1006.85 527.28 958.575 527.28 910.304 527.28 871.172 488.148 871.172 439.877 871.172 391.606 910.304 352.474 958.575 352.474 1006.85 352.474 1045.98 391.606 1045.98 439.877ZM1441.44 1439.99C1341.15 1540.29 1333.98 1697.91 1418.52 1806.8 1579 1712.23 1713.68 1577.55 1806.82 1418.5 1699.35 1332.53 1541.74 1339.7 1441.44 1439.99ZM1414.21 1325.37C1414.21 1373.64 1375.08 1412.77 1326.8 1412.77 1278.53 1412.77 1239.4 1373.64 1239.4 1325.37 1239.4 1277.1 1278.53 1237.97 1326.8 1237.97 1375.08 1237.97 1414.21 1277.1 1414.21 1325.37ZM478.577 477.145C578.875 376.846 586.039 219.234 501.502 110.339 341.024 204.906 206.338 339.592 113.203 498.637 220.666 584.607 378.278 576.01 478.577 477.145ZM679.155 590.32C679.155 638.591 640.024 677.723 591.752 677.723 543.481 677.723 504.349 638.591 504.349 590.32 504.349 542.048 543.481 502.917 591.752 502.917 640.024 502.917 679.155 542.048 679.155 590.32ZM1440 475.712C1540.3 576.01 1697.91 583.174 1806.8 498.637 1712.24 338.159 1577.55 203.473 1418.51 110.339 1332.54 217.801 1341.13 375.413 1440 475.712ZM1414.21 590.32C1414.21 638.591 1375.08 677.723 1326.8 677.723 1278.53 677.723 1239.4 638.591 1239.4 590.32 1239.4 542.048 1278.53 502.917 1326.8 502.917 1375.08 502.917 1414.21 542.048 1414.21 590.32ZM477.145 1438.58C376.846 1338.28 219.234 1331.12 110.339 1415.65 204.906 1576.13 339.593 1710.82 498.637 1805.39 584.607 1696.49 577.443 1538.88 477.145 1438.58ZM679.155 1325.37C679.155 1373.64 640.024 1412.77 591.752 1412.77 543.481 1412.77 504.349 1373.64 504.349 1325.37 504.349 1277.1 543.481 1237.97 591.752 1237.97 640.024 1237.97 679.155 1277.1 679.155 1325.37Z'/%3E%3C/svg%3E")}.mastery .active:after,.mastery [class$=topNavBarBrand__iconContainer],.mastery #footer{background-color:#24a159}.mastery [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M672.274 547.699V889.681L371.706 760.866C332.318 747.272 297.441 723.083 270.907 690.958 244.373 658.833 227.209 620.015 221.301 578.769 215.392 537.524 220.969 495.447 237.417 457.164 253.866 418.883 280.55 385.876 314.537 361.771 348.524 337.668 388.498 323.399 430.066 320.536 471.634 317.672 513.187 326.323 550.158 345.538 587.13 364.753 618.089 393.788 639.632 429.453 661.176 465.119 672.47 506.033 672.274 547.699ZM959.895 1550.52C1013.45 1550.76 1065.35 1531.95 1106.32 1497.47 1147.3 1462.98 1174.68 1415.06 1183.6 1362.25 1192.51 1309.44 1182.37 1255.17 1154.98 1209.16 1127.6 1163.13 1084.75 1128.34 1034.08 1110.97L733.516 982.161V1324.15C733.584 1384.17 757.456 1441.7 799.895 1484.15 842.335 1526.59 899.876 1550.46 959.895 1550.52ZM226.887 1097.53C182.052 1097.47 138.21 1110.72 100.908 1135.6 63.6045 1160.47 34.5168 1195.85 17.3245 1237.26.13224 1278.67-4.39211 1324.24 4.32386 1368.21 13.0399 1412.19 34.6045 1452.61 66.2896 1484.32 97.9747 1516.04 138.356 1537.65 182.325 1546.42 226.295 1555.19 271.876 1550.71 313.303 1533.57 354.73 1516.42 390.14 1487.37 415.054 1450.1 439.968 1412.82 453.266 1368.99 453.266 1324.16 453.199 1264.12 429.335 1206.55 386.902 1164.08 344.47 1121.59 286.929 1097.66 226.887 1097.53ZM1693.14 1550.52C1746.69 1550.76 1798.6 1531.95 1839.57 1497.47 1880.54 1462.98 1907.93 1415.06 1916.85 1362.25 1925.75 1309.44 1915.62 1255.17 1888.23 1209.16 1860.85 1163.13 1818 1128.34 1767.33 1110.97L1466.51 982.161V1324.15C1466.64 1384.19 1490.57 1441.72 1533.05 1484.16 1575.53 1526.59 1633.1 1550.46 1693.14 1550.52ZM1405.53 547.689V889.671L1104.7 760.856C1065.35 747.221 1030.51 723.005 1004.02 690.865 977.527 658.724 960.404 619.905 954.531 578.67 948.656 537.434 954.261 495.378 970.726 457.12 987.192 418.861 1013.88 385.879 1047.87 361.798 1081.85 337.716 1121.81 323.465 1163.37 320.611 1204.92 317.757 1246.46 326.408 1283.41 345.617 1320.37 364.825 1351.33 393.847 1372.86 429.495 1394.41 465.143 1405.71 506.038 1405.53 547.689Z'/%3E%3C/svg%3E")}.elevate .active:after,.elevate [class$=topNavBarBrand__iconContainer],.elevate #footer{background-color:#0097d3}.elevate [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1070.45 53.9152C1104.97 88.4365 1124.36 135.258 1124.36 184.078L1123.51 1188.09C1123.74 1229.1 1110.25 1269.01 1085.18 1301.47 1060.11 1333.93 1024.9 1357.08 985.16 1367.22 945.419 1377.35 903.428 1373.91 865.87 1357.43 828.312 1340.95 797.346 1312.38 777.899 1276.28 763.314 1249.19 755.85 1218.85 756.21 1188.09V184.078C756.21 135.258 775.603 88.4365 810.124 53.9152 844.646 19.3939 891.467 0 940.288 0 989.108 0 1035.93 19.3939 1070.45 53.9152ZM161.091 1320.33C194.624 1353.7 240.009 1372.44 287.319 1372.44 310.767 1372.44 333.985 1367.81 355.644 1358.83 377.304 1349.85 396.98 1336.69 413.547 1320.1 430.113 1303.5 443.246 1283.8 452.193 1262.13 461.141 1240.45 465.726 1217.23 465.689 1193.78L463.406 359.01 106.666 741.15 108.378 1194.35C108.605 1241.67 127.558 1286.96 161.091 1320.33ZM1592.41 1372.44C1639.74 1372.51 1685.17 1353.81 1718.72 1320.42 1752.27 1287.02 1771.2 1241.69 1771.35 1194.35L1773.06 741.15 1416.33 359.01 1414.32 1193.78C1414.29 1217.21 1418.87 1240.41 1427.79 1262.06 1436.72 1283.71 1449.83 1303.41 1466.37 1319.99 1482.9 1336.58 1502.55 1349.75 1524.17 1358.75 1545.8 1367.75 1568.99 1372.4 1592.41 1372.44ZM1123.46 1752.39C1126.77 1716.09 1119.25 1679.61 1101.83 1647.56 1090.29 1626.27 1074.66 1607.47 1055.85 1592.22 1037.03 1576.97 1015.39 1565.59 992.163 1558.73 968.939 1551.86 944.588 1549.64 920.506 1552.2 896.423 1554.76 873.083 1562.05 851.822 1573.65 819.782 1591.06 793.627 1617.59 776.661 1649.87 759.697 1682.14 752.685 1718.73 756.513 1754.99 760.341 1791.25 774.837 1825.57 798.168 1853.59 821.499 1881.62 852.616 1902.09 887.585 1912.44 922.554 1922.77 959.804 1922.51 994.623 1911.68 1029.44 1900.84 1060.27 1879.94 1083.2 1851.58 1106.13 1823.23 1120.14 1788.71 1123.46 1752.39Z'/%3E%3C/svg%3E")}.impact .active:after,.impact [class$=topNavBarBrand__iconContainer],.impact #footer{background-color:#f76400}.impact [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M910.001 203.918C910.001 163.587 921.96 124.161 944.366 90.6273 966.773 57.0931 998.621 30.9565 1035.88 15.5225 1073.14.0883516 1114.15-3.9499 1153.7 3.91831 1193.26 11.7866 1229.59 31.2078 1258.11 59.7263 1286.63 88.2447 1306.05 124.579 1313.92 164.135 1321.78 203.692 1317.75 244.693 1302.32 281.954 1286.88 319.215 1260.74 351.062 1227.21 373.47 1193.68 395.876 1154.25 407.836 1113.92 407.836 1087.13 407.869 1060.6 402.617 1035.84 392.38 1011.09 382.144 988.596 367.124 969.654 348.182 950.712 329.241 935.692 306.748 925.457 281.993 915.22 257.237 909.967 230.706 910.001 203.918ZM167.424 913.308 458.311 622.422H1045.04L460.789 1206.68C421.886 1245.58 369.124 1267.44 314.107 1267.44 259.09 1267.44 206.327 1245.58 167.424 1206.68 128.522 1167.77 106.667 1115.01 106.667 1059.99 106.667 1004.97 128.522 952.211 167.424 913.308ZM1738.81 1027.77 1454.11 1313.21H867.136L1444.7 734.406C1483.6 695.405 1536.4 673.455 1591.49 673.386 1646.57 673.316 1699.43 695.132 1738.43 734.034 1777.43 772.936 1799.38 825.739 1799.45 880.826 1799.52 935.911 1777.71 988.769 1738.81 1027.77ZM587.075 1602.79C564.668 1636.33 552.709 1675.75 552.709 1716.08 552.709 1770.16 574.192 1822.02 612.435 1860.27 650.677 1898.51 702.543 1920 756.627 1920 796.957 1920 836.382 1908.04 869.917 1885.63 903.451 1863.23 929.588 1831.38 945.021 1794.12 960.456 1756.85 964.494 1715.85 956.625 1676.29 948.758 1636.74 929.336 1600.4 900.817 1571.89 872.299 1543.37 835.965 1523.94 796.409 1516.08 756.853 1508.21 715.851 1512.25 678.59 1527.69 641.329 1543.12 609.481 1569.25 587.075 1602.79Z'/%3E%3C/svg%3E%0A")}.learnplatform .active:after,.learnplatform [class$=topNavBarBrand__iconContainer],.learnplatform #footer{background-color:#07c}.learnplatform [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 299 300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='149.478' cy='150.235' r='149.353' fill='none'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z' fill='white'/%3E%3Cpath d='M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z' fill='white'/%3E%3Cpath d='M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373' fill='white'/%3E%3Cpath d='M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373' fill='white'/%3E%3C/svg%3E")}.parchment .active:after,.parchment [class$=topNavBarBrand__iconContainer],.parchment #footer{background-color:#0093b2}.parchment [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -3 29 31.68'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23ffffff; stroke-width: 0px; %7D %3C/style%3E%3C/defs%3E%3Cg data-name='Logo Artwork'%3E%3Cg%3E%3Cg%3E%3Cg%3E%3Cpolygon class='cls-1' points='26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77 26.87 21.98'/%3E%3Crect class='cls-1' x='26.87' y='4.89' width='2.44' height='2.44'/%3E%3Crect class='cls-1' x='21.98' width='2.44' height='2.44'/%3E%3Crect class='cls-1' x='26.87' width='2.44' height='2.44'/%3E%3Cg%3E%3Cpath class='cls-1' d='M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z'/%3E%3Cpath class='cls-1' d='M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E")}body:not(.instructure) [class$=topNavBarBrand__iconContainer] svg{visibility:hidden}[class$=topNavBarBrand__iconContainer]{background-size:2.5rem!important;background-repeat:no-repeat!important;background-position:center!important}li [data-cid=Checkbox],li [class$=checkbox]{opacity:inherit}pre{font-family:Menlo,Consolas,Monaco,Andale Mono,monospace!important}#toggleFilters{display:none}[data-cid=ToggleDetails] [class$=gridCol]{margin-bottom:.75em}[data-cid=RadioInputGroup] [class$=formFieldGroup] [class$=gridRow]{flex-wrap:wrap}[data-cid=RadioInputGroup] [class$=formFieldGroup] [class$=gridCol]{margin-bottom:.75em}.markdown [class$=toggleDetails__details]{padding-left:0!important}.markdown [class$=toggleDetails__content]{border:1px solid rgb(199,205,209);border-radius:1rem 0}.markdown h2{margin-top:3rem!important}#language .lang,#language .lang:hover,#language .lang:focus,#language .lang:active{color:inherit;display:block;text-decoration:inherit}#language [id$=__label]:not(:has(a)),#language [id$=__label] a{padding:.5rem 1rem}#language [role=menuitem]{padding:0}#language,[class$=view-drilldown__container]{width:10rem;min-width:10rem!important}#main.mdui{box-shadow:none;border:0 none} +body{margin:0;font-family:-apple-system,blinkmacsystemfont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,menlo,monaco,consolas,Courier New,monospace}@media only screen and (min-width: 1009px){#root{background-image:url(/assets/banner-Dl8io6Qq.webp);background-position:0% 8rem;background-size:120rem auto;background-repeat:no-repeat}#root>div{padding-bottom:8rem}#main{background:#fff;margin-top:3rem;padding:3rem;box-shadow:0 1.25rem 3rem .66rem #143d5026;border-radius:2rem}}#footer{background-color:#287a9f}.active:after{content:"";position:absolute;inset-block-end:0;inset-inline-start:.5rem;inset-inline-end:.5rem;height:.125rem;background-color:#287a9f;display:block}.canvas .active:after,.canvas [class$=topNavBarBrand__iconContainer],.canvas #footer{background-color:#e72429}.canvas [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M958.568 277.97C1100.42 277.97 1216.48 171.94 1233.67 34.3881 1146.27 12.8955 1054.57 0 958.568 0 864.001 0 770.867 12.8955 683.464 34.3881 700.658 171.94 816.718 277.97 958.568 277.97ZM35.8207 682.031C173.373 699.225 279.403 815.285 279.403 957.136 279.403 1098.99 173.373 1215.05 35.8207 1232.24 12.8953 1144.84 1.43262 1051.7 1.43262 957.136 1.43262 862.569 12.8953 769.434 35.8207 682.031ZM528.713 957.142C528.713 1005.41 489.581 1044.55 441.31 1044.55 393.038 1044.55 353.907 1005.41 353.907 957.142 353.907 908.871 393.038 869.74 441.31 869.74 489.581 869.74 528.713 908.871 528.713 957.142ZM1642.03 957.136C1642.03 1098.99 1748.06 1215.05 1885.61 1232.24 1908.54 1144.84 1920 1051.7 1920 957.136 1920 862.569 1908.54 769.434 1885.61 682.031 1748.06 699.225 1642.03 815.285 1642.03 957.136ZM1567.51 957.142C1567.51 1005.41 1528.38 1044.55 1480.11 1044.55 1431.84 1044.55 1392.71 1005.41 1392.71 957.142 1392.71 908.871 1431.84 869.74 1480.11 869.74 1528.38 869.74 1567.51 908.871 1567.51 957.142ZM958.568 1640.6C816.718 1640.6 700.658 1746.63 683.464 1884.18 770.867 1907.11 864.001 1918.57 958.568 1918.57 1053.14 1918.57 1146.27 1907.11 1233.67 1884.18 1216.48 1746.63 1100.42 1640.6 958.568 1640.6ZM1045.98 1480.11C1045.98 1528.38 1006.85 1567.51 958.575 1567.51 910.304 1567.51 871.172 1528.38 871.172 1480.11 871.172 1431.84 910.304 1392.71 958.575 1392.71 1006.85 1392.71 1045.98 1431.84 1045.98 1480.11ZM1045.98 439.877C1045.98 488.148 1006.85 527.28 958.575 527.28 910.304 527.28 871.172 488.148 871.172 439.877 871.172 391.606 910.304 352.474 958.575 352.474 1006.85 352.474 1045.98 391.606 1045.98 439.877ZM1441.44 1439.99C1341.15 1540.29 1333.98 1697.91 1418.52 1806.8 1579 1712.23 1713.68 1577.55 1806.82 1418.5 1699.35 1332.53 1541.74 1339.7 1441.44 1439.99ZM1414.21 1325.37C1414.21 1373.64 1375.08 1412.77 1326.8 1412.77 1278.53 1412.77 1239.4 1373.64 1239.4 1325.37 1239.4 1277.1 1278.53 1237.97 1326.8 1237.97 1375.08 1237.97 1414.21 1277.1 1414.21 1325.37ZM478.577 477.145C578.875 376.846 586.039 219.234 501.502 110.339 341.024 204.906 206.338 339.592 113.203 498.637 220.666 584.607 378.278 576.01 478.577 477.145ZM679.155 590.32C679.155 638.591 640.024 677.723 591.752 677.723 543.481 677.723 504.349 638.591 504.349 590.32 504.349 542.048 543.481 502.917 591.752 502.917 640.024 502.917 679.155 542.048 679.155 590.32ZM1440 475.712C1540.3 576.01 1697.91 583.174 1806.8 498.637 1712.24 338.159 1577.55 203.473 1418.51 110.339 1332.54 217.801 1341.13 375.413 1440 475.712ZM1414.21 590.32C1414.21 638.591 1375.08 677.723 1326.8 677.723 1278.53 677.723 1239.4 638.591 1239.4 590.32 1239.4 542.048 1278.53 502.917 1326.8 502.917 1375.08 502.917 1414.21 542.048 1414.21 590.32ZM477.145 1438.58C376.846 1338.28 219.234 1331.12 110.339 1415.65 204.906 1576.13 339.593 1710.82 498.637 1805.39 584.607 1696.49 577.443 1538.88 477.145 1438.58ZM679.155 1325.37C679.155 1373.64 640.024 1412.77 591.752 1412.77 543.481 1412.77 504.349 1373.64 504.349 1325.37 504.349 1277.1 543.481 1237.97 591.752 1237.97 640.024 1237.97 679.155 1277.1 679.155 1325.37Z'/%3E%3C/svg%3E")}.mastery .active:after,.mastery [class$=topNavBarBrand__iconContainer],.mastery #footer{background-color:#24a159}.mastery [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M672.274 547.699V889.681L371.706 760.866C332.318 747.272 297.441 723.083 270.907 690.958 244.373 658.833 227.209 620.015 221.301 578.769 215.392 537.524 220.969 495.447 237.417 457.164 253.866 418.883 280.55 385.876 314.537 361.771 348.524 337.668 388.498 323.399 430.066 320.536 471.634 317.672 513.187 326.323 550.158 345.538 587.13 364.753 618.089 393.788 639.632 429.453 661.176 465.119 672.47 506.033 672.274 547.699ZM959.895 1550.52C1013.45 1550.76 1065.35 1531.95 1106.32 1497.47 1147.3 1462.98 1174.68 1415.06 1183.6 1362.25 1192.51 1309.44 1182.37 1255.17 1154.98 1209.16 1127.6 1163.13 1084.75 1128.34 1034.08 1110.97L733.516 982.161V1324.15C733.584 1384.17 757.456 1441.7 799.895 1484.15 842.335 1526.59 899.876 1550.46 959.895 1550.52ZM226.887 1097.53C182.052 1097.47 138.21 1110.72 100.908 1135.6 63.6045 1160.47 34.5168 1195.85 17.3245 1237.26.13224 1278.67-4.39211 1324.24 4.32386 1368.21 13.0399 1412.19 34.6045 1452.61 66.2896 1484.32 97.9747 1516.04 138.356 1537.65 182.325 1546.42 226.295 1555.19 271.876 1550.71 313.303 1533.57 354.73 1516.42 390.14 1487.37 415.054 1450.1 439.968 1412.82 453.266 1368.99 453.266 1324.16 453.199 1264.12 429.335 1206.55 386.902 1164.08 344.47 1121.59 286.929 1097.66 226.887 1097.53ZM1693.14 1550.52C1746.69 1550.76 1798.6 1531.95 1839.57 1497.47 1880.54 1462.98 1907.93 1415.06 1916.85 1362.25 1925.75 1309.44 1915.62 1255.17 1888.23 1209.16 1860.85 1163.13 1818 1128.34 1767.33 1110.97L1466.51 982.161V1324.15C1466.64 1384.19 1490.57 1441.72 1533.05 1484.16 1575.53 1526.59 1633.1 1550.46 1693.14 1550.52ZM1405.53 547.689V889.671L1104.7 760.856C1065.35 747.221 1030.51 723.005 1004.02 690.865 977.527 658.724 960.404 619.905 954.531 578.67 948.656 537.434 954.261 495.378 970.726 457.12 987.192 418.861 1013.88 385.879 1047.87 361.798 1081.85 337.716 1121.81 323.465 1163.37 320.611 1204.92 317.757 1246.46 326.408 1283.41 345.617 1320.37 364.825 1351.33 393.847 1372.86 429.495 1394.41 465.143 1405.71 506.038 1405.53 547.689Z'/%3E%3C/svg%3E")}.elevate .active:after,.elevate [class$=topNavBarBrand__iconContainer],.elevate #footer{background-color:#0097d3}.elevate [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1070.45 53.9152C1104.97 88.4365 1124.36 135.258 1124.36 184.078L1123.51 1188.09C1123.74 1229.1 1110.25 1269.01 1085.18 1301.47 1060.11 1333.93 1024.9 1357.08 985.16 1367.22 945.419 1377.35 903.428 1373.91 865.87 1357.43 828.312 1340.95 797.346 1312.38 777.899 1276.28 763.314 1249.19 755.85 1218.85 756.21 1188.09V184.078C756.21 135.258 775.603 88.4365 810.124 53.9152 844.646 19.3939 891.467 0 940.288 0 989.108 0 1035.93 19.3939 1070.45 53.9152ZM161.091 1320.33C194.624 1353.7 240.009 1372.44 287.319 1372.44 310.767 1372.44 333.985 1367.81 355.644 1358.83 377.304 1349.85 396.98 1336.69 413.547 1320.1 430.113 1303.5 443.246 1283.8 452.193 1262.13 461.141 1240.45 465.726 1217.23 465.689 1193.78L463.406 359.01 106.666 741.15 108.378 1194.35C108.605 1241.67 127.558 1286.96 161.091 1320.33ZM1592.41 1372.44C1639.74 1372.51 1685.17 1353.81 1718.72 1320.42 1752.27 1287.02 1771.2 1241.69 1771.35 1194.35L1773.06 741.15 1416.33 359.01 1414.32 1193.78C1414.29 1217.21 1418.87 1240.41 1427.79 1262.06 1436.72 1283.71 1449.83 1303.41 1466.37 1319.99 1482.9 1336.58 1502.55 1349.75 1524.17 1358.75 1545.8 1367.75 1568.99 1372.4 1592.41 1372.44ZM1123.46 1752.39C1126.77 1716.09 1119.25 1679.61 1101.83 1647.56 1090.29 1626.27 1074.66 1607.47 1055.85 1592.22 1037.03 1576.97 1015.39 1565.59 992.163 1558.73 968.939 1551.86 944.588 1549.64 920.506 1552.2 896.423 1554.76 873.083 1562.05 851.822 1573.65 819.782 1591.06 793.627 1617.59 776.661 1649.87 759.697 1682.14 752.685 1718.73 756.513 1754.99 760.341 1791.25 774.837 1825.57 798.168 1853.59 821.499 1881.62 852.616 1902.09 887.585 1912.44 922.554 1922.77 959.804 1922.51 994.623 1911.68 1029.44 1900.84 1060.27 1879.94 1083.2 1851.58 1106.13 1823.23 1120.14 1788.71 1123.46 1752.39Z'/%3E%3C/svg%3E")}.impact .active:after,.impact [class$=topNavBarBrand__iconContainer],.impact #footer{background-color:#f76400}.impact [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1920' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M910.001 203.918C910.001 163.587 921.96 124.161 944.366 90.6273 966.773 57.0931 998.621 30.9565 1035.88 15.5225 1073.14.0883516 1114.15-3.9499 1153.7 3.91831 1193.26 11.7866 1229.59 31.2078 1258.11 59.7263 1286.63 88.2447 1306.05 124.579 1313.92 164.135 1321.78 203.692 1317.75 244.693 1302.32 281.954 1286.88 319.215 1260.74 351.062 1227.21 373.47 1193.68 395.876 1154.25 407.836 1113.92 407.836 1087.13 407.869 1060.6 402.617 1035.84 392.38 1011.09 382.144 988.596 367.124 969.654 348.182 950.712 329.241 935.692 306.748 925.457 281.993 915.22 257.237 909.967 230.706 910.001 203.918ZM167.424 913.308 458.311 622.422H1045.04L460.789 1206.68C421.886 1245.58 369.124 1267.44 314.107 1267.44 259.09 1267.44 206.327 1245.58 167.424 1206.68 128.522 1167.77 106.667 1115.01 106.667 1059.99 106.667 1004.97 128.522 952.211 167.424 913.308ZM1738.81 1027.77 1454.11 1313.21H867.136L1444.7 734.406C1483.6 695.405 1536.4 673.455 1591.49 673.386 1646.57 673.316 1699.43 695.132 1738.43 734.034 1777.43 772.936 1799.38 825.739 1799.45 880.826 1799.52 935.911 1777.71 988.769 1738.81 1027.77ZM587.075 1602.79C564.668 1636.33 552.709 1675.75 552.709 1716.08 552.709 1770.16 574.192 1822.02 612.435 1860.27 650.677 1898.51 702.543 1920 756.627 1920 796.957 1920 836.382 1908.04 869.917 1885.63 903.451 1863.23 929.588 1831.38 945.021 1794.12 960.456 1756.85 964.494 1715.85 956.625 1676.29 948.758 1636.74 929.336 1600.4 900.817 1571.89 872.299 1543.37 835.965 1523.94 796.409 1516.08 756.853 1508.21 715.851 1512.25 678.59 1527.69 641.329 1543.12 609.481 1569.25 587.075 1602.79Z'/%3E%3C/svg%3E%0A")}.learnplatform .active:after,.learnplatform [class$=topNavBarBrand__iconContainer],.learnplatform #footer{background-color:#07c}.learnplatform [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 299 300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='149.478' cy='150.235' r='149.353' fill='none'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M191.431 212.736H205.086C204.961 212.34 204.846 211.974 204.738 211.63C204.404 210.567 204.135 209.713 203.834 208.81C199.852 198.417 195.964 187.986 192.171 177.517C181.493 149.012 170.872 120.497 160.309 91.9733C159.911 90.214 158.223 89.0597 156.44 89.3276C151.091 89.4698 145.743 89.5267 140.423 89.3276C138.432 89 136.546 90.3293 136.184 92.3147C121.657 131.422 107.129 170.519 92.6017 209.607C92.414 210.136 92.2467 210.686 92.0507 211.329C91.9201 211.759 91.7767 212.23 91.606 212.765C93.7973 212.765 95.9464 212.748 98.0664 212.732C102.222 212.701 106.265 212.67 110.297 212.765C112.402 212.935 113.17 211.94 113.824 210.091C115.474 205.226 117.167 200.375 118.859 195.525C120.552 190.675 122.245 185.824 123.895 180.959C124.199 179.276 125.788 178.141 127.479 178.399H168.729C170.418 178.138 172.011 179.255 172.342 180.931C173.799 185.14 175.307 189.334 176.814 193.524C178.251 197.519 179.687 201.511 181.076 205.51C182.365 209.107 183.012 210.914 184.295 211.821C185.589 212.736 187.531 212.736 191.431 212.736ZM148.417 109.213C154.145 126.092 159.977 143.351 165.913 160.989H131.121L148.417 109.213Z' fill='white'/%3E%3Cpath d='M225 110.209V114.191H207.931V133.707H203.522V114.191H186.453V110.209H203.522V90.8069H207.732V110.209H225Z' fill='white'/%3E%3Cpath d='M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373' fill='white'/%3E%3Cpath d='M219.488 246.567C178.123 277.109 121.739 277.405 80.0539 247.301L86.1316 238.9C47.7742 211.418 31.5805 162.32 46.069 117.435L55.9454 119.307C69.5589 79.1029 107.372 52.0989 149.847 52.2484V13C90.0696 13.0663 37.1326 51.5854 18.7192 108.414C0.305744 165.242 20.6036 227.455 68.998 262.519C117.392 297.583 182.877 297.523 231.207 262.37C279.537 227.218 299.72 164.967 281.203 108.173L272.111 111.134C289.714 164.146 271.022 222.449 225.87 255.373' fill='white'/%3E%3C/svg%3E")}.parchment .active:after,.parchment [class$=topNavBarBrand__iconContainer],.parchment #footer{background-color:#0093b2}.parchment [class$=topNavBarBrand__iconContainer]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -3 29 31.68'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23ffffff; stroke-width: 0px; %7D %3C/style%3E%3C/defs%3E%3Cg data-name='Logo Artwork'%3E%3Cg%3E%3Cg%3E%3Cg%3E%3Cpolygon class='cls-1' points='26.87 21.98 2.44 21.98 2.44 2.44 19.54 2.44 19.54 0 0 0 0 24.43 29.31 24.43 29.31 9.77 26.87 9.77 26.87 21.98'/%3E%3Crect class='cls-1' x='26.87' y='4.89' width='2.44' height='2.44'/%3E%3Crect class='cls-1' x='21.98' width='2.44' height='2.44'/%3E%3Crect class='cls-1' x='26.87' width='2.44' height='2.44'/%3E%3Cg%3E%3Cpath class='cls-1' d='M9.38,13.2c-.5,0-.62.37-.62.71v1.53c0,.4.23.69.66.69.36,0,.55-.21.55-.69v-1.53c0-.42-.13-.71-.58-.71Z'/%3E%3Cpath class='cls-1' d='M9.15,11.01c-2.36,0-4.27,1.91-4.27,4.27s1.91,4.27,4.27,4.27,4.27-1.91,4.27-4.27-1.91-4.27-4.27-4.27ZM10.86,15.4c0,.81-.54,1.44-1.27,1.44-.31,0-.84-.14-.84-.38v1.87c0,.14-.18.23-.3.23h-.3c-.13,0-.31-.08-.31-.23v-5.53c0-.14.18-.28.31-.28h.31c.13,0,.29.13.29.28v.05c0-.18.44-.36.8-.36.8,0,1.31.5,1.31,1.48v1.43Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E")}body:not(.instructure) [class$=topNavBarBrand__iconContainer] svg{visibility:hidden}[class$=topNavBarBrand__iconContainer]{background-size:2.5rem!important;background-repeat:no-repeat!important;background-position:center!important}li [data-cid=Checkbox],li [class$=checkbox]{opacity:inherit}pre{font-family:menlo,consolas,monaco,Andale Mono,monospace!important}#toggleFilters{display:none}[data-cid=ToggleDetails] [class$=gridCol]{margin-bottom:.75em}[data-cid=RadioInputGroup] [class$=formFieldGroup] [class$=gridRow]{flex-wrap:wrap}[data-cid=RadioInputGroup] [class$=formFieldGroup] [class$=gridCol]{margin-bottom:.75em}.markdown [class$=toggleDetails__details]{padding-left:0!important}.markdown [class$=toggleDetails__content]{border:1px solid rgb(199,205,209);border-radius:1rem 0}.markdown h2{margin-top:3rem!important}#language .lang,#language .lang:hover,#language .lang:focus,#language .lang:active{color:inherit;display:block;text-decoration:inherit}#language [id$=__label]:not(:has(a)),#language [id$=__label] a{padding:.5rem 1rem}#language [role=listitem]{padding:0}#language,[class$=view-drilldown__container]{width:10rem;min-width:10rem!important}#main.mdui{box-shadow:none;border:0 none} diff --git a/assets/links-BgPQ3f7b.js b/assets/links-BgPQ3f7b.js new file mode 100644 index 00000000..d4fea711 --- /dev/null +++ b/assets/links-BgPQ3f7b.js @@ -0,0 +1,2 @@ +const __vite__fileDeps=["assets/error-pmzUJ_SX.js","assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css","assets/RenderTopNavBar-BKjAQtrP.js","assets/index-BIsQGgQp.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{r as h,R as U,P as n,w as fe,o as ae,d as w,p as ve,a as be,e as z,f as O,L as Z,j as r,V as I,_ as me,g as Se}from"./index-DT1C1ZDw.js";import{S as V,w as ie,t as le,i as ye,d as xe,m as ke,s as Ce,a as Le,g as Re,R as Ee,H as G,T as A,e as we,L as Be,f as ze,b as Ie,h as q}from"./RenderTopNavBar-BKjAQtrP.js";import{F as _e,a as N,B as Fe,T as Pe,b as je,I as $e,c as b,d as K,e as De}from"./index-3znfDf88.js";var Q;class R extends h.Component{constructor(...a){super(...a),this.ref=null,this.handleRef=l=>{const i=this.props.elementRef;this.ref=l,typeof i=="function"&&i(l)}}render(){return U.createElement(V,Object.assign({},this.props,{name:"IconCopy",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Q||(Q=U.createElement("path",{d:"M0 1919.887h1467.88V452.008H0v1467.88ZM1354.965 564.922v1242.051H112.914V564.922h1242.051ZM1920 0v1467.992h-338.741v-113.027h225.827V112.914H565.035V338.74H452.008V0H1920ZM338.741 1016.93h790.397V904.016H338.74v112.914Zm0 451.062h790.397v-113.027H338.74v113.027Zm0-225.588h564.57v-112.913H338.74v112.913Z",fillRule:"evenodd"})))}}R.glyphName="copy";R.variant="Line";R.displayName="IconCopyLine";R.propTypes={...V.propTypes};R.allowedProps=[...V.allowedProps];const He=(e,a)=>{const l=a.disabled,i=a.variant,u=a.context,p=a.size,o=a.inline,s=F=>`[class$=-radioInput__input]:${F} + [class$=-radioInput__control] &`,g={success:{backgroundColor:e.toggleBackgroundSuccess},danger:{backgroundColor:e.toggleBackgroundDanger},warning:{backgroundColor:e.toggleBackgroundWarning},off:{backgroundColor:e.toggleBackgroundOff}},f={simple:{base:{boxSizing:"border-box",display:"block",position:"relative",marginInlineEnd:e.simpleFacadeMarginEnd,marginInlineStart:"0",flexShrink:0,minWidth:"1rem",transition:"all 0.2s ease-out",borderRadius:"100%",border:`${e.borderWidth} solid ${e.borderColor}`,background:e.background,"&::before":{content:'""',position:"absolute",top:"-0.375rem",left:"-0.375rem",width:"calc(100% + 0.75rem)",height:"calc(100% + 0.75rem)",boxSizing:"border-box",borderRadius:"100%",border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none"},[s("hover")]:{borderColor:e.hoverBorderColor},[s("focus")]:{background:e.background,"&::before":{transform:"scale(1)",opacity:1}}},small:{width:e.simpleFacadeSmallSize,height:e.simpleFacadeSmallSize,[s("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetSmall} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},medium:{width:e.simpleFacadeMediumSize,height:e.simpleFacadeMediumSize,[s("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetMedium} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}},large:{width:e.simpleFacadeLargeSize,height:e.simpleFacadeLargeSize,[s("checked")]:{background:e.background,boxShadow:`inset 0 0 0 ${e.simpleCheckedInsetLarge} ${e.hoverBorderColor}`,borderColor:e.hoverBorderColor}}},toggle:{base:{boxSizing:"border-box",visibility:"hidden",display:"block",position:"absolute",zIndex:1,top:"0",left:"0",width:"100%",height:"100%",boxShadow:e.toggleShadow,borderRadius:e.toggleBorderRadius,...g[u],"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:`calc(${e.toggleBorderRadius} + 0.0625rem)`,border:`${e.focusBorderWidth} ${e.focusBorderStyle} ${e.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0},[s("checked")]:{visibility:"visible"},[s("focus")]:{"&::before":{opacity:1,transform:"scale(1)"}}},small:{},medium:{},large:{}}},S={simple:{base:{display:"flex",alignItems:"flex-start"},small:{},medium:{},large:{}},toggle:{base:{display:"block",userSelect:"none",boxSizing:"border-box",position:"relative"},small:{padding:"0 0.5rem",height:e.toggleSmallHeight},medium:{padding:"0 0.875rem",height:e.toggleMediumHeight},large:{padding:"0 1rem",height:e.toggleLargeHeight}}},m={simple:{base:{},small:{fontSize:e.simpleFontSizeSmall},medium:{fontSize:e.simpleFontSizeMedium},large:{fontSize:e.simpleFontSizeLarge}},toggle:{base:{position:"relative",zIndex:1,textTransform:"uppercase",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:1,display:"flex",alignItems:"center",minWidth:"0.0625rem",[s("checked")]:{color:e.toggleHandleText},[s("focus")]:{textDecoration:"underline"}},small:{fontSize:e.toggleSmallFontSize,height:e.toggleSmallHeight,svg:{fontSize:`calc(${e.toggleSmallFontSize} + 0.375rem)`}},medium:{fontSize:e.toggleMediumFontSize,height:e.toggleMediumHeight,svg:{fontSize:`calc(${e.toggleMediumFontSize} + 0.375rem)`}},large:{fontSize:e.toggleLargeFontSize,height:e.toggleLargeHeight,svg:{fontSize:`calc(${e.toggleLargeFontSize} + 0.375rem)`}}}},E={padding:"0",margin:"0",fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:"0",left:"0",opacity:1e-4};return{radioInput:{label:"radioInput",position:"relative",width:"100%",...l&&{opacity:.5},...o&&{display:"inline-block",verticalAlign:"middle",width:"auto"},"&:hover":{cursor:"default",...l&&{cursor:"not-allowed"}}},input:{label:"radioInput__input",...E,'&:is(input)[type="radio"]':E,'&:-webkit-any(input)[type="radio"]':E},control:{label:"radioInput__control",all:"initial",display:"block",direction:"inherit",textAlign:"start",...S[i].base,...S[i][p]},facade:{label:"radioInput__facade",...f[i].base,...f[i][p]},label:{label:"radioInput__label",flex:"1 1 auto",color:e.labelColor,fontFamily:e.labelFontFamily,fontWeight:e.labelFontWeight,lineHeight:e.labelLineHeight,...m[i].base,...m[i][p],cursor:"default"}}},Oe=e=>{const a=e.spacing,l=e.borders,i=e.colors,u=e.forms,p=e.shadows,o=e.typography,s=e.key,g={canvas:{focusBorderColor:e["ic-brand-primary"],hoverBorderColor:e["ic-brand-font-color-dark"],labelColor:e["ic-brand-font-color-dark"]},"canvas-high-contrast":{toggleBackgroundOff:i==null?void 0:i.backgroundDarkest}};return{...{labelColor:i==null?void 0:i.textDarkest,labelFontFamily:o==null?void 0:o.fontFamily,labelFontWeight:o==null?void 0:o.fontWeightNormal,labelLineHeight:o==null?void 0:o.lineHeightCondensed,background:i==null?void 0:i.backgroundLightest,borderWidth:l==null?void 0:l.widthSmall,borderColor:i==null?void 0:i.borderMedium,hoverBorderColor:i==null?void 0:i.borderDarkest,controlSize:"0.1875rem",focusBorderColor:i==null?void 0:i.borderBrand,focusBorderWidth:l==null?void 0:l.widthMedium,focusBorderStyle:l==null?void 0:l.style,simpleFacadeSmallSize:"1rem",simpleFacadeMediumSize:"1.25rem",simpleFacadeLargeSize:"1.75rem",simpleCheckedInsetSmall:"0.1875rem",simpleCheckedInsetMedium:"0.25rem",simpleCheckedInsetLarge:"0.375rem",simpleFontSizeSmall:o==null?void 0:o.fontSizeSmall,simpleFontSizeMedium:o==null?void 0:o.fontSizeMedium,simpleFontSizeLarge:o==null?void 0:o.fontSizeLarge,simpleFacadeMarginEnd:a==null?void 0:a.xSmall,toggleBorderRadius:l==null?void 0:l.radiusSmall,toggleBorderWidth:l==null?void 0:l.widthLarge,toggleBackgroundSuccess:i==null?void 0:i.backgroundSuccess,toggleBackgroundOff:i==null?void 0:i.backgroundDark,toggleBackgroundDanger:i==null?void 0:i.backgroundDanger,toggleBackgroundWarning:i==null?void 0:i.backgroundWarning,toggleHandleText:i==null?void 0:i.textLightest,toggleSmallHeight:u==null?void 0:u.inputHeightSmall,toggleMediumHeight:u==null?void 0:u.inputHeightMedium,toggleLargeHeight:u==null?void 0:u.inputHeightLarge,toggleShadow:p==null?void 0:p.depth1,toggleSmallFontSize:o==null?void 0:o.fontSizeXSmall,toggleMediumFontSize:o==null?void 0:o.fontSizeSmall,toggleLargeFontSize:o==null?void 0:o.fontSizeMedium},...g[s]}},Ae={label:n.node.isRequired,value:n.oneOfType([n.string,n.number]),id:n.string,name:n.string,checked:n.bool,disabled:n.bool,readOnly:n.bool,variant:n.oneOf(["simple","toggle"]),size:n.oneOf(["small","medium","large"]),context:n.oneOf(["success","warning","danger","off"]),inline:n.bool,onClick:n.func,onChange:n.func},Me=["label","value","id","name","checked","disabled","readOnly","variant","size","context","inline","onClick","onChange"];var X,J,Y,L,y;let k=(X=ie(),J=fe(He,Oe),Y=le(),X(L=J(L=Y(L=(y=class re extends h.Component{constructor(a){super(a),this.ref=null,this._defaultId=void 0,this._input=null,this.handleClick=l=>{if(this.props.disabled||this.props.readOnly){l.preventDefault();return}typeof this.props.onClick=="function"&&this.props.onClick(l)},this.handleChange=l=>{if(this.props.disabled||this.props.readOnly){l.preventDefault();return}typeof this.props.checked>"u"&&this.setState({checked:!this.state.checked}),typeof this.props.onChange=="function"&&this.props.onChange(l)},typeof a.checked>"u"&&(this.state={checked:!1}),this._defaultId=a.deterministicId()}componentDidMount(){var a,l;(a=(l=this.props).makeStyles)===null||a===void 0||a.call(l)}componentDidUpdate(){var a,l;(a=(l=this.props).makeStyles)===null||a===void 0||a.call(l)}focus(){var a;(a=this._input)===null||a===void 0||a.focus()}get id(){return this.props.id||this._defaultId}get focused(){return ye(this._input)}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}render(){const a=this.props,l=a.disabled,i=a.readOnly,u=a.label,p=a.value,o=a.name,s=a.styles,g=ae(this.props,re.allowedProps);return w("div",{css:s==null?void 0:s.radioInput,ref:f=>{this.ref=f}},w("input",Object.assign({},g,{id:this.id,ref:f=>{this._input=f},value:p,name:o,checked:this.checked,type:"radio",css:s==null?void 0:s.input,disabled:l||i,"aria-disabled":l||i?"true":void 0,onChange:this.handleChange,onClick:this.handleClick})),w("label",{css:s==null?void 0:s.control,htmlFor:this.id},w("span",{css:s==null?void 0:s.facade,"aria-hidden":"true"}),w("span",{css:s==null?void 0:s.label},u)))}},y.displayName="RadioInput",y.componentId="RadioInput",y.allowedProps=Me,y.propTypes=Ae,y.defaultProps={variant:"simple",size:"medium",disabled:!1,inline:!1,context:"success",readOnly:!1},y))||L)||L)||L);const Ue={name:n.string.isRequired,description:n.node.isRequired,defaultValue:n.oneOfType([n.string,n.number]),value:xe(n.oneOfType([n.string,n.number])),onChange:n.func,disabled:n.bool,readOnly:n.bool,messages:n.arrayOf(_e.message),children:n.node,variant:n.oneOf(["simple","toggle"]),size:n.oneOf(["small","medium","large"]),layout:n.oneOf(["stacked","columns","inline"])},Ne=["name","description","defaultValue","value","onChange","disabled","readOnly","messages","children","variant","size","layout"];var T,ee,_,x;let M=(T=ie(),ee=le(),T(_=ee(_=(x=class oe extends h.Component{constructor(a){super(a),this.ref=null,this._messagesId=void 0,this.handleRef=l=>{this.ref=l},this.handleChange=l=>{const i=l.target.value;if(this.props.disabled||this.props.readOnly){l.preventDefault();return}typeof this.props.value>"u"&&this.setState({value:i}),typeof this.props.onChange=="function"&&this.props.onChange(l,i)},typeof a.value>"u"&&(this.state={value:a.defaultValue}),this._messagesId=a.deterministicId("RadioInputGroup-messages")}get hasMessages(){return!!this.props.messages&&this.props.messages.length>0}get value(){return typeof this.props.value>"u"?this.state.value:this.props.value}renderChildren(){const a=this.props,l=a.children,i=a.name,u=a.variant,p=a.size,o=a.disabled,s=a.readOnly;return h.Children.map(l,(g,f)=>{if(ke(g,[k])){const S=this.value===g.props.value,m=!this.value&&f===0;return Ce(g,{name:i,disabled:o||g.props.disabled,variant:u,size:p,checked:S,onChange:this.handleChange,readOnly:s||g.props.readOnly,width:g.props.width||"auto","aria-describedby":this.hasMessages?this._messagesId:void 0,tabIndex:S||m?0:-1,label:g.props.label})}else return g})}render(){const a=this.props,l=a.variant,i=a.layout,u=a.description;return U.createElement(N,Object.assign({},ae(this.props,oe.allowedProps),ve(this.props,N.allowedProps),{description:u,layout:i==="columns"&&l==="toggle"?"stacked":i,vAlign:l==="toggle"?"middle":"top",rowSpacing:"small",colSpacing:l==="toggle"?"none":"small",startAt:l==="toggle"?"small":void 0,messagesId:this._messagesId,elementRef:this.handleRef}),this.renderChildren())}},x.displayName="RadioInputGroup",x.componentId="RadioInputGroup",x.allowedProps=Ne,x.propTypes=Ue,x.defaultProps={disabled:!1,variant:"simple",size:"medium",layout:"stacked",readOnly:!1},x))||_)||_);const Ve={header:{EN:"Redirect Links",ES_LA:"Enlaces de Redirección",PT_BR:"Links de Redirecionamento",DE:"Weiterleitungslinks"},description:{EN:"This page provides a collection of shortened URLs for use in RFP responses. Each row has a short URL and the original URL. Click on the copy icon and the short URL will be added to your clipboard.",ES_LA:"Esta página proporciona una colección de URL abreviadas para usar en las respuestas a RFP. Cada fila tiene una URL corta y la URL original. Haga clic en la copia y la URL corta se agregará a su portapapeles.",PT_BR:"Esta página fornece uma coleção de URLs abreviados para uso em respostas de RFP. Cada linha possui um URL curto e o URL original. Clique na cópia ícone e o URL curto serão adicionados à sua área de transferência.",DE:"Diese Seite bietet eine Sammlung verkürzter URLs zur Verwendung in RFP-Antworten. Jede Zeile enthält eine Kurz-URL und die Original-URL. Klicken Sie auf die Kopie-Symbol und die Kurz-URL wird Ihrer Zwischenablage hinzugefügt."},filters:{EN:"Filters",ES_LA:"Filtros",PT_BR:"Filtros",DE:"filter"},toggleShow:{EN:"Show filters",ES_LA:"Mostrar filtros",PT_BR:"Mostrar filtros",DE:"Filter anzeigen"},toggleHide:{EN:"Hide filters",ES_LA:"Ocultar filtros",PT_BR:"Ocultar filtros",DE:"Filter ausblenden"},search:{EN:"Search",ES_LA:"Buscar",PT_BR:"Procurar",DE:"Suche"},clearSearch:{EN:"Clear search",ES_LA:"Borrar búsqueda",PT_BR:"Limpar pesquisa",DE:"Suche löschen"},placeholder:{EN:"community",ES_LA:"comunidad",PT_BR:"comunidade",DE:"Gemeinschaft"},brands:{EN:"Brands",ES_LA:"Marcas",PT_BR:"Marcas",DE:"Marken"},products:{EN:"Products",ES_LA:"Productos",PT_BR:"Produtos",DE:"Produkte"},language:{EN:"Language",ES_LA:"Idioma",PT_BR:"Idioma",DE:"Sprache"},title:{EN:"Title",ES_LA:"Título",PT_BR:"Título",DE:"Titel"},link:{EN:"Link",ES_LA:"Enlace",PT_BR:"Link",DE:"Link"},copy:{EN:"Copy",ES_LA:"Copiar",PT_BR:"Copiar",DE:"Kopieren"},copy_url:{EN:"Copy URL to clipboard",ES_LA:"Copiar URL al portapapeles",PT_BR:"Copiar URL para a área de transferência",DE:"Kopieren Sie die URL in die Zwischenablage"},copy_error:{EN:"Error copying to clipboard",ES_LA:"Error al copiar al portapapeles",PT_BR:"Erro ao copiar para a área de transferência",DE:"Fehler beim Kopieren in die Zwischenablage"}};function We(){const e=Le(be().language),a=Re(Ve,e),l=Se.url.replace("https://",""),[i,u]=h.useState({expanded:!1,text:a.toggleShow}),p=()=>{const t=i.expanded?a.toggleShow:a.toggleHide;u({expanded:!i.expanded,text:t})},[o,s]=h.useState(""),g=(t,d)=>{t.preventDefault(),s(d),B(m,d,D,P)},f=t=>{t.stopPropagation(),g(t,"")},S=()=>o.search.length?r.jsx(K,{type:"button",size:"small",withBackground:!1,withBorder:!1,screenReaderLabel:a.clearSearch,onClick:f,children:r.jsx(De,{})}):null,[m,E]=h.useState([e]),F=(t,d)=>{t.preventDefault();const c=[];d==="all"?(c.push(...q),$(t,"all")):c.push(...q.filter(C=>C.toUpperCase().includes(d.toUpperCase()))),E(c),B(c,o,D,P)},[P,te]=h.useState("all"),[j,se]=h.useState(z),$=(t,d)=>{t.preventDefault(),d==="all"||z.includes(d)?te(d):console.error(`Invalid value for setActiveProduct: ${d}`),B(m,o,D,d)},[W,ne]=h.useState("all"),[D,de]=h.useState(O),ce=(t,d)=>{t.preventDefault();const c=[];d==="all"?c.push("AWS",...O):c.push(...["AWS",...O].filter(C=>C.toLowerCase().includes(d.toLowerCase()))),ne(d),de(c),$(t,"all"),se(c),B(m,o,c,"all")},[ue,ge]=h.useState({list:Z.map(t=>({...t,links:t.links.filter(d=>d.lang.toUpperCase()===e)}))}),B=(t,d,c,C)=>{const he=Z.map(v=>({...v,links:v.links.filter(H=>`${`${v.brand} ${H.title}`}`.toLowerCase().includes(d.toLowerCase())).filter(H=>t.includes(H.lang.toUpperCase()))})).filter(v=>v.links.length>0).filter(v=>c.includes(v.brand)).filter(v=>C!=="all"?v.brand===j[0]||v.brand===C:!0);ge({list:he})};async function pe(t){try{await navigator.clipboard.writeText(t)}catch(d){let c=a.copy_error;d instanceof Error?c=d.message:typeof d=="string"&&(c=d),console.error(c)}}return r.jsxs(r.Fragment,{children:[r.jsx(Ee,{language:e}),r.jsxs(I,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[r.jsxs(I,{as:"div",margin:"none none x-large",children:[r.jsx(G,{level:"h1",children:a.header}),r.jsx(A,{as:"p",children:a.description}),r.jsx(Fe,{onClick:p,children:i.text}),r.jsx(Pe,{id:"toggleFilters",summary:a.filters,onToggle:p,expanded:i.expanded,children:r.jsx(I,{as:"div",margin:"large none none",children:r.jsx("form",{name:"searchFilters",autoComplete:"off",children:r.jsxs(N,{label:"",description:"",layout:"stacked",children:[r.jsx(je,{type:"search",renderLabel:a.search,placeholder:a.placeholder,onChange:g,renderBeforeInput:r.jsx($e,{inline:!1}),renderAfterInput:S,value:o}),r.jsxs(M,{name:"brand",description:a.brands,defaultValue:"all",layout:"columns",variant:"toggle",onChange:ce,children:[r.jsx(k,{value:"all",label:"All",context:"off"},"all"),["AWS",...z].map(t=>r.jsx(k,{value:t,label:t,context:"off"},t))]}),W!=="all"&&j.length>1&&r.jsxs(M,{name:"product",description:a.products,defaultValue:"all",layout:"columns",variant:"toggle",onChange:$,children:[r.jsx(k,{value:"all",label:"All",context:"off",id:"allProducts",checked:P==="all"},"all"),j.filter(t=>t!==W).map(t=>r.jsx(k,{value:t,label:t,context:"off"},t))]}),r.jsxs(M,{name:"language",description:a.language,defaultValue:e,layout:"columns",variant:"toggle",onChange:F,children:[r.jsx(k,{value:"all",label:"All",context:"off"},"all"),we.map(t=>r.jsx(k,{value:t.code,label:t.local,context:"off"},t.code))]})]})})})})]}),ue.list.map(t=>{if(t.links.length){const d=t.brand;return r.jsxs(I,{as:"div",margin:"none none xx-large",children:[r.jsx(G,{level:z.includes(d)?"h2":"h3",id:d,children:d}),r.jsxs(b,{hover:!0,caption:d,children:[r.jsx(b.Head,{children:r.jsxs(b.Row,{children:[r.jsx(b.ColHeader,{id:"Title",width:"25%",children:a.title}),r.jsx(b.ColHeader,{id:"URLs",children:a.link})]})}),r.jsx(b.Body,{children:t.links.map(c=>r.jsxs(b.Row,{children:[r.jsx(b.Cell,{children:r.jsx(A,{children:c.title})}),r.jsxs(b.Cell,{children:[r.jsx(Be,{href:`https://${l}${c.from}`,children:`${l}${c.from}`}),"  ",r.jsx(ze,{renderTip:a.copy,on:["hover","focus"],placement:"top",color:"primary-inverse",children:r.jsx(K,{withBackground:!1,withBorder:!1,screenReaderLabel:a.copy_url,onClick:()=>{pe(`https://${l}${c.from}`)},children:r.jsx(R,{})})}),r.jsx("br",{}),r.jsx(A,{size:"small",color:"secondary",children:c.to.split("?")[0]})]})]},c.title))})]})]},d)}return null})]}),r.jsx(Ie,{language:e})]})}We.displayName="Route.Links";function Ze(){const e=h.lazy(()=>me(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([0,1,2,3,4])).then(a=>({default:a.Component})));return r.jsx(h.Suspense,{fallback:r.jsx("h1",{children:"Error."}),children:r.jsx(e,{})})}Ze.displayName="Error.Links";export{We as Component,Ze as ErrorBoundary}; diff --git a/assets/markdownBrand-LsH9OAbQ.js b/assets/markdownBrand-LsH9OAbQ.js new file mode 100644 index 00000000..2c909a98 --- /dev/null +++ b/assets/markdownBrand-LsH9OAbQ.js @@ -0,0 +1,9 @@ +const __vite__fileDeps=["assets/error-pmzUJ_SX.js","assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css","assets/RenderTopNavBar-BKjAQtrP.js","assets/index-BIsQGgQp.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{g as A,r as x,j as f,u as H,a as F,b as K,_ as q,V as D}from"./index-DT1C1ZDw.js";import{g as N,c as v,a as J,R as Q,b as X}from"./RenderTopNavBar-BKjAQtrP.js";import{r as I,a as U,b as G,M as O,c as V,m as M}from"./mdtoui-CrW6q7x2.js";import"./index-3znfDf88.js";const W={fetch_fail:{EN:"Didn't fetch text correctly.",ES_LA:"No se obtuvo el texto correctamente.",PT_BR:"Não buscou o texto corretamente.",DE:"Text nicht korrekt abgerufen."},download:{EN:"Download",ES_LA:"Descargar",PT_BR:"Baixar",DE:"Herunterladen"},explore:{EN:"Explore",ES_LA:"Explorar",PT_BR:"Explorar",DE:"Erkunden"}};var B={VITE_APP_VERSION:"4.0.0+1717539510",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function Y(e,t,n){const c=`${A.api}/repos/${e}/${t}/git/trees/${n}?recursive=1`;try{const s=await(await fetch(c,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:B!=null&&B.GITHUB_TOKEN?`token ${B.GITHUB_TOKEN}`:""}})).json();return{...s,tree:s.tree.sort(Z)}}catch(o){return o instanceof Error?console.error(`Error: ${o.message}`):console.error(`An unexpected error occurred: ${o}`),null}}function Z(e,t){const n=r=>{const l=r.toLocaleUpperCase(),m=c.findIndex(a=>l.startsWith(a.toLocaleUpperCase()));return m!==-1?m:c.length},c=["Amazon Web Services","Instructure"],o=n(e.path),s=n(t.path);return o!==s?s-o:e.path.localeCompare(t.path)}function ee(e,t,n,c,o){var d;const r=N(W,o),l=e.tree.filter(i=>i.type==="tree"),m=e.tree.filter(i=>i.type==="blob").filter(i=>i.path!==".gitignore");let a=`
+ 🕵️ ${r.explore}\r +\r +`;for(const[i,u]of l.entries()){a+=`| ${u.path} |\r +| ---------------- |`;for(const p of m)u!=null&&u.path&&((d=p==null?void 0:p.path)!=null&&d.startsWith(u.path))&&(a+=`\r +| [${p.path.replace(`${u.path}/`,"")}](${encodeURI(`${A.raw}/${t}/${n}/${c}/${p.path}`)}) |`);i~l.indexOf(e)).toString();if(r){const l=await Y(o,s,r);if(l)return ee(l,o,s,r,c)}return null}const re=e=>{const t=v.c(9),{brand:n,branch:c,l:o}=e,[s,r]=x.useState(null);let l,m;t[0]!==n||t[1]!==c||t[2]!==o?(l=()=>{te(n.toLowerCase(),c,o).then(u=>r(u)).catch(u=>console.error(u))},m=[n,c,o],t[0]=n,t[1]=c,t[2]=o,t[3]=l,t[4]=m):(l=t[3],m=t[4]),x.useEffect(l,m);let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=[I,U],t[5]=a):a=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=[G],t[6]=d):d=t[6];let i;return t[7]!==s?(i=f.jsx(O,{remarkPlugins:a,rehypePlugins:d,allowedElements:V,components:M,children:s}),t[7]=s,t[8]=i):i=t[8],i};function oe(){const e=v.c(38),{readme:t,brand:n}=H(),c=F().language;let o,s,r;e[0]!==c?(r=J(c),s=N(W,r),o=r.toUpperCase(),e[0]=c,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);const l=`.markdown .lang { display: none; } .markdown .lang.${o} { display: inherit; }`,m=t,[a,d]=x.useState("Loading..."),[i,u]=x.useState(!1);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[4]=p):p=e[4];const[P,z]=x.useState(p);let w;e[5]!==n||e[6]!==m||e[7]!==s.fetch_fail?(w=()=>{document.title=`${n} Compliance Packages`,fetch(m).then(h=>h.ok?h.text():Promise.reject(s.fetch_fail)).then(h=>{d(h)}).catch(h=>console.error(h))},e[5]=n,e[6]=m,e[7]=s.fetch_fail,e[8]=w):w=e[8],x.useEffect(w);let R,j;e[9]!==a?(R=()=>{a&&(z(Array.from(document.querySelectorAll(".contents"))),u(!0))},j=[a],e[9]=a,e[10]=R,e[11]=j):(R=e[10],j=e[11]),x.useEffect(R,j);let g;e[12]!==i||e[13]!==P||e[14]!==n||e[15]!==r?(g=i&&(P==null?void 0:P.map(h=>K.createPortal(f.jsx(re,{brand:n,branch:h,l:r}),h))),e[12]=i,e[13]=P,e[14]=n,e[15]=r,e[16]=g):g=e[16];let E;e[17]!==r?(E=f.jsx(Q,{language:r}),e[17]=r,e[18]=E):E=e[18];let y;e[19]!==l?(y=f.jsx("style",{children:l}),e[19]=l,e[20]=y):y=e[20];const L=`${n.toLowerCase()} markdown`;let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=[I,U],e[21]=k):k=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=[G],e[22]=C):C=e[22];let _;e[23]!==a?(_=f.jsx(O,{remarkPlugins:k,rehypePlugins:C,allowedElements:V,components:M,children:a}),e[23]=a,e[24]=_):_=e[24];let b;e[25]!==L||e[26]!==_?(b=f.jsx(D,{as:"div",className:L,children:_}),e[25]=L,e[26]=_,e[27]=b):b=e[27];let S;e[28]!==y||e[29]!==b?(S=f.jsxs(D,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[y,b]}),e[28]=y,e[29]=b,e[30]=S):S=e[30];let $;e[31]!==r?($=f.jsx(X,{language:r}),e[31]=r,e[32]=$):$=e[32];let T;return e[33]!==g||e[34]!==E||e[35]!==S||e[36]!==$?(T=f.jsxs(f.Fragment,{children:[g,E,S,$]}),e[33]=g,e[34]=E,e[35]=S,e[36]=$,e[37]=T):T=e[37],T}oe.displayName="Route.MarkdownBrand";function ne(){const e=x.lazy(()=>q(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([0,1,2,3,4])).then(t=>({default:t.Component})));return f.jsx(x.Suspense,{fallback:f.jsx("h1",{children:"Error."}),children:f.jsx(e,{})})}ne.displayName="Error.MarkdownBrand";export{oe as Component,ne as ErrorBoundary}; diff --git a/assets/mdtoui-CrW6q7x2.js b/assets/mdtoui-CrW6q7x2.js new file mode 100644 index 00000000..8600f71a --- /dev/null +++ b/assets/mdtoui-CrW6q7x2.js @@ -0,0 +1,59 @@ +const __vite__fileDeps=["assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{r as we,R as De,P as Q,T as Ei,w as dn,h as Js,d as ne,i as ea,k as As,V as Nt,l as t0,o as Kc,_ as XS,m as WS,t as HS,n as YS,q as Af,s as qS,j as se}from"./index-DT1C1ZDw.js";import{S as Pt,t as wr,j as VS,B as jS,k as Jc,w as eh,l as n0,n as GS,o as KS,I as JS,d as i0,i as e_,p as Xr,C as t_,s as n_,r as i_,L as r_,T as zi,A as s_,H as Xi}from"./RenderTopNavBar-BKjAQtrP.js";import{e as r0,F as a_,f as o_,b as l_,I as u_,d as Cf,g as c_,h as h_,B as f_,T as d_,c as ii}from"./index-3znfDf88.js";var Pf;class Ni extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return De.createElement(Pt,Object.assign({},this.props,{name:"IconCheckMark",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Pf||(Pf=De.createElement("path",{d:"M1743.858 267.012 710.747 1300.124 176.005 765.382 0 941.387l710.747 710.871 1209.24-1209.116z",fillRule:"evenodd"})))}}Ni.glyphName="check-mark";Ni.variant="Solid";Ni.displayName="IconCheckMarkSolid";Ni.propTypes={...Pt.propTypes};Ni.allowedProps=[...Pt.allowedProps];var vf;class Ar extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return De.createElement(Pt,Object.assign({},this.props,{name:"IconInfoBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),vf||(vf=De.createElement("path",{d:"M1229.93 594.767c36.644 37.975 50.015 91.328 43.72 142.909-9.128 74.877-30.737 144.983-56.093 215.657-27.129 75.623-54.66 151.09-82.332 226.512-44.263 120.685-88.874 241.237-132.65 362.1-10.877 30.018-18.635 62.072-21.732 93.784-3.376 34.532 21.462 51.526 52.648 36.203 24.977-12.278 49.288-28.992 68.845-48.768 31.952-32.31 63.766-64.776 94.805-97.98 15.515-16.605 30.86-33.397 45.912-50.438 11.993-13.583 24.318-34.02 40.779-42.28 31.17-15.642 55.226 22.846 49.582 49.794-5.39 25.773-23.135 48.383-39.462 68.957l-1.123 1.416a1559.53 1559.53 0 0 0-4.43 5.6c-54.87 69.795-115.043 137.088-183.307 193.977-67.103 55.77-141.607 103.216-223.428 133.98-26.65 10.016-53.957 18.253-81.713 24.563-53.585 12.192-112.798 11.283-167.56 3.333-40.151-5.828-76.246-31.44-93.264-68.707-29.544-64.698-8.98-144.595 6.295-210.45 18.712-80.625 46.8-157.388 75.493-234.619l2.18-5.867 1.092-2.934 2.182-5.87 2.182-5.873c33.254-89.517 67.436-178.676 101.727-267.797 31.294-81.296 62.72-162.537 93.69-243.95 2.364-6.216 5.004-12.389 7.669-18.558l1-2.313c6.835-15.806 13.631-31.617 16.176-48.092 6.109-39.537-22.406-74.738-61.985-51.947-68.42 39.4-119.656 97.992-170.437 156.944l-6.175 7.17c-15.78 18.323-31.582 36.607-47.908 54.286-16.089 17.43-35.243 39.04-62.907 19.07-29.521-21.308-20.765-48.637-3.987-71.785 93.18-128.58 205.056-248.86 350.86-316.783 60.932-28.386 146.113-57.285 225.882-58.233 59.802-.707 116.561 14.29 157.774 56.99Zm92.038-579.94c76.703 29.846 118.04 96.533 118.032 190.417-.008 169.189-182.758 284.908-335.53 212.455-78.956-37.446-117.358-126.202-98.219-227.002 26.494-139.598 183.78-227.203 315.717-175.87Z",fillRule:"evenodd"})))}}Ar.glyphName="info-borderless";Ar.variant="Solid";Ar.displayName="IconInfoBorderlessSolid";Ar.propTypes={...Pt.propTypes};Ar.allowedProps=[...Pt.allowedProps];var Rf;class Cr extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return De.createElement(Pt,Object.assign({},this.props,{name:"IconNo",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),Rf||(Rf=De.createElement("path",{d:"M213.333 960c0-167.36 56-321.707 149.44-446.4L1406.4 1557.227c-124.693 93.44-279.04 149.44-446.4 149.44-411.627 0-746.667-335.04-746.667-746.667m1493.334 0c0 167.36-56 321.707-149.44 446.4L513.6 362.773c124.693-93.44 279.04-149.44 446.4-149.44 411.627 0 746.667 335.04 746.667 746.667M960 0C429.76 0 0 429.76 0 960s429.76 960 960 960 960-429.76 960-960S1490.24 0 960 0",fillRule:"evenodd"})))}}Cr.glyphName="no";Cr.variant="Solid";Cr.displayName="IconNoSolid";Cr.propTypes={...Pt.propTypes};Cr.allowedProps=[...Pt.allowedProps];var If;class Pr extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}render(){return De.createElement(Pt,Object.assign({},this.props,{name:"IconWarningBorderless",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),If||(If=De.createElement("path",{d:"M994.578 1436.356c-133.365 0-241.822 108.457-241.822 241.822S861.213 1920 994.578 1920s241.822-108.457 241.822-241.822-108.457-241.822-241.822-241.822zm170.485-120.912L1310.156 0H679l145.093 1315.444z",fillRule:"evenodd"})))}}Pr.glyphName="warning-borderless";Pr.variant="Solid";Pr.displayName="IconWarningBorderlessSolid";Pr.propTypes={...Pt.propTypes};Pr.allowedProps=[...Pt.allowedProps];const p_=(t,e)=>{const n=e.placement,i=e.offset,r={none:0,"x-small":t.offsetXSmall,small:t.offsetSmall,medium:t.offsetMedium},s=()=>{const a=r[i];return{...a!==0&&{top:a},insetInlineStart:n==="start"?a:"auto",insetInlineEnd:n==="end"?a:"auto"}};return{closeButton:{label:"closeButton",zIndex:t.zIndex,display:"inline-block",...n==="static"?{position:"static"}:{position:"absolute",...s()}}}},m_=t=>{const e=t.spacing,n=t.stacking;return{...{offsetMedium:e==null?void 0:e.medium,offsetSmall:e==null?void 0:e.small,offsetXSmall:e==null?void 0:e.xSmall,zIndex:n==null?void 0:n.above}}},g_={screenReaderLabel:Q.oneOfType([Q.string,Q.node]).isRequired,color:Q.oneOf(["primary","primary-inverse"]),interaction:Q.oneOf(["enabled","disabled","readonly"]),elementRef:Q.func,size:Q.oneOf(["small","medium","large"]),onClick:Q.func,margin:Ei.spacing,placement:Q.oneOf(["start","end","static"]),offset:Q.oneOf(["none","x-small","small","medium"]),type:Q.oneOf(["button","submit","reset"]),as:Q.elementType,href:Q.string,cursor:Q.string,tabIndex:Q.number},O_=["as","color","cursor","elementRef","href","interaction","margin","offset","onClick","placement","screenReaderLabel","size","tabIndex","type"],b_=["screenReaderLabel","elementRef","size","onClick","margin","placement","offset","type","as","href","cursor","tabIndex","styles"];var Qf,Nf,Oa,ri;let y_=(Qf=dn(p_,m_),Nf=wr(),Qf(Oa=Nf(Oa=(ri=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}get interaction(){return VS({props:this.props})}get color(){const e=this.props.color;return e==="primary"?"secondary":e}render(){const e=this.props,n=e.screenReaderLabel;e.elementRef;const i=e.size,r=e.onClick,s=e.margin;e.placement,e.offset;const a=e.type,o=e.as,l=e.href,u=e.cursor,c=e.tabIndex,h=e.styles,f=Js(e,b_);return ne("span",Object.assign({},ea(f),{css:h==null?void 0:h.closeButton,ref:p=>this.ref=p}),ne(jS,{renderIcon:r0,elementRef:this.handleRef,interaction:this.interaction,type:a,color:this.color,size:i,onClick:r,margin:s,withBorder:!1,withBackground:!1,as:o,href:l,cursor:u,tabIndex:c},ne(Jc,null,n)))}},ri.displayName="CloseButton",ri.componentId="CloseButton",ri.propTypes=g_,ri.allowedProps=O_,ri.defaultProps={interaction:void 0,type:"button",placement:"static",offset:"x-small",size:"small",margin:"0",as:"button",cursor:"pointer"},ri))||Oa)||Oa);const k_=(t,e)=>{const n=e.variant,i=e.hasShadow,r={error:{alert:{borderColor:t.dangerBorderColor},icon:{background:t.dangerIconBackground,borderRightColor:t.dangerIconBackground}},info:{alert:{borderColor:t.infoBorderColor},icon:{background:t.infoIconBackground,borderRightColor:t.infoIconBackground}},success:{alert:{borderColor:t.successBorderColor},icon:{backgroundColor:t.successIconBackground,borderRightColor:t.successIconBackground}},warning:{alert:{borderColor:t.warningBorderColor},icon:{background:t.warningIconBackground,borderRightColor:t.warningIconBackground}}};return{alert:{label:"alert",color:t.color,background:t.background,boxSizing:"border-box",display:"flex",minWidth:"12rem",borderWidth:t.borderWidth,borderStyle:t.borderStyle,borderRadius:t.borderRadius,...r[n].alert,...i&&{boxShadow:t.boxShadow}},icon:{color:t.iconColor,boxSizing:"border-box",flex:"0 0 2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.125rem",borderRight:`${t.borderWidth} ${t.borderStyle}`,...r[n].icon},closeButton:{boxSizing:"border-box",display:"flex",alignItems:"flex-start",order:1,marginTop:t.closeButtonMarginTop,marginRight:t.closeButtonMarginRight},content:{boxSizing:"border-box",flex:1,minWidth:"0.0625rem",fontSize:t.contentFontSize,fontFamily:t.contentFontFamily,fontWeight:t.contentFontWeight,lineHeight:t.contentLineHeight,padding:t.contentPadding}}},S_=t=>{const e=t.colors,n=t.spacing,i=t.borders,r=t.typography,s=t.shadows,a=t.key,o={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,marginTop:n==null?void 0:n.small,borderRadius:i==null?void 0:i.radiusMedium,borderWidth:i==null?void 0:i.widthMedium,borderStyle:i==null?void 0:i.style,contentPadding:`${n==null?void 0:n.small} ${n==null?void 0:n.medium}`,contentFontSize:r==null?void 0:r.fontSizeMedium,contentFontFamily:r==null?void 0:r.fontFamily,contentFontWeight:r==null?void 0:r.fontWeightNormal,contentLineHeight:r==null?void 0:r.lineHeightCondensed,closeButtonMarginTop:n==null?void 0:n.xSmall,closeButtonMarginRight:n==null?void 0:n.xxSmall,iconColor:e==null?void 0:e.textLightest,successBorderColor:e==null?void 0:e.borderSuccess,successIconBackground:e==null?void 0:e.backgroundSuccess,infoBorderColor:e==null?void 0:e.borderInfo,infoIconBackground:e==null?void 0:e.backgroundInfo,warningBorderColor:e==null?void 0:e.borderWarning,warningIconBackground:e==null?void 0:e.backgroundWarning,dangerBorderColor:e==null?void 0:e.borderDanger,dangerIconBackground:e==null?void 0:e.backgroundDanger,boxShadow:s==null?void 0:s.depth2},...o[a]}},__={children:Q.node,variant:Q.oneOf(["info","success","warning","error"]),margin:Ei.spacing,liveRegion:Q.func,liveRegionPoliteness:Q.oneOf(["polite","assertive"]),isLiveRegionAtomic:Q.bool,screenReaderOnly:Q.bool,timeout:Q.number,renderCloseButtonLabel:Q.oneOfType([Q.func,Q.node]),onDismiss:Q.func,transition:Q.oneOf(["none","fade"]),open:Q.bool,hasShadow:Q.bool},E_=["children","variant","margin","liveRegion","liveRegionPoliteness","isLiveRegionAtomic","screenReaderOnly","timeout","renderCloseButtonLabel","onDismiss","transition","open","hasShadow"];var Lf,Df,ba,si;let T_=(Lf=eh(),Df=dn(k_,S_),Lf(ba=Df(ba=(si=class extends we.Component{constructor(e){super(e),this._timeouts=[],this.srid=void 0,this.variantUI={error:Cr,info:Ar,success:Ni,warning:Pr},this.ref=null,this.handleRef=n=>{this.ref=n},this.handleTimeout=()=>{this.props.timeout>0&&this._timeouts.push(setTimeout(()=>{this.close()},this.props.timeout))},this.onExitTransition=()=>{this.props.onDismiss&&this.props.onDismiss()},this.close=()=>{this.clearTimeouts(),this.removeScreenreaderAlert(),this.setState({open:!1},()=>{this.props.onDismiss&&this.props.transition==="none"&&this.props.onDismiss()})},this.handleKeyUp=n=>{this.props.renderCloseButtonLabel&&n.keyCode===n0.codes.esc&&this.close()},this.srid=this.props.deterministicId(),this.state={open:!0}}clearTimeouts(){this._timeouts.forEach(e=>clearTimeout(e)),this._timeouts=[]}isDOMNode(e){return e&&typeof e=="object"&&e.nodeType===1}getLiveRegion(){let e=null;return typeof this.props.liveRegion=="function"&&(e=this.props.liveRegion()),this.isDOMNode(e)?e:null}initLiveRegion(e){As(e.getAttribute("role")==="alert","[Alert] live region must have role='alert' set on page load in order to announce content"),e&&(e.setAttribute("aria-live",this.props.liveRegionPoliteness),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic",`${this.props.isLiveRegionAtomic}`))}createScreenreaderContentNode(){return ne(Jc,null,this.props.children)}createScreenreaderAlert(){const e=this.getLiveRegion();if(e){const n=document.createElement("div");n.setAttribute("id",this.srid),e.appendChild(n)}}removeScreenreaderAlert(){const e=this.getLiveRegion();e&&document.getElementById(this.srid)&&(e.removeAttribute("aria-live"),e.removeAttribute("aria-relevant"),e.removeAttribute("aria-atomic"),this.initLiveRegion(e))}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const i=this.getLiveRegion();i&&this.initLiveRegion(i),this.handleTimeout()}componentWillUnmount(){this.clearTimeouts()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),!this.props.open&&!!this.props.open!=!!e.open&&this.close()}renderIcon(){var e;const n=this.variantUI[this.props.variant];return ne("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.icon},ne(n,null))}renderCloseButton(){var e;const n=this.props.renderCloseButtonLabel&&GS(this.props.renderCloseButtonLabel);return n?ne("div",{css:(e=this.props.styles)===null||e===void 0?void 0:e.closeButton,key:"closeButton"},ne(y_,{onClick:this.close,size:"small",screenReaderLabel:n})):null}renderAlert(){var e,n;return ne(Nt,{as:"div",margin:this.props.margin,css:(e=this.props.styles)===null||e===void 0?void 0:e.alert,onKeyUp:this.handleKeyUp,elementRef:this.handleRef},this.renderIcon(),ne("div",{css:(n=this.props.styles)===null||n===void 0?void 0:n.content},this.props.children),this.renderCloseButton())}createScreenReaderPortal(e){return this.state.open?t0.createPortal(ne("div",{id:this.srid},this.createScreenreaderContentNode()),e):null}render(){const e=this.getLiveRegion(),n=e?this.createScreenReaderPortal(e):null;return this.props.screenReaderOnly?(As(!!this.getLiveRegion(),"[Alert] The 'screenReaderOnly' prop must be used in conjunction with 'liveRegion'."),n):this.props.transition==="none"?this.state.open?ne(De.Fragment,null,n,this.renderAlert()):null:ne(De.Fragment,null,n,ne(KS,{type:this.props.transition,transitionOnMount:!0,in:this.state.open,unmountOnExit:!0,onExited:this.onExitTransition},this.renderAlert()))}},si.displayName="Alert",si.componentId="Alert",si.propTypes=__,si.allowedProps=E_,si.defaultProps={variant:"info",margin:"x-small 0",timeout:0,transition:"fade",open:!0,screenReaderOnly:!1,liveRegionPoliteness:"assertive",isLiveRegionAtomic:!1,children:null,hasShadow:!0},si))||ba)||ba);const x_=(t,e)=>{const n=e.alignContent,i=e.size,r={top:{alignItems:"flex-start"},center:{alignItems:"center"}},s={display:"flex",background:t.background,margin:0,padding:0,fontFamily:t.fontFamily,...r[n]},a={color:t.color,margin:0,padding:0};return{byline:{label:"byline",...s,"&:is(figure)":s,"&:-webkit-any(figure)":s},figure:{label:"byline__figure",marginInlineStart:0,marginInlineEnd:t.figureMargin},caption:{label:"byline__caption",...a,"&:is(figcaption)":a,"&:-webkit-any(figcaption)":a},title:{label:"byline__title",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"block",margin:t.titleMargin,fontSize:t.titleFontSize,fontWeight:t.titleFontWeight,lineHeight:t.titleLineHeight},description:{label:"byline__description",fontSize:t.descriptionFontSize,lineHeight:t.descriptionLineHeight,fontWeight:t.descriptionFontWeight},maxWidth:i&&t[i]}},w_=t=>{const e=t.colors,n=t.spacing,i=t.typography,r=t.breakpoints,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:i==null?void 0:i.fontFamily,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,figureMargin:n==null?void 0:n.small,titleMargin:`0 0 ${n==null?void 0:n.xSmall} 0`,titleFontSize:i==null?void 0:i.fontSizeLarge,titleFontWeight:i==null?void 0:i.fontWeightNormal,titleLineHeight:i==null?void 0:i.lineHeightFit,descriptionFontSize:i==null?void 0:i.fontSizeMedium,descriptionFontWeight:i==null?void 0:i.fontWeightNormal,descriptionLineHeight:i==null?void 0:i.lineHeightCondensed,small:r==null?void 0:r.small,medium:r==null?void 0:r.medium,large:r==null?void 0:r.large},...a[s]}},A_={children:Q.node.isRequired,title:Q.node,description:Q.oneOfType([Q.string,Q.node]),alignContent:Q.oneOf(["top","center"]),margin:Ei.spacing,size:Q.oneOf(["small","medium","large"]),elementRef:Q.func},C_=["alignContent","children","description","elementRef","margin","size","title"];var $f,Mf,ai;let P_=($f=dn(x_,w_),$f(Mf=(ai=class Cu extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){var e,n,i,r,s,a;const o=Nt.omitViewProps(Kc(this.props,Cu.allowedProps),Cu);return ne(Nt,Object.assign({},o,{elementRef:this.handleRef,css:(e=this.props.styles)===null||e===void 0?void 0:e.byline,as:"figure",margin:this.props.margin,maxWidth:(n=this.props.styles)===null||n===void 0?void 0:n.maxWidth}),ne("div",{css:(i=this.props.styles)===null||i===void 0?void 0:i.figure},this.props.children),ne("figcaption",{css:(r=this.props.styles)===null||r===void 0?void 0:r.caption},this.props.title&&ne("span",{css:(s=this.props.styles)===null||s===void 0?void 0:s.title},this.props.title),this.props.description&&ne("div",{css:(a=this.props.styles)===null||a===void 0?void 0:a.description},this.props.description)))}},ai.displayName="Byline",ai.componentId="Byline",ai.propTypes=A_,ai.allowedProps=C_,ai.defaultProps={alignContent:"center"},ai))||Mf);const v_=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,s=e.hovered,a=e.indeterminate,o=i||a,l={small:{label:{fontSize:t.labelFontSizeSmall},facade:{fontSize:t.iconSizeSmall,width:t.facadeSizeSmall,height:t.facadeSizeSmall}},medium:{label:{fontSize:t.labelFontSizeMedium},facade:{fontSize:t.iconSizeMedium,width:t.facadeSizeMedium,height:t.facadeSizeMedium}},large:{label:{fontSize:t.labelFontSizeLarge},facade:{fontSize:t.iconSizeLarge,width:t.facadeSizeLarge,height:t.facadeSizeLarge}}};return{checkboxFacade:{label:"checkboxFacade",display:"flex",alignItems:"flex-start"},facade:{label:"checkboxFacade__facade",color:t.color,background:t.background,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",flexShrink:0,transition:"all 0.2s",border:`${t.borderWidth} solid ${t.borderColor}`,borderRadius:t.borderRadius,marginInlineEnd:t.marginRight,marginInlineStart:"0",padding:t.padding,...l[n].facade,"&::before":{content:'""',position:"absolute",top:"-0.3125rem",bottom:"-0.3125rem",left:"-0.3125rem",right:"-0.3125rem",boxSizing:"border-box",borderRadius:`calc(${t.borderRadius} * 1.5)`,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusBorderColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}},...o&&{background:t.checkedBackground,borderColor:t.checkedBorderColor},...s&&{borderColor:t.hoverBorderColor}},label:{label:"checkboxFacade__label",flex:"1 1 auto",minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...l[n].label,...o&&{color:t.checkedLabelColor}}}},R_=t=>{const e=t.colors,n=t.borders,i=t.spacing,r=t.typography,s=t.key,a={canvas:{focusBorderColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"],checkedLabelColor:t["ic-brand-font-color-dark"],checkedBackground:t["ic-brand-font-color-dark"],checkedBorderColor:t["ic-brand-font-color-dark"],hoverBorderColor:t["ic-brand-font-color-dark"]}};return{...{color:e==null?void 0:e.textLightest,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,background:e==null?void 0:e.backgroundLightest,marginRight:i==null?void 0:i.xSmall,padding:i==null?void 0:i.xxxSmall,checkedBackground:e==null?void 0:e.backgroundDarkest,checkedBorderColor:e==null?void 0:e.borderDarkest,hoverBorderColor:e==null?void 0:e.borderDarkest,focusBorderColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,labelColor:e==null?void 0:e.textDarkest,checkedLabelColor:e==null?void 0:e.textDarkest,labelFontFamily:r==null?void 0:r.fontFamily,labelFontWeight:r==null?void 0:r.fontWeightNormal,labelLineHeight:r==null?void 0:r.lineHeightCondensed,facadeSizeSmall:"1rem",facadeSizeMedium:"1.25rem",facadeSizeLarge:"1.75rem",labelFontSizeSmall:r==null?void 0:r.fontSizeSmall,labelFontSizeMedium:r==null?void 0:r.fontSizeMedium,labelFontSizeLarge:r==null?void 0:r.fontSizeLarge,iconSizeSmall:"0.625rem",iconSizeMedium:"0.75rem",iconSizeLarge:"1rem"},...a[s]}},I_={children:Q.node.isRequired,checked:Q.bool,focused:Q.bool,hovered:Q.bool,size:Q.oneOf(["small","medium","large"]),indeterminate:Q.bool},Q_=["children","checked","focused","hovered","size","indeterminate"];var Bf,Uf,oi,Ff,Zf;let N_=(Bf=dn(v_,R_),Bf(Uf=(oi=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){return this.props.indeterminate?Ff||(Ff=ne(Pt,{viewBox:"0 0 1920 1920",inline:!1},ne("rect",{x:"140",y:"820",width:"1640",height:"280"}))):this.props.checked?Zf||(Zf=ne(Ni,{inline:!1})):null}render(){const e=this.props,n=e.children,i=e.styles;return ne("span",{css:i==null?void 0:i.checkboxFacade,ref:this.handleRef},ne("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},this.renderIcon()),ne("span",{css:i==null?void 0:i.label},n))}},oi.displayName="CheckboxFacade",oi.componentId="CheckboxFacade",oi.propTypes=I_,oi.allowedProps=Q_,oi.defaultProps={checked:!1,focused:!1,hovered:!1,size:"medium",indeterminate:!1},oi))||Uf);const L_=(t,e)=>{const n=e.size,i=e.checked,r=e.focused,s=e.labelPlacement,a={start:{facade:{marginInlineEnd:"0",marginInlineStart:t.marginStart},label:{textAlign:"end"}},end:{facade:{marginInlineEnd:t.marginEnd,marginInlineStart:"0"},label:{}},top:{facade:{marginTop:t.marginVertical},label:{display:"block"}}},o={small:{fontSize:t.labelFontSizeSmall},medium:{fontSize:t.labelFontSizeMedium},large:{fontSize:t.labelFontSizeLarge}};return{toggleFacade:{label:"toggleFacade",display:"flex",alignItems:"center",...s==="top"&&{display:"block"}},facade:{label:"toggleFacade__facade",background:t.background,borderColor:t.borderColor,cursor:"pointer",display:"inline-block",userSelect:"none",position:"relative",borderRadius:"3rem",verticalAlign:"middle",boxShadow:`inset 0 0 0 ${t.borderWidth} ${t.borderColor}`,height:t.toggleSize,width:`calc(${t.toggleSize} * 1.5)`,...a[s].facade,...i&&{background:t.checkedBackground,boxShadow:"none"},"&::before":{content:'""',position:"absolute",top:"-0.25rem",left:"-0.25rem",width:"calc(100% + 0.5rem)",height:"calc(100% + 0.5rem)",boxSizing:"border-box",borderRadius:t.borderRadius,border:`${t.focusBorderWidth} ${t.focusBorderStyle} ${t.focusOutlineColor}`,transition:"all 0.2s",transform:"scale(0.75)",opacity:0,pointerEvents:"none",...r&&{transform:"scale(1)",opacity:1}}},icon:{label:"toggleFacade__icon",display:"block",textAlign:"center",position:"absolute",top:"0",insetInlineStart:"0",insetInlineEnd:"auto",transition:"all 0.2s",transform:"translate3d(0, 0, 0)",fontSize:"0.875rem",height:t.toggleSize,width:t.toggleSize,...i&&{transform:"translate3d(50%, 0, 0)",'[dir="rtl"] &':{transform:"translate3d(-50%, 0, 0)"}}},iconToggle:{label:"toggleFacade__iconToggle",position:"relative",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center","&::before":{content:'""',position:"absolute",top:t.borderWidth,left:t.borderWidth,height:`calc(100% - (${t.borderWidth} * 2))`,width:`calc(100% - (${t.borderWidth} * 2))`,background:t.toggleBackground,boxShadow:t.toggleShadow,borderRadius:"100%"}},iconSVG:{label:"toggleFacade__iconSVG",display:"block",color:t.uncheckedIconColor,position:"relative",zIndex:1,...i&&{color:t.checkedIconColor}},label:{label:"toggleFacade__label",flex:1,minWidth:"0.0625rem",color:t.labelColor,fontFamily:t.labelFontFamily,fontWeight:t.labelFontWeight,lineHeight:t.labelLineHeight,...o[n],...a[s].label}}},D_=t=>{const e=t.colors,n=t.borders,i=t.forms,r=t.shadows,s=t.spacing,a=t.typography,o=t.key,l={canvas:{focusOutlineColor:t["ic-brand-primary"],labelColor:t["ic-brand-font-color-dark"]},"canvas-high-contrast":{background:e==null?void 0:e.backgroundDarkest,borderColor:e==null?void 0:e.borderDarkest}};return{...{color:e==null?void 0:e.textLightest,background:e==null?void 0:e.backgroundLight,borderColor:e==null?void 0:e.borderMedium,borderWidth:n==null?void 0:n.widthSmall,borderRadius:"4rem",marginEnd:s==null?void 0:s.small,marginStart:s==null?void 0:s.small,marginVertical:s==null?void 0:s.xSmall,checkedBackground:e==null?void 0:e.backgroundSuccess,uncheckedIconColor:e==null?void 0:e.textDarkest,checkedIconColor:e==null?void 0:e.textSuccess,focusOutlineColor:e==null?void 0:e.borderBrand,focusBorderWidth:n==null?void 0:n.widthMedium,focusBorderStyle:n==null?void 0:n.style,toggleBackground:e==null?void 0:e.backgroundLightest,toggleShadow:r==null?void 0:r.depth1,toggleSize:i==null?void 0:i.inputHeightSmall,labelColor:e==null?void 0:e.textDarkest,labelFontFamily:a==null?void 0:a.fontFamily,labelFontWeight:a==null?void 0:a.fontWeightNormal,labelLineHeight:a==null?void 0:a.lineHeightCondensed,labelFontSizeSmall:a==null?void 0:a.fontSizeSmall,labelFontSizeMedium:a==null?void 0:a.fontSizeMedium,labelFontSizeLarge:a==null?void 0:a.fontSizeLarge},...l[o]}},$_={children:Q.node.isRequired,checked:Q.bool,disabled:Q.bool,readOnly:Q.bool,focused:Q.bool,size:Q.oneOf(["small","medium","large"]),labelPlacement:Q.oneOf(["top","start","end"])},M_=["children","checked","disabled","readOnly","focused","size","labelPlacement"];var zf,Xf,li;let B_=(zf=dn(L_,D_),zf(Xf=(li=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{this.ref=n}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderIcon(){const e=this.props,n=e.styles;return e.checked?ne(JS,{css:n==null?void 0:n.iconSVG}):ne(r0,{css:n==null?void 0:n.iconSVG})}renderLabel(){const e=this.props,n=e.children,i=e.styles;return ne("span",{css:i==null?void 0:i.label},n)}render(){const e=this.props,n=e.labelPlacement,i=e.styles;return ne("span",{css:i==null?void 0:i.toggleFacade,ref:this.handleRef},(n==="top"||n==="start")&&this.renderLabel(),ne("span",{css:i==null?void 0:i.facade,"aria-hidden":"true"},ne("span",{css:i==null?void 0:i.icon},ne("span",{css:i==null?void 0:i.iconToggle},this.renderIcon()))),n==="end"&&this.renderLabel())}},li.displayName="ToggleFacade",li.componentId="ToggleFacade",li.propTypes=$_,li.allowedProps=M_,li.defaultProps={checked:!1,focused:!1,size:"medium",disabled:!1,readOnly:!1,labelPlacement:"end"},li))||Xf);const U_=(t,e)=>{const n=e.inline;return{checkbox:{label:"checkbox",position:"relative",width:"100%",...e.disabled&&{cursor:"not-allowed",pointerEvents:"none",opacity:.5},...n&&{display:"inline-block",verticalAlign:"middle",width:"auto"}},input:{label:"checkbox__input",padding:0,margin:0,fontSize:"inherit",lineHeight:"inherit",width:"auto",position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",opacity:1e-4},control:{label:"checkbox__control",all:"initial",display:"block",direction:"inherit",textAlign:"start"}}},F_={label:Q.node.isRequired,id:Q.string,value:Q.oneOfType([Q.string,Q.number]),messages:Q.arrayOf(a_.message),defaultChecked:Q.bool,checked:i0(Q.bool,"onChange","defaultChecked"),onChange:Q.func,onKeyDown:Q.func,onFocus:Q.func,onBlur:Q.func,onMouseOver:Q.func,onMouseOut:Q.func,disabled:Q.bool,readOnly:Q.bool,indeterminate:Q.bool,size:Q.oneOf(["small","medium","large"]),variant:Q.oneOf(["simple","toggle"]),inline:Q.bool,labelPlacement:Q.oneOf(["top","start","end"])},Z_=["label","id","value","messages","defaultChecked","checked","onChange","onKeyDown","onFocus","onBlur","onMouseOver","onMouseOut","disabled","readOnly","indeterminate","size","variant","inline","labelPlacement"];var Wf,Hf,Yf,Wi,ui;let z_=(Wf=eh(),Hf=dn(U_,null),Yf=wr(),Wf(Wi=Hf(Wi=Yf(Wi=(ui=class s0 extends we.Component{constructor(e){super(e),this._defaultId=void 0,this._input=null,this.ref=null,this.handleRef=n=>{this.ref=n},this.handleChange=n=>{const i=this.props,r=i.onChange,s=i.disabled,a=i.checked,o=i.readOnly;if(s||o){n.preventDefault();return}typeof a>"u"&&this.setState({checked:!this.state.checked}),typeof r=="function"&&r(n)},this.handleKeyDown=n=>{this.props.variant==="toggle"&&n.keyCode===n0.codes.enter&&(this._input&&this._input.click(),n.preventDefault())},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1})},this.handleMouseOver=()=>{!this.props.disabled&&this.setState({hovered:!0})},this.handleMouseOut=()=>{this.setState({hovered:!1})},this.state={focused:!1,hovered:!1,checked:typeof e.checked>"u"?!!e.defaultChecked:void 0},typeof e.checked>"u"&&(this.state.checked=!!e.defaultChecked),this._defaultId=e.deterministicId()}componentDidMount(){var e,n;this._input&&(this._input.indeterminate=this.props.indeterminate),(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(e){var n,i;e.indeterminate!==this.props.indeterminate&&this._input&&(this._input.indeterminate=this.props.indeterminate||!1),(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i)}get id(){return this.props.id||this._defaultId}get checked(){return typeof this.props.checked>"u"?this.state.checked:this.props.checked}get focused(){return e_(this._input)}focus(){this._input&&this._input.focus()}renderFacade(){const e=this.props,n=e.size,i=e.disabled,r=e.variant,s=e.label,a=e.readOnly,o=e.indeterminate,l=e.labelPlacement,u=e.themeOverride,c=this.state,h=c.hovered,f=c.focused;return As(!(r==="simple"&&l!=="end"),"[Checkbox] The `simple` variant does not support the `labelPlacement` property. Use the `toggle` variant instead."),r==="toggle"?ne(B_,{disabled:i,size:n,focused:f,checked:this.checked,readOnly:a,labelPlacement:l,themeOverride:u},s):ne(N_,{size:n,hovered:h,focused:f,checked:this.checked,indeterminate:o,themeOverride:u},s)}renderMessages(){const e=this.props.messages;return e&&e.length>0?ne(Nt,{display:"block",margin:"small 0 0"},ne(o_,{messages:e})):null}render(){const e=this.props,n=e.disabled,i=e.readOnly,r=e.value,s=e.onKeyDown,a=e.onFocus,o=e.onBlur,l=e.onMouseOver,u=e.onMouseOut,c=e.indeterminate,h=e.variant,f=e.styles,p=Kc(this.props,s0.allowedProps);return As(!(h==="toggle"&&c),"[Checkbox] The `toggle` variant does not support the `indeterminate` property. Use the `simple` variant instead."),ne("div",{css:f==null?void 0:f.checkbox,onMouseOver:Xr(l,this.handleMouseOver),onMouseOut:Xr(u,this.handleMouseOut),ref:this.handleRef},ne("input",Object.assign({},p,{id:this.id,value:r,type:"checkbox",ref:m=>{this._input=m},disabled:n||i,"aria-checked":c?"mixed":void 0,css:f==null?void 0:f.input,onChange:this.handleChange,onKeyDown:Xr(s,this.handleKeyDown),onFocus:Xr(a,this.handleFocus),onBlur:Xr(o,this.handleBlur),checked:this.checked})),ne("label",{htmlFor:this.id,css:f==null?void 0:f.control},this.renderFacade(),this.renderMessages()))}},ui.displayName="Checkbox",ui.componentId="Checkbox",ui.propTypes=F_,ui.allowedProps=Z_,ui.defaultProps={size:"medium",variant:"simple",disabled:!1,inline:!1,indeterminate:!1,readOnly:!1,labelPlacement:"end"},ui))||Wi)||Wi)||Wi);const X_=(t,e)=>{const n=e.overlay,i=e.withBlur,r=e.withGrayscale,s=e.constrain,a=s==="cover",o=s==="contain",l={transition:`all ${t.effectTransitionDuration}`},u=()=>{const p=[];return i&&p.push(`blur(${t.imageBlurAmount})`),r&&p.push("grayscale(1)"),p.length>0?{...l,filter:p.join(" ")}:{filter:"none"}},c={width:"100%",height:"100%"},h={objectFit:"cover",...c},f={objectFit:"contain",...c,...n&&{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}};return{overlay:{label:"img__overlay",position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",...l,...n&&{backgroundColor:n.color,opacity:n.opacity*.1,mixBlendMode:n.blend?n.blend:void 0}},container:{label:"img__container",...n&&{position:"relative",overflow:"hidden"},...a&&c,...o&&{height:"inherit"}},img:{label:"img",margin:"0",padding:"0",float:"none",top:"auto",bottom:"auto",left:"auto",right:"auto",lineHeight:"normal",position:"static",transform:"none",maxHeight:"none",minHeight:"0",minWidth:"0",maxWidth:"100%",...u(),...n&&{display:"block"},...a&&h,...o&&f}}},W_=()=>({...{effectTransitionDuration:"1s",imageBlurAmount:"0.25em"}}),H_={src:Q.string.isRequired,alt:Q.string,display:Q.oneOf(["inline-block","block"]),loading:Q.oneOf(["eager","lazy"]),margin:Ei.spacing,overlay:Q.shape({color:Q.string.isRequired,opacity:Q.oneOf([0,1,2,3,4,5,6,7,8,9,10]).isRequired,blend:Q.oneOf(["normal","multiply","screen","overlay","color-burn"])}),withGrayscale:Q.bool,withBlur:Q.bool,constrain:Q.oneOf(["cover","contain"]),elementRef:Q.func,height:Q.oneOfType([Q.string,Q.number]),width:Q.oneOfType([Q.string,Q.number])},Y_=["src","alt","display","loading","margin","overlay","withGrayscale","withBlur","constrain","elementRef","height","width"],q_=["src","alt","margin","display","overlay","withGrayscale","withBlur","constrain","width","height","elementRef","styles","loading"];var qf,Vf,ya,ci;let V_=(qf=dn(X_,W_),Vf=wr(),qf(ya=Vf(ya=(ci=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props,n=e.src,i=e.alt,r=e.margin,s=e.display,a=e.overlay;e.withGrayscale,e.withBlur,e.constrain;const o=e.width,l=e.height;e.elementRef;const u=e.styles,c=e.loading,h=Js(e,q_),f={alt:i||""},p={css:u==null?void 0:u.img,src:n,loading:c},m={...ea(h),width:o,height:l,margin:r,display:s,elementRef:this.handleRef};if(a){const g={...m};return ne(Nt,Object.assign({},g,{as:"span",css:u==null?void 0:u.container}),ne("img",Object.assign({},p,f)),a&&ne("span",{css:u==null?void 0:u.overlay}))}else return ne(Nt,Object.assign({},m,p,f,{as:"img"}))}},ci.displayName="Img",ci.componentId="Img",ci.propTypes=H_,ci.allowedProps=Y_,ci.defaultProps={alt:"",display:"inline-block",withGrayscale:!1,withBlur:!1},ci))||ya)||ya);const j_=(t,e)=>{const n=e.size,i=e.delimiter,r=e.spacing,s=i!=="none",a=r!=="none";As(!(s&&a),"[List] `itemSpacing` has no effect inside Lists with the `delimiter` prop set to anything other than `none`.");const o={small:{fontSize:t.fontSizeSmall},medium:{fontSize:t.fontSizeMedium},large:{fontSize:t.fontSizeLarge}},l={"xxx-small":{marginTop:t.spacingXXXSmall,marginBottom:t.spacingXXXSmall},"xx-small":{marginTop:t.spacingXXSmall,marginBottom:t.spacingXXSmall},"x-small":{marginTop:t.spacingXSmall,marginBottom:t.spacingXSmall},small:{marginTop:t.spacingSmall,marginBottom:t.spacingSmall},medium:{marginTop:t.spacingMedium,marginBottom:t.spacingMedium},large:{marginTop:t.spacingLarge,marginBottom:t.spacingLarge},"x-large":{marginTop:t.spacingXLarge,marginBottom:t.spacingXLarge},"xx-large":{marginTop:t.spacingXXLarge,marginBottom:t.spacingXXLarge},none:{}},u={dashed:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterDashedBorder}},solid:{listStylePosition:"inside","&:not(:first-of-type)":{borderTop:t.delimiterSolidBorder}},none:{}};return{listItem:{label:"listItem",fontWeight:t.fontWeight,fontFamily:t.fontFamily,lineHeight:t.lineHeight,color:t.color,padding:0,...o[n],...a&&!s&&l[r],...s&&u[i],"&:first-of-type":{marginTop:"0"},"&:last-of-type":{marginBottom:"0"}}}},G_=t=>{const e=t.borders,n=t.colors,i=t.spacing,r=t.typography,s=t.key,a={canvas:{color:t["ic-brand-font-color-dark"]}};return{...{fontFamily:r==null?void 0:r.fontFamily,fontWeight:r==null?void 0:r.fontWeightNormal,lineHeight:r==null?void 0:r.lineHeight,fontSizeSmall:r==null?void 0:r.fontSizeSmall,fontSizeMedium:r==null?void 0:r.fontSizeMedium,fontSizeLarge:r==null?void 0:r.fontSizeLarge,color:n==null?void 0:n.textDarkest,spacingXXXSmall:i==null?void 0:i.xxxSmall,spacingXXSmall:i==null?void 0:i.xxSmall,spacingXSmall:i==null?void 0:i.xSmall,spacingSmall:i==null?void 0:i.small,spacingMedium:i==null?void 0:i.medium,spacingLarge:i==null?void 0:i.large,spacingXLarge:i==null?void 0:i.xLarge,spacingXXLarge:i==null?void 0:i.xxLarge,delimiterDashedBorder:`${e==null?void 0:e.widthSmall} dashed ${n==null?void 0:n.borderMedium}`,delimiterSolidBorder:`${e==null?void 0:e.widthSmall} solid ${n==null?void 0:n.borderMedium}`},...a[s]}},K_={children:Q.oneOfType([Q.node,Q.func]).isRequired,delimiter:Q.oneOf(["none","dashed","solid"]),size:Q.oneOf(["small","medium","large"]),margin:Ei.spacing,padding:Ei.spacing,spacing:Q.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:Q.func},J_=["children","delimiter","size","margin","padding","spacing","elementRef"],eE=["delimiter","spacing","size","margin","padding","elementRef","children","styles"];var jf,Gf,ka,hi;let a0=(jf=dn(j_,G_),Gf=wr(),jf(ka=Gf(ka=(hi=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}render(){const e=this.props;e.delimiter,e.spacing,e.size;const n=e.margin,i=e.padding;e.elementRef;const r=e.children,s=e.styles,a=Js(e,eE);return ne(Nt,Object.assign({},ea(a),{css:s==null?void 0:s.listItem,as:"li",margin:n,padding:i,maxWidth:"100%",elementRef:this.handleRef}),r)}},hi.displayName="ListItem",hi.componentId="List.Item",hi.propTypes=K_,hi.allowedProps=J_,hi.defaultProps={padding:"none",spacing:"none",delimiter:"none",size:"medium"},hi))||ka)||ka);const tE=(t,e)=>{const n=e.isUnstyled,r=e.as==="ol";return{list:{label:"list",paddingInlineStart:t.listPadding,paddingInlineEnd:0,...r&&{listStyleType:"none",paddingInlineStart:`calc(${t.listPadding} / 2)`,paddingInlineEnd:0,counterReset:"ol-counter","&>li::before":{fontWeight:t.orderedNumberFontWeight,counterIncrement:"ol-counter",content:'counters(ol-counter, ".") "."',marginInlineEnd:t.orderedNumberMargin,marginInlineStart:0}},...n&&{listStyleType:"none",paddingInlineStart:0}}}},nE=t=>{const e=t.spacing,n=t.typography;return{...{listPadding:e==null?void 0:e.large,orderedNumberFontWeight:n==null?void 0:n.fontWeightBold,orderedNumberMargin:e==null?void 0:e.xSmall}}},iE={children:t_.oneOf([a0]),as:Q.oneOf(["ul","ol"]),delimiter:Q.oneOf(["none","dashed","solid"]),isUnstyled:Q.bool,margin:Ei.spacing,size:Q.oneOf(["small","medium","large"]),itemSpacing:Q.oneOf(["none","xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"]),elementRef:Q.func},rE=["children","as","delimiter","isUnstyled","margin","size","itemSpacing","elementRef"],sE=["as","margin","isUnstyled","elementRef","styles"];var Kf,Jf,Sa,Rn;let Wr=(Kf=dn(tE,nE),Jf=wr(),Kf(Sa=Jf(Sa=(Rn=class extends we.Component{constructor(...e){super(...e),this.ref=null,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)}}componentDidMount(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}componentDidUpdate(){var e,n;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n)}renderChildren(){return we.Children.map(this.props.children,e=>{if(e)return n_(e,{isUnstyled:this.props.isUnstyled,delimiter:this.props.delimiter,size:this.props.size,spacing:this.props.itemSpacing})})}render(){const e=this.props,n=e.as,i=e.margin;e.isUnstyled,e.elementRef;const r=e.styles,s=Js(e,sE);return ne(Nt,Object.assign({},ea(s),{css:r==null?void 0:r.list,as:n,margin:i,elementRef:this.handleRef,display:"block"}),this.renderChildren())}},Rn.displayName="List",Rn.componentId="List",Rn.propTypes=iE,Rn.allowedProps=rE,Rn.defaultProps={as:"ul",delimiter:"none",isUnstyled:!1,size:"medium",itemSpacing:"none"},Rn.Item=a0,Rn))||Sa)||Sa);class Oe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=hr(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),sn.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=hr(this,e,n);let i=[];return this.decompose(e,n,i,0),sn.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new fs(this),s=new fs(e);for(let a=n,o=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new fs(this,e)}iterRange(e,n=this.length){return new o0(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new l0(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Oe.empty:e.length<=32?new Le(e):sn.from(Le.split(e,[]))}}class Le extends Oe{constructor(e,n=aE(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.text[s],o=r+a.length;if((n?i:o)>=e)return new oE(r,o,i,a);r=o+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Le(ed(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),o=eo(s.text,a.text.slice(),0,s.length);if(o.length<=32)i.push(new Le(o,a.length+s.length));else{let l=o.length>>1;i.push(new Le(o.slice(0,l)),new Le(o.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Le))return super.replace(e,n,i);[e,n]=hr(this,e,n);let r=eo(this.text,eo(i.text,ed(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Le(r,s):sn.from(Le.split(r,[]),s)}sliceString(e,n=this.length,i=` +`){[e,n]=hr(this,e,n);let r="";for(let s=0,a=0;s<=n&&ae&&a&&(r+=i),es&&(r+=o.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Le(i,r)),i=[],r=-1);return r>-1&&n.push(new Le(i,r)),n}}class sn extends Oe{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.children[s],o=r+a.length,l=i+a.lines-1;if((n?l:o)>=e)return a.lineInner(e,n,i,r);r=o+1,i=l+1}}decompose(e,n,i,r){for(let s=0,a=0;a<=n&&s=a){let u=r&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!u?i.push(o):o.decompose(e-a,n-a,i,u)}a=l+1}}replace(e,n,i){if([e,n]=hr(this,e,n),i.lines=s&&n<=o){let l=a.replace(e-s,n-s,i),u=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new sn(c,this.length-(n-e)+i.length)}return super.replace(s,o,l)}s=o+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` +`){[e,n]=hr(this,e,n);let r="";for(let s=0,a=0;se&&s&&(r+=i),ea&&(r+=o.sliceString(e-a,n-a,i)),a=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof sn))return 0;let i=0,[r,s,a,o]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==o)return i;let l=this.children[r],u=e.children[s];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new Le(p,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,o=[],l=0,u=-1,c=[];function h(p){let m;if(p.lines>s&&p instanceof sn)for(let g of p.children)h(g);else p.lines>a&&(l>a||!l)?(f(),o.push(p)):p instanceof Le&&l&&(m=c[c.length-1])instanceof Le&&p.lines+m.lines<=32?(l+=p.lines,u+=p.length+1,c[c.length-1]=new Le(m.text.concat(p.text),m.length+1+p.length)):(l+p.lines>r&&f(),l+=p.lines,u+=p.length+1,c.push(p))}function f(){l!=0&&(o.push(c.length==1?c[0]:sn.from(c,u)),u=-1,l=c.length=0)}for(let p of e)h(p);return f(),o.length==1?o[0]:new sn(o,n)}}Oe.empty=new Le([""],0);function aE(t){let e=-1;for(let n of t)e+=n.length+1;return e}function eo(t,e,n=0,i=1e9){for(let r=0,s=0,a=!0;s=n&&(l>i&&(o=o.slice(0,i-r)),r0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,o=r instanceof Le?r.text.length:r.children.length;if(a==(n>0?o:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof Le){let l=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Le?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class o0{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new fs(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class l0{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Oe.prototype[Symbol.iterator]=function(){return this.iter()},fs.prototype[Symbol.iterator]=o0.prototype[Symbol.iterator]=l0.prototype[Symbol.iterator]=function(){return this});let oE=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function hr(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let nr="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return nr[e-1]<=t;return!1}function td(t){return t>=127462&&t<=127487}const nd=8205;function tt(t,e,n=!0,i=!0){return(n?u0:uE)(t,e,i)}function u0(t,e,n){if(e==t.length)return e;e&&c0(t.charCodeAt(e))&&h0(t.charCodeAt(e-1))&&e--;let i=Ge(t,e);for(e+=Qt(i);e=0&&td(Ge(t,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function uE(t,e,n){for(;e>0;){let i=u0(t,e-2,n);if(i=56320&&t<57344}function h0(t){return t>=55296&&t<56320}function Ge(t,e){let n=t.charCodeAt(e);if(!h0(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return c0(i)?(n-55296<<10)+(i-56320)+65536:n}function th(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Qt(t){return t<65536?1:2}const Pu=/\r\n?|\n/;var Je=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Je||(Je={}));class hn{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return s+(e-r);s+=o}else{if(i!=Je.Simple&&u>=e&&(i==Je.TrackDel&&re||i==Je.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!o)return e==r||n<0?s:s+l;s+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i=0&&r<=n&&o>=e)return rn?"cover":!0;r=o}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new hn(e)}static create(e){return new hn(e)}}class We extends hn{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return vu(this,(n,i,r,s,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return Ru(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=o,n[r+1]=a;let l=r>>1;for(;i.length0&&Un(i,n,s.text),s.forward(c),o+=c}let u=e[a++];for(;o>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],a=0,o=null;function l(c=!1){if(!c&&!r.length)return;af||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let m=p?typeof p=="string"?Oe.of(p.split(i||Pu)):p:Oe.empty,g=m.length;if(h==f&&g==0)return;ha&&nt(r,h-a,-1),nt(r,f-h,g),Un(s,r,m),a=f}}return u(e),l(!o),o}static empty(e){return new We(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;ro&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==t[r+1]?t[r]+=e:e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Un(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)o=t.sections[a++],l=t.sections[a++];e(r,u,s,c,h),r=u,s=c}}}function Ru(t,e,n,i=!1){let r=[],s=i?[]:null,a=new Cs(t),o=new Cs(e);for(let l=-1;;)if(a.ins==-1&&o.ins==-1){let u=Math.min(a.len,o.len);nt(r,u,-1),a.forward(u),o.forward(u)}else if(o.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(o.len=0&&l=0){let u=0,c=a.len;for(;c;)if(o.ins==-1){let h=Math.min(c,o.len);u+=h,c-=h,o.forward(h)}else if(o.ins==0&&o.lenl||a.ins>=0&&a.len>l)&&(o||i.length>u),s.forward2(l),a.forward(l)}}}}class Cs{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Oe.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Oe.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ki{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new ki(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return L.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return L.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return L.range(e.anchor,e.head)}static create(e,n,i){return new ki(e,n,i)}}class L{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:L.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new L(e.ranges.map(n=>ki.fromJSON(n)),e.main)}static single(e,n=e){return new L([L.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;rs.head?L.range(l,o):L.range(o,l))}}return new L(e,n)}}function d0(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let nh=0;class Y{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=nh++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Y(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:ih),!!e.static,e.enables)}of(e){return new to([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new to(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new to(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function ih(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class to{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=nh++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=e[s]>>1,o=this.type==2,l=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||c.push(e[h.id]);return{create(h){return h.values[a]=i(h),1},update(h,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||Iu(h,c)){let p=i(h);if(o?!id(p,h.values[a],r):!r(p,h.values[a]))return h.values[a]=p,1}return 0},reconfigure:(h,f)=>{let p,m=f.config.address[s];if(m!=null){let g=bo(f,m);if(this.dependencies.every(O=>O instanceof Y?f.facet(O)===h.facet(O):O instanceof Ve?f.field(O,!1)==h.field(O,!1):!0)||(o?id(p=i(h),g,r):r(p=i(h),g)))return h.values[a]=g,0}else p=i(h);return h.values[a]=p,1}}}}function id(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),a=t[e.id]>>1;function o(l){let u=[];for(let c=0;ci===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(rd).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,rd.of({field:this,create:e})]}get extension(){return this}}const gi={lowest:4,low:3,default:2,high:1,highest:0};function Hr(t){return e=>new p0(e,t)}const wn={highest:Hr(gi.highest),high:Hr(gi.high),default:Hr(gi.default),low:Hr(gi.low),lowest:Hr(gi.lowest)};class p0{constructor(e,n){this.inner=e,this.prec=n}}class Jo{of(e){return new Qu(this,e)}reconfigure(e){return Jo.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Qu{constructor(e,n){this.compartment=e,this.inner=n}}class Oo{constructor(e,n,i,r,s,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let r=[],s=Object.create(null),a=new Map;for(let f of hE(e,n,a))f instanceof Ve?r.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let o=Object.create(null),l=[],u=[];for(let f of r)o[f.id]=u.length<<1,u.push(p=>f.slot(p));let c=i==null?void 0:i.config.facets;for(let f in s){let p=s[f],m=p[0].facet,g=c&&c[f]||[];if(p.every(O=>O.type==0))if(o[m.id]=l.length<<1|1,ih(g,p))l.push(i.facet(m));else{let O=m.combine(p.map(k=>k.value));l.push(i&&m.compare(O,i.facet(m))?i.facet(m):O)}else{for(let O of p)O.type==0?(o[O.id]=l.length<<1|1,l.push(O.value)):(o[O.id]=u.length<<1,u.push(k=>O.dynamicSlot(k)));o[m.id]=u.length<<1,u.push(O=>cE(O,m,p))}}let h=u.map(f=>f(o));return new Oo(e,a,h,o,l,s)}}function hE(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(a,o){let l=r.get(a);if(l!=null){if(l<=o)return;let u=i[l].indexOf(a);u>-1&&i[l].splice(u,1),a instanceof Qu&&n.delete(a.compartment)}if(r.set(a,o),Array.isArray(a))for(let u of a)s(u,o);else if(a instanceof Qu){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(a.compartment)||a.inner;n.set(a.compartment,u),s(u,o)}else if(a instanceof p0)s(a.inner,a.prec);else if(a instanceof Ve)i[o].push(a),a.provides&&s(a.provides,o);else if(a instanceof to)i[o].push(a),a.facet.extensions&&s(a.facet.extensions,gi.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,o)}}return s(t,gi.default),i.reduce((a,o)=>a.concat(o))}function ds(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function bo(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const m0=Y.define(),Nu=Y.define({combine:t=>t.some(e=>e),static:!0}),g0=Y.define({combine:t=>t.length?t[0]:void 0,static:!0}),O0=Y.define(),b0=Y.define(),y0=Y.define(),k0=Y.define({combine:t=>t.length?t[0]:!1});class An{constructor(e,n){this.type=e,this.value=n}static define(){return new fE}}class fE{of(e){return new An(this,e)}}class dE{constructor(e){this.map=e}of(e){return new ae(this,e)}}class ae{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ae(this.type,n)}is(e){return this.type==e}static define(e={}){return new dE(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}ae.reconfigure=ae.define();ae.appendConfig=ae.define();class Fe{constructor(e,n,i,r,s,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&d0(i,n.newLength),s.some(o=>o.type==Fe.time)||(this.annotations=s.concat(Fe.time.of(Date.now())))}static create(e,n,i,r,s,a){return new Fe(e,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Fe.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Fe.time=An.define();Fe.userEvent=An.define();Fe.addToHistory=An.define();Fe.remote=An.define();function pE(t,e){let n=[];for(let i=0,r=0;;){let s,a;if(i=t[i]))s=t[i++],a=t[i++];else if(r=0;r--){let s=i[r](t);s instanceof Fe?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Fe?t=s[0]:t=_0(e,ir(s),!1)}return t}function gE(t){let e=t.startState,n=e.facet(y0),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=S0(i,Lu(e,s,t.changes.newLength),!0))}return i==t?t:Fe.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const OE=[];function ir(t){return t==null?OE:Array.isArray(t)?t:[t]}var Qe=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Qe||(Qe={}));const bE=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Du;try{Du=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function yE(t){if(Du)return Du.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||bE.test(n)))return!0}return!1}function kE(t){return e=>{if(!/\S/.test(e))return Qe.Space;if(yE(e))return Qe.Word;for(let n=0;n-1)return Qe.Word;return Qe.Other}}class ue{constructor(e,n,i,r,s,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let o=0;or.set(u,l)),n=null),r.set(o.value.compartment,o.value.extension)):o.is(ae.reconfigure)?(n=null,i=o.value):o.is(ae.appendConfig)&&(n=null,i=ir(i).concat(o.value));let s;n?s=e.startState.values.slice():(n=Oo.resolve(i,r,this),s=new ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let a=e.startState.facet(Nu)?e.newSelection:e.newSelection.asSingle();new ue(n,e.newDoc,a,s,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:L.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=ir(i.effects);for(let o=1;oa.spec.fromJSON(o,l)))}}return ue.create({doc:e.doc,selection:L.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=Oo.resolve(e.extensions||[],new Map),i=e.doc instanceof Oe?e.doc:Oe.of((e.doc||"").split(n.staticFacet(ue.lineSeparator)||Pu)),r=e.selection?e.selection instanceof L?e.selection:L.single(e.selection.anchor,e.selection.head):L.single(0);return d0(r,i.length),n.staticFacet(Nu)||(r=r.asSingle()),new ue(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(ue.tabSize)}get lineBreak(){return this.facet(ue.lineSeparator)||` +`}get readOnly(){return this.facet(k0)}phrase(e,...n){for(let i of this.facet(ue.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(m0))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return kE(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-i,o=e-i;for(;a>0;){let l=tt(n,a,!1);if(s(n.slice(l,a))!=Qe.Word)break;a=l}for(;ot.length?t[0]:4});ue.lineSeparator=g0;ue.readOnly=k0;ue.phrases=Y.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});ue.languageData=m0;ue.changeFilter=O0;ue.transactionFilter=b0;ue.transactionExtender=y0;Jo.reconfigure=ae.define();function pn(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let a=r[s],o=i[s];if(o===void 0)i[s]=a;else if(!(o===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](o,a);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Ti{eq(e){return this==e}range(e,n=e){return $u.create(e,n,this)}}Ti.prototype.startSide=Ti.prototype.endSide=0;Ti.prototype.point=!1;Ti.prototype.mapMode=Je.TrackDel;let $u=class E0{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new E0(e,n,i)}};function Mu(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class rh{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let a=r,o=s.length;;){if(a==o)return a;let l=a+o>>1,u=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return u>=0?a:o;u>=0?o=l:a=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);sp||f==p&&u.startSide>0&&u.endSide<=0)continue;(p-f||u.endSide-u.startSide)<0||(a<0&&(a=f),u.point&&(o=Math.max(o,p-f)),i.push(u),r.push(f-a),s.push(p-a))}return{mapped:i.length?new rh(r,s,i,o):null,pos:a}}}class me{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new me(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(Mu)),this.isEmpty)return n.length?me.of(n):this;let o=new T0(this,null,-1).goto(0),l=0,u=[],c=new Yn;for(;o.value||l=0){let h=n[l++];c.addInner(h.from,h.to,h.value)||u.push(h)}else o.rangeIndex==1&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&e<=s+a.length&&a.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Ps.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ps.from(e).goto(n)}static compare(e,n,i,r,s=-1){let a=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),o=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=sd(a,o,i),u=new Yr(a,l,s),c=new Yr(o,l,s);i.iterGaps((h,f,p)=>ad(u,h,c,f,p,r)),i.empty&&i.length==0&&ad(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),a=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let o=sd(s,a),l=new Yr(s,o,0).goto(i),u=new Yr(a,o,0).goto(i);for(;;){if(l.to!=u.to||!Bu(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,s=-1){let a=new Yr(e,null,s).goto(n),o=n,l=a.openStart;for(;;){let u=Math.min(a.to,i);if(a.point){let c=a.activeForPoint(a.to),h=a.pointFromo&&(r.span(o,u,a.active,l),l=a.openEnd(u));if(a.to>i)return l+(a.point&&a.to>i?1:0);o=a.to,a.next()}}static of(e,n=!1){let i=new Yn;for(let r of e instanceof $u?[e]:n?SE(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return me.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=me.empty;r=r.nextLayer)n=new me(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}me.empty=new me([],[],null,-1);function SE(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(Mu);e=i}return t}me.empty.nextLayer=me.empty;class Yn{finishChunk(e){this.chunks.push(new rh(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Yn)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(me.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=me.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function sd(t,e,n){let i=new Map;for(let s of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new T0(a,n,i,s));return r.length==1?r[0]:new Ps(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)wl(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)wl(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),wl(this.heap,0)}}}function wl(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Yr{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ps.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){_a(this.active,e),_a(this.activeTo,e),_a(this.activeRank,e),this.minActive=od(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;Ea(this.active,n,i),Ea(this.activeTo,n,r),Ea(this.activeRank,n,s),e&&Ea(e,n,this.cursor.from),this.minActive=od(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&_a(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function ad(t,e,n,i,r,s){t.goto(e),n.goto(i);let a=i+r,o=i,l=i-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,h=Math.min(c,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Bu(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(o,h,t.point,n.point):h>o&&!Bu(t.active,n.active)&&s.compareRange(o,h,t.active,n.active),c>a)break;o=c,u<=0&&t.next(),u>=0&&n.next()}}function Bu(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function od(t,e){let n=-1,i=1e9;for(let r=0;r=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=tt(t,r)}return i===!0?-1:t.length}const Fu="ͼ",ld=typeof Symbol>"u"?"__"+Fu:Symbol.for(Fu),Zu=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ud=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qn{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,o,l,u){let c=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&h[1]=="keyframes";if(h&&o==null)return l.push(a[0]+";");for(let p in o){let m=o[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>a.map(O=>g.replace(/&/,O))).reduce((g,O)=>g.concat(O)),m,l);else if(m&&typeof m=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),m,c,f)}else m!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+m+";")}(c.length||f)&&l.push((i&&!h&&!u?a.map(i):a).join(", ")+" {"+c.join(" ")+"}")}for(let a in e)s(r(a),e[a],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=ud[ld]||1;return ud[ld]=e+1,Fu+e.toString(36)}static mount(e,n,i){let r=e[Zu],s=i&&i.nonce;r?s&&r.setNonce(s):r=new _E(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let cd=new Map;class _E{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=cd.get(i);if(s)return e[Zu]=s;this.sheet=new r.CSSStyleSheet,cd.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Zu]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let a=0;a-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},EE=typeof navigator<"u"&&/Mac/.test(navigator.platform),TE=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ke=0;Ke<10;Ke++)Vn[48+Ke]=Vn[96+Ke]=String(Ke);for(var Ke=1;Ke<=24;Ke++)Vn[Ke+111]="F"+Ke;for(var Ke=65;Ke<=90;Ke++)Vn[Ke]=String.fromCharCode(Ke+32),vs[Ke]=String.fromCharCode(Ke);for(var Al in Vn)vs.hasOwnProperty(Al)||(vs[Al]=Vn[Al]);function xE(t){var e=EE&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||TE&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?vs:Vn)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function yo(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function zu(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function wE(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function no(t,e){if(!e.anchorNode)return!1;try{return zu(t,e.anchorNode)}catch{return!1}}function Rs(t){return t.nodeType==3?wi(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function ps(t,e,n,i){return n?hd(t,e,n,i,-1)||hd(t,e,n,i,1):!1}function xi(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function ko(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function hd(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:En(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=xi(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?En(t):0}else return!1}}function En(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function sh(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function AE(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function x0(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function CE(t,e,n,i,r,s,a,o){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let f,p=c==l.body,m=1,g=1;if(p)f=AE(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let T=c.getBoundingClientRect();({scaleX:m,scaleY:g}=x0(c,T)),f={left:T.left,right:T.left+c.clientWidth*m,top:T.top,bottom:T.top+c.clientHeight*g}}let O=0,k=0;if(r=="nearest")e.top0&&e.bottom>f.bottom+k&&(k=e.bottom-f.bottom+k+a)):e.bottom>f.bottom&&(k=e.bottom-f.bottom+a,n<0&&e.top-k0&&e.right>f.right+O&&(O=e.right-f.right+O+s)):e.right>f.right&&(O=e.right-f.right+s,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class vE{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?En(n):0),i,Math.min(e.focusOffset,i?En(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Hi=null;function w0(t){if(t.setActive)return t.setActive();if(Hi)return t.focus(Hi);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Hi==null?{get preventScroll(){return Hi={preventScroll:!0},!0}}:void 0),!Hi){Hi=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function P0(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=En(n)}else if(n.parentNode&&!ko(n))i=xi(n),n=n.parentNode;else return null}}function v0(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return h.domBoundsAround(e,n,u);if(f>=e&&r==-1&&(r=l,s=u),u>n&&h.dom.parentNode==this.dom){a=l,o=c;break}c=f,u=f+h.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=ah){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function I0(t,e,n,i,r,s,a,o,l){let{children:u}=t,c=u.length?u[e]:null,h=s.length?s[s.length-1]:null,f=h?h.breakAfter:a;if(!(e==i&&c&&!a&&!f&&s.length<2&&c.merge(n,r,s.length?h:null,n==0,o,l))){if(i0&&(!a&&s.length&&c.merge(n,c.length,s[0],!1,o,0)?c.breakAfter=s.shift().breakAfter:(n2);var V={mac:gd||/Mac/.test(mt.platform),windows:/Win/.test(mt.platform),linux:/Linux|X11/.test(mt.platform),ie:el,ie_version:N0?Xu.documentMode||6:Hu?+Hu[1]:Wu?+Wu[1]:0,gecko:pd,gecko_version:pd?+(/Firefox\/(\d+)/.exec(mt.userAgent)||[0,0])[1]:0,chrome:!!Cl,chrome_version:Cl?+Cl[1]:0,ios:gd,android:/Android\b/.test(mt.userAgent),webkit:md,safari:L0,webkit_version:md?+(/\bAppleWebKit\/(\d+)/.exec(mt.userAgent)||[0,0])[1]:0,tabSize:Xu.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const QE=256;class qt extends Se{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof qt)||this.length-(n-e)+i.length>QE||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new qt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new it(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return NE(this.dom,e,n)}}class Tn extends Se{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(A0(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,a){return i&&(!(i instanceof Tn&&i.mark.eq(this.mark))||e&&s<=0||ne&&n.push(i=e&&(r=s),i=l,s++}let a=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Tn(this.mark,n,a)}domAtPos(e){return D0(this,e)}coordsAt(e,n){return M0(this,e,n)}}function NE(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,a=0;e==0&&n<0||e==i&&n>=0?V.chrome||V.gecko||(e?(r--,a=1):s=0)?0:o.length-1];return V.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(o,u=>u.width)||l),a?sh(l,a<0):l||null}class Fn extends Se{static create(e,n,i){return new Fn(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Fn.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,a){return i&&(!(i instanceof Fn)||!this.widget.compare(i.widget)||e>0&&s<=0||n0)?it.before(this.dom):it.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let a=this.side?this.side<0:e>0;for(let o=a?r.length-1:0;s=r[o],!(e>0?o==0:o==r.length-1||s.top0?it.before(this.dom):it.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Oe.empty}get isHidden(){return!0}}qt.prototype.children=Fn.prototype.children=fr.prototype.children=ah;function D0(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;rs&&e0;s--){let a=i[s-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let s=r;s0&&e instanceof Tn&&r.length&&(i=r[r.length-1])instanceof Tn&&i.mark.eq(e.mark)?$0(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function M0(t,e,n){let i=null,r=-1,s=null,a=-1;function o(u,c){for(let h=0,f=0;h=c&&(p.children.length?o(p,c-f):(!s||s.isHidden&&n>0)&&(m>c||f==m&&p.getSide()>0)?(s=p,a=c-f):(f-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function qu(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function DE(t){let e=Object.create(null);for(let n=0;n0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){oh(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){$0(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=Yu(n,this.attrs||{})),i&&(this.attrs=Yu({class:i},this.attrs||{}))}domAtPos(e){return D0(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(A0(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(qu(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Se.get(r)instanceof Tn;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Se.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!V.ios||!this.children.some(s=>s instanceof qt))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof qt)||/[^ -~]/.test(i.text))return null;let r=Rs(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=M0(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=n){if(s instanceof Xe)return s;if(a>n)break}r=a+s.breakAfter}return null}}class Sn extends Se{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,a){return i&&(!(i instanceof Sn)||!this.widget.compare(i.widget)||e>0&&s<=0||n0}}class Cn{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var yt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(yt||(yt={}));class te extends Ti{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ta(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new jn(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=B0(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new jn(e,i,r,n,e.widget||null,!0)}static line(e){return new na(e)}static set(e,n=!1){return me.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}te.none=me.empty;class ta extends te{constructor(e){let{start:n,end:i}=B0(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof ta&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&oh(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}ta.prototype.point=!1;class na extends te{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof na&&this.spec.class==e.spec.class&&oh(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}na.prototype.mapMode=Je.TrackBefore;na.prototype.point=!0;class jn extends te{constructor(e,n,i,r,s,a){super(n,i,s,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Je.TrackBefore:Je.TrackAfter:Je.TrackDel}get type(){return this.startSide!=this.endSide?yt.WidgetRange:this.startSide<=0?yt.WidgetBefore:yt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof jn&&$E(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}jn.prototype.point=!0;function B0(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function $E(t,e){return t==e||!!(t&&e&&t.compare(e))}function Vu(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class ms{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Sn&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xe),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Ta(new fr(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Sn)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:a,done:o}=this.cursor.next(this.skip);if(this.skip=0,o)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(Ta(new qt(this.text.slice(this.textOff,this.textOff+r)),n),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,a){if(this.disallowBlockEffectsFor[a]&&i instanceof jn){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=n-e;if(i instanceof jn)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Sn(i.widget||dr.block,o,i));else{let l=Fn.create(i.widget||dr.inline,o,o?0:i.startSide),u=this.atCursorPos&&!l.isEditable&&s<=r.length&&(e0),c=!l.isEditable&&(er.length||i.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(Ta(new fr(1),r),s),s=r.length+Math.max(0,s-r.length)),h.append(Ta(l,r),s),this.atCursorPos=c,this.pendingBuffer=c?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let a=new ms(e,n,i,s);return a.openEnd=me.spans(r,n,i,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function Ta(t,e){for(let n of e)t=new Tn(n,[t],t.length);return t}class dr extends Cn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}dr.inline=new dr("span");dr.block=new dr("div");var ve=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(ve||(ve={}));const Ai=ve.LTR,lh=ve.RTL;function U0(t){let e=[];for(let n=0;n=n){if(o.level==i)return a;(s<0||(r!=0?r<0?o.fromn:e[s].level>o.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function Z0(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;g-=3)if(Jt[g+1]==-p){let O=Jt[g+2],k=O&2?r:O&4?O&1?s:r:0;k&&(ke[h]=ke[Jt[g]]=k),o=g;break}}else{if(Jt.length==189)break;Jt[o++]=h,Jt[o++]=f,Jt[o++]=l}else if((m=ke[h])==2||m==1){let g=m==r;l=g?0:1;for(let O=o-3;O>=0;O-=3){let k=Jt[O+2];if(k&2)break;if(g)Jt[O+2]|=2;else{if(k&4)break;Jt[O+2]|=4}}}}}function zE(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:t,o=rl;)m==O&&(m=n[--g].from,O=g?n[g-1].to:t),ke[--m]=p;l=c}else s=u,l++}}}function Gu(t,e,n,i,r,s,a){let o=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;ll&&a.push(new Zn(l,g.from,p));let O=g.direction==Ai!=!(p%2);Ku(t,O?i+1:i,r,g.inner,g.from,g.to,a),l=g.to}m=g.to}else{if(m==n||(c?ke[m]!=o:ke[m]==o))break;m++}f?Gu(t,l,m,i+1,r,f,a):le;){let c=!0,h=!1;if(!u||l>s[u-1].to){let g=ke[l-1];g!=o&&(c=!1,h=g==16)}let f=!c&&o==1?[]:null,p=c?i:i+1,m=l;e:for(;;)if(u&&m==s[u-1].to){if(h)break e;let g=s[--u];if(!c)for(let O=g.from,k=u;;){if(O==e)break e;if(k&&s[k-1].to==O)O=s[--k].from;else{if(ke[O-1]==o)break e;break}}if(f)f.push(g);else{g.toke.length;)ke[ke.length]=256;let i=[],r=e==Ai?0:1;return Ku(t,r,r,n,0,t.length,i),i}function z0(t){return[new Zn(0,t,0)]}let X0="";function WE(t,e,n,i,r){var s;let a=i.head-t.from,o=Zn.find(e,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[o],u=l.side(r,n);if(a==u){let f=o+=r?1:-1;if(f<0||f>=e.length)return null;l=e[o=f],a=l.side(!r,n),u=l.side(r,n)}let c=tt(t.text,a,l.forward(r,n));(cl.to)&&(c=u),X0=t.text.slice(Math.min(a,c),Math.max(a,c));let h=o==(r?e.length-1:0)?null:e[o+(r?1:-1)];return h&&c==u&&h.level+(r?0:1)t.some(e=>e)}),K0=Y.define({combine:t=>t.some(e=>e)}),J0=Y.define();class sr{constructor(e,n="nearest",i="nearest",r=5,s=5,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new sr(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new sr(L.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const xa=ae.define({map:(t,e)=>t.map(e)});function Ot(t,e,n){let i=t.facet(q0);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const tl=Y.define({combine:t=>t.length?t[0]:!0});let YE=0;const ss=Y.define();class Ze{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.extension=s(this)}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:a}=n||{};return new Ze(YE++,e,i,r,o=>{let l=[ss.of(o)];return a&&l.push(Is.of(u=>{let c=u.plugin(o);return c?a(c):te.none})),s&&l.push(s(o)),l})}static fromClass(e,n){return Ze.define(i=>new e(i),n)}}class Pl{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Ot(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Ot(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Ot(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const eO=Y.define(),uh=Y.define(),Is=Y.define(),tO=Y.define(),ch=Y.define(),nO=Y.define();function bd(t,e){let n=t.state.facet(nO);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return me.spans(i,e.from,e.to,{point(){},span(s,a,o,l){let u=s-e.from,c=a-e.from,h=r;for(let f=o.length-1;f>=0;f--,l--){let p=o[f].spec.bidiIsolate,m;if(p==null&&(p=HE(e.text,u,c)),l>0&&h.length&&(m=h[h.length-1]).to==u&&m.direction==p)m.to=c,h=m.inner;else{let g={from:u,to:c,direction:p,inner:[]};h.push(g),h=g.inner}}}}),r}const iO=Y.define();function rO(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(iO)){let a=s(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}const as=Y.define();class $t{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new $t(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toAc)break;s+=2}if(!l)return i;new $t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),a=l.toA,o=l.toB}}}class So{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=We.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,a,o,l)=>r.push(new $t(s,a,o,l))),this.changedRanges=r}static create(e,n,i){return new So(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class yd extends Se{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Xe],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new $t(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!eT(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?VE(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;i=new $t(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(V.ie||V.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,o=this.updateDeco(),l=KE(a,o,e.changes);return i=$t.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=V.chrome||V.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||r.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[a]:null;if(!o)break;let{fromA:l,toA:u,fromB:c,toB:h}=o,f,p,m,g;if(i&&i.range.fromBc){let I=ms.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),v=ms.build(this.view.state.doc,i.range.toB,h,this.decorations,this.dynamicDecorationMap);p=I.breakAtStart,m=I.openStart,g=v.openEnd;let w=this.compositionView(i);v.breakAtStart?w.breakAfter=1:v.content.length&&w.merge(w.length,w.length,v.content[0],!1,v.openStart,0)&&(w.breakAfter=v.content[0].breakAfter,v.content.shift()),I.content.length&&w.merge(0,0,I.content[I.content.length-1],!0,0,I.openEnd)&&I.content.pop(),f=I.content.concat(w).concat(v.content)}else({content:f,breakAtStart:p,openStart:m,openEnd:g}=ms.build(this.view.state.doc,c,h,this.decorations,this.dynamicDecorationMap));let{i:O,off:k}=s.findPos(u,1),{i:T,off:A}=s.findPos(l,-1);I0(this,T,A,O,k,f,p,m,g)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new qt(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Tn(r,[n],n.length);let i=new Xe;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let o=Se.get(s);o&&o!=a&&(o.dom=null),a.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&no(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let a=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(o.anchor)),u=o.empty?l:this.moveToLine(this.domAtPos(o.head));if(V.gecko&&o.empty&&!this.hasComposition&&qE(l)){let h=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(h,l.node.childNodes[l.offset]||null)),l=u=new it(h,0),a=!0}let c=this.view.observer.selectionRange;(a||!c.focusNode||(!ps(l.node,l.offset,c.anchorNode,c.anchorOffset)||!ps(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,o))&&(this.view.observer.ignore(()=>{V.android&&V.chrome&&this.dom.contains(c.focusNode)&&JE(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=yo(this.view.root);if(h)if(o.empty){if(V.gecko){let f=jE(l.node,l.offset);if(f&&f!=3){let p=(f==1?P0:v0)(l.node,l.offset);p&&(l=new it(p.node,p.offset))}}h.collapse(l.node,l.offset),o.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=o.bidiLevel)}else if(h.extend){h.collapse(l.node,l.offset);try{h.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();o.anchor>o.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new it(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new it(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&ps(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=yo(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=Xe.find(this,n.head);if(!a)return;let o=a.posAtStart;if(n.head==o||n.head==o+a.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r=0;r--){let s=Se.get(n.childNodes[r]);s instanceof Xe&&(i=s.domAtPos(s.length))}return i?new it(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=Se.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;a--){let o=this.children[a],l=s-o.breakAfter,u=l-o.length;if(le||o.covers(1))&&(!i||o instanceof Xe&&!(i instanceof Xe&&n>=0)))i=o,r=u;else if(i&&u==e&&l==e&&o instanceof Sn&&Math.abs(n)<2){if(o.deco.startSide<0)break;a&&(i=null)}s=u}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Xe))return null;for(;r.children.length;){let{i:o,off:l}=r.childPos(i,1);for(;;o++){if(o==r.children.length)return null;if((r=r.children[o]).length)break}i=l}if(!(r instanceof qt))return null;let s=tt(r.text,i);if(s==i)return null;let a=wi(r.dom,i,s).getClientRects();for(let o=0;oMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,l=this.view.textDirection==ve.LTR;for(let u=0,c=0;cr)break;if(u>=i){let p=h.dom.getBoundingClientRect();if(n.push(p.height),a){let m=h.dom.lastChild,g=m?Rs(m):[];if(g.length){let O=g[g.length-1],k=l?O.right-p.left:p.right-O.left;k>o&&(o=k,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?ve.RTL:ve.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Xe){let a=s.measureTextSize();if(a)return a}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Rs(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new R0(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.length;if(a>i){let o=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(te.replace({widget:new kd(o),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return te.set(e)}updateDeco(){let e=0,n=this.view.state.facet(Is).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(tO).map((s,a)=>{let o=typeof s=="function";return o&&(i=!0),o?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(me.join(r))),this.decorations=[...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=rO(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:o,offsetHeight:l}=this.view.scrollDOM;CE(this.view.scrollDOM,a,n.head{ie.from&&(n=!0)}),n}function tT(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return L.cursor(e);s==0?n=1:s==r.length&&(n=-1);let a=s,o=s;n<0?a=tt(r.text,s,!1):o=tt(r.text,s);let l=i(r.text.slice(a,o));for(;a>0;){let u=tt(r.text,a,!1);if(i(r.text.slice(u,a))!=l)break;a=u}for(;ot?e.left-t:Math.max(0,t-e.right)}function iT(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function vl(t,e){return t.tope.top+1}function Sd(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function ec(t,e,n){let i,r,s,a,o=!1,l,u,c,h;for(let m=t.firstChild;m;m=m.nextSibling){let g=Rs(m);for(let O=0;OA||a==A&&s>T){i=m,r=k,s=T,a=A;let I=A?n0?O0)}T==0?n>k.bottom&&(!c||c.bottomk.top)&&(u=m,h=k):c&&vl(c,k)?c=_d(c,k.bottom):h&&vl(h,k)&&(h=Sd(h,k.top))}}if(c&&c.bottom>=n?(i=l,r=c):h&&h.top<=n&&(i=u,r=h),!i)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return Ed(i,f,n);if(o&&i.contentEditable!="false")return ec(i,f,n);let p=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:p}}function Ed(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,a=0;for(let o=0;on?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&h=(c.left+c.right)/2,p=f;if((V.chrome||V.gecko)&&wi(t,o).getBoundingClientRect().left==c.right&&(p=!f),h<=0)return{node:t,offset:o+(p?1:0)};r=o+(p?1:0),s=h}}}return{node:t,offset:r>-1?r:a>0?t.nodeValue.length:0}}function aO(t,e,n,i=-1){var r,s;let a=t.contentDOM.getBoundingClientRect(),o=a.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:h}=e,f=h-o;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let I=t.viewState.heightOracle.textHeight/2,v=!1;l=t.elementAtHeight(f),l.type!=yt.Text;)for(;f=i>0?l.bottom+I:l.top-I,!(f>=0&&f<=u);){if(v)return n?null:0;v=!0,i=-i}h=o+f;let p=l.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:Td(t,a,l,c,h);let m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,O=g.elementFromPoint(c,h);O&&!t.contentDOM.contains(O)&&(O=null),O||(c=Math.max(a.left+1,Math.min(a.right-1,c)),O=g.elementFromPoint(c,h),O&&!t.contentDOM.contains(O)&&(O=null));let k,T=-1;if(O&&((r=t.docView.nearest(O))===null||r===void 0?void 0:r.isEditable)!=!1){if(m.caretPositionFromPoint){let I=m.caretPositionFromPoint(c,h);I&&({offsetNode:k,offset:T}=I)}else if(m.caretRangeFromPoint){let I=m.caretRangeFromPoint(c,h);I&&({startContainer:k,startOffset:T}=I,(!t.contentDOM.contains(k)||V.safari&&rT(k,T,c)||V.chrome&&sT(k,T,c))&&(k=void 0))}}if(!k||!t.docView.dom.contains(k)){let I=Xe.find(t.docView,p);if(!I)return f>l.top+l.height/2?l.to:l.from;({node:k,offset:T}=ec(I.dom,c,h))}let A=t.docView.nearest(k);if(!A)return null;if(A.isWidget&&((s=A.dom)===null||s===void 0?void 0:s.nodeType)==1){let I=A.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let o=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-o)*.5)/o);s+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+Uu(a,s,t.state.tabSize)}function rT(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return wi(t,i-1,i).getBoundingClientRect().left>n}function sT(t,e,n){if(e!=0)return!1;for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():wi(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function tc(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==yt.Text))return i}return n}function aT(t,e,n,i){let r=tc(t,e.head),s=!i||r.type!=yt.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let a=t.dom.getBoundingClientRect(),o=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(o==ve.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(l!=null)return L.cursor(l,n?-1:1)}return L.cursor(n?r.to:r.from,n?-1:1)}function xd(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let o=e,l=null;;){let u=WE(r,s,a,o,n),c=X0;if(!u){if(r.number==(n?t.state.doc.lines:1))return o;c=` +`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return o}else{if(!i)return u;l=i(c)}o=u}}function oT(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let a=i(s);return r==Qe.Space&&(r=a),r==a}}function lT(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return L.cursor(r,e.assoc);let a=e.goalColumn,o,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),c=t.documentTop;if(u)a==null&&(a=u.left-l.left),o=s<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-p.from))),o=(s<0?p.top:p.bottom)+c}let h=l.left+a,f=i??t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=o+(f+p)*s,g=aO(t,{x:h,y:m},!1,s);if(ml.bottom||(s<0?gr)){let O=t.docView.coordsForChar(g),k=!O||m{if(e>s&&er(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:L.cursor(i,inull),V.gecko&&xT(e.contentDOM.ownerDocument)}handleEvent(e){!OT(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=cT(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,o=i[s];o&&a!=!o.handlers.length&&(r.removeEventListener(s,this.handleEvent),o=null),o||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&lO.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),V.android&&V.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return V.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=oO.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||hT.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:V.safari&&!V.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function wd(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){Ot(n.state,r)}}}function cT(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec;if(r&&r.domEventHandlers)for(let s in r.domEventHandlers){let a=r.domEventHandlers[s];a&&n(s).handlers.push(wd(i.value,a))}if(r&&r.domEventObservers)for(let s in r.domEventObservers){let a=r.domEventObservers[s];a&&n(s).observers.push(wd(i.value,a))}}for(let i in Vt)n(i).handlers.push(Vt[i]);for(let i in Bt)n(i).observers.push(Bt[i]);return e}const oO=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],hT="dthko",lO=[16,17,18,20,91,92,224,225],wa=6;function Aa(t){return Math.max(0,t)*.7+8}function fT(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class dT{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=PE(e.contentDOM),this.atoms=e.state.facet(ch).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(ue.allowMultipleSelections)&&pT(e,n),this.dragging=gT(e,n)&&fO(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&fT(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,s=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=rO(this.view);e.clientX-a.left<=s.left+wa?i=-Aa(s.left-e.clientX):e.clientX+a.right>=s.right-wa&&(i=Aa(e.clientX-s.right)),e.clientY-a.top<=s.top+wa?r=-Aa(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-wa&&(r=Aa(e.clientY-s.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;in.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function pT(t,e){let n=t.state.facet(W0);return n.length?n[0](e):V.mac?e.metaKey:e.ctrlKey}function mT(t,e){let n=t.state.facet(H0);return n.length?n[0](e):V.mac?!e.altKey:!e.ctrlKey}function gT(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=yo(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function OT(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Se.get(n))&&i.ignoreEvent(e))return!1;return!0}const Vt=Object.create(null),Bt=Object.create(null),uO=V.ie&&V.ie_version<15||V.ios&&V.webkit_version<604;function bT(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),cO(t,n.value)},50)}function cO(t,e){let{state:n}=t,i,r=1,s=n.toText(e),a=s.lines==n.selection.ranges.length;if(nc!=null&&n.selection.ranges.every(l=>l.empty)&&nc==s.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let h=n.toText((a?s.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:L.cursor(u.from+h.length)}})}else a?i=n.changeByRange(l=>{let u=s.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:L.cursor(l.from+u.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Bt.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Vt.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Bt.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Bt.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Vt.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(Y0))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=ST(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new dT(t,e,n,i)),i&&t.observer.ignore(()=>{w0(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function Ad(t,e,n,i){if(i==1)return L.cursor(e,n);if(i==2)return tT(t.state,e,n);{let r=Xe.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:s.from,o=r?r.posAtEnd:s.to;return ot>=e.top&&t<=e.bottom,Cd=(t,e,n)=>hO(e,n)&&t>=n.left&&t<=n.right;function yT(t,e,n,i){let r=Xe.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let a=r.coordsAt(s,-1);if(a&&Cd(n,i,a))return-1;let o=r.coordsAt(s,1);return o&&Cd(n,i,o)?1:a&&hO(i,a)?-1:1}function Pd(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:yT(t,n,e.clientX,e.clientY)}}const kT=V.ie&&V.ie_version<=11;let vd=null,Rd=0,Id=0;function fO(t){if(!kT)return t.detail;let e=vd,n=Id;return vd=t,Id=Date.now(),Rd=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Rd+1)%3:1}function ST(t,e){let n=Pd(t,e),i=fO(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,o){let l=Pd(t,s),u,c=Ad(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!a){let h=Ad(t,n.pos,n.bias,i),f=Math.min(h.from,c.from),p=Math.max(h.to,c.to);c=f1&&(u=_T(r,l.pos))?u:o?r.addRange(c):L.create([c])}}}function _T(t,e){for(let n=0;n=e)return L.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Vt.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=L.range(s,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Vt.dragend=t=>(t.inputState.draggedContent=null,!1);function Qd(t,e,n,i){if(!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,a=i&&s&&mT(t,e)?{from:s.from,to:s.to}:null,o={from:r,insert:n},l=t.state.changes(a?[a,o]:o);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Vt.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&Qd(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(i[a]=o.result),s()},o.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Qd(t,e,i,!0),!0}return!1};Vt.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=uO?null:e.clipboardData;return n?(cO(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(bT(t),!1)};function ET(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function TT(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let a=t.doc.lineAt(s);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let nc=null;Vt.copy=Vt.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=TT(t.state);if(!n&&!r)return!1;nc=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=uO?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(ET(t,n),!1)};const dO=An.define();function pO(t,e){let n=[];for(let i of t.facet(j0)){let r=i(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:dO.of(!0)}):null}function mO(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=pO(t.state,e);n?t.dispatch(n):t.update([])}},10)}Bt.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),mO(t)};Bt.blur=t=>{t.observer.clearSelectionRange(),mO(t)};Bt.compositionstart=Bt.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};Bt.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,V.chrome&&V.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};Bt.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Vt.beforeinput=(t,e)=>{var n;let i;if(V.chrome&&V.android&&(i=oO.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return V.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),V.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Bt.compositionend(t,e),20),!1};const Nd=new Set;function xT(t){Nd.has(t)||(Nd.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Ld=["pre-wrap","normal","pre-line","break-spaces"];class wT{constructor(e){this.lineWrapping=e,this.doc=Oe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Ld.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>ro&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return ht.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,a=i.doc;for(let o=r.length-1;o>=0;o--){let{fromA:l,toA:u,fromB:c,toB:h}=r[o],f=s.lineAt(l,Pe.ByPosNoHeight,i.setDoc(n),0,0),p=f.to>=u?f:s.lineAt(u,Pe.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;o>0&&f.from<=r[o-1].toA;)l=r[o-1].fromA,c=r[o-1].fromB,o--,ls*2){let o=e[n-1];o.break?e.splice(--n,1,o.left,null,o.right):e.splice(--n,1,o.left,o.right),i+=1+o.break,r-=o.size}else if(s>r*2){let o=e[i];o.break?e.splice(i,1,o.left,null,o.right):e.splice(i,1,o.left,o.right),i+=2+o.break,s-=o.size}else break;else if(r=s&&a(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class xt extends gO{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new an(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof xt||r instanceof je&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof je?r=new xt(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ht.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class je extends ht{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,a,o=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);a=l/s,this.length>s+1&&(o=(this.height-l)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:o}}blockAt(e,n,i,r){let{firstLine:s,lastLine:a,perLine:o,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let s=i[i.length-1];s instanceof je?i[i.length-1]=new je(s.length+r):i.push(null,new je(r-1))}if(e>0){let s=i[0];s instanceof je?i[0]=new je(e+s.length):i.unshift(new je(e-1),null)}return ht.of(i)}decomposeLeft(e,n){n.push(new je(e-1),null)}decomposeRight(e,n){n.push(null,new je(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],o=Math.max(n,r.from),l=-1;for(r.from>n&&a.push(new je(r.from-n-1).updateHeight(e,n));o<=s&&r.more;){let c=e.doc.lineAt(o).length;a.length&&a.push(null);let h=r.heights[r.index++];l==-1?l=h:Math.abs(h-l)>=ro&&(l=-2);let f=new xt(c,h);f.outdated=!1,a.push(f),o+=c+1}o<=s&&a.push(null,new je(s-o).updateHeight(e,o));let u=ht.of(a);return(l<0||Math.abs(u.height-this.height)>=ro||Math.abs(l-this.heightMetrics(e,n).perLine)>=ro)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class CT extends ht{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return eo))return u;let c=n==Pe.ByPosNoHeight?Pe.ByPosNoHeight:Pe.ByPos;return l?u.join(this.right.lineAt(o,c,i,a,o)):this.left.lineAt(o,c,i,r,s).join(u)}forEachLine(e,n,i,r,s,a){let o=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,o,l,a);else{let u=this.lineAt(l,Pe.ByPos,i,r,s);e=e&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,o,l,a)}}replace(e,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let o of i)s.push(o);if(e>0&&Dd(s,a-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?ht.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:a}=this,o=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=o+a.length&&r.more?l=a=a.updateHeight(e,o,i,r):a.updateHeight(e,o,i),l?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Dd(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof je&&(i=t[e+1])instanceof je&&t.splice(e-1,3,new je(n.length+1+i.length))}const PT=5;class hh{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof xt?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new xt(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=PT)&&this.addLineDeco(r,s,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new xt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new je(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof xt)return e;let n=new xt(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof xt)&&!this.isCovered?this.nodes.push(new xt(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let f=c.getBoundingClientRect();s=Math.max(s,f.left),a=Math.min(a,f.right),o=Math.max(o,f.top),l=u==t.parentNode?f.bottom:Math.min(l,f.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:o-(n.top+e),bottom:Math.max(o,l)-(n.top+e)}}function QT(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Il{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new wT(n),this.stateDeco=e.facet(Is).filter(i=>typeof i!="function"),this.heightMap=ht.empty().applyChanges(this.stateDeco,Oe.empty,this.heightOracle.setDoc(e.doc),[new $t(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=te.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);e.push(new Ca(s,a))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Md:new fh(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(os(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Is).filter(c=>typeof c!="function");let r=e.changedRanges,s=$t.extendWithRanges(r,vT(i,this.stateDeco,e?e.changes:We.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=a&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(K0)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ve.RTL:ve.LTR;let a=this.heightOracle.mustRefreshForWrapping(s),o=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let u=0,c=0;if(o.width&&o.height){let{scaleX:I,scaleY:v}=x0(n,o);(I>.005&&Math.abs(this.scaleX-I)>.005||v>.005&&Math.abs(this.scaleY-v)>.005)&&(this.scaleX=I,this.scaleY=v,u|=8,a=l=!0)}let h=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=C0(e.scrollDOM);let m=(this.printing?QT:IT)(n,this.paddingTop),g=m.top-this.pixelViewport.top,O=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let T=o.width;if((this.contentDOMWidth!=T||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let I=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(I)&&(a=!0),a||r.lineWrapping&&Math.abs(T-this.contentDOMWidth)>r.charWidth){let{lineHeight:v,charWidth:w,textHeight:$}=e.docView.measureTextSize();a=v>0&&r.refresh(s,v,w,$,T/w,I),a&&(e.docView.minWidth=0,u|=8)}g>0&&O>0?c=Math.max(g,O):g<0&&O<0&&(c=Math.min(g,O)),r.heightChanged=!1;for(let v of this.viewports){let w=v.from==this.viewport.from?I:e.docView.measureVisibleLineHeights(v);this.heightMap=(a?ht.empty().applyChanges(this.stateDeco,Oe.empty,this.heightOracle,[new $t(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new AT(v.from,w))}r.heightChanged&&(u|=2)}let A=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return A&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,l=new Ca(r.lineAt(a-i*1e3,Pe.ByHeight,s,0,0).from,r.lineAt(o+(1-i)*1e3,Pe.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(u,Pe.ByPos,s,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=o+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s>1,a=r<<1;if(this.defaultTextDirection!=ve.LTR&&!i)return[];let o=[],l=(u,c,h,f)=>{if(c-uu&&OO.from>=h.from&&O.to<=h.to&&Math.abs(O.from-u)O.fromk));if(!g){if(cO.from<=c&&O.to>=c)){let O=n.moveToLineBoundary(L.cursor(c),!1,!0).head;O>u&&(c=O)}g=new Il(u,c,this.gapSize(h,u,c,f))}o.push(g)};for(let u of this.viewportLines){if(u.lengthu.from&&l(u.from,f,u,c),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];me.spans(e,this.viewport.from,this.viewport.to,{span(r,s){n.push({from:r,to:s})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((r,s)=>r.from!=n[s].from||r.to!=n[s].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||os(this.heightMap.lineAt(e,Pe.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||os(this.heightMap.lineAt(this.scaler.fromDOM(e),Pe.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return os(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ca{constructor(e,n){this.from=e,this.to=n}}function LT(t,e,n){let i=[],r=t,s=0;return me.spans(n,t,e,{span(){},point(a,o){a>r&&(i.push({from:r,to:a}),s+=a-r),r=o}},20),r=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:a}=e[r],o=a-s;if(i<=o)return s+i;i-=o}}function va(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function DT(t,e){for(let n of t)if(e(n))return n}const Md={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class fh{constructor(e,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:o,to:l})=>{let u=n.lineAt(o,Pe.ByPos,e,0,0).top,c=n.lineAt(l,Pe.ByPos,e,0,0).bottom;return r+=c-u,{from:o,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let o of this.viewports)o.domTop=a+(o.top-s)*this.scale,a=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function os(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new an(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>os(r,e)):t._content)}const Ra=Y.define({combine:t=>t.join(" ")}),ic=Y.define({combine:t=>t.indexOf(!0)>-1}),rc=qn.newName(),OO=qn.newName(),bO=qn.newName(),yO={"&light":"."+OO,"&dark":"."+bO};function sc(t,e,n){return new qn(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const $T=sc("."+rc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},yO),ls="￿";class MT{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ls}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=r.nextSibling;if(a==n)break;let o=Se.get(r),l=Se.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:ko(r))||ko(a)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&this.lineBreak(),r=a}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,o;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(o=r.exec(n))&&(s=o.index,a=o[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);i=s+a}}readNode(e){if(e.cmIgnore)return;let n=Se.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(BT(e,i.node,i.offset)?n:0))}}function BT(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let o=s||a?[]:zT(e),l=new MT(o,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=XT(o,this.bounds.from)}else{let o=e.observer.selectionRange,l=s&&s.node==o.focusNode&&s.offset==o.focusOffset||!zu(e.contentDOM,o.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(o.focusNode,o.focusOffset),u=a&&a.node==o.anchorNode&&a.offset==o.anchorOffset||!zu(e.contentDOM,o.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(o.anchorNode,o.anchorOffset),c=e.viewport;if((V.ios||V.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:o}=e.bounds,l=r.from,u=null;(s===8||V.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(V.mac||V.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=L.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Oe.of([" "])}):V.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=L.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Oe.of([" "])}),n){if(V.ios&&t.inputState.flushIOSKey(n)||V.android&&(n.to==r.to&&(n.from==r.from||n.from==r.from-1&&t.state.sliceDoc(n.from,r.from)==" ")&&n.insert.length==1&&n.insert.lines==2&&rr(t.contentDOM,"Enter",13)||(n.from==r.from-1&&n.to==r.to&&n.insert.length==0||s==8&&n.insert.lengthr.head)&&rr(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&n.insert.length==0&&rr(t.contentDOM,"Delete",46)))return!0;let a=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=FT(t,n,i));return t.state.facet(V0).some(u=>u(t,n.from,n.to,a,l))||t.dispatch(l()),!0}else if(i&&!i.main.eq(r)){let a=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),o=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:a,userEvent:o}),!0}else return!1}function FT(t,e,n){let i,r=t.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let o=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(o+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let o=r.changes(e),l=n&&n.main.to<=o.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),c,h=n&&sO(t,n.main.head);if(h){let m=e.insert.length-(e.to-e.from);c={from:h.from,to:h.to-m}}else c=t.state.doc.lineAt(s.head);let f=s.to-e.to,p=s.to-s.from;i=r.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:o,range:l||m.map(o)};let g=m.to-f,O=g-u.length;if(m.to-m.from!=p||t.state.sliceDoc(O,g)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let k=r.changes({from:O,to:g,insert:e.insert}),T=m.to-s.to;return{changes:k,range:l?L.range(Math.max(0,l.anchor+T),Math.max(0,l.head+T)):m.map(k)}})}else i={changes:o,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function ZT(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s0&&o>0&&t.charCodeAt(a-1)==e.charCodeAt(o-1);)a--,o--;if(i=="end"){let l=Math.max(0,s-Math.min(a,o));n-=a+l-s}if(a=a?s-n:0;s-=l,o=s+(o-a),a=s}else if(o=o?s-n:0;s-=l,a=s+(a-o),o=s}return{from:s,toA:a,toB:o}}function zT(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new Bd(n,i)),(r!=n||s!=i)&&e.push(new Bd(r,s))),e}function XT(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?L.single(n+e,i+e):null}const WT={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ql=V.ie&&V.ie_version<=11;class HT{constructor(e){this.view=e,this.active=!1,this.selectionRange=new vE,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(V.ie&&V.ie_version<=11||V.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ql&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){e.type=="change"&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(tl)?i.root.activeElement!=this.dom:!no(i.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(V.ie&&V.ie_version<=11||V.android&&V.chrome)&&!i.state.selection.main.empty&&r.focusNode&&ps(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=yo(e.root);if(!n)return!1;let i=V.safari&&e.root.nodeType==11&&wE(this.dom.ownerDocument)==this.dom&&YT(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=no(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&rr(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&no(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new UT(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=kO(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Ud(n,e.previousSibling||e.target.previousSibling,-1),r=Ud(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Ud(t,e,n){for(;e;){let i=Se.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function Fd(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return ps(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function YT(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Fd(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Fd(t,n):null}class W{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(r=>n(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||RE(e.parent)||document,this.viewState=new $d(e.state||ue.create(e)),e.scrollTo&&e.scrollTo.is(xa)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ss).map(i=>new Pl(i));for(let i of this.plugins)i.update(this);this.observer=new HT(this),this.inputState=new uT(this),this.inputState.ensureHandlers(this.plugins),this.docView=new yd(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let n=e.length==1&&e[0]instanceof Fe?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,o=0,l=null;e.some(f=>f.annotation(dO))?(this.inputState.notifiedFocused=a,o=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=pO(s,a),l||(o=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(ue.phrases)!=this.state.facet(ue.phrases))return this.setState(s);r=So.create(this,s,e),r.flags|=o;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection;h=new sr(p.empty?p:L.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of f.effects)p.is(xa)&&(h=p.value.clip(this.state))}this.viewState.update(r,h),this.bidiCache=_o.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(as)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Ra)!=r.state.facet(Ra)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let f of this.state.facet(Ju))try{f(r)}catch(p){Ot(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!kO(this,c)&&u.force&&rr(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new $d(e),this.plugins=e.facet(ss).map(i=>new Pl(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new yd(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(ss),i=e.state.facet(ss);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new Pl(s));else{let o=this.plugins[a];o.mustUpdate=e,r.push(o)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let o=0;;o++){if(a<0)if(C0(i))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);s=p.from,a=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(o>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(p=>{try{return p.read(this)}catch(m){return Ot(this.state,m),Zd}}),h=So.create(this,this.state,[]),f=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h),f&&this.docViewUpdate());for(let p=0;p1||m<-1){r=r+m,i.scrollTop=r/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let o of this.state.facet(Ju))o(n)}get themeClasses(){return rc+" "+(this.state.facet(ic)?bO:OO)+" "+this.state.facet(Ra)}updateAttrs(){let e=zd(this,eO,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(tl)?"true":"false",class:"cm-content",style:`${V.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),zd(this,uh,n);let i=this.observer.ignore(()=>{let r=qu(this.contentDOM,this.contentAttrs,n),s=qu(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(W.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(as);let e=this.state.facet(W.cspNonce);qn.mount(this.root,this.styleModules.concat($T).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Rl(this,e,xd(this,e,n,i))}moveByGroup(e,n){return Rl(this,e,xd(this,e,n,i=>oT(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return L.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return aT(this,e,n,i)}moveVertically(e,n,i){return Rl(this,e,lT(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),aO(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),a=s[Zn.find(s,e-r.from,-1,n)];return sh(i,a.dir==ve.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(G0)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>qT)return z0(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||Z0(s.isolates,i=bd(this,e))))return s.order;i||(i=bd(this,e));let r=XE(e.text,n,i);return this.bidiCache.push(new _o(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||V.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{w0(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return xa.of(new sr(typeof e=="number"?L.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return xa.of(new sr(L.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ze.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ze.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=qn.newName(),r=[Ra.of(i),as.of(sc(`.${i}`,e))];return n&&n.dark&&r.push(ic.of(!0)),r}static baseTheme(e){return wn.lowest(as.of(sc("."+rc,e,yO)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Se.get(i)||Se.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}W.styleModule=as;W.inputHandler=V0;W.scrollHandler=J0;W.focusChangeEffect=j0;W.perLineTextDirection=G0;W.exceptionSink=q0;W.updateListener=Ju;W.editable=tl;W.mouseSelectionStyle=Y0;W.dragMovesSelection=H0;W.clickAddsSelectionRange=W0;W.decorations=Is;W.outerDecorations=tO;W.atomicRanges=ch;W.bidiIsolatedRanges=nO;W.scrollMargins=iO;W.darkTheme=ic;W.cspNonce=Y.define({combine:t=>t.length?t[0]:""});W.contentAttributes=uh;W.editorAttributes=eO;W.lineWrapping=W.contentAttributes.of({class:"cm-lineWrapping"});W.announce=ae.define();const qT=4096,Zd={};class _o{constructor(e,n,i,r,s,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:ve.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],a=typeof s=="function"?s(t):s;a&&Yu(a,n)}return n}const VT=V.mac?"mac":V.windows?"win":V.linux?"linux":"key";function jT(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,o;for(let l=0;li.concat(r),[]))),n}function KT(t,e,n){return _O(SO(t.state),e,t,n)}let Bn=null;const JT=4e3;function ex(t,e=VT){let n=Object.create(null),i=Object.create(null),r=(a,o)=>{let l=i[a];if(l==null)i[a]=o;else if(l!=o)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,o,l,u,c)=>{var h,f;let p=n[a]||(n[a]=Object.create(null)),m=o.split(/ (?!$)/).map(k=>jT(k,e));for(let k=1;k{let I=Bn={view:A,prefix:T,scope:a};return setTimeout(()=>{Bn==I&&(Bn=null)},JT),!0}]})}let g=m.join(" ");r(g,!1);let O=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});l&&O.run.push(l),u&&(O.preventDefault=!0),c&&(O.stopPropagation=!0)};for(let a of t){let o=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of o){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=a;for(let f in c)c[f].run.push(p=>h(p,ac))}let l=a[e]||a.key;if(l)for(let u of o)s(u,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(u,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let ac=null;function _O(t,e,n,i){ac=e;let r=xE(e),s=Ge(r,0),a=Qt(s)==r.length&&r!=" ",o="",l=!1,u=!1,c=!1;Bn&&Bn.view==n&&Bn.scope==i&&(o=Bn.prefix+" ",lO.indexOf(e.keyCode)<0&&(u=!0,Bn=null));let h=new Set,f=O=>{if(O){for(let k of O.run)if(!h.has(k)&&(h.add(k),k(n)))return O.stopPropagation&&(c=!0),!0;O.preventDefault&&(O.stopPropagation&&(c=!0),u=!0)}return!1},p=t[i],m,g;return p&&(f(p[o+Ia(r,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(V.windows&&e.ctrlKey&&e.altKey)&&(m=Vn[e.keyCode])&&m!=r?(f(p[o+Ia(m,e,!0)])||e.shiftKey&&(g=vs[e.keyCode])!=r&&g!=m&&f(p[o+Ia(g,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(p[o+Ia(r,e,!0)])&&(l=!0),!l&&f(p._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),ac=null,l}class ra{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=EO(e);return[new ra(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return tx(e,n,i)}}function EO(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ve.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Wd(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,o=t.posAtCoords({x:s.left+1,y:a}),l=t.posAtCoords({x:s.right-1,y:a});return o==null||l==null?i:{from:Math.max(i.from,Math.min(o,l)),to:Math.min(i.to,Math.max(o,l))}}function tx(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==ve.LTR,a=t.contentDOM,o=a.getBoundingClientRect(),l=EO(t),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=o.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=o.right-(c?parseInt(c.paddingRight):0),p=tc(t,i),m=tc(t,r),g=p.type==yt.Text?p:null,O=m.type==yt.Text?m:null;if(g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=Wd(t,i,1,g)),O&&(t.lineWrapping||m.widgetLineBreaks)&&(O=Wd(t,r,-1,O)),g&&O&&g.from==O.from&&g.to==O.to)return T(A(n.from,n.to,g));{let v=g?A(n.from,null,g):I(p,!1),w=O?A(null,n.to,O):I(m,!0),$=[];return(g||p).to<(O||m).from-(g&&O?1:0)||p.widgetLineBreaks>1&&v.bottom+t.defaultLineHeight/2B&&J.from=be)break;E>G&&U(Math.max(Ne,G),v==null&&Ne<=B,Math.min(E,be),w==null&&E>=K,Ce.dir)}if(G=ge.to+1,G>=be)break}return C.length==0&&U(B,v==null,K,w==null,t.textDirection),{top:H,bottom:q,horizontal:C}}function I(v,w){let $=o.top+(w?v.top:v.bottom);return{top:$,bottom:$,horizontal:[]}}}function nx(t,e){return t.constructor==e.constructor&&t.eq(e)}class ix{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(so)!=e.state.facet(so)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(so);for(;n!nx(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const so=Y.define();function TO(t){return[Ze.define(e=>new ix(e,t)),so.of(t)]}const xO=!V.ios,Qs=Y.define({combine(t){return pn(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function rx(t={}){return[Qs.of(t),sx,ax,ox,K0.of(!0)]}function wO(t){return t.startState.facet(Qs)!=t.state.facet(Qs)}const sx=TO({above:!0,markers(t){let{state:e}=t,n=e.facet(Qs),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty?!s||xO:n.drawRangeCursor){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=r.empty?r:L.cursor(r.head,r.head>r.anchor?-1:1);for(let l of ra.forRange(t,a,o))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=wO(t);return n&&Hd(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Hd(e.state,t)},class:"cm-cursorLayer"});function Hd(t,e){e.style.animationDuration=t.facet(Qs).cursorBlinkRate+"ms"}const ax=TO({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:ra.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||wO(t)},class:"cm-selectionLayer"}),oc={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};xO&&(oc[".cm-line"].caretColor=oc[".cm-content"].caretColor="transparent !important");const ox=wn.highest(W.theme(oc)),AO=ae.define({map(t,e){return t==null?null:e.mapPos(t)}}),us=Ve.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(AO)?i.value:n,t)}}),lx=Ze.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(us);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(us)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(us),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(us)!=t&&this.view.dispatch({effects:AO.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ux(){return[us,lx]}function Yd(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),a=n,o;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)r(a+o.index,o)}function cx(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class hx{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(o,l,u,c)=>r(c,u,u+o[0].length,o,l);else if(typeof i=="function")this.addMatch=(o,l,u,c)=>{let h=i(o,l,u);h&&c(u,u+o[0].length,h)};else if(i)this.addMatch=(o,l,u,c)=>c(u,u+o[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let n=new Yn,i=n.add.bind(n);for(let{from:r,to:s}of cx(e,this.maxLength))Yd(e.state.doc,this.regexp,r,s,(a,o)=>this.addMatch(o,e,a,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,a,o,l)=>{l>e.view.viewport.from&&o1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let a=Math.max(s.from,i),o=Math.min(s.to,r);if(o>a){let l=e.state.doc.lineAt(a),u=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){c=a;break}for(;of.push(k.range(g,O));if(l==u)for(this.regexp.lastIndex=c-l.from;(p=this.regexp.exec(l.text))&&p.indexthis.addMatch(O,e,g,m));n=n.update({filterFrom:c,filterTo:h,filter:(g,O)=>gh,add:f})}}return n}}const lc=/x/.unicode!=null?"gu":"g",fx=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,lc),dx={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Nl=null;function px(){var t;if(Nl==null&&typeof document<"u"&&document.body){let e=document.body.style;Nl=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Nl||!1}const ao=Y.define({combine(t){let e=pn(t,{render:null,specialChars:fx,addSpecialChars:null});return(e.replaceTabs=!px())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,lc)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,lc)),e}});function mx(t={}){return[ao.of(t),gx()]}let qd=null;function gx(){return qd||(qd=Ze.fromClass(class{constructor(t){this.view=t,this.decorations=te.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(ao)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new hx({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=Ge(e[0],0);if(s==9){let a=r.lineAt(i),o=n.state.tabSize,l=Yt(a.text,o,i-a.from);return te.replace({widget:new kx((o-l%o)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=te.replace({widget:new yx(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(ao);t.startState.facet(ao)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Ox="•";function bx(t){return t>=32?Ox:t==10?"␤":String.fromCharCode(9216+t)}class yx extends Cn{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=bx(this.code),i=e.state.phrase("Control character")+" "+(dx[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class kx extends Cn{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Sx(){return Ex}const _x=te.line({class:"cm-activeLine"}),Ex=Ze.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(_x.range(r.from)),e=r.from)}return te.set(n)}},{decorations:t=>t.decorations}),uc=2e3;function Tx(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>uc||n.off>uc||e.col<0||n.col<0){let a=Math.min(e.off,n.off),o=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=o&&s.push(L.range(u.from+a,u.to+o))}}else{let a=Math.min(e.col,n.col),o=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=Uu(u.text,a,t.tabSize,!0);if(c<0)s.push(L.cursor(u.to));else{let h=Uu(u.text,o,t.tabSize);s.push(L.range(u.from+c,u.from+h))}}}return s}function xx(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Vd(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>uc?-1:r==i.length?xx(t,e.clientX):Yt(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function wx(t,e){let n=Vd(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let o=Vd(t,r);if(!o)return i;let l=Tx(t.state,n,o);return l.length?a?L.create(l.concat(i.ranges)):L.create(l):i}}:null}function Ax(t){let e=n=>n.altKey&&n.button==0;return W.mouseSelectionStyle.of((n,i)=>e(i)?wx(n,i):null)}const Cx={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Px={style:"cursor: crosshair"};function vx(t={}){let[e,n]=Cx[t.key||"Alt"],i=Ze.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,W.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?Px:null})]}const qr="-10000px";class CO{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],o=n?[]:null;for(let l=0;ln[u]=l),n.length=o.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function Rx(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Ll=Y.define({combine:t=>{var e,n,i;return{position:V.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Rx}}}),jd=new WeakMap,dh=Ze.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Ll);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new CO(t,ph,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Ll);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=qr,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(V.gecko)i=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==qr&&r.style.left=="0px"){let s=r.getBoundingClientRect();i=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,n=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((r,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Ll).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let o of this.manager.tooltipViews)o.dom.style.position="absolute"}let{editor:n,space:i,scaleX:r,scaleY:s}=t,a=[];for(let o=0;o=Math.min(n.bottom,i.bottom)||h.rightMath.min(n.right,i.right)+.1){c.style.top=qr;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=f.right-f.left,O=(e=jd.get(u))!==null&&e!==void 0?e:f.bottom-f.top,k=u.offset||Qx,T=this.view.textDirection==ve.LTR,A=f.width>i.right-i.left?T?i.left:i.right-f.width:T?Math.min(h.left-(p?14:0)+k.x,i.right-g):Math.max(i.left,h.left-g+(p?14:0)-k.x),I=this.above[o];!l.strictSide&&(I?h.top-(f.bottom-f.top)-k.yi.bottom)&&I==i.bottom-h.bottom>h.top-i.top&&(I=this.above[o]=!I);let v=(I?h.top-i.top:i.bottom-h.bottom)-m;if(vA&&H.topw&&(w=I?H.top-O-2-m:H.bottom+m+2);if(this.position=="absolute"?(c.style.top=(w-t.parent.top)/s+"px",c.style.left=(A-t.parent.left)/r+"px"):(c.style.top=w/s+"px",c.style.left=A/r+"px"),p){let H=h.left+(T?k.x:-k.x)-(A+14-7);p.style.left=H/r+"px"}u.overlap!==!0&&a.push({left:A,top:w,right:$,bottom:w+O}),c.classList.toggle("cm-tooltip-above",I),c.classList.toggle("cm-tooltip-below",!I),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=qr}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Ix=W.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Qx={x:0,y:0},ph=Y.define({enables:[dh,Ix]}),Eo=Y.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class nl{static create(e){return new nl(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new CO(e,Eo,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Nx=ph.compute([Eo],t=>{let e=t.facet(Eo);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:nl.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Lx{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;eo.bottom||n.xo.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(c=>c.from<=r&&c.to>=r),u=l&&l.dir==ve.RTL?-1:1;s=n.x{this.pending==o&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Ot(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(dh),n=e?e.manager.tooltips.findIndex(i=>i.create==nl.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!Dx(s.dom,e)||this.pending){let{pos:a}=r[0]||this.pending,o=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==o?this.view.posAtCoords(this.lastMove)!=a:!$x(this.view,a,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Qa=4;function Dx(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-Qa&&e.clientX<=n.right+Qa&&e.clientY>=n.top-Qa&&e.clientY<=n.bottom+Qa}function $x(t,e,n,i,r,s){let a=t.scrollDOM.getBoundingClientRect(),o=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>i||a.rightr||Math.min(a.bottom,o)=e&&l<=n}function Mx(t,e={}){let n=ae.define(),i=Ve.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(a=>!e.hideOn(s,a))),s.docChanged)){let a=[];for(let o of r){let l=s.changes.mapPos(o.pos,-1,Je.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),o);u.pos=l,u.end!=null&&(u.end=s.changes.mapPos(u.end)),a.push(u)}}r=a}for(let a of s.effects)a.is(n)&&(r=a.value),a.is(Bx)&&(r=[]);return r},provide:r=>Eo.from(r)});return[i,Ze.define(r=>new Lx(r,t,i,n,e.hoverTime||300)),Nx]}function PO(t,e){let n=t.plugin(dh);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const Bx=ae.define(),Gd=Y.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Ns(t,e){let n=t.plugin(vO),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const vO=Ze.fromClass(class{constructor(t){this.input=t.state.facet(Ls),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Gd);this.top=new Na(t,!0,e.topContainer),this.bottom=new Na(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Gd);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Na(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Na(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Ls);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],a=[],o=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),o.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?s:a).push(c)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let l of o)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>W.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Na{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Kd(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Kd(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Kd(t){let e=t.nextSibling;return t.remove(),e}const Ls=Y.define({enables:vO});class xn extends Ti{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}xn.prototype.elementClass="";xn.prototype.toDOM=void 0;xn.prototype.mapMode=Je.TrackBefore;xn.prototype.startSide=xn.prototype.endSide=-1;xn.prototype.point=!0;const oo=Y.define(),Ux={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>me.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},gs=Y.define();function Fx(t){return[RO(),gs.of(Object.assign(Object.assign({},Ux),t))]}const Jd=Y.define({combine:t=>t.some(e=>e)});function RO(t){return[Zx]}const Zx=Ze.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(gs).map(e=>new tp(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Jd),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Jd)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=me.iter(this.view.state.facet(oo),this.view.viewport.from),i=[],r=this.gutters.map(s=>new zx(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let o of s.type)if(o.type==yt.Text&&a){cc(n,i,o.from);for(let l of r)l.line(this.view,o,i);a=!1}else if(o.widget)for(let l of r)l.widget(this.view,o)}else if(s.type==yt.Text){cc(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(gs),n=t.state.facet(gs),i=t.docChanged||t.heightChanged||t.viewportChanged||!me.eq(t.startState.facet(oo),t.state.facet(oo),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=e.indexOf(s);a<0?r.push(new tp(this.view,s)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>W.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==ve.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function ep(t){return Array.isArray(t)?t:[t]}function cc(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class zx{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=me.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let o=new IO(e,a,s,i);r.elements.push(o),r.dom.appendChild(o.dom)}else r.elements[this.i].update(e,a,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];cc(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class tp{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,o,r)&&r.preventDefault()});this.markers=ep(n.markers(e)),n.initialSpacer&&(this.spacer=new IO(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=ep(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!me.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class IO{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Xx(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let o=a,l=ss(o,l,u)||a(o,l,u):a}return i}})}});class Dl extends xn{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function $l(t,e){return t.state.facet(Ji).formatNumber(e,t.state)}const Hx=gs.compute([Ji],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Wx)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Dl($l(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Ji)!=e.state.facet(Ji),initialSpacer(e){return new Dl($l(e,np(e.state.doc.lines)))},updateSpacer(e,n){let i=$l(n.view,np(n.view.state.doc.lines));return i==e.number?e:new Dl(i)},domEventHandlers:t.facet(Ji).domEventHandlers}));function Yx(t={}){return[Ji.of(t),RO(),Hx]}function np(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(qx.range(r)))}return me.of(e)});function jx(){return Vx}const QO=1024;let Gx=0;class Lt{constructor(e,n){this.from=e,this.to=n}}class ie{constructor(e={}){this.id=Gx++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ze.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}ie.closedBy=new ie({deserialize:t=>t.split(" ")});ie.openedBy=new ie({deserialize:t=>t.split(" ")});ie.group=new ie({deserialize:t=>t.split(" ")});ie.isolate=new ie({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});ie.contextHash=new ie({perNode:!0});ie.lookAhead=new ie({perNode:!0});ie.mounted=new ie({perNode:!0});class Ds{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[ie.mounted.id]}}const Kx=Object.create(null);class ze{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):Kx,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ze(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(ie.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(ie.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}ze.none=new ze("",Object.create(null),0,8);class vr{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|Ae.IncludeAnonymous);;){let u=!1;if(l.from<=s&&l.to>=r&&(!o&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(o||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Oh(ze.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new he(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new he(ze.none,n,i,r)))}static build(e){return nw(e)}}he.empty=new he(ze.none,[],[],0);class mh{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new mh(this.buffer,this.index)}}class Gn{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return ze.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return o}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),a=0;for(let o=e,l=0;o=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function $s(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?o.length:-1;e!=u;e+=n){let c=o[e],h=l[e]+a.from;if(NO(r,i,h,h+c.length)){if(c instanceof Gn){if(s&Ae.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,i-h,r);if(f>-1)return new on(new Jx(a,c,e,h),null,f)}else if(s&Ae.IncludeAnonymous||!c.type.isAnonymous||gh(c)){let f;if(!(s&Ae.IgnoreMounts)&&(f=Ds.get(c))&&!f.overlay)return new st(f.tree,h,e,a);let p=new st(c,h,e,a);return s&Ae.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?c.children.length-1:0,n,i,r)}}}if(s&Ae.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&Ae.IgnoreOverlays)&&(r=Ds.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:a,to:o}of r.overlay)if((n>0?a<=s:a=s:o>s))return new st(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function rp(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function hc(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class Jx{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class on extends LO{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new on(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&Ae.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new on(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new on(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new on(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];e.push(i.slice(r,s,a)),n.push(0)}return new he(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function DO(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;sn.from||a.to=e){let o=new st(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push($s(o,e,n,!1))}}return r?DO(r):i}class To{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof st)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof st?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&Ae.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ae.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ae.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=n+e,a=e<0?-1:i._tree.children.length;s!=a;s+=e){let o=i._tree.children[s];if(this.mode&Ae.IncludeAnonymous||o instanceof Gn||!o.type.isAnonymous||gh(o))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return hc(this.node,e,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}}function gh(t){return t.children.some(e=>e instanceof Gn||!e.type.isAnonymous||gh(e))}function nw(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=QO,reused:s=[],minRepeatType:a=i.types.length}=t,o=Array.isArray(n)?new mh(n,n.length):n,l=i.types,u=0,c=0;function h(v,w,$,H,q,C){let{id:U,start:B,end:K,size:J}=o,G=c;for(;J<0;)if(o.next(),J==-1){let E=s[U];$.push(E),H.push(B-v);return}else if(J==-3){u=U;return}else if(J==-4){c=U;return}else throw new RangeError(`Unrecognized record size: ${J}`);let be=l[U],ge,Ce,Ne=B-v;if(K-B<=r&&(Ce=O(o.pos-w,q))){let E=new Uint16Array(Ce.size-Ce.skip),Re=o.pos-Ce.size,Me=E.length;for(;o.pos>Re;)Me=k(Ce.start,E,Me);ge=new Gn(E,K-Ce.start,i),Ne=Ce.start-v}else{let E=o.pos-J;o.next();let Re=[],Me=[],x=U>=a?U:-1,He=0,vt=K;for(;o.pos>E;)x>=0&&o.id==x&&o.size>=0?(o.end<=vt-r&&(m(Re,Me,B,He,o.end,vt,x,G),He=Re.length,vt=o.end),o.next()):C>2500?f(B,E,Re,Me):h(B,E,Re,Me,x,C+1);if(x>=0&&He>0&&He-1&&He>0){let Be=p(be);ge=Oh(be,Re,Me,0,Re.length,0,K-B,Be,Be)}else ge=g(be,Re,Me,K-B,G-K)}$.push(ge),H.push(Ne)}function f(v,w,$,H){let q=[],C=0,U=-1;for(;o.pos>w;){let{id:B,start:K,end:J,size:G}=o;if(G>4)o.next();else{if(U>-1&&K=0;J-=3)B[G++]=q[J],B[G++]=q[J+1]-K,B[G++]=q[J+2]-K,B[G++]=G;$.push(new Gn(B,q[2]-K,i)),H.push(K-v)}}function p(v){return(w,$,H)=>{let q=0,C=w.length-1,U,B;if(C>=0&&(U=w[C])instanceof he){if(!C&&U.type==v&&U.length==H)return U;(B=U.prop(ie.lookAhead))&&(q=$[C]+U.length+B)}return g(v,w,$,H,q)}}function m(v,w,$,H,q,C,U,B){let K=[],J=[];for(;v.length>H;)K.push(v.pop()),J.push(w.pop()+$-q);v.push(g(i.types[U],K,J,C-q,B-C)),w.push(q-$)}function g(v,w,$,H,q=0,C){if(u){let U=[ie.contextHash,u];C=C?[U].concat(C):[U]}if(q>25){let U=[ie.lookAhead,q];C=C?[U].concat(C):[U]}return new he(v,w,$,H,C)}function O(v,w){let $=o.fork(),H=0,q=0,C=0,U=$.end-r,B={size:0,start:0,skip:0};e:for(let K=$.pos-v;$.pos>K;){let J=$.size;if($.id==w&&J>=0){B.size=H,B.start=q,B.skip=C,C+=4,H+=4,$.next();continue}let G=$.pos-J;if(J<0||G=a?4:0,ge=$.start;for($.next();$.pos>G;){if($.size<0)if($.size==-3)be+=4;else break e;else $.id>=a&&(be+=4);$.next()}q=ge,H+=J,C+=be}return(w<0||H==v)&&(B.size=H,B.start=q,B.skip=C),B.size>4?B:void 0}function k(v,w,$){let{id:H,start:q,end:C,size:U}=o;if(o.next(),U>=0&&H4){let K=o.pos-(U-4);for(;o.pos>K;)$=k(v,w,$)}w[--$]=B,w[--$]=C-v,w[--$]=q-v,w[--$]=H}else U==-3?u=H:U==-4&&(c=H);return $}let T=[],A=[];for(;o.pos>0;)h(t.start||0,t.bufferStart||0,T,A,-1,0);let I=(e=t.length)!==null&&e!==void 0?e:T.length?A[0]+T[0].length:0;return new he(l[t.topID],T.reverse(),A.reverse(),I)}const sp=new WeakMap;function lo(t,e){if(!t.isAnonymous||e instanceof Gn||e.type!=t)return 1;let n=sp.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof he)){n=1;break}n+=lo(t,i)}sp.set(e,n)}return n}function Oh(t,e,n,i,r,s,a,o,l){let u=0;for(let m=i;m=c)break;w+=$}if(A==I+1){if(w>c){let $=m[I];p($.children,$.positions,0,$.children.length,g[I]+T);continue}h.push(m[I])}else{let $=g[A-1]+m[A-1].length-v;h.push(Oh(t,m,g,I,A,v,$,null,l))}f.push(v+T-s)}}return p(e,n,i,r,0),(o||l)(h,f,a)}class $O{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof on?this.setBuffer(e.context.buffer,e.index,n):e instanceof st&&this.map.set(e.tree,n)}get(e){return e instanceof on?this.getBuffer(e.context.buffer,e.index):e instanceof st?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class _n{constructor(e,n,i,r,s=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new _n(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,a=e.length?e[0]:null;for(let o=0,l=0,u=0;;o++){let c=o=i)for(;a&&a.from=f.from||h<=f.to||u){let p=Math.max(f.from,l)-u,m=Math.min(f.to,h)-u;f=p>=m?null:new _n(p,m,f.tree,f.offset+u,o>0,!!c)}if(f&&r.push(f),a.to>h)break;a=snew Lt(r.from,r.to)):[new Lt(0,0)]:[new Lt(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}};class iw{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function MO(t){return(e,n,i,r)=>new sw(e,t,n,i,r)}class ap{constructor(e,n,i,r,s){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=s}}function op(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class rw{constructor(e,n,i,r,s,a,o){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.target=a,this.prev=o,this.depth=0,this.ranges=[]}}const fc=new ie({perNode:!0});class sw{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new he(i.type,i.children,i.positions,i.length,i.propValues.concat([[fc,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[ie.mounted.id]=new Ds(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let h=c.from+u.pos,f=c.to+u.pos;h>=r.from&&f<=r.to&&!n.ranges.some(p=>p.fromh)&&n.ranges.push({from:h,to:f})}}o=!1}else if(i&&(a=aw(i.ranges,r.from,r.to)))o=a!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew Lt(h.from-r.from,h.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):o=!1}}else n&&(l=n.predicate(r))&&(l===!0&&(l=new Lt(r.from,r.to)),l.fromnew Lt(c.from-n.start,c.to-n.start)),n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function aw(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function lp(t,e,n,i,r,s){if(e=e&&n.enter(i,1,Ae.IgnoreOverlays|Ae.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof he)n=n.children[0];else break}return!1}}let lw=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(fc))!==null&&n!==void 0?n:i.to,this.inner=new up(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(fc))!==null&&e!==void 0?e:n.to,this.inner=new up(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(i=s.tree)===null||i===void 0?void 0:i.prop(ie.mounted);if(a&&a.parser==n)for(let o=this.fragI;o=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:a})}}}return r}};function cp(t,e){let n=null,i=e;for(let r=1,s=0;r=o)break;l.to<=a||(n||(i=n=e.slice()),l.fromo&&n.splice(s+1,0,new Lt(o,l.to))):l.to>o?n[s--]=new Lt(o,l.to):n.splice(s--,1))}}return i}function uw(t,e,n,i){let r=0,s=0,a=!1,o=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:a?t[r].to:t[r].from,h=s==e.length?1e9:o?e[s].to:e[s].from;if(a!=o){let f=Math.max(l,n),p=Math.min(c,h,i);fnew Lt(f.from+i,f.to+i)),h=uw(e,c,l,u);for(let f=0,p=l;;f++){let m=f==h.length,g=m?u:h[f].from;if(g>p&&n.push(new _n(p,g,r.tree,-a,s.from>=p||s.openStart,s.to<=g||s.openEnd)),m)break;p=h[f].to}}else n.push(new _n(l,u,r.tree,-a,s.from>=a||s.openStart,s.to<=o||s.openEnd))}return n}let cw=0;class Xt{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=cw++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Xt([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new xo;return n=>n.modified.indexOf(e)>-1?n:xo.get(n.base||n,n.modified.concat(e).sort((i,r)=>i.id-r.id))}}let hw=0;class xo{constructor(){this.instances=[],this.id=hw++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(o=>o.base==e&&fw(n,o.modified));if(i)return i;let r=[],s=new Xt(r,e,n);for(let o of n)o.instances.push(s);let a=dw(n);for(let o of e.set)if(!o.modified.length)for(let l of a)r.push(xo.get(o,l));return s}}function fw(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function dw(t){let e=[[]];for(let n=0;ni.length-n.length)}function Li(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,o=r;for(let h=0;;){if(o=="..."&&h>0&&h+3==r.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!f)throw new RangeError("Invalid path: "+r);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==r.length)break;let p=r[h++];if(h==r.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);o=r.slice(h)}let l=s.length-1,u=s[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new wo(i,a,l>0?s.slice(0,l):null);e[u]=c.sort(e[u])}}return BO.add(e)}const BO=new ie;class wo{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=r;for(let o of s)for(let l of o.set){let u=n[l.id];if(u){a=a?a+" "+u:u;break}}return a},scope:i}}function pw(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function mw(t,e,n,i=0,r=t.length){let s=new gw(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class gw{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:a,from:o,to:l}=e;if(o>=i||l<=n)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let u=r,c=Ow(e)||wo.empty,h=pw(s,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(r+=(r?" ":"")+h)),this.startSpan(Math.max(n,o),u),c.opaque)return;let f=e.tree&&e.tree.prop(ie.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+o,1),m=this.highlighters.filter(O=>!O.scope||O.scope(f.tree.type)),g=e.firstChild();for(let O=0,k=o;;O++){let T=O=A||!e.nextSibling())););if(!T||A>i)break;k=T.to+o,k>n&&(this.highlightRange(p.cursor(),Math.max(n,T.from+o),Math.min(i,k),"",m),this.startSpan(Math.min(i,k),u))}g&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function Ow(t){let e=t.type.prop(BO);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const X=Xt.define,Da=X(),$n=X(),fp=X($n),dp=X($n),Mn=X(),$a=X(Mn),Ml=X(Mn),nn=X(),fi=X(nn),en=X(),tn=X(),dc=X(),Vr=X(dc),Ma=X(),S={comment:Da,lineComment:X(Da),blockComment:X(Da),docComment:X(Da),name:$n,variableName:X($n),typeName:fp,tagName:X(fp),propertyName:dp,attributeName:X(dp),className:X($n),labelName:X($n),namespace:X($n),macroName:X($n),literal:Mn,string:$a,docString:X($a),character:X($a),attributeValue:X($a),number:Ml,integer:X(Ml),float:X(Ml),bool:X(Mn),regexp:X(Mn),escape:X(Mn),color:X(Mn),url:X(Mn),keyword:en,self:X(en),null:X(en),atom:X(en),unit:X(en),modifier:X(en),operatorKeyword:X(en),controlKeyword:X(en),definitionKeyword:X(en),moduleKeyword:X(en),operator:tn,derefOperator:X(tn),arithmeticOperator:X(tn),logicOperator:X(tn),bitwiseOperator:X(tn),compareOperator:X(tn),updateOperator:X(tn),definitionOperator:X(tn),typeOperator:X(tn),controlOperator:X(tn),punctuation:dc,separator:X(dc),bracket:Vr,angleBracket:X(Vr),squareBracket:X(Vr),paren:X(Vr),brace:X(Vr),content:nn,heading:fi,heading1:X(fi),heading2:X(fi),heading3:X(fi),heading4:X(fi),heading5:X(fi),heading6:X(fi),contentSeparator:X(nn),list:X(nn),quote:X(nn),emphasis:X(nn),strong:X(nn),link:X(nn),monospace:X(nn),strikethrough:X(nn),inserted:X(),deleted:X(),changed:X(),invalid:X(),meta:Ma,documentMeta:X(Ma),annotation:X(Ma),processingInstruction:X(Ma),definition:Xt.defineModifier(),constant:Xt.defineModifier(),function:Xt.defineModifier(),standard:Xt.defineModifier(),local:Xt.defineModifier(),special:Xt.defineModifier()};UO([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var Bl;const zn=new ie;function rl(t){return Y.define({combine:t?e=>e.concat(t):void 0})}const bh=new ie;class At{constructor(e,n,i=[],r=""){this.data=e,this.name=r,ue.prototype.hasOwnProperty("tree")||Object.defineProperty(ue.prototype,"tree",{get(){return Ee(this)}}),this.parser=n,this.extension=[Kn.of(this),ue.languageData.of((s,a,o)=>{let l=pp(s,a,o),u=l.type.prop(zn);if(!u)return[];let c=s.facet(u),h=l.type.prop(bh);if(h){let f=l.resolve(a-l.from,o);for(let p of h)if(p.test(f,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return pp(e,n,i).type.prop(zn)==this.data}findRegions(e){let n=e.facet(Kn);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(zn)==this.data){i.push({from:a,to:a+s.length});return}let o=s.prop(ie.mounted);if(o){if(o.tree.prop(zn)==this.data){if(o.overlay)for(let l of o.overlay)i.push({from:l.from+a,to:l.to+a});else i.push({from:a,to:a+s.length});return}else if(o.overlay){let l=i.length;if(r(o.tree,o.overlay[0].from+a),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new Ci(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ee(t){let e=t.field(At.state,!1);return e?e.tree:he.empty}class bw{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let jr=null;class Pi{constructor(e,n,i=[],r,s,a,o,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new Pi(e,n,[],he.empty,0,i,[],null)}startParse(){return this.parser.startParse(new bw(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=he.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(_n.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=jr;jr=this;try{return e()}finally{jr=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=mp(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:o}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,h,f)=>l.push({fromA:u,toA:c,fromB:h,toB:f})),i=_n.applyChanges(i,l),r=he.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){o=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);ce.from&&(this.fragments=mp(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends il{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let l=jr;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new he(ze.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return jr}}function mp(t,e,n){return _n.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class pr{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new pr(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=Pi.create(e.facet(Kn).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new pr(i)}}At.state=Ve.define({create:pr.init,update(t,e){for(let n of e.effects)if(n.is(At.setState))return n.value;return e.startState.facet(Kn)!=e.state.facet(Kn)?pr.init(e.state):t.apply(e)}});let FO=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(FO=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Ul=typeof navigator<"u"&&(!((Bl=navigator.scheduling)===null||Bl===void 0)&&Bl.isInputPending)?()=>navigator.scheduling.isInputPending():null,yw=Ze.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(At.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(At.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=FO(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>Ul&&Ul()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:At.setState.of(new pr(s.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Ot(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Kn=Y.define({combine(t){return t.length?t[0]:null},enables:t=>[At.state,yw,W.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class mr{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class Ao{constructor(e,n,i,r,s,a=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new Ao(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let a=n.indexOf(s);if(a>-1&&(s.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+s.length])))return r}return null}}const ZO=Y.define(),Rr=Y.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function vi(t){let e=t.facet(Rr);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function gr(t,e){let n="",i=t.tabSize,r=t.facet(Rr)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s=e?Sw(t,n,e):null}function kw(t,e,n){let i=Object.create(null),r=new sa(t,{overrideIndentation:a=>{var o;return(o=i[a])!==null&&o!==void 0?o:-1}}),s=[];for(let a=e;a<=n;){let o=t.doc.lineAt(a);a=o.to+1;let l=sl(r,o.from);if(l==null)continue;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=gr(t,l);u!=c&&(i[o.from]=l,s.push({from:o.from,to:o.from+u.length,insert:c}))}return t.changes(s)}class sa{constructor(e,n={}){this.state=e,this.options=n,this.unit=vi(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return Yt(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ir=new ie;function Sw(t,e,n){let i=e.resolveStack(n),r=i.node.enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a!=i.node;a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return zO(i,t,n)}function zO(t,e,n){for(let i=t;i;i=i.next){let r=Ew(i.node);if(r)return r(yh.create(e,n,i))}return 0}function _w(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Ew(t){let e=t.type.prop(Ir);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(ie.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>XO(a,!0,1,void 0,s&&!_w(a)?r.from:void 0)}return t.parent==null?Tw:null}function Tw(){return 0}class yh extends sa{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new yh(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(xw(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return zO(this.context.next,this.base,this.pos)}}function xw(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function ww(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let o=n.to;;){let l=e.childAfter(o);if(!l||l==i)return null;if(!l.type.isSkipped)return l.fromXO(i,e,n,t)}function XO(t,e,n,i,r){let s=t.textAfter,a=s.match(/^\s*/)[0].length,o=i&&s.slice(a,a+i.length)==i||r==t.pos+a,l=e?ww(t):null;return l?o?t.column(l.from):t.column(l.to):t.baseIndent+(o?0:t.unit*n)}const Cw=t=>t.baseIndent;function ar({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const Pw=200;function vw(){return ue.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+Pw)return t;let s=n.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return t;let{state:a}=t,o=-1,l=[];for(let{head:u}of a.selection.ranges){let c=a.doc.lineAt(u);if(c.from==o)continue;o=c.from;let h=sl(a,c.from);if(h==null)continue;let f=/^\s*/.exec(c.text)[0],p=gr(a,h);f!=p&&l.push({from:c.from,to:c.from+f.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const WO=Y.define(),Di=new ie;function kh(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(s&&o.from=e&&u.to>n&&(s=u)}}return s}function Iw(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Co(t,e,n){for(let i of t.facet(WO)){let r=i(t,e,n);if(r)return r}return Rw(t,e,n)}function HO(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const al=ae.define({map:HO}),aa=ae.define({map:HO});function YO(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Ri=Ve.define({create(){return te.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(al)&&!Qw(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(jO),r=i?te.replace({widget:new Uw(i(e.state,n.value))}):gp;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(aa)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(r,s)=>{ri&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(r,s)=>s<=i||r>=i}))}return t},provide:t=>W.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>s)&&(r={from:s,to:a})}),r}function Qw(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function qO(t,e){return t.field(Ri,!1)?e:e.concat(ae.appendConfig.of(GO()))}const Nw=t=>{for(let e of YO(t)){let n=Co(t.state,e.from,e.to);if(n)return t.dispatch({effects:qO(t.state,[al.of(n),VO(t,n)])}),!0}return!1},Lw=t=>{if(!t.state.field(Ri,!1))return!1;let e=[];for(let n of YO(t)){let i=Po(t.state,n.from,n.to);i&&e.push(aa.of(i),VO(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function VO(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return W.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const Dw=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Ri,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(aa.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},Mw=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Nw},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Lw},{key:"Ctrl-Alt-[",run:Dw},{key:"Ctrl-Alt-]",run:$w}],Bw={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jO=Y.define({combine(t){return pn(t,Bw)}});function GO(t){return[Ri,zw]}function KO(t,e){let{state:n}=t,i=n.facet(jO),r=a=>{let o=t.lineBlockAt(t.posAtDOM(a.target)),l=Po(t.state,o.from,o.to);l&&t.dispatch({effects:aa.of(l)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const gp=te.replace({widget:new class extends Cn{toDOM(t){return KO(t,null)}}});class Uw extends Cn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return KO(e,this.value)}}const Fw={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Fl extends xn{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Zw(t={}){let e=Object.assign(Object.assign({},Fw),t),n=new Fl(e,!0),i=new Fl(e,!1),r=Ze.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Kn)!=a.state.facet(Kn)||a.startState.field(Ri,!1)!=a.state.field(Ri,!1)||Ee(a.startState)!=Ee(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let o=new Yn;for(let l of a.viewportLineBlocks){let u=Po(a.state,l.from,l.to)?i:Co(a.state,l.from,l.to)?n:null;u&&o.add(l.from,l.from,u)}return o.finish()}}),{domEventHandlers:s}=e;return[r,Fx({class:"cm-foldGutter",markers(a){var o;return((o=a.plugin(r))===null||o===void 0?void 0:o.markers)||me.empty},initialSpacer(){return new Fl(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(a,o,l)=>{if(s.click&&s.click(a,o,l))return!0;let u=Po(a.state,o.from,o.to);if(u)return a.dispatch({effects:aa.of(u)}),!0;let c=Co(a.state,o.from,o.to);return c?(a.dispatch({effects:al.of(c)}),!0):!1}})}),GO()]}const zw=W.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class oa{constructor(e,n){this.specs=e;let i;function r(o){let l=qn.newName();return(i||(i=Object.create(null)))["."+l]=o,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof At?o=>o.prop(zn)==a.data:a?o=>o==a:void 0,this.style=UO(e.map(o=>({tag:o.tag,class:o.class||r(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=i?new qn(i):null,this.themeType=n.themeType}static define(e,n){return new oa(e,n||{})}}const pc=Y.define(),JO=Y.define({combine(t){return t.length?[t[0]]:null}});function Zl(t){let e=t.facet(pc);return e.length?e:t.facet(JO)}function Op(t,e){let n=[Ww],i;return t instanceof oa&&(t.module&&n.push(W.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(JO.of(t)):i?n.push(pc.computeN([W.darkTheme],r=>r.facet(W.darkTheme)==(i=="dark")?[t]:[])):n.push(pc.of(t)),n}class Xw{constructor(e){this.markCache=Object.create(null),this.tree=Ee(e.state),this.decorations=this.buildDeco(e,Zl(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ee(e.state),i=Zl(e.state),r=i!=Zl(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return te.none;let i=new Yn;for(let{from:r,to:s}of e.visibleRanges)mw(this.tree,n,(a,o,l)=>{i.add(a,o,this.markCache[l]||(this.markCache[l]=te.mark({class:l})))},r,s);return i.finish()}}const Ww=wn.high(Ze.fromClass(Xw,{decorations:t=>t.decorations})),Hw=oa.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),Yw=W.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),e1=1e4,t1="()[]{}",n1=Y.define({combine(t){return pn(t,{afterCursor:!0,brackets:t1,maxScanDistance:e1,renderMatch:jw})}}),qw=te.mark({class:"cm-matchingBracket"}),Vw=te.mark({class:"cm-nonmatchingBracket"});function jw(t){let e=[],n=t.matched?qw:Vw;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Gw=Ve.define({create(){return te.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(n1);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=ln(e.state,r.head,-1,i)||r.head>0&&ln(e.state,r.head-1,1,i)||i.afterCursor&&(ln(e.state,r.head,1,i)||r.headW.decorations.from(t)}),Kw=[Gw,Yw];function Jw(t={}){return[n1.of(t),Kw]}const i1=new ie;function mc(t,e,n){let i=t.prop(e<0?ie.openedBy:ie.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function gc(t){let e=t.type.prop(i1);return e?e(t.node):t}function ln(t,e,n,i={}){let r=i.maxScanDistance||e1,s=i.brackets||t1,a=Ee(t),o=a.resolveInner(e,n);for(let l=o;l;l=l.parent){let u=mc(l.type,n,s);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return e2(t,e,n,l,c,u,s)}}return t2(t,e,n,a,o.type,r,s)}function e2(t,e,n,i,r,s,a){let o=i.parent,l={from:r.from,to:r.to},u=0,c=o==null?void 0:o.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!c.next().done&&f<=s;){let p=c.value;n<0&&(f+=p.length);let m=e+f*n;for(let g=n>0?0:p.length-1,O=n>0?p.length:-1;g!=O;g+=n){let k=a.indexOf(p[g]);if(!(k<0||i.resolveInner(m+g,1).type!=r))if(k%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:m+g,to:m+g+1},matched:k>>1==l>>1};h--}}n>0&&(f+=p.length)}return c.done?{start:u,matched:!1}:null}function bp(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let a=i;a=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?a.toLowerCase():a,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function n2(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||i2,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||_h}}function i2(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const yp=new WeakMap;class vo extends At{constructor(e){let n=rl(e.languageData),i=n2(e),r,s=new class extends il{createParse(a,o,l){return new s2(r,a,o,l)}};super(n,s,[ZO.of((a,o)=>this.getIndent(a,o))],e.name),this.topNode=l2(n),r=this,this.streamParser=i,this.stateAfter=new ie({perNode:!0}),this.tokenTable=e.tokenTable?new l1(i.tokenTable):o2}static define(e){return new vo(e)}getIndent(e,n){let i=Ee(e.state),r=i.resolve(n);for(;r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;let s,{overrideIndentation:a}=e.options;a&&(s=yp.get(e.state),s!=null&&s1e4)return null;for(;l=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let a=e.children.length-1;a>=0;a--){let o=e.children[a],l=n+e.positions[a],u=o instanceof he&&l=e.length)return e;!r&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let a=e.positions[s],o=e.children[s],l;if(an&&Sh(t,r.tree,0-r.offset,n,a),l;if(o&&(l=s1(t,r.tree,n+r.offset,o.pos+r.offset,!1)))return{state:o.state,tree:l}}return{state:t.streamParser.startState(i?vi(i):4),tree:he.empty}}let s2=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=Pi.get(),a=r[0].from,{state:o,tree:l}=r2(e,i,a,s==null?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=a+l.length;for(let u=0;u=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` +`&&(n="");else{let i=n.indexOf(` +`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,o=this.lineAfter(a);n+=o,i=a+o.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){s=this.skipGapsTo(n,s,1),n+=s;let a=this.chunk.length;s=this.skipGapsTo(i,s,-1),i+=s,r+=this.chunk.length-a}return this.chunk.push(e,n,i,r),s}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new r1(n,e?e.state.tabSize:4,e?vi(e.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let o=a1(s.token,a,this.state);if(o&&(r=this.emitToken(this.lang.tokenTable.resolve(o),this.parsedPos+a.start,this.parsedPos+a.pos,4,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const _h=Object.create(null),Ms=[ze.none],a2=new vr(Ms),kp=[],Sp=Object.create(null),o1=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])o1[t]=u1(_h,e);class l1{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),o1)}resolve(e){return e?this.table[e]||(this.table[e]=u1(this.extra,e)):0}}const o2=new l1(_h);function zl(t,e){kp.indexOf(t)>-1||(kp.push(t),console.warn(e))}function u1(t,e){let n=[];for(let o of e.split(" ")){let l=[];for(let u of o.split(".")){let c=t[u]||S[u];c?typeof c=="function"?l.length?l=l.map(c):zl(u,`Modifier ${u} used at start of tag`):l.length?zl(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:zl(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(o=>o.id),s=Sp[r];if(s)return s.id;let a=Sp[r]=ze.define({id:Ms.length,name:i,props:[Li({[i]:n})]});return Ms.push(a),a.id}function l2(t){let e=ze.define({id:Ms.length,name:"Document",props:[zn.add(()=>t)],top:!0});return Ms.push(e),e}ve.RTL,ve.LTR;class Eh{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Ee(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(h1(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function _p(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function u2(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:u2(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function c2(t,e){return n=>{for(let i=Ee(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class Ep{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Xn(t){return t.selection.main.from}function h1(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Th=An.define();function h2(t,e,n,i){let{main:r}=t.selection,s=n-r.from,a=i-r.from;return Object.assign(Object.assign({},t.changeByRange(o=>o!=r&&n!=i&&t.sliceDoc(o.from+s,o.from+a)!=t.sliceDoc(n,i)?{range:o}:{changes:{from:o.from+s,to:i==r.from?o.to:o.from+a,insert:e},range:L.cursor(o.from+s+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const Tp=new WeakMap;function f2(t){if(!Array.isArray(t))return t;let e=Tp.get(t);return e||Tp.set(t,e=c1(t)),e}const Ro=ae.define(),Bs=ae.define();class d2{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&v<=57||v>=97&&v<=122?2:v>=65&&v<=90?1:0:(w=th(v))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!T||$==1&&O||I==0&&$!=0)&&(n[h]==v||i[h]==v&&(f=!0)?a[h++]=T:a.length&&(k=!1)),I=$,T+=Qt(v)}return h==l&&a[0]==0&&k?this.result(-100+(f?-200:0),a,e):p==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):p==l?this.ret(-900-e.length,[m,g]):h==l?this.result(-100+(f?-200:0)+-700+(k?0:-1100),a,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let a of n){let o=a+(this.astral?Qt(Ge(i,a)):1);s&&r[s-1]==a?r[s-1]=o:(r[s++]=a,r[s++]=o)}return this.ret(e-i.length,r)}}class p2{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:m2,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>xp(e(i),n(i)),optionClass:(e,n)=>i=>xp(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function xp(t,e){return t?e?t+" "+e:t:e}function m2(t,e,n,i,r,s){let a=t.textDirection==ve.RTL,o=a,l=!1,u="top",c,h,f=e.left-r.left,p=r.right-e.right,m=i.right-i.left,g=i.bottom-i.top;if(o&&f=g||T>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let O=(e.bottom-e.top)/s.offsetHeight,k=(e.right-e.left)/s.offsetWidth;return{style:`${u}: ${c/O}px; max-width: ${h/k}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":o?"left":"right")}}function g2(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let o=n.displayLabel||n.label,l=0;for(let u=0;ul&&a.appendChild(document.createTextNode(o.slice(l,c)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(c,h))),f.className="cm-completionMatchedText",l=h}return ln.position-i.position).map(n=>n.render)}function Xl(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class O2{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:a}=r.open,o=e.state.facet(et);this.optionContent=g2(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Xl(s.length,a,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(et).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Bs.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:a,disabled:o}=i.open;(!r.open||r.open.options!=s)&&(this.range=Xl(s.length,a,e.state.facet(et).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),o!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Xl(n.options.length,n.selected,this.view.state.facet(et).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>Ot(this.view.state,a,"completion info")):this.addInfoPane(s,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&y2(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottomi.from||i.from==0))if(s=f,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=f}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+a,c.setAttribute("role","option");let h=this.optionClass(o);h&&(c.className=h);for(let f of this.optionContent){let p=f(o,this.view.state,this.view,l);p&&c.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew O2(n,t,e)}function y2(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function wp(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function k2(t,e){let n=[],i=null,r=u=>{n.push(u);let{section:c}=u.completion;if(c){i||(i=[]);let h=typeof c=="string"?c:c.name;i.some(f=>f.name==h)||i.push(typeof c=="string"?{name:h}:c)}},s=e.facet(et);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let h of u.result.options)r(new Ep(h,u.source,c?c(h):[],1e9-n.length));else{let h=e.sliceDoc(u.from,u.to),f,p=s.filterStrict?new p2(h):new d2(h);for(let m of u.result.options)if(f=p.match(m.label)){let g=m.displayLabel?c?c(m,f.matched):[]:f.matched;r(new Ep(m,u.source,g,f.score+(m.boost||0)))}}}if(i){let u=Object.create(null),c=0,h=(f,p)=>{var m,g;return((m=f.rank)!==null&&m!==void 0?m:1e9)-((g=p.rank)!==null&&g!==void 0?g:1e9)||(f.nameh.score-c.score||l(c.completion,h.completion))){let c=u.completion;!o||o.label!=c.label||o.detail!=c.detail||o.type!=null&&c.type!=null&&o.type!=c.type||o.apply!=c.apply||o.boost!=c.boost?a.push(u):wp(u.completion)>wp(o)&&(a[a.length-1]=u),o=u.completion}return a}class er{constructor(e,n,i,r,s,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new er(this.options,Ap(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s){let a=k2(e,n);if(!a.length)return r&&e.some(l=>l.state==1)?new er(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let o=n.facet(et).selectOnOpen?0:-1;if(r&&r.selected!=o&&r.selected!=-1){let l=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:x2,above:s.aboveCursor},r?r.timestamp:Date.now(),o,!1)}map(e){return new er(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Io{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Io(E2,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(et),s=(i.override||n.languageDataAt("autocomplete",Xn(n)).map(f2)).map(o=>(this.active.find(u=>u.source==o)||new ut(o,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((o,l)=>o==this.active[l])&&(s=this.active);let a=this.open;a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(o=>o.hasResult()&&e.changes.touchesRange(o.from,o.to))||!S2(s,this.active)?a=er.build(s,n,this.id,a,i):a&&a.disabled&&!s.some(o=>o.state==1)&&(a=null),!a&&s.every(o=>o.state!=1)&&s.some(o=>o.hasResult())&&(s=s.map(o=>o.hasResult()?new ut(o.source,0):o));for(let o of e.effects)o.is(d1)&&(a=a&&a.setSelected(o.value,this.id));return s==this.active&&a==this.open?this:new Io(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:_2}}function S2(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const E2=[];function Oc(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(Th);if(n&&e.activateOnCompletion(n))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class ut{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=Oc(e,n),r=this;i?r=r.handleUserEvent(e,i,n):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new ut(r.source,0));for(let s of e.effects)if(s.is(Ro))r=new ut(r.source,1,s.value?Xn(e.state):-1);else if(s.is(Bs))r=new ut(r.source,0);else if(s.is(f1))for(let a of s.value)a.source==r.source&&(r=a);return r}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new ut(this.source,1)}handleChange(e){return e.changes.touchesRange(Xn(e.startState))?new ut(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ut(this.source,this.state,e.mapPos(this.explicitPos))}}class or extends ut{constructor(e,n,i,r,s){super(e,2,n),this.result=i,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,n,i){var r;let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let a=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Xn(e.state);if((this.explicitPos<0?l<=a:lo||!s||n=="delete"&&Xn(e.startState)==this.from)return new ut(this.source,n=="input"&&i.activateOnTyping?1:0);let u=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return T2(s.validFor,e.state,a,o)?new or(this.source,u,s,a,o):s.update&&(s=s.update(s,a,o,new Eh(e.state,l,u>=0)))?new or(this.source,u,s,s.from,(r=s.to)!==null&&r!==void 0?r:Xn(e.state)):new ut(this.source,1,u)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ut(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new or(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ut(this.source,0)}}function T2(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):h1(t,!0).test(r)}const f1=ae.define({map(t,e){return t.map(n=>n.map(e))}}),d1=ae.define(),gt=Ve.define({create(){return Io.start()},update(t,e){return t.update(e)},provide:t=>[ph.from(t,e=>e.tooltip),W.contentAttributes.from(t,e=>e.attrs)]});function xh(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(gt).active.find(r=>r.source==e.source);return i instanceof or?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},h2(t.state,n,i.from,i.to)),{annotations:Th.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const x2=b2(gt,xh);function Ba(t,e="option"){return n=>{let i=n.state.field(gt,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(t?1:-1):t?0:a-1;return o<0?o=e=="page"?0:a-1:o>=a&&(o=e=="page"?a-1:0),n.dispatch({effects:d1.of(o)}),!0}}const w2=t=>{let e=t.state.field(gt,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(gt,!1)?(t.dispatch({effects:Ro.of(!0)}),!0):!1,C2=t=>{let e=t.state.field(gt,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Bs.of(null)}),!0)};class P2{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const v2=50,R2=1e3,I2=Ze.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(gt).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(gt),n=t.state.facet(et);if(!t.selectionSet&&!t.docChanged&&t.startState.field(gt)==e)return;let i=t.transactions.some(s=>(s.selection||s.docChanged)&&!Oc(s,n));for(let s=0;sv2&&Date.now()-a.time>R2){for(let o of a.context.abortListeners)try{o()}catch(l){Ot(this.view.state,l)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(a=>a.is(Ro)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.state==1&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)Oc(s,n)=="input"?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(gt);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Xn(e),i=new Eh(e,n,t.explicitPos==n),r=new P2(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Bs.of(null)}),Ot(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(et).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(et);for(let i=0;ia.source==r.active.source);if(s&&s.state==1)if(r.done==null){let a=new ut(r.active.source,0);for(let o of r.updates)a=a.update(o,n);a.state!=1&&e.push(a)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:f1.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(gt,!1);if(e&&e.tooltip&&this.view.state.facet(et).closeOnBlur){let n=e.open&&PO(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Bs.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ro.of(!1)}),20),this.composing=0}}}),Q2=typeof navigator=="object"&&/Win/.test(navigator.platform),N2=wn.highest(W.domEventHandlers({keydown(t,e){let n=e.state.field(gt,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Q2&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&xh(e,i),!1}})),p1=W.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class L2{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class wh{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Je.TrackDel),i=e.mapPos(this.to,1,Je.TrackDel);return n==null||i==null?null:new wh(this.field,n,i)}}class Ah{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let u=a,c=/^\t*/.exec(l)[0].length;for(let h=0;hnew wh(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:o}}static parse(e){let n=[],i=[],r=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let o=s[1]?+s[1]:null,l=s[2]||s[3]||"",u=-1,c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h=u&&f.field++}r.push(new L2(u,i.length,s.index,s.index+c.length)),a=a.slice(0,s.index)+l+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(o,l,u)=>{for(let c of r)c.line==i.length&&c.from>u&&(c.from--,c.to--);return l}),i.push(a)}return new Ah(i,r)}}let D2=te.widget({widget:new class extends Cn{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),$2=te.mark({class:"cm-snippetField"});class Qr{constructor(e,n){this.ranges=e,this.active=n,this.deco=te.set(e.map(i=>(i.from==i.to?D2:$2).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Qr(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const la=ae.define({map(t,e){return t&&t.map(e)}}),M2=ae.define(),Us=Ve.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(la))return n.value;if(n.is(M2)&&t)return new Qr(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>W.decorations.from(t,e=>e?e.deco:te.none)});function Ch(t,e){return L.create(t.filter(n=>n.field==e).map(n=>L.range(n.from,n.to)))}function B2(t){let e=Ah.parse(t);return(n,i,r,s)=>{let{text:a,ranges:o}=e.instantiate(n.state,r),l={changes:{from:r,to:s,insert:Oe.of(a)},scrollIntoView:!0,annotations:i?[Th.of(i),Fe.userEvent.of("input.complete")]:void 0};if(o.length&&(l.selection=Ch(o,0)),o.some(u=>u.field>0)){let u=new Qr(o,0),c=l.effects=[la.of(u)];n.state.field(Us,!1)===void 0&&c.push(ae.appendConfig.of([Us,X2,W2,p1]))}n.dispatch(n.state.update(l))}}function m1(t){return({state:e,dispatch:n})=>{let i=e.field(Us,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:Ch(i.ranges,r),effects:la.of(s?null:new Qr(i.ranges,r)),scrollIntoView:!0})),!0}}const U2=({state:t,dispatch:e})=>t.field(Us,!1)?(e(t.update({effects:la.of(null)})),!0):!1,F2=m1(1),Z2=m1(-1),z2=[{key:"Tab",run:F2,shift:Z2},{key:"Escape",run:U2}],Cp=Y.define({combine(t){return t.length?t[0]:z2}}),X2=wn.highest(ia.compute([Cp],t=>t.facet(Cp)));function pt(t,e){return Object.assign(Object.assign({},e),{apply:B2(t)})}const W2=W.domEventHandlers({mousedown(t,e){let n=e.state.field(Us,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:Ch(n.ranges,r.field),effects:la.of(n.ranges.some(s=>s.field>r.field)?new Qr(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Fs={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Si=ae.define({map(t,e){let n=e.mapPos(t,-1,Je.TrackAfter);return n??void 0}}),Ph=new class extends Ti{};Ph.startSide=1;Ph.endSide=-1;const g1=Ve.define({create(){return me.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Si)&&(t=t.update({add:[Ph.range(n.value,n.value+1)]}));return t}});function H2(){return[q2,g1]}const Wl="()[]{}<>";function O1(t){for(let e=0;e{if((Y2?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Qt(Ge(i,0))==1||e!=r.from||n!=r.to)return!1;let s=G2(t.state,i);return s?(t.dispatch(s),!0):!1}),V2=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=b1(t,t.selection.main.head).brackets||Fs.brackets,r=null,s=t.changeByRange(a=>{if(a.empty){let o=K2(t.doc,a.head);for(let l of i)if(l==o&&ol(t.doc,a.head)==O1(Ge(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:L.cursor(a.head-l.length)}}return{range:r=a}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},j2=[{key:"Backspace",run:V2}];function G2(t,e){let n=b1(t,t.selection.main.head),i=n.brackets||Fs.brackets;for(let r of i){let s=O1(Ge(r,0));if(e==r)return s==r?tA(t,r,i.indexOf(r+r+r)>-1,n):J2(t,r,s,n.before||Fs.before);if(e==s&&y1(t,t.selection.main.from))return eA(t,r,s)}return null}function y1(t,e){let n=!1;return t.field(g1).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function ol(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Qt(Ge(n,0)))}function K2(t,e){let n=t.sliceString(e-2,e);return Qt(Ge(n,0))==n.length?n:n.slice(1)}function J2(t,e,n,i){let r=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Si.of(a.to+e.length),range:L.range(a.anchor+e.length,a.head+e.length)};let o=ol(t.doc,a.head);return!o||/\s/.test(o)||i.indexOf(o)>-1?{changes:{insert:e+n,from:a.head},effects:Si.of(a.head+e.length),range:L.cursor(a.head+e.length)}:{range:r=a}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function eA(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&ol(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:L.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function tA(t,e,n,i){let r=i.stringPrefixes||Fs.stringPrefixes,s=null,a=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:Si.of(o.to+e.length),range:L.range(o.anchor+e.length,o.head+e.length)};let l=o.head,u=ol(t.doc,l),c;if(u==e){if(Pp(t,l))return{changes:{insert:e+e,from:l},effects:Si.of(l+e.length),range:L.cursor(l+e.length)};if(y1(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:L.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=vp(t,l-2*e.length,r))>-1&&Pp(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Si.of(l+e.length),range:L.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Qe.Word&&vp(t,l,r)>-1&&!nA(t,l,e,r))return{changes:{insert:e+e,from:l},effects:Si.of(l+e.length),range:L.cursor(l+e.length)}}return{range:s=o}});return s?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function Pp(t,e){let n=Ee(t).resolveInner(e+1);return n.parent&&n.from==e}function nA(t,e,n,i){let r=Ee(t).resolveInner(e,-1),s=i.reduce((a,o)=>Math.max(a,o.length),0);for(let a=0;a<5;a++){let o=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=o.indexOf(n);if(!l||l>-1&&i.indexOf(o.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function vp(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Qe.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=Qe.Word)return s}return-1}function iA(t={}){return[N2,gt,et.of(t),I2,rA,p1]}const k1=[{key:"Ctrl-Space",run:A2},{key:"Escape",run:C2},{key:"ArrowDown",run:Ba(!0)},{key:"ArrowUp",run:Ba(!1)},{key:"PageDown",run:Ba(!0,"page")},{key:"PageUp",run:Ba(!1,"page")},{key:"Enter",run:w2}],rA=wn.highest(ia.computeN([et],t=>t.facet(et).defaultKeymap?[k1]:[]));function xe(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;et.normalize("NFKD"):t=>t;class Or{constructor(e,n,i=0,r=e.length,s,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?o=>s(Rp(o)):Rp,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ge(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=th(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Qt(e);let r=this.normalize(n);for(let s=0,a=i;;s++){let o=r.charCodeAt(s),l=this.match(o,a,this.bufferPos+this.bufferStart);if(s==r.length-1){if(l)return this.value=l,this;break}a==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Qo(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let o=new lr(n,e.sliceString(n,i));return Hl.set(e,o),o}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=e.sliceString(n,a)+s,a=n),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=Qo(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=lr.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(E1.prototype[Symbol.iterator]=T1.prototype[Symbol.iterator]=function(){return this});function sA(t){try{return new RegExp(t,vh),!0}catch{return!1}}function Qo(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function bc(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=xe("input",{class:"cm-textfield",name:"line",value:e}),i=xe("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:No.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},xe("label",t.state.phrase("Go to line"),": ",n)," ",xe("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:a}=t,o=a.doc.lineAt(a.selection.main.head),[,l,u,c,h]=s,f=c?+c.slice(1):0,p=u?+u:o.number;if(u&&h){let O=p/100;l&&(O=O*(l=="-"?-1:1)+o.number/a.doc.lines),p=Math.round(a.doc.lines*O)}else u&&l&&(p=p*(l=="-"?-1:1)+o.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,p))),g=L.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[No.of(!1),W.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:i}}const No=ae.define(),Ip=Ve.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(No)&&(t=n.value);return t},provide:t=>Ls.from(t,e=>e?bc:null)}),aA=t=>{let e=Ns(t,bc);if(!e){let n=[No.of(!0)];t.state.field(Ip,!1)==null&&n.push(ae.appendConfig.of([Ip,oA])),t.dispatch({effects:n}),e=Ns(t,bc)}return e&&e.dom.querySelector("input").select(),!0},oA=W.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),lA={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uA=Y.define({combine(t){return pn(t,lA,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function cA(t){return[mA,pA]}const hA=te.mark({class:"cm-selectionMatch"}),fA=te.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Qp(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Qe.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Qe.Word)}function dA(t,e,n,i){return t(e.sliceDoc(n,n+1))==Qe.Word&&t(e.sliceDoc(i-1,i))==Qe.Word}const pA=Ze.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(uA),{state:n}=t,i=n.selection;if(i.ranges.length>1)return te.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return te.none;let l=n.wordAt(r.head);if(!l)return te.none;a=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return te.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(Qp(a,n,r.from,r.to)&&dA(a,n,r.from,r.to)))return te.none}else if(s=n.sliceDoc(r.from,r.to),!s)return te.none}let o=[];for(let l of t.visibleRanges){let u=new Or(n.doc,s,l.from,l.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!a||Qp(a,n,c,h))&&(r.empty&&c<=r.from&&h>=r.to?o.push(fA.range(c,h)):(c>=r.to||h<=r.from)&&o.push(hA.range(c,h)),o.length>e.maxMatches))return te.none}}return te.set(o)}},{decorations:t=>t.decorations}),mA=W.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),gA=({state:t,dispatch:e})=>{let{selection:n}=t,i=L.create(n.ranges.map(r=>t.wordAt(r.head)||L.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function OA(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,o=new Or(t.doc,e,i[i.length-1].to);;)if(o.next(),o.done){if(a)return null;o=new Or(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(l=>l.from==o.value.from))continue;if(s){let l=t.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}const bA=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return gA({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=OA(t,i);return r?(e(t.update({selection:t.selection.addRange(L.range(r.from,r.to),!1),effects:W.scrollIntoView(r.to)})),!0):!1},$i=Y.define({combine(t){return pn(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new RA(e),scrollToMatch:e=>W.scrollIntoView(e)})}});function yA(t){return t?[$i.of(t),kc]:kc}class Rh{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||sA(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new EA(this):new SA(this)}getCursor(e,n=0,i){let r=e.doc?e:ue.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Vi(this,r,n,i):qi(this,r,n,i)}}class x1{constructor(e){this.spec=e}}function qi(t,e,n,i){return new Or(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?kA(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function kA(t,e){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=qi(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function Vi(t,e,n,i){return new E1(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?_A(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function Lo(t,e){return t.slice(tt(t,e,!1),e)}function Do(t,e){return t.slice(e,tt(t,e))}function _A(t){return(e,n,i)=>!i[0].length||(t(Lo(i.input,i.index))!=Qe.Word||t(Do(i.input,i.index))!=Qe.Word)&&(t(Do(i.input,i.index+i[0].length))!=Qe.Word||t(Lo(i.input,i.index+i[0].length))!=Qe.Word)}class EA extends x1{nextMatch(e,n,i){let r=Vi(this.spec,e,i,e.doc.length).next();return r.done&&(r=Vi(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=Vi(this.spec,e,s,i),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==n||o.from>s+10))return o;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Vi(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const br=ae.define(),Ih=ae.define(),Wn=Ve.define({create(t){return new Yl(yc(t).create(),null)},update(t,e){for(let n of e.effects)n.is(br)?t=new Yl(n.value.create(),t.panel):n.is(Ih)&&(t=new Yl(t.query,n.value?Qh:null));return t},provide:t=>Ls.from(t,e=>e.panel)});class Yl{constructor(e,n){this.query=e,this.panel=n}}const TA=te.mark({class:"cm-searchMatch"}),xA=te.mark({class:"cm-searchMatch cm-searchMatch-selected"}),wA=Ze.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Wn))}update(t){let e=t.state.field(Wn);(e!=t.startState.field(Wn)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return te.none;let{view:n}=this,i=new Yn;for(let r=0,s=n.visibleRanges,a=s.length;rs[r+1].from-2*250;)l=s[++r].to;t.highlight(n.state,o,l,(u,c)=>{let h=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);i.add(u,c,h?xA:TA)})}return i.finish()}},{decorations:t=>t.decorations});function ua(t){return e=>{let n=e.state.field(Wn,!1);return n&&n.query.spec.valid?t(e,n):C1(e)}}const Zs=ua((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=L.single(i.from,i.to),s=t.state.facet($i);return t.dispatch({selection:r,effects:[Lh(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),A1(t),!0}),zs=ua((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=L.single(r.from,r.to),a=t.state.facet($i);return t.dispatch({selection:s,effects:[Lh(t,r),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),A1(t),!0}),AA=ua((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:L.create(n.map(i=>L.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),CA=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let o=new Or(t.doc,t.sliceDoc(i,r));!o.next().done;){if(s.length>1e3)return!1;o.value.from==i&&(a=s.length),s.push(L.range(o.value.from,o.value.to))}return e(t.update({selection:L.create(s,a),userEvent:"select.search.matches"})),!0},Np=ua((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let a=[],o,l,u=[];if(s.from==i&&s.to==r&&(l=n.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:l}),s=e.nextMatch(n,s.from,s.to),u.push(W.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),s){let c=a.length==0||a[0].from>=s.to?0:s.to-s.from-l.length;o=L.single(s.from-c,s.to-c),u.push(Lh(t,s)),u.push(n.facet($i).scrollToMatch(o.main,t))}return t.dispatch({changes:a,selection:o,effects:u,userEvent:"input.replace"}),!0}),PA=ua((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:a}=r;return{from:s,to:a,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:W.announce.of(i),userEvent:"input.replace.all"}),!0});function Qh(t){return t.state.facet($i).createPanel(t)}function yc(t,e){var n,i,r,s,a;let o=t.selection.main,l=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to);if(e&&!l)return e;let u=t.facet($i);return new Rh({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function w1(t){let e=Ns(t,Qh);return e&&e.dom.querySelector("[main-field]")}function A1(t){let e=w1(t);e&&e==t.root.activeElement&&e.select()}const C1=t=>{let e=t.state.field(Wn,!1);if(e&&e.panel){let n=w1(t);if(n&&n!=t.root.activeElement){let i=yc(t.state,e.query.spec);i.valid&&t.dispatch({effects:br.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Ih.of(!0),e?br.of(yc(t.state,e.query.spec)):ae.appendConfig.of(kc)]});return!0},Nh=t=>{let e=t.state.field(Wn,!1);if(!e||!e.panel)return!1;let n=Ns(t,Qh);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Ih.of(!1)}),!0},vA=[{key:"Mod-f",run:C1,scope:"editor search-panel"},{key:"F3",run:Zs,shift:zs,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Zs,shift:zs,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Nh,scope:"editor search-panel"},{key:"Mod-Shift-l",run:CA},{key:"Mod-Alt-g",run:aA},{key:"Mod-d",run:bA,preventDefault:!0}];let RA=class{constructor(e){this.view=e;let n=this.query=e.state.field(Wn).query.spec;this.commit=this.commit.bind(this),this.searchField=xe("input",{value:n.search,placeholder:St(e,"Find"),"aria-label":St(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=xe("input",{value:n.replace,placeholder:St(e,"Replace"),"aria-label":St(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=xe("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=xe("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=xe("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return xe("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=xe("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Zs(e),[St(e,"next")]),i("prev",()=>zs(e),[St(e,"previous")]),i("select",()=>AA(e),[St(e,"all")]),xe("label",null,[this.caseField,St(e,"match case")]),xe("label",null,[this.reField,St(e,"regexp")]),xe("label",null,[this.wordField,St(e,"by word")]),...e.state.readOnly?[]:[xe("br"),this.replaceField,i("replace",()=>Np(e),[St(e,"replace")]),i("replaceAll",()=>PA(e),[St(e,"replace all")])],xe("button",{name:"close",onclick:()=>Nh(e),"aria-label":St(e,"close"),type:"button"},["×"])])}commit(){let e=new Rh({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:br.of(e)}))}keydown(e){KT(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?zs:Zs)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Np(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(br)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet($i).top}};function St(t,e){return t.state.phrase(e)}const Ua=30,Fa=/[\s\.,:;?!]/;function Lh(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-Ua),a=Math.min(r,n+Ua),o=t.state.sliceDoc(s,a);if(s!=i.from){for(let l=0;lo.length-Ua;l--)if(!Fa.test(o[l-1])&&Fa.test(o[l])){o=o.slice(0,l);break}}return W.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${i.number}.`)}const IA=W.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),kc=[Wn,wn.low(wA),IA],QA=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=$h(t.state,n.from);return i.line?NA(t):i.block?DA(t):!1};function Dh(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const NA=Dh(BA,0),LA=Dh(P1,0),DA=Dh((t,e)=>P1(t,e,MA(e)),0);function $h(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Gr=50;function $A(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Gr,i),a=t.sliceDoc(r,r+Gr),o=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(a)[0].length,u=s.length-o;if(s.slice(u-e.length,u)==e&&a.slice(l,l+n.length)==n)return{open:{pos:i-o,margin:o&&1},close:{pos:r+l,margin:l&&1}};let c,h;r-i<=2*Gr?c=h=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+Gr),h=t.sliceDoc(r-Gr,r));let f=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(h)[0].length,m=h.length-p-n.length;return c.slice(f,f+e.length)==e&&h.slice(m,m+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(h.charAt(m-1))?1:0}}:null}function MA(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function P1(t,e,n=e.selection.ranges){let i=n.map(s=>$h(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>$A(e,i[a],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let a=0,o;ar&&(s==a||a>h.from)){r=h.from;let f=/^\s*/.exec(h.text)[0].length,p=f==h.length,m=h.text.slice(f,f+u.length)==u?f:-1;fs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:l,indent:u,empty:c,single:h}of i)(h||!c)&&s.push({from:o.from+u,insert:l+" "});let a=e.changes(s);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:o,token:l}of i)if(o>=0){let u=a.from+o,c=u+l.length;a.text[c-a.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const Sc=An.define(),UA=An.define(),FA=Y.define(),v1=Y.define({combine(t){return pn(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),R1=Ve.define({create(){return un.empty},update(t,e){let n=e.state.facet(v1),i=e.annotation(Sc);if(i){let l=bt.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=$o(c,c.length,n.minDepth,l):c=N1(c,e.startState.selection),new un(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(UA);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Fe.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=bt.fromTransaction(e),a=e.annotation(Fe.time),o=e.annotation(Fe.userEvent);return s?t=t.addChanges(s,a,o,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,o,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new un(t.done.map(bt.fromJSON),t.undone.map(bt.fromJSON))}});function ZA(t={}){return[R1,v1.of(t),W.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?I1:e.inputType=="historyRedo"?_c:null;return i?(e.preventDefault(),i(n)):!1}})]}function ll(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(R1,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const I1=ll(0,!1),_c=ll(1,!1),zA=ll(0,!0),XA=ll(1,!0);class bt{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new bt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new bt(e.changes&&We.fromJSON(e.changes),[],e.mapped&&hn.fromJSON(e.mapped),e.startSelection&&L.fromJSON(e.startSelection),e.selectionsAfter.map(L.fromJSON))}static fromTransaction(e,n){let i=Dt;for(let r of e.startState.facet(FA)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new bt(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Dt)}static selection(e){return new bt(void 0,Dt,void 0,void 0,e)}}function $o(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function WA(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,a,o)=>{for(let l=0;l=u&&a<=c&&(i=!0)}}),i}function HA(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function Q1(t,e){return t.length?e.length?t.concat(e):t:e}const Dt=[],YA=200;function N1(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-YA));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),$o(t,t.length-1,1e9,n.setSelAfter(i)))}else return[bt.selection([e])]}function qA(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function ql(t,e){if(!t.length)return t;let n=t.length,i=Dt;for(;n;){let r=VA(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[bt.selection(i)]:Dt}function VA(t,e,n){let i=Q1(t.selectionsAfter.length?t.selectionsAfter.map(o=>o.map(e)):Dt,n);if(!t.changes)return bt.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(s):s;return new bt(r,ae.mapEffects(t.effects,e),a,t.startSelection.map(s),i)}const jA=/^(input\.type|delete)($|\.)/;class un{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new un(this.done,this.undone):this}addChanges(e,n,i,r,s){let a=this.done,o=a[a.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!i||jA.test(i))&&(!o.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):ul(n,e))}function at(t){return t.textDirectionAt(t.state.selection.main.head)==ve.LTR}const Mh=t=>L1(t,!at(t)),Bh=t=>L1(t,at(t));function D1(t,e){return jt(t,n=>n.empty?t.moveByGroup(n,e):ul(n,e))}const $1=t=>D1(t,!at(t)),M1=t=>D1(t,at(t));function KA(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function cl(t,e,n){let i=Ee(t).resolveInner(e.head),r=n?ie.closedBy:ie.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;KA(t,u,r)?i=u:l=n?u.to:u.from}let s=i.type.prop(r),a,o;return s&&(a=n?ln(t,i.from,1):ln(t,i.to,-1))&&a.matched?o=n?a.end.to:a.end.from:o=n?i.to:i.from,L.cursor(o,n?-1:1)}const B1=t=>jt(t,e=>cl(t.state,e,!at(t))),U1=t=>jt(t,e=>cl(t.state,e,at(t)));function F1(t,e){return jt(t,n=>{if(!n.empty)return ul(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const Z1=t=>F1(t,!1),z1=t=>F1(t,!0);function X1(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):ul(a,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),o=t.scrollDOM.getBoundingClientRect(),l=o.top+n.marginTop,u=o.bottom-n.marginBottom;a&&a.top>l&&a.bottomW1(t,!1),Ec=t=>W1(t,!0);function Jn(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=L.cursor(i.from+s))}return r}const H1=t=>jt(t,e=>Jn(t,e,!0)),Y1=t=>jt(t,e=>Jn(t,e,!1)),q1=t=>jt(t,e=>Jn(t,e,!at(t))),V1=t=>jt(t,e=>Jn(t,e,at(t))),JA=t=>jt(t,e=>L.cursor(t.lineBlockAt(e.head).from,1)),eC=t=>jt(t,e=>L.cursor(t.lineBlockAt(e.head).to,-1));function tC(t,e,n){let i=!1,r=Nr(t.selection,s=>{let a=ln(t,s.head,-1)||ln(t,s.head,1)||s.head>0&&ln(t,s.head-1,1)||s.headtC(t,e);function Ut(t,e){let n=Nr(t.state.selection,i=>{let r=e(i);return L.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(mn(t.state,n)),!0)}function j1(t,e){return Ut(t,n=>t.moveByChar(n,e))}const Uh=t=>j1(t,!at(t)),Fh=t=>j1(t,at(t));function G1(t,e){return Ut(t,n=>t.moveByGroup(n,e))}const K1=t=>G1(t,!at(t)),J1=t=>G1(t,at(t)),eb=t=>Ut(t,e=>cl(t.state,e,!at(t))),tb=t=>Ut(t,e=>cl(t.state,e,at(t)));function nb(t,e){return Ut(t,n=>t.moveVertically(n,e))}const ib=t=>nb(t,!1),rb=t=>nb(t,!0);function sb(t,e){return Ut(t,n=>t.moveVertically(n,e,X1(t).height))}const Dp=t=>sb(t,!1),$p=t=>sb(t,!0),ab=t=>Ut(t,e=>Jn(t,e,!0)),ob=t=>Ut(t,e=>Jn(t,e,!1)),lb=t=>Ut(t,e=>Jn(t,e,!at(t))),ub=t=>Ut(t,e=>Jn(t,e,at(t))),iC=t=>Ut(t,e=>L.cursor(t.lineBlockAt(e.head).from)),rC=t=>Ut(t,e=>L.cursor(t.lineBlockAt(e.head).to)),Mp=({state:t,dispatch:e})=>(e(mn(t,{anchor:0})),!0),Bp=({state:t,dispatch:e})=>(e(mn(t,{anchor:t.doc.length})),!0),Up=({state:t,dispatch:e})=>(e(mn(t,{anchor:t.selection.main.anchor,head:0})),!0),Fp=({state:t,dispatch:e})=>(e(mn(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),sC=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),aC=({state:t,dispatch:e})=>{let n=hl(t).map(({from:i,to:r})=>L.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:L.create(n),userEvent:"select"})),!0},oC=({state:t,dispatch:e})=>{let n=Nr(t.selection,i=>{var r;let s=Ee(t).resolveStack(i.from,1);for(let a=s;a;a=a.next){let{node:o}=a;if((o.from=i.to||o.to>i.to&&o.from<=i.from)&&(!((r=o.parent)===null||r===void 0)&&r.parent))return L.range(o.to,o.from)}return i});return e(mn(t,n)),!0},lC=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=L.create([n.main]):n.main.empty||(i=L.create([L.cursor(n.main.head)])),i?(e(mn(t,i)),!0):!1};function Lr(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:a,to:o}=s;if(a==o){let l=e(s);la&&(n="delete.forward",l=Za(t,l,!0)),a=Math.min(a,l),o=Math.max(o,l)}else a=Za(t,a,!1),o=Za(t,o,!0);return a==o?{range:s}:{changes:{from:a,to:o},range:L.cursor(a,ar(t)))i.between(e,e,(r,s)=>{re&&(e=n?s:r)});return e}const cb=(t,e,n)=>Lr(t,i=>{let r=i.from,{state:s}=t,a=s.doc.lineAt(r),o,l;if(n&&!e&&r>a.from&&rcb(t,!1,!0),Bo=t=>cb(t,!0,!1),hb=(t,e)=>Lr(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let o=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=tt(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),c=a(u);if(o!=null&&c!=o)break;(u!=" "||i!=n.head)&&(o=c),i=l}return i}),Zh=t=>hb(t,!1),fb=t=>hb(t,!0),db=t=>Lr(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headLr(t,e=>{let n=t.lineBlockAt(e.head).from;return e.head>n?n:Math.max(0,e.head-1)}),cC=t=>Lr(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),hC=t=>Lr(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Oe.of(["",""])},range:L.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},dC=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),a=r==s.from?r-1:tt(s.text,r-s.from,!1)+s.from,o=r==s.to?r+1:tt(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:o,insert:t.doc.slice(r,o).append(t.doc.slice(a,r))},range:L.cursor(o)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function hl(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=s.to,a.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function pb(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of hl(t)){if(n?s.to==t.doc.length:s.from==0)continue;let a=t.doc.lineAt(n?s.to+1:s.from-1),o=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+t.lineBreak});for(let l of s.ranges)r.push(L.range(Math.min(t.doc.length,l.anchor+o),Math.min(t.doc.length,l.head+o)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:t.lineBreak+a.text});for(let l of s.ranges)r.push(L.range(l.anchor-o,l.head-o))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:L.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const pC=({state:t,dispatch:e})=>pb(t,e,!1),mC=({state:t,dispatch:e})=>pb(t,e,!0);function mb(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of hl(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const gC=({state:t,dispatch:e})=>mb(t,e,!1),OC=({state:t,dispatch:e})=>mb(t,e,!0),bC=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(hl(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(t.lineWrapping){let a=t.lineBlockAt(r.head),o=t.coordsAtPos(r.head,r.assoc||1);o&&(s=a.bottom+t.documentTop-o.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function yC(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ee(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(ie.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const kC=gb(!1),SC=gb(!0);function gb(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:a}=r,o=e.doc.lineAt(s),l=!t&&s==a&&yC(e,s);t&&(s=a=(a<=o.to?o:e.doc.lineAt(a)).to);let u=new sa(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=sl(u,s);for(c==null&&(c=Yt(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));ao.from&&s{let r=[];for(let a=i.from;a<=i.to;){let o=t.doc.lineAt(a);o.number>n&&(i.empty||i.to>o.from)&&(e(o,r,i),n=o.number),a=o.to+1}let s=t.changes(r);return{changes:r,range:L.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const Ob=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new sa(t,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=zh(t,(s,a,o)=>{let l=sl(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let u=/^\s*/.exec(s.text)[0],c=gr(t,l);(u!=c||o.fromt.readOnly?!1:(e(t.update(zh(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Rr)})}),{userEvent:"input.indent"})),!0),yb=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(zh(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Yt(r,t.tabSize),a=0,o=gr(t,Math.max(0,s-vi(t)));for(;a(t.setTabFocusMode(),!0),EC=[{key:"Ctrl-b",run:Mh,shift:Uh,preventDefault:!0},{key:"Ctrl-f",run:Bh,shift:Fh},{key:"Ctrl-p",run:Z1,shift:ib},{key:"Ctrl-n",run:z1,shift:rb},{key:"Ctrl-a",run:JA,shift:iC},{key:"Ctrl-e",run:eC,shift:rC},{key:"Ctrl-d",run:Bo},{key:"Ctrl-h",run:Mo},{key:"Ctrl-k",run:db},{key:"Ctrl-Alt-h",run:Zh},{key:"Ctrl-o",run:fC},{key:"Ctrl-t",run:dC},{key:"Ctrl-v",run:Ec}],TC=[{key:"ArrowLeft",run:Mh,shift:Uh,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:$1,shift:K1,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:q1,shift:lb,preventDefault:!0},{key:"ArrowRight",run:Bh,shift:Fh,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:M1,shift:J1,preventDefault:!0},{mac:"Cmd-ArrowRight",run:V1,shift:ub,preventDefault:!0},{key:"ArrowUp",run:Z1,shift:ib,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Mp,shift:Up},{mac:"Ctrl-ArrowUp",run:Lp,shift:Dp},{key:"ArrowDown",run:z1,shift:rb,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Bp,shift:Fp},{mac:"Ctrl-ArrowDown",run:Ec,shift:$p},{key:"PageUp",run:Lp,shift:Dp},{key:"PageDown",run:Ec,shift:$p},{key:"Home",run:Y1,shift:ob,preventDefault:!0},{key:"Mod-Home",run:Mp,shift:Up},{key:"End",run:H1,shift:ab,preventDefault:!0},{key:"Mod-End",run:Bp,shift:Fp},{key:"Enter",run:kC},{key:"Mod-a",run:sC},{key:"Backspace",run:Mo,shift:Mo},{key:"Delete",run:Bo},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Zh},{key:"Mod-Delete",mac:"Alt-Delete",run:fb},{mac:"Mod-Backspace",run:cC},{mac:"Mod-Delete",run:hC}].concat(EC.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Zp=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:B1,shift:eb},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:U1,shift:tb},{key:"Alt-ArrowUp",run:pC},{key:"Shift-Alt-ArrowUp",run:gC},{key:"Alt-ArrowDown",run:mC},{key:"Shift-Alt-ArrowDown",run:OC},{key:"Escape",run:lC},{key:"Mod-Enter",run:SC},{key:"Alt-l",mac:"Ctrl-l",run:aC},{key:"Mod-i",run:oC,preventDefault:!0},{key:"Mod-[",run:yb},{key:"Mod-]",run:bb},{key:"Mod-Alt-\\",run:Ob},{key:"Shift-Mod-k",run:bC},{key:"Shift-Mod-\\",run:nC},{key:"Mod-/",run:QA},{key:"Alt-A",run:LA},{key:"Ctrl-m",mac:"Shift-Alt-m",run:_C}].concat(TC),xC={key:"Tab",run:bb,shift:yb};class wC{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Oi{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=e,s=i.facet(Xs).markerFilter;s&&(r=s(r,i));let a=te.set(r.map(o=>o.from==o.to||o.from==o.to-1&&i.doc.lineAt(o.from).to==o.from?te.widget({widget:new LC(o),diagnostic:o}).range(o.from):te.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity+(o.markClass?" "+o.markClass:"")},diagnostic:o,inclusive:!0}).range(o.from,o.to)),!0);return new Oi(a,n,yr(a))}}function yr(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:a})=>{if(!(e&&a.diagnostic!=e))return i=new wC(r,s,a.diagnostic),!1}),i}function AC(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Xs).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(kb))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function CC(t,e){return t.field(Ct,!1)?e:e.concat(ae.appendConfig.of(MC))}const kb=ae.define(),Xh=ae.define(),Sb=ae.define(),Ct=Ve.define({create(){return new Oi(te.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=yr(n,t.selected.diagnostic,s)||yr(n,null,s)}!n.size&&r&&e.state.facet(Xs).autoPanel&&(r=null),t=new Oi(n,r,i)}for(let n of e.effects)if(n.is(kb)){let i=e.state.facet(Xs).autoPanel?n.value.length?Ws.open:null:t.panel;t=Oi.init(n.value,i,e.state)}else n.is(Xh)?t=new Oi(t.diagnostics,n.value?Ws.open:null,t.selected):n.is(Sb)&&(t=new Oi(t.diagnostics,t.panel,n.value));return t},provide:t=>[Ls.from(t,e=>e.panel),W.decorations.from(t,e=>e.diagnostics)]}),PC=te.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function vC(t,e,n){let{diagnostics:i}=t.state.field(Ct),r=[],s=2e8,a=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eEb(t,n,!1)))}const IC=t=>{let e=t.state.field(Ct,!1);(!e||!e.panel)&&t.dispatch({effects:CC(t.state,[Xh.of(!0)])});let n=Ns(t,Ws.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},zp=t=>{let e=t.state.field(Ct,!1);return!e||!e.panel?!1:(t.dispatch({effects:Xh.of(!1)}),!0)},QC=t=>{let e=t.state.field(Ct,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},NC=[{key:"Mod-Shift-m",run:IC,preventDefault:!0},{key:"F8",run:QC}],Xs=Y.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},pn(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function _b(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Eb(t,e,n){var i;let r=n?_b(e.actions):[];return xe("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},xe("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,a)=>{let o=!1,l=f=>{if(f.preventDefault(),o)return;o=!0;let p=yr(t.state.field(Ct).diagnostics,e);p&&s.apply(t,p.from,p.to)},{name:u}=s,c=r[a]?u.indexOf(r[a]):-1,h=c<0?u:[u.slice(0,c),xe("u",u.slice(c,c+1)),u.slice(c+1)];return xe("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[a]})"`}.`},h)}),e.source&&xe("div",{class:"cm-diagnosticSource"},e.source))}class LC extends Cn{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return xe("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Xp{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Eb(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ws{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)zp(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=_b(s.actions);for(let o=0;o{for(let s=0;szp(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ct).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let h=i;hi&&(this.items.splice(i,u-i),r=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),s=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:o})=>{let l=o.height/this.list.offsetHeight;a.topo.bottom&&(this.list.scrollTop+=(a.bottom-o.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ct),i=yr(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Sb.of(i)})}static open(e){return new Ws(e)}}function DC(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function za(t){return DC(``,'width="6" height="3"')}const $C=W.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:za("#d11")},".cm-lintRange-warning":{backgroundImage:za("orange")},".cm-lintRange-info":{backgroundImage:za("#999")},".cm-lintRange-hint":{backgroundImage:za("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),MC=[Ct,W.decorations.compute([Ct],t=>{let{selected:e,panel:n}=t.field(Ct);return!e||!n||e.from==e.to?te.none:te.set([PC.range(e.from,e.to)])}),Mx(vC,{hideOn:AC}),$C];var Wp={};class Uo{constructor(e,n,i,r,s,a,o,l,u,c=0,h){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=o,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new Uo(e,[],n,i,i,0,[],0,r?new Hp(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p;this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[o-4]==0&&a.buffer[o-1]>-1){if(n==i)return;if(a.buffer[o-2]>=n){a.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4);this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let s=e,{parser:a}=this.p;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new Uo(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new BC(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;sl&1&&o==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,u=this.stack.length-o*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return o<<19|65536|l}}else{let o=i(a,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Hp{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class BC{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class Fo{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Fo(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Fo(this.stack,this.pos,this.index)}}function cs(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class uo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Yp=new uo;class UC{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Yp,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n=this.chunk2Pos&&io.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Yp,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class ur{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;Tb(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}ur.prototype.contextual=ur.prototype.fallback=ur.prototype.extend=!1;class Zo{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?cs(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(Tb(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Zo.prototype.contextual=ur.prototype.fallback=ur.prototype.extend=!1;class Gt{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Tb(t,e,n,i,r,s){let a=0,o=1<0){let m=t[p];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||FC(m,e.token.value,r,s))){e.acceptToken(m);break}}let c=e.next,h=0,f=t[a+2];if(e.next<0&&f>h&&t[u+f*3-3]==65535){a=t[u+f*3-1];continue e}for(;h>1,m=u+p+(p<<1),g=t[m],O=t[m+1]||65536;if(c=O)h=p+1;else{a=t[m+2],e.advance();continue e}}break}}function qp(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function FC(t,e,n,i){let r=qp(n,i,e);return r<0||qp(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let ZC=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Vp(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Vp(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(s instanceof he){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}};class zC{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new uo)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let u=0;uh.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let f=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(i=h,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new uo,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new uo,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a=0&&i.p.parser.dialect.allows(o>>1)){o&1?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;se.bufferLength*4?new ZC(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!i.length){let a=r&&HC(r);if(a)return _t&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw _t&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return _t&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((o,l)=>l.score-o.score);i.length>a;)i.pop();i.some(o=>o.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a500&&u.buffer.length>500)if((o.score-u.score||o.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(r);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?s.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!u||(h.prop(ie.contextHash)||0)==c))return e.useNode(h,f),_t&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0;if(!(h instanceof he)||h.children.length==0||h.positions[0]>0)break;let p=h.children[0];if(p instanceof he&&h.positions[0]==0)h=p;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),_t&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return jp(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),_t&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let h=o.split(),f=c;for(let p=0;h.forceReduce()&&p<10&&(_t&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,i));p++)_t&&(f=this.stackID(h)+" -> ");for(let p of o.recoverByInsert(l))_t&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>o.pos?(u==o.pos&&(u++,l=0),o.recoverByDelete(l,u),_t&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),jp(o,i)):(!r||r.scoret;class xb{constructor(e){this.start=e.start,this.shift=e.shift||jl,this.reduce=e.reduce||jl,this.reuse=e.reuse||jl,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ii extends il{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let o=0;oe.topRules[o][1]),r=[];for(let o=0;o=0)s(c,l,o[u++]);else{let h=o[u+-c];for(let f=-c;f>0;f--)s(o[u++],l,h);u++}}}this.nodeSet=new vr(n.map((o,l)=>ze.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=QO;let a=cs(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new ur(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new XC(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],o=a&1,l=r[s++];if(o&&i)return l;for(let u=s+(a>>1);s0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=kn(this.data,s+2);else break;r=n(kn(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=kn(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Ii.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=Gp(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const YC=312,Kp=1,qC=2,VC=3,jC=4,GC=313,KC=315,JC=316,eP=5,tP=6,nP=0,Tc=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],wb=125,iP=59,xc=47,rP=42,sP=43,aP=45,oP=60,lP=44,uP=63,cP=46,hP=new xb({start:!1,shift(t,e){return e==eP||e==tP||e==KC?t:e==JC},strict:!1}),fP=new Gt((t,e)=>{let{next:n}=t;(n==wb||n==-1||e.context)&&t.acceptToken(GC)},{contextual:!0,fallback:!0}),dP=new Gt((t,e)=>{let{next:n}=t,i;Tc.indexOf(n)>-1||n==xc&&((i=t.peek(1))==xc||i==rP)||n!=wb&&n!=iP&&n!=-1&&!e.context&&t.acceptToken(YC)},{contextual:!0}),pP=new Gt((t,e)=>{let{next:n}=t;if(n==sP||n==aP){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(Kp);t.acceptToken(i?Kp:qC)}}else n==uP&&t.peek(1)==cP&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(VC))},{contextual:!0});function Gl(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const mP=new Gt((t,e)=>{if(t.next!=oP||!e.dialectEnabled(nP)||(t.advance(),t.next==xc))return;let n=0;for(;Tc.indexOf(t.next)>-1;)t.advance(),n++;if(Gl(t.next,!0)){for(t.advance(),n++;Gl(t.next,!1);)t.advance(),n++;for(;Tc.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==lP)return;for(let i=0;;i++){if(i==7){if(!Gl(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(jC,-n)}),gP=Li({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const using function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,"LineComment Hashbang":S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),OP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},bP={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},yP={__proto__:null,"<":187},kP=Ii.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EoQWO1G3oO$4tQ^O1G3qO$8xQ^O'#HpOOQU1G3t1G3tO$9VQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$9_Q^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$=fQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$=kQ07bO,5:UOOQO,5;],5;]O$=uQ`O'#IaO$>]QWO,5@[OOQ?Mr1G/o1G/oO$>eQ`O'#IgO$>oQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$>wQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$?OQ?MxO1G0jO$?ZQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$?iQ?MxO1G0jOOQO1G0Z1G0ZO$?}Q?NdO1G0jPOOO-EzO$@kQWO1G5uO$@sQWO1G6TO$@{QrO1G6UO9WQWO,5?QO$AVQ?NdO1G6RO%[Q^O1G6RO$AgQ?MxO1G6RO$AxQWO1G6QO$AxQWO1G6QO9WQWO1G6QO$BQQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$BfQWO,5?TO$)nQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%:PQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%:UQ`O1G5wO%:jQ07bO1G0wO%:tQWO1G0wOOQO1G/p1G/pO%;PQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$?}Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%;ZQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%;fQ?MxO7+&UO%;tQ?NdO7++mO%[Q^O7++mO%|O%[Q^O,5>|OOQO-E<`-E<`O%HZQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&;mQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&;rQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<tQWO7+)hO'){QWO<{AN>{O%[Q^OAN?[OOQO<]Q7[OG27QOOQO<mQ07bO7+*jOOQUG27iG27iO&:OQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'>wQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'?RQ?NdOG27QOOQ?MpG26uG26uOOQULD-TLD-TO&:OQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'AaQ07bOG27QO!(oQ^O'#DwO1PQWO'#EUO'CSQrO'#JmO'CZQMnO'#DsO'CbQ^O'#D{O'CiQrO'#CiO'FPQrO'#CiO!(oQ^O'#D}O'FaQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'HdQWO,5kOh%WOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%WO!i%cO~Oh%WO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%WO#]+zO~Oh%WOk+}O![$}O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%WO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP:kOQ:kOSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO}){O!P)|O(u%QOk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%+]O}){O!P)|Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%,OO(m$ZO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O;lO~P!1_OmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0pO!X4YO!V'cX!Y'cX~P!3^O!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O(t%OOk%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%0^O(u%QOk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%1POg(Yi!Y(Yi~P!0pO#]4lOg(Yi!Y(Yi~P!0pO!h4oO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4sO~O!Y4tO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4wOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4wO~Ob4}O%g5OO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5SO~O`5TO~Oa%lO'u%lO~P#.aO![$}O~P#.aO!Y5]O#]5_O!Z)QX~O!Z5`O~Op!nO!P5aO!_!yO!`!vO!a!vO!y:lO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5fO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5eO~P%6ZOk5kO![1aO%f5jO~Oh%WOk5kO![1aO%f5jO~Ob5rO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5tO~O`5xO~O#s5{O&W5|O~PMlO!h5}O~P%[Oa6PO~Oa6PO~P%[Ob2SO!Z6UO&f2RO~P`O!d6WO~O!d6YOh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#D_O#]6ZO!Y#ei!Z#ei~O!Y!^i!Z!^i~P#D_Oa%lO#]6dO'u%lO~Oa%lO!d#vO#]6dO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6kO(O%eO~O![']O%f6nO~Ok6rO![']O%f6nO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%+]O#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%,OO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%0^O#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%1PO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#D_OP$]OR#zO}#yO!P#{O!i#xO!m$]O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%HpO#k:tO~P%HpOP$]OR#zO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO([VO[#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~Oo#ji~P%JxOo:vO~P%JxOP$]OR#zOo:vO}#yO!P#{O!i#xO!m$]O#k:tO#l:uO#m:uO#n:uO#o:wO([VO#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O[#ji#O#ji#p#ji#q#ji#r#ji#s#ji~P%MQO[;SO#O:xO#p:xO#q:xO#r;RO#s:xO~P%MQOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w:{O~P& iO#w#ji~P& iOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO([VO#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#w#ji(t#ji(u#ji~P&#qO#w:{O(t#|O(u#}O~P&#qOP$]OR#zO[;SOo:vO}#yO!P#{O!i#xO!m$]O#O:xO#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO#w:{O#y:}O([VO(t#|O(u#}O~O#z#ji#}#ji(m#ji!Y#ji!Z#ji~P&&POa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mOk < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:hP,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[gP],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-OP[t]||-1},{term:338,get:t=>bP[t]||-1},{term:92,get:t=>yP[t]||-1}],tokenPrec:14793}),Ab=[pt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),pt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),pt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),pt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),pt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),pt(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),pt("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),pt(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),pt(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),pt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),pt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],SP=Ab.concat([pt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),pt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),pt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Jp=new $O,Cb=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Kr(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const _P=["FunctionDeclaration"],EP={FunctionDeclaration:Kr("function"),ClassDeclaration:Kr("class"),ClassExpression:()=>!0,EnumDeclaration:Kr("constant"),TypeAliasDeclaration:Kr("type"),NamespaceDeclaration:Kr("namespace"),VariableDefinition(t,e){t.matchContext(_P)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function Pb(t,e){let n=Jp.get(e);if(n)return n;let i=[],r=!0;function s(a,o){let l=t.sliceString(a.from,a.to);i.push({label:l,type:o})}return e.cursor(Ae.IncludeAnonymous).iterate(a=>{if(r)r=!1;else if(a.name){let o=EP[a.name];if(o&&o(a,s)||Cb.has(a.name))return!1}else if(a.to-a.from>8192){for(let o of Pb(t,a.node))i.push(o);return!1}}),Jp.set(e,i),i}const em=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,vb=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function TP(t){let e=Ee(t.state).resolveInner(t.pos,-1);if(vb.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&em.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)Cb.has(r.name)&&(i=i.concat(Pb(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:em}}const fn=Ci.define({name:"javascript",parser:kP.configure({props:[Ir.add({IfStatement:ar({except:/^\s*({|else\b)/}),TryStatement:ar({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Cw,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Aw({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":ar({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Di.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":kh,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Rb={test:t=>/^JSX/.test(t.name),facet:rl({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Ib=fn.configure({dialect:"ts"},"typescript"),Qb=fn.configure({dialect:"jsx",props:[bh.add(t=>t.isTop?[Rb]:void 0)]}),Nb=fn.configure({dialect:"jsx ts",props:[bh.add(t=>t.isTop?[Rb]:void 0)]},"typescript");let Lb=t=>({label:t,type:"keyword"});const Db="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Lb),xP=Db.concat(["declare","implements","private","protected","public"].map(Lb));function wc(t={}){let e=t.jsx?t.typescript?Nb:Qb:t.typescript?Ib:fn,n=t.typescript?SP.concat(xP):Ab.concat(Db);return new mr(e,[fn.data.of({autocomplete:c2(vb,c1(n))}),fn.data.of({autocomplete:TP}),t.jsx?CP:[]])}function wP(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function tm(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const AP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),CP=W.inputHandler.of((t,e,n,i,r)=>{if((AP?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!fn.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:a}=s,o=a.changeByRange(l=>{var u;let{head:c}=l,h=Ee(a).resolveInner(c-1,-1),f;if(h.name=="JSXStartTag"&&(h=h.parent),!(a.doc.sliceString(c-1,c)!=i||h.name=="JSXAttributeValue"&&h.to>c)){if(i==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(i=="/"&&h.name=="JSXStartCloseTag"){let p=h.parent,m=p.parent;if(m&&p.from==c-2&&((f=tm(a.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let g=`${f}>`;return{range:L.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(i==">"){let p=wP(h);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(f=tm(a.doc,p,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return o.changes.empty?!1:(t.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),PP=54,vP=1,RP=55,IP=2,QP=56,NP=3,nm=4,LP=5,zo=6,$b=7,Mb=8,Bb=9,Ub=10,DP=11,$P=12,MP=13,Kl=57,BP=14,im=58,Fb=20,UP=22,Zb=23,FP=24,Ac=26,zb=27,ZP=28,zP=31,XP=34,WP=36,HP=37,YP=0,qP=1,VP={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},jP={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},rm={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function GP(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function Xb(t){return t==9||t==10||t==13||t==32}let sm=null,am=null,om=0;function Cc(t,e){let n=t.pos+e;if(om==n&&am==t)return sm;let i=t.peek(e);for(;Xb(i);)i=t.peek(++e);let r="";for(;GP(i);)r+=String.fromCharCode(i),i=t.peek(++e);return am=t,om=n,sm=r?r.toLowerCase():i==KP||i==JP?void 0:null}const Wb=60,Xo=62,Wh=47,KP=63,JP=33,ev=45;function lm(t,e){this.name=t,this.parent=e}const tv=[zo,Ub,$b,Mb,Bb],nv=new xb({start:null,shift(t,e,n,i){return tv.indexOf(e)>-1?new lm(Cc(i,1)||"",t):t},reduce(t,e){return e==Fb&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==zo||r==WP?new lm(Cc(i,1)||"",t):t},strict:!1}),iv=new Gt((t,e)=>{if(t.next!=Wb){t.next<0&&e.context&&t.acceptToken(Kl);return}t.advance();let n=t.next==Wh;n&&t.advance();let i=Cc(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?BP:zo);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(DP);if(r&&jP[r])return t.acceptToken(Kl,-2);if(e.dialectEnabled(YP))return t.acceptToken($P);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(MP)}else{if(i=="script")return t.acceptToken($b);if(i=="style")return t.acceptToken(Mb);if(i=="textarea")return t.acceptToken(Bb);if(VP.hasOwnProperty(i))return t.acceptToken(Ub);r&&rm[r]&&rm[r][i]?t.acceptToken(Kl,-1):t.acceptToken(zo)}},{contextual:!0}),rv=new Gt(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(im);break}if(t.next==ev)e++;else if(t.next==Xo&&e>=2){n>=3&&t.acceptToken(im,-2);break}else e=0;t.advance()}});function sv(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const av=new Gt((t,e)=>{if(t.next==Wh&&t.peek(1)==Xo){let n=e.dialectEnabled(qP)||sv(e.context);t.acceptToken(n?LP:nm,2)}else t.next==Xo&&t.acceptToken(nm,1)});function Hh(t,e,n){let i=2+t.length;return new Gt(r=>{for(let s=0,a=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(e);break}if(s==0&&r.next==Wb||s==1&&r.next==Wh||s>=2&&sa?r.acceptToken(e,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(e,1);break}else s=a=0;r.advance()}})}const ov=Hh("script",PP,vP),lv=Hh("style",RP,IP),uv=Hh("textarea",QP,NP),cv=Li({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),hv=Ii.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:nv,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[cv],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=o.type.id;if(u==ZP)return Jl(o,l,n);if(u==zP)return Jl(o,l,i);if(u==XP)return Jl(o,l,r);if(u==Fb&&s.length){let c=o.node,h=c.firstChild,f=h&&um(h,l),p;if(f){for(let m of s)if(m.tag==f&&(!m.attrs||m.attrs(p||(p=Hb(h,l))))){let g=c.lastChild,O=g.type.id==HP?g.from:c.to;if(O>h.to)return{parser:m.parser,overlay:[{from:h.to,to:O}]}}}}if(a&&u==Zb){let c=o.node,h;if(h=c.firstChild){let f=a[l.read(h.from,h.to)];if(f)for(let p of f){if(p.tagName&&p.tagName!=um(c.parent,l))continue;let m=c.lastChild;if(m.type.id==Ac){let g=m.from+1,O=m.lastChild,k=m.to-(O&&O.isError?0:1);if(k>g)return{parser:p.parser,overlay:[{from:g,to:k}]}}else if(m.type.id==zb)return{parser:p.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const fv=99,cm=1,dv=100,pv=101,hm=2,qb=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],mv=58,gv=40,Vb=95,Ov=91,co=45,bv=46,yv=35,kv=37,Sv=38,_v=92,Ev=10;function Hs(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function jb(t){return t>=48&&t<=57}const Tv=new Gt((t,e)=>{for(let n=!1,i=0,r=0;;r++){let{next:s}=t;if(Hs(s)||s==co||s==Vb||n&&jb(s))!n&&(s!=co||r>0)&&(n=!0),i===r&&s==co&&i++,t.advance();else if(s==_v&&t.peek(1)!=Ev)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(s==gv?dv:i==2&&e.canShift(hm)?hm:pv);break}}}),xv=new Gt(t=>{if(qb.includes(t.peek(-1))){let{next:e}=t;(Hs(e)||e==Vb||e==yv||e==bv||e==Ov||e==mv&&Hs(t.peek(1))||e==co||e==Sv)&&t.acceptToken(fv)}}),wv=new Gt(t=>{if(!qb.includes(t.peek(-1))){let{next:e}=t;if(e==kv&&(t.advance(),t.acceptToken(cm)),Hs(e)){do t.advance();while(Hs(t.next)||jb(t.next));t.acceptToken(cm)}}}),Av=Li({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,KeyframeRangeName:S.operatorKeyword,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ColorLiteral:S.color,"ParenthesizedContent StringLiteral":S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),Cv={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},Pv={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},vv={__proto__:null,not:132,only:132},Rv=Ii.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO${QdO,59}O-kQ[O'#E^O-xQWO,5;_O-xQWO,5;_POOO'#EV'#EVP.TO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.zQXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/XQ`O1G/^O/rQXO1G/aO0YQXO1G/cO0pQXO1G/dO1WQWO,59|O1]Q[O'#DSO1dQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1kQpO,59]OOQS,59_,59_O${QdO,59aO1sQWO1G/mOOQS,59c,59cO1xQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2QQ[O,59jOOQS,59j,59jO2YQWO'#DjO2eQWO,5:VO2jQWO,5:]O&`Q[O,5:XO&`Q[O'#E_O2rQWO,5;`O2}QWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3`QWO1G0OO3eQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO3pQtO1G/iOOQO,5:x,5:xO4WQ[O,5:xOOQO-E8[-E8[O4eQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO4pQXO'#ErO4wQWO,59nO4|QtO'#EXO5tQdO'#EoO6OQWO,59ZO6TQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XO6]QWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6bQWO,5:yOOQO-E8]-E8]O6pQXO1G/xOOQS7+%j7+%jO6wQYO'#CsOOQO'#EQ'#EQO7SQ`O'#EPOOQO'#EP'#EPO7_QWO'#E`O7gQdO,5:jOOQS,5:j,5:jO7rQtO'#E]O${QdO'#E]O8sQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9WQpO<OAN>OO:xQdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[xv,wv,Tv,1,2,3,4,new Zo("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>Cv[t]||-1},{term:58,get:t=>Pv[t]||-1},{term:101,get:t=>vv[t]||-1}],tokenPrec:1200});let eu=null;function tu(){if(!eu&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));eu=e.sort().map(i=>({type:"property",label:i}))}return eu||[]}const fm=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),dm=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Iv=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),In=/^(\w[\w-]*|-\w[\w-]*|)$/,Qv=/^-(-[\w-]*)?$/;function Nv(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const pm=new $O,Lv=["Declaration"];function Dv(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Gb(t,e,n){if(e.to-e.from>4096){let i=pm.get(e);if(i)return i;let r=[],s=new Set,a=e.cursor(Ae.IncludeAnonymous);if(a.firstChild())do for(let o of Gb(t,a.node,n))s.has(o.label)||(s.add(o.label),r.push(o));while(a.nextSibling());return pm.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var a;if(n(s)&&s.matchContext(Lv)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let o=t.sliceString(s.from,s.to);r.has(o)||(r.add(o),i.push({label:o,type:"variable"}))}}),i}}const $v=t=>e=>{let{state:n,pos:i}=e,r=Ee(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:tu(),validFor:In};if(r.name=="ValueName")return{from:r.from,options:dm,validFor:In};if(r.name=="PseudoClassName")return{from:r.from,options:fm,validFor:In};if(t(r)||(e.explicit||s)&&Nv(r,n.doc))return{from:t(r)||s?r.from:i,options:Gb(n.doc,Dv(r),t),validFor:Qv};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:tu(),validFor:In};return{from:r.from,options:Iv,validFor:In}}if(!e.explicit)return null;let a=r.resolve(i),o=a.childBefore(i);return o&&o.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:fm,validFor:In}:o&&o.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:dm,validFor:In}:a.name=="Block"||a.name=="Styles"?{from:i,options:tu(),validFor:In}:null},Mv=$v(t=>t.name=="VariableName"),Wo=Ci.define({name:"css",parser:Rv.configure({props:[Ir.add({Declaration:ar()}),Di.add({"Block KeyframeList":kh})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Kb(){return new mr(Wo,Wo.data.of({autocomplete:Mv}))}const Jr=["_blank","_self","_top","_parent"],nu=["ascii","utf-8","utf-16","latin1","latin1"],iu=["get","post","put","delete"],ru=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Et=["true","false"],j={},Bv={a:{attrs:{href:null,ping:null,type:null,media:null,target:Jr,hreflang:null}},abbr:j,address:j,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:j,aside:j,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:j,base:{attrs:{href:null,target:Jr}},bdi:j,bdo:j,blockquote:{attrs:{cite:null}},body:j,br:j,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ru,formmethod:iu,formnovalidate:["novalidate"],formtarget:Jr,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:j,center:j,cite:j,code:j,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:j,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:j,div:j,dl:j,dt:j,em:j,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:j,figure:j,footer:j,form:{attrs:{action:null,name:null,"accept-charset":nu,autocomplete:["on","off"],enctype:ru,method:iu,novalidate:["novalidate"],target:Jr}},h1:j,h2:j,h3:j,h4:j,h5:j,h6:j,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:j,hgroup:j,hr:j,html:{attrs:{manifest:null}},i:j,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ru,formmethod:iu,formnovalidate:["novalidate"],formtarget:Jr,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:j,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:j,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:j,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:nu,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:j,noscript:j,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:j,param:{attrs:{name:null,value:null}},pre:j,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:j,rt:j,ruby:j,samp:j,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:nu}},section:j,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:j,source:{attrs:{src:null,type:null,media:null}},span:j,strong:j,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:j,summary:j,sup:j,table:j,tbody:j,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:j,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:j,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:j,time:{attrs:{datetime:null}},title:j,tr:j,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:j,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:j},Jb={accesskey:null,class:null,contenteditable:Et,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Et,autocorrect:Et,autocapitalize:Et,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Et,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Et,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Et,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Et,"aria-hidden":Et,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Et,"aria-multiselectable":Et,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Et,"aria-relevant":null,"aria-required":Et,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},ey="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of ey)Jb[t]=null;let Ys=class{constructor(e,n){this.tags=Object.assign(Object.assign({},Bv),e),this.globalAttrs=Object.assign(Object.assign({},Jb),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Ys.default=new Ys;function kr(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function Sr(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function ty(t,e,n){let i=n.tags[kr(t,Sr(e))];return(i==null?void 0:i.children)||n.allTags}function Yh(t,e){let n=[];for(let i=Sr(e);i&&!i.type.isTop;i=Sr(i.parent)){let r=kr(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const ny=/^[:\-\.\w\u00b7-\uffff]*$/;function mm(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",a=Sr(n,!0);return{from:i,to:r,options:ty(t.doc,a,e).map(o=>({label:o,type:"type"})).concat(Yh(t.doc,n).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function gm(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:Yh(t.doc,e).map((s,a)=>({label:s,apply:s+r,type:"type",boost:99-a})),validFor:ny}}function Uv(t,e,n,i){let r=[],s=0;for(let a of ty(t.doc,n,e))r.push({label:"<"+a,type:"type"});for(let a of Yh(t.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Fv(t,e,n,i,r){let s=Sr(n),a=s?e.tags[kr(t.doc,s)]:null,o=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:ny}}function Zv(t,e,n,i,r){var s;let a=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(a){let u=t.sliceDoc(a.from,a.to),c=e.globalAttrs[u];if(!c){let h=Sr(n),f=h?e.tags[kr(t.doc,h)]:null;c=(f==null?void 0:f.attrs)&&f.attrs[u]}if(c){let h=t.sliceDoc(i,r).toLowerCase(),f='"',p='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",p=t.sliceDoc(r,r+1)==h[0]?"":h[0],h=h.slice(1),i++):l=/^[^\s<>='"]*$/;for(let m of c)o.push({label:m,apply:f+m+p,type:"constant"})}}return{from:i,to:r,options:o,validFor:l}}function iy(t,e){let{state:n,pos:i}=e,r=Ee(n).resolveInner(i,-1),s=r.resolve(i);for(let a=i,o;s==r&&(o=r.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.fromiy(i,r)}const Wv=fn.parser.configure({top:"SingleExpression"}),ry=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:Ib.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Qb.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:Nb.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:Wv},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:fn.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Wo.parser}],sy=[{name:"style",parser:Wo.parser.configure({top:"Styles"})}].concat(ey.map(t=>({name:t,parser:fn.parser}))),ay=Ci.define({name:"html",parser:hv.configure({props:[Ir.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),ho=ay.configure({wrap:Yb(ry,sy)});function oy(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=Yb((t.nestedLanguages||[]).concat(ry),(t.nestedAttributes||[]).concat(sy)));let i=n?ay.configure({wrap:n,dialect:e}):e?ho.configure({dialect:e}):ho;return new mr(i,[ho.data.of({autocomplete:Xv(t)}),t.autoCloseTags!==!1?Hv:[],wc().support,Kb().support])}const Om=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Hv=W.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!ho.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:a}=s,o=a.changeByRange(l=>{var u,c,h;let f=a.doc.sliceString(l.from-1,l.to)==i,{head:p}=l,m=Ee(a).resolveInner(p,-1),g;if(f&&i==">"&&m.name=="EndTag"){let O=m.parent;if(((c=(u=O.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(g=kr(a.doc,O.parent,p))&&!Om.has(g)){let k=p+(a.doc.sliceString(p,p+1)===">"?1:0),T=``;return{range:l,changes:{from:p,to:k,insert:T}}}}else if(f&&i=="/"&&m.name=="IncompleteCloseTag"){let O=m.parent;if(m.from==p-2&&((h=O.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(g=kr(a.doc,O,p))&&!Om.has(g)){let k=p+(a.doc.sliceString(p,p+1)===">"?1:0),T=`${g}>`;return{range:L.cursor(p+T.length,-1),changes:{from:p,to:k,insert:T}}}}return{range:l}});return o.changes.empty?!1:(t.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class Ho{static create(e,n,i,r,s){let a=r+(r<<8)+e+(n<<4)|0;return new Ho(e,n,i,a,s,[],[])}constructor(e,n,i,r,s,a,o){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=a,this.positions=o,this.hashProp=[[ie.contextHash,r]]}addChild(e,n){e.prop(ie.contextHash)!=this.hash&&(e=new he(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new he(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,a)=>new he(ze.none,r,s,a,this.hashProp)})}}var Z;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(Z||(Z={}));class Yv{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class qv{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Os(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==Z.OrderedList?jh:Vh)(n,e,!1);return i>0&&(t.type!=Z.BulletList||qh(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const ly={[Z.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(de(Z.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Ft(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[Z.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[Z.OrderedList]:bm,[Z.BulletList]:bm,[Z.Document](){return!0}};function Ft(t){return t==32||t==9||t==10||t==13}function Os(t,e=0){for(;en&&Ft(t.charCodeAt(e-1));)e--;return e}function uy(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length||i<3?-1:1}function hy(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Vh(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ft(t.text.charCodeAt(t.pos+1)))&&(!n||hy(e,Z.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||it.pos+1||t.next!=49)?-1:i+1-t.pos}function fy(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function dy(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,my=/\?>/,vc=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(s)return t.append(de(Z.Comment,n,n+1+s[0].length));let a=/^\?[^]*?\?>/.exec(i);if(a)return t.append(de(Z.ProcessingInstruction,n,n+1+a[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return o?t.append(de(Z.HTMLTag,n,n+1+o[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),a=Vs.test(r),o=Vs.test(s),l=/\s|^$/.test(r),u=/\s|^$/.test(s),c=!u&&(!o||l||a),h=!l&&(!a||u||o),f=c&&(e==42||!h||a),p=h&&(e==42||!c||o);return t.append(new Rt(e==95?Sy:_y,n,i,(f?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(de(Z.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(de(Z.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Rt(ji,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Rt(Ic,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Rt&&(r.type==ji||r.type==Ic)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),a=t.parts[i]=tR(t,s,r.type==ji?Z.Link:Z.Image,r.from,n+1);if(r.type==ji)for(let o=0;oe?de(Z.URL,e+n,s+n):s==t.length?null:!1}}function Ty(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,a=!1;s=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new Rt(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Rt&&(n.type==ji||n.type==Ic))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;l--){let g=this.parts[l];if(g instanceof Rt&&g.side&1&&g.type==r.type&&!(s&&(r.side&1||g.side&2)&&(g.to-g.from+a)%3==0&&((g.to-g.from)%3||a%3))){o=g;break}}if(!o)continue;let u=r.type.resolve,c=[],h=o.from,f=r.to;if(s){let g=Math.min(2,o.to-o.from,a);h=o.to-g,f=r.from+g,u=g==1?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,h,o.to));for(let g=l+1;g=0;n--){let i=this.parts[n];if(i instanceof Rt&&i.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return Os(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?de(this.parser.getNodeType(e),n,i,r):new ky(e,n)}}function Qc(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(ie.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,o=e.block.children.length,l=a,u=o;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=wy(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let h=new he(e.parser.nodeSet.types[Z.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,n.tree),e.addNode(h,c)}if(n.type.is("Block")&&(iR.indexOf(n.type.id)<0?(a=n.to-i,o=e.block.children.length):(a=l,o=u,l=n.to-i,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-s}}function wy(t,e){let n=t;for(let i=1;iXa[t]),Object.keys(Xa).map(t=>Gv[t]),Object.keys(Xa),Kv,ly,Object.keys(au).map(t=>au[t]),Object.keys(au),[]);function oR(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let a=r?r.from:n;if(a>s&&i.push({from:s,to:a}),!r)break;s=r.to}return i}function lR(t){let{codeParser:e,htmlParser:n}=t;return{wrap:MO((r,s)=>{let a=r.type.id;if(e&&(a==Z.CodeBlock||a==Z.FencedCode)){let o="";if(a==Z.FencedCode){let u=r.node.getChild(Z.CodeInfo);u&&(o=s.read(u.from,u.to))}let l=e(o);if(l)return{parser:l,overlay:u=>u.type.id==Z.CodeText}}else if(n&&(a==Z.HTMLBlock||a==Z.HTMLTag))return{parser:n,overlay:oR(r.node,r.from,r.to)};return null})}}const uR={resolve:"Strikethrough",mark:"StrikethroughMark"},cR={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":S.strikethrough}},{name:"StrikethroughMark",style:S.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),a=/\s|^$/.test(r),o=Vs.test(i),l=Vs.test(r);return t.addDelimiter(uR,n,n+2,!a&&(!l||s||o),!s&&(!o||a||l))},after:"Emphasis"}]};function bs(t,e,n=0,i,r=0){let s=0,a=!0,o=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+o,r+l,t.parser.parseInline(e.slice(o,l),r+o)))};for(let h=n;h-1)&&s++,a=!1,i&&(o>-1&&c(),i.push(t.elt("TableDelimiter",h+r,h+r+1))),o=l=-1):(u||f!=32&&f!=9)&&(o<0&&(o=h),l=h+1),u=!u&&f==92}return o>-1&&(s++,i&&c()),s}function _m(t,e){for(let n=e;nr instanceof Em)||!_m(e.text,e.basePos))return!1;let i=t.scanLine(t.absoluteLineEnd+1).text;return Ay.test(i)&&bs(t,e.text,e.basePos)==bs(t,i,e.basePos)},before:"SetextHeading"}]};class fR{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const dR={defineNodes:[{name:"Task",block:!0,style:S.list},{name:"TaskMarker",style:S.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new fR:null},after:"SetextHeading"}]},Tm=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,xm=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,pR=/[\w-]+\.[\w-]+($|\/)/,wm=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Am=/\/[a-zA-Z\d@.]+/gy;function Cm(t,e,n,i){let r=0;for(let s=e;s-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&Cm(t,e,i,")")>Cm(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function Pm(t,e){wm.lastIndex=e;let n=wm.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const gR={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;Tm.lastIndex=i;let r=Tm.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=mR(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+a[0].length}}else r[3]?s=Pm(t.text,i):(s=Pm(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(Am.lastIndex=s,r=Am.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},OR=[hR,dR,cR,gR];function Cy(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let a=[i.elt(n,s,s+1)];for(let o=s+1;o"}}}),vy=new ie,Ry=aR.configure({props:[Di.add(t=>!t.is("Block")||t.is("Document")||Nc(t)!=null||SR(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),vy.add(Nc),Ir.add({Document:()=>null}),zn.add({Document:Py})]});function Nc(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function SR(t){return t.name=="OrderedList"||t.name=="BulletList"}function _R(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=Nc(i.type))!=null&&r<=e)break;n=i}return n.to}const ER=WO.of((t,e,n)=>{for(let i=Ee(t).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:s}}return null});function Gh(t){return new At(Py,t,[ER],"markdown")}const TR=Gh(Ry),xR=Ry.configure([OR,yR,bR,kR,{props:[Di.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Iy=Gh(xR);function wR(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=Ao.matchLanguageName(t,n,!0),i instanceof Ao)return i.support?i.support.language.parser:Pi.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class Ha{constructor(e,n,i,r,s,a,o){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=a,this.item=o}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+Ny(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Qy(t,e){let n=[];for(let r=t;r&&r.name!="Document";r=r.parent)(r.name=="ListItem"||r.name=="Blockquote"||r.name=="FencedCode")&&n.push(r);let i=[];for(let r=n.length-1;r>=0;r--){let s=n[r],a,o=e.lineAt(s.from),l=s.from-o.from;if(s.name=="FencedCode")i.push(new Ha(s,l,l,"","","",null));else if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(o.text.slice(l))))i.push(new Ha(s,l,l+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let u=a[3],c=a[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new Ha(s.parent,l,l+c,a[1],u,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let u=a[4],c=a[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let h=a[2];a[3]&&(h+=a[3].replace(/[xX]/," ")),i.push(new Ha(s.parent,l,l+c,a[1],u,h,s))}}return i}function Ny(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function ou(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let o=Ny(s,e),l=+o[2];if(r>=0){if(l!=r+1)return;n.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(r+2+i)})}r=l}let a=s.nextSibling;if(!a)break;s=a}}function Kh(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Rr)!=" ")return t;let i=Yt(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const AR=({state:t,dispatch:e})=>{let n=Ee(t),{doc:i}=t,r=null,s=t.changeByRange(a=>{if(!a.empty||!Iy.isActiveAt(t,a.from))return r={range:a};let o=a.from,l=i.lineAt(o),u=Qy(n.resolveInner(o,-1),i);for(;u.length&&u[u.length-1].from>o-l.from;)u.pop();if(!u.length)return r={range:a};let c=u[u.length-1];if(c.to-c.spaceAfter.length>o-l.from)return r={range:a};let h=o>=c.to-c.spaceAfter.length&&!/\S/.test(l.text.slice(c.to));if(c.item&&h){let O=c.node.firstChild,k=c.node.getChild("ListItem","ListItem");if(O.to>=o||k&&k.to0&&!/[^\s>]/.test(i.lineAt(l.from-1).text)){let T=u.length>1?u[u.length-2]:null,A,I="";T&&T.item?(A=l.from+T.from,I=T.marker(i,1)):A=l.from+(T?T.to:0);let v=[{from:A,to:o,insert:I}];return c.node.name=="OrderedList"&&ou(c.item,i,v,-2),T&&T.node.name=="OrderedList"&&ou(T.item,i,v),{range:L.cursor(A+I.length),changes:v}}else{let T=Rm(u,t,l);return{range:L.cursor(o+T.length+1),changes:{from:l.from,insert:T+t.lineBreak}}}}if(c.node.name=="Blockquote"&&h&&l.from){let O=i.lineAt(l.from-1),k=/>\s*$/.exec(O.text);if(k&&k.index==c.from){let T=t.changes([{from:O.from+k.index,to:O.to},{from:l.from+c.from,to:l.to}]);return{range:a.map(T),changes:T}}}let f=[];c.node.name=="OrderedList"&&ou(c.item,i,f);let p=c.item&&c.item.from]*/.exec(l.text)[0].length>=c.to)for(let O=0,k=u.length-1;O<=k;O++)m+=O==k&&!p?u[O].marker(i,1):u[O].blank(Ol.from&&/\s/.test(l.text.charAt(g-l.from-1));)g--;return m=Kh(m,t),CR(c.node,t.doc)&&(m=Rm(u,t,l)+t.lineBreak+m),f.push({from:g,to:o,insert:t.lineBreak+m}),{range:L.cursor(g+m.length+1),changes:f}});return r?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)};function vm(t){return t.name=="QuoteMark"||t.name=="ListMark"}function CR(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),a=/^[\s>]*$/.test(r.text);return r.number+(a?0:1){let n=Ee(t),i=null,r=t.changeByRange(s=>{let a=s.from,{doc:o}=t;if(s.empty&&Iy.isActiveAt(t,s.from)){let l=o.lineAt(a),u=Qy(PR(n,a),o);if(u.length){let c=u[u.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(a-l.from>h&&!/\S/.test(l.text.slice(h,a-l.from)))return{range:L.cursor(l.from+h),changes:{from:l.from+h,to:a}};if(a-l.from==h&&(!c.item||l.from<=c.item.from||!/\S/.test(l.text.slice(0,c.to)))){let f=l.from+c.from;if(c.item&&c.node.from1&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=dl(n,n=="("?"quote":n=="{"?"def":"string"),Er(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};function FR(t){return function(e,n){return e.sol()&&e.string==t&&n.tokens.shift(),e.skipToEnd(),"string.special"}}function Er(t,e){return(e.tokens[0]||BR)(t,e)}const ZR={name:"shell",startState:function(){return{tokens:[]}},token:function(t,e){return Er(t,e)},languageData:{autocomplete:Ly.concat(Dy,$y),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};var zR=["true","false","on","off","yes","no"],XR=new RegExp("\\b(("+zR.join(")|(")+"))$","i");const WR={name:"yaml",token:function(t,e){var n=t.peek(),i=e.escaped;if(e.escaped=!1,n=="#"&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---")||t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return n=="{"?e.inlinePairs++:n=="}"?e.inlinePairs--:n=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&n==",")return t.next(),"meta";if(e.inlinePairs>0&&!i&&n==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(XR))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=n=="\\",t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var Im,Qm,Nm;function Lm({view:t,searchConfig:e}){const n=we.useState(""),i=WS(n,2),r=i[0],s=i[1],a=(f,p)=>{s(p),o(p)},o=f=>{t.dispatch({effects:br.of(new Rh({search:f}))})},l=f=>{f.key==="Enter"&&(f.shiftKey?h():c())},u=f=>{f.key==="Escape"&&Nh(t)},c=()=>{o(r),Zs(t)},h=()=>{o(r),zs(t)};return De.createElement(l_,{renderLabel:"",inputRef:f=>{setTimeout(()=>f==null?void 0:f.focus(),0)},size:"small",display:"inline-block",width:"20rem",placeholder:e.placeholder,onChange:a,onKeyDown:l,onKeyUp:u,renderBeforeInput:Im||(Im=De.createElement(u_,{size:"x-small"})),renderAfterInput:De.createElement("span",null,De.createElement(Cf,{size:"small",withBorder:!1,withBackground:!1,onClick:c,screenReaderLabel:e.nextResultLabel},Qm||(Qm=De.createElement(c_,null))),De.createElement(Cf,{size:"small",withBorder:!1,withBackground:!1,onClick:h,screenReaderLabel:e.prevResultLabel},Nm||(Nm=De.createElement(h_,null))))})}function HR(t){return t?yA({createPanel:e=>{var n;const i=document.createElement("div");return i.style.padding="8px",Number(De.version.split(".")[0])>=18?XS(()=>import("./index-DT1C1ZDw.js").then(s=>s.c),__vite__mapDeps([0,1])).then(s=>{s.createRoot(i).render(n||(n=De.createElement(Lm,{view:e,searchConfig:t})))}).catch(s=>{}):t0.render(De.createElement(Lm,{view:e,searchConfig:t}),i),{dom:i}}}):[]}const YR=(t,e)=>{const n=e.attachment,i=e.height,r=e.width,s={top:{borderBottomLeftRadius:0,borderBottomRightRadius:0},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0}},a={top:{marginBottom:0,marginTop:"0.25rem"},bottom:{borderTopLeftRadius:0,borderTopRightRadius:0,marginBottom:"0.25rem"}},o=1.4375;return{codeEditor:{label:"codeEditor",position:"relative",boxSizing:"border-box",height:i||"auto",width:r},label:{label:"label",height:"100%",width:"100%"},codeEditorContainer:{label:"codeEditorContainer",height:"100%",width:"100%",borderColor:t==null?void 0:t.borderColor,borderStyle:"solid",borderWidth:t==null?void 0:t.borderWidth,borderRadius:t.borderRadius,marginBottom:"1rem",...n&&{...a[n],...s[n]}},theme:{"&":{overflow:"hidden",background:t.background,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.color,border:0,height:"100%",width:"100%",minHeight:`${o}rem`,lineHeight:o,borderRadius:t.borderRadius,...n&&{...s[n]}},"&.cm-editor.cm-focused":{outline:`${t==null?void 0:t.borderWidth} solid ${t==null?void 0:t.focusBorderColor}`},".cm-content":{padding:`${t.verticalPadding} 0`},".cm-scroller":{fontFamily:t.fontFamily,lineHeight:1.4375},".cm-gutters":{background:t.gutterBackground,borderColor:t.borderColor},".cm-line":{padding:`0 ${t.horizontalPadding}`},".cm-selectionBackground":{background:"transparent"},".cm-focused .cm-selectionBackground":{background:"#d7d4f0"},".cm-placeholder":{color:"#707070"}},highlightStyle:[{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.meta,color:"#757075"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#d13b00"},{tag:[S.typeName,S.namespace],color:"#008051"},{tag:S.invalid,color:"#e60000"}]}},qR=t=>{const e=t.colors,n=t.borders,i=t.typography,r=t.spacing;return{...{fontFamily:i==null?void 0:i.fontFamilyMonospace,fontSize:i==null?void 0:i.fontSizeSmall,background:e==null?void 0:e.backgroundLightest,color:e==null?void 0:e.textDarkest,gutterBackground:e==null?void 0:e.backgroundLight,borderWidth:n==null?void 0:n.widthSmall,borderColor:e==null?void 0:e.borderMedium,borderRadius:n==null?void 0:n.radiusMedium,focusBorderColor:e==null?void 0:e.borderBrand,horizontalPadding:r==null?void 0:r.xSmall,verticalPadding:r==null?void 0:r.xxSmall}}},Dm=[{key:"ArrowLeft",run:Bh,shift:Fh,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:M1,shift:J1},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:U1,shift:tb},{mac:"Cmd-ArrowLeft",run:V1,shift:ub},{key:"Home",run:H1,shift:ab},{key:"ArrowRight",run:Mh,shift:Uh,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:$1,shift:K1},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:B1,shift:eb},{mac:"Cmd-ArrowRight",run:q1,shift:lb},{key:"End",run:Y1,shift:ob},{key:"Delete",run:Mo},{key:"Mod-Delete",mac:"Alt-Delete",run:Zh},{key:"Backspace",run:Bo,shift:Bo},{key:"Mod-Backspace",mac:"Alt-Backspace",run:fb},{mac:"Mod-Delete",run:uC},{mac:"Mod-Backspace",run:db}],VR={label:Q.string.isRequired,language:Q.oneOf(["sh","js","json","javascript","jsx","shell","css","html","markdown","yaml","yml","bash"]),readOnly:Q.bool,editable:Q.bool,lineNumbers:Q.bool,foldGutter:Q.bool,highlightActiveLineGutter:Q.bool,highlightActiveLine:Q.bool,lineWrapping:Q.bool,autofocus:Q.bool,spellcheck:Q.bool,direction:Q.oneOf(["ltr","rtl"]),rtlMoveVisually:Q.bool,indentOnLoad:Q.bool,indentWithTab:Q.bool,indentUnit:Q.string,defaultValue:Q.string,value:i0(Q.string,"onChange","defaultValue"),onChange:Q.func,onFocus:Q.func,onBlur:Q.func,attachment:Q.oneOf(["bottom","top"]),height:Q.string,width:Q.string,elementRef:Q.func,containerRef:Q.func,searchConfig:Q.object},jR=["label","language","readOnly","editable","lineNumbers","foldGutter","highlightActiveLineGutter","highlightActiveLine","lineWrapping","autofocus","spellcheck","direction","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","defaultValue","value","onChange","onFocus","onBlur","attachment","height","width","elementRef","containerRef","searchConfig"],GR=["label","styles"];var $m,Mm,Bm,Um,Qn,pi;let KR=($m=eh(),Mm=dn(YR,qR),Bm=HS(),Um=wr(),$m(Qn=Mm(Qn=Bm(Qn=Um(Qn=(pi=class By extends we.Component{addAnimationFrame(e){typeof e=="function"&&this._raf.push(i_(e))}cancelAnimationFrames(){this._raf.forEach(e=>e.cancel()),this._raf=[]}focus(){this.addAnimationFrame(()=>{var e;(e=this._editorView)===null||e===void 0||e.focus()})}get hasFocus(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.hasFocus}selectAll(){this._editorView&&this.addAnimationFrame(()=>{var e;this.dispatchViewSelection({anchor:0,head:(e=this.currentDocValue)===null||e===void 0?void 0:e.length})})}deselectAll(){this._editorView&&this.addAnimationFrame(()=>{this.dispatchViewSelection({anchor:0,head:0})})}indentCurrentSelection(){this.addAnimationFrame(()=>{this._editorView&&Ob({state:this._editorView.state,dispatch:e=>{var n;(n=this._editorView)===null||n===void 0||n.update([e])}})})}indentAll(){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.indentCodeRange(0,this.currentDocValue.length)})}indentCodeRange(e,n){this.addAnimationFrame(()=>{this._editorView&&this.currentDocValue&&this.dispatchViewChanges({changes:kw(this._editorView.state,e,n)})})}dispatchViewEffects(e){!this._editorView||!e||this._editorView.dispatch({effects:e})}dispatchViewChanges({changes:e,selection:n,userEvent:i}){!this._editorView||!e||this._editorView.dispatch({changes:e,...n?{selection:n}:void 0,...i?{userEvent:i}:void 0})}dispatchViewSelection(e){!this._editorView||!e||this._editorView.dispatch({selection:e})}get currentDocValue(){var e;return(e=this._editorView)===null||e===void 0?void 0:e.state.doc}get isControlled(){return typeof this.props.value=="string"}constructor(e){super(e),this._id=void 0,this.ref=null,this._containerRef=void 0,this._editorView=void 0,this._raf=[],this._newSelectionAfterValueChange=void 0,this.handleRef=n=>{const i=this.props.elementRef;this.ref=n,typeof i=="function"&&i(n)},this.handleContainerRef=n=>{const i=this.props.containerRef;this._containerRef=n||void 0,typeof i=="function"&&i(n)},this._id=e.deterministicId()}componentDidMount(){var e,n;const i=this.props,r=i.value,s=i.defaultValue,a=i.autofocus,o=i.indentOnLoad;(e=(n=this.props).makeStyles)===null||e===void 0||e.call(n);const l=ue.create({doc:r||s,extensions:this.extensions});this._editorView=new W({state:l,parent:this._containerRef}),a&&this.focus(),o&&this.indentAll()}componentWillUnmount(){var e;(e=this._editorView)===null||e===void 0||e.destroy(),this.cancelAnimationFrames()}componentDidUpdate(e){var n,i;(n=(i=this.props).makeStyles)===null||n===void 0||n.call(i),this._editorView&&(this.props.value!==e.value&&this.refreshEditorValue(),this.shouldUpdateExtensions(e)&&this.refreshExtensions())}shouldUpdateExtensions(e){const n=["styles","themeOverride","language","readOnly","editable","lineNumbers","highlightActiveLineGutter","foldGutter","lineWrapping","autofocus","spellcheck","direction","dir","rtlMoveVisually","indentOnLoad","indentWithTab","indentUnit","highlightActiveLine","attachment"];for(const i of n)if(!YS(this.props[i],e[i]))return!0;return!1}get direction(){return this.props.direction||this.props.dir}get extensions(){const e=[...this.baseExtensions,this.languageExtension,this.onChangeExtension,this.focusListenerExtension,this.announceLineNumberExtension];return this.themeExtension&&e.push(this.themeExtension),this.props.lineNumbers&&e.push(Yx()),this.props.highlightActiveLine&&e.push(Sx()),this.props.highlightActiveLineGutter&&e.push(jx()),this.props.foldGutter&&e.push(Zw()),this.props.lineWrapping&&e.push(W.lineWrapping),this.props.editable===!1&&e.push(W.editable.of(!1)),this.props.readOnly&&e.push(ue.readOnly.of(!0)),this.props.spellcheck&&e.push(W.contentAttributes.of({spellcheck:"true"})),this.direction&&e.push(W.contentAttributes.of({dir:this.direction})),this.props.indentUnit&&e.push(Rr.of(this.props.indentUnit)),e}get baseExtensions(){return[mx(),ZA(),rx(),ux(),ue.allowMultipleSelections.of(!0),Op(Hw,{fallback:!0}),Jw(),H2(),iA(),Ax(),vx(),cA(),vw(),HR(this.props.searchConfig),ia.of(this.keymaps)]}get keymaps(){const e=[...j2,...this.commandKeybinding,...GA,...Mw,...k1,...NC,...this.props.searchConfig?vA:[]];return this.props.indentWithTab&&e.push(xC),e}get commandKeybinding(){const e=this.props.rtlMoveVisually;if(this.direction==="rtl"&&!e){const n=Dm.map(r=>r.key?r.key:r.mac?r.mac:r);return[...Zp.filter(r=>r.key?n.indexOf(r.key)<0:r.mac?n.indexOf(r.mac)<0:!1),...Dm]}return Zp}get themeExtension(){const e=this.props.styles;if(!(e!=null&&e.theme)||!e.highlightStyle)return;const n=W.theme(e==null?void 0:e.theme),i=Op(oa.define(e==null?void 0:e.highlightStyle));return[n,i]}get languageExtension(){switch(this.props.language){case"json":return MR();case"js":case"jsx":case"javascript":return wc({jsx:!0,typescript:!0});case"html":return oy({matchClosingTags:!0,autoCloseTags:!0});case"css":return Kb();case"markdown":return IR();case"sh":case"shell":case"bash":return vo.define(ZR);case"yml":case"yaml":return vo.define(WR);default:return wc({jsx:!0,typescript:!0})}}callOnChangeHandler(e){const n=this.props,i=n.onChange,r=n.value;this.addAnimationFrame(()=>{typeof i=="function"&&e!==r&&i(e)})}get onChangeExtension(){return ue.changeFilter.of(e=>{if(!this._editorView)return!1;if(e.docChanged){const n=e.newDoc.toString();if(this.isControlled)return n!==this.props.value?(this._newSelectionAfterValueChange=e.selection,this.cancelAnimationFrames(),this.callOnChangeHandler(n),!1):!0;this.callOnChangeHandler(n)}return!0})}get focusListenerExtension(){const e=this.props,n=e.onFocus,i=e.onBlur;return W.updateListener.of(r=>{r.focusChanged&&this._editorView&&(this.hasFocus?typeof n=="function"&&n():typeof i=="function"&&i())})}get announceLineNumberExtension(){return ue.transactionExtender.of(e=>{const n=e.selection,i=e.startState.selection.main;if(n&&n.main.empty&&i.empty){const r=e.startState.doc.lineAt(i.head),s=e.newDoc.lineAt(n.main.head);if(r.number!=s.number)return{effects:W.announce.of(e.startState.phrase("line ")+s.number+".")}}return null})}refreshExtensions(){this.dispatchViewEffects(ae.reconfigure.of(this.extensions))}refreshEditorValue(){if(!this._editorView)return;const e=this.props.value,n=this._editorView.state.doc.toString();if(typeof e<"u"&&n!==e){let i;const r=e.length-n.length;r===1?i="input.type":r===-1&&(i="delete.backward"),this.dispatchViewChanges({changes:{from:0,to:n.length,insert:e||""},selection:this._newSelectionAfterValueChange,userEvent:i}),this._newSelectionAfterValueChange=void 0}this.props.indentOnLoad&&this.indentAll()}render(){const e=this.props,n=e.label,i=e.styles,r=Js(e,GR);return ne("div",Object.assign({ref:this.handleRef,css:i==null?void 0:i.codeEditor},ea(Kc(r,By.allowedProps))),ne("label",{css:i==null?void 0:i.label,htmlFor:this._id},ne(Jc,null,n),ne("div",{ref:this.handleContainerRef,css:i==null?void 0:i.codeEditorContainer})))}},pi.displayName="SourceCodeEditor",pi.componentId="SourceCodeEditor",pi.propTypes=VR,pi.allowedProps=jR,pi.defaultProps={language:"jsx",readOnly:!1,editable:!0,lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,lineWrapping:!1,autofocus:!1,spellcheck:!1,rtlMoveVisually:!0,indentOnLoad:!1,indentWithTab:!1,defaultValue:"",height:"auto"},pi))||Qn)||Qn)||Qn)||Qn);function Fm(t){const e=[],n=String(t||"");let i=n.indexOf(","),r=0,s=!1;for(;!s;){i===-1&&(i=n.length,s=!0);const a=n.slice(r,i).trim();(a||!s)&&e.push(a),r=i+1,i=n.indexOf(",",r)}return e}function Uy(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const JR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,t3={};function Zm(t,e){return(t3.jsx?e3:JR).test(t)}const n3=/[ \t\n\f\r]/g;function i3(t){return typeof t=="object"?t.type==="text"?zm(t.value):!1:zm(t)}function zm(t){return t.replace(n3,"")===""}class ca{constructor(e,n,i){this.property=e,this.normal=n,i&&(this.space=i)}}ca.prototype.property={};ca.prototype.normal={};ca.prototype.space=null;function Fy(t,e){const n={},i={};let r=-1;for(;++r4&&n.slice(0,4)==="data"&&l3.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Wm,h3);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Wm.test(s)){let a=s.replace(u3,c3);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}r=ef}return new r(i,e)}function c3(t){return"-"+t.toLowerCase()}function h3(t){return t.charAt(1).toUpperCase()}const f3={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"},ha=Fy([Xy,zy,Yy,qy,a3],"html"),ei=Fy([Xy,zy,Yy,qy,o3],"svg");function Hm(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Vy(t){return t.join(" ").trim()}var jy={},Ym=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,d3=/\n/g,p3=/^\s*/,m3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,g3=/^:\s*/,O3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,b3=/^[;\s]*/,y3=/^\s+|\s+$/g,k3=` +`,qm="/",Vm="*",bi="",S3="comment",_3="declaration",E3=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,i=1;function r(m){var g=m.match(d3);g&&(n+=g.length);var O=m.lastIndexOf(k3);i=~O?m.length-O:i+m.length}function s(){var m={line:n,column:i};return function(g){return g.position=new a(m),u(),g}}function a(m){this.start=m,this.end={line:n,column:i},this.source=e.source}a.prototype.content=t;function o(m){var g=new Error(e.source+":"+n+":"+i+": "+m);if(g.reason=m,g.filename=e.source,g.line=n,g.column=i,g.source=t,!e.silent)throw g}function l(m){var g=m.exec(t);if(g){var O=g[0];return r(O),t=t.slice(O.length),g}}function u(){l(p3)}function c(m){var g;for(m=m||[];g=h();)g!==!1&&m.push(g);return m}function h(){var m=s();if(!(qm!=t.charAt(0)||Vm!=t.charAt(1))){for(var g=2;bi!=t.charAt(g)&&(Vm!=t.charAt(g)||qm!=t.charAt(g+1));)++g;if(g+=2,bi===t.charAt(g-1))return o("End of comment missing");var O=t.slice(2,g-2);return i+=2,r(O),t=t.slice(g),i+=2,m({type:S3,comment:O})}}function f(){var m=s(),g=l(m3);if(g){if(h(),!l(g3))return o("property missing ':'");var O=l(O3),k=m({type:_3,property:jm(g[0].replace(Ym,bi)),value:O?jm(O[0].replace(Ym,bi)):bi});return l(b3),k}}function p(){var m=[];c(m);for(var g;g=f();)g!==!1&&(m.push(g),c(m));return m}return u(),p()};function jm(t){return t?t.replace(y3,bi):bi}var T3=Af&&Af.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jy,"__esModule",{value:!0});var x3=T3(E3);function w3(t,e){var n=null;if(!t||typeof t!="string")return n;var i=(0,x3.default)(t),r=typeof e=="function";return i.forEach(function(s){if(s.type==="declaration"){var a=s.property,o=s.value;r?e(a,o,s):o&&(n=n||{},n[a]=o)}}),n}var Gm=jy.default=w3;const A3=Gm.default||Gm,ml=Gy("end"),gn=Gy("start");function Gy(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function C3(t){const e=gn(t),n=ml(t);if(e&&n)return{start:e,end:n}}function ys(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Km(t.position):"start"in t||"end"in t?Km(t):"line"in t||"column"in t?Mc(t):""}function Mc(t){return Jm(t&&t.line)+":"+Jm(t&&t.column)}function Km(t){return Mc(t&&t.start)+"-"+Mc(t&&t.end)}function Jm(t){return t&&typeof t=="number"?t:1}class ot extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?r=e:!s.cause&&e&&(a=!0,r=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?s.ruleId=i:(s.source=i.slice(0,l),s.ruleId=i.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=o?o.line:void 0,this.name=ys(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}ot.prototype.file="";ot.prototype.name="";ot.prototype.reason="";ot.prototype.message="";ot.prototype.stack="";ot.prototype.column=void 0;ot.prototype.line=void 0;ot.prototype.ancestors=void 0;ot.prototype.cause=void 0;ot.prototype.fatal=void 0;ot.prototype.place=void 0;ot.prototype.ruleId=void 0;ot.prototype.source=void 0;const tf={}.hasOwnProperty,P3=new Map,v3=/[A-Z]/g,R3=/-([a-z])/g,I3=new Set(["table","tbody","thead","tfoot","tr"]),Q3=new Set(["td","th"]),Ky="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function N3(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Z3(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=F3(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?ei:ha,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Jy(r,t,void 0);return s&&typeof s!="string"?s:r.create(t,r.Fragment,{children:s||void 0},void 0)}function Jy(t,e,n){if(e.type==="element")return L3(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return D3(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return M3(t,e,n);if(e.type==="mdxjsEsm")return $3(t,e);if(e.type==="root")return B3(t,e,n);if(e.type==="text")return U3(t,e)}function L3(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=ei,t.schema=r),t.ancestors.push(e);const s=tk(t,e.tagName,!1),a=z3(t,e);let o=rf(t,e);return I3.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!i3(l):!0})),ek(t,a,s,e),nf(a,o),t.ancestors.pop(),t.schema=i,t.create(e,s,a,n)}function D3(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Gs(t,e.position)}function $3(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Gs(t,e.position)}function M3(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=ei,t.schema=r),t.ancestors.push(e);const s=e.name===null?t.Fragment:tk(t,e.name,!0),a=X3(t,e),o=rf(t,e);return ek(t,a,s,e),nf(a,o),t.ancestors.pop(),t.schema=i,t.create(e,s,a,n)}function B3(t,e,n){const i={};return nf(i,rf(t,e)),t.create(e,t.Fragment,i,n)}function U3(t,e){return e.value}function ek(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function nf(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function F3(t,e,n){return i;function i(r,s,a,o){const u=Array.isArray(a.children)?n:e;return o?u(s,a,o):u(s,a)}}function Z3(t,e){return n;function n(i,r,s,a){const o=Array.isArray(s.children),l=gn(i);return e(r,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function z3(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&tf.call(e.properties,r)){const s=W3(t,r,e.properties[r]);if(s){const[a,o]=s;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Q3.has(e.tagName)?i=o:n[a]=o}}if(i){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function X3(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const s=i.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else Gs(t,e.position);else{const r=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const o=i.value.data.estree.body[0];o.type,s=t.evaluater.evaluateExpression(o.expression)}else Gs(t,e.position);else s=i.value===null?!0:i.value;n[r]=s}return n}function rf(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:P3;for(;++ir?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s0?(Mt(t,t.length,0,e),t):e}const ng={}.hasOwnProperty;function ik(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ht(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ct=ti(/[A-Za-z]/),rt=ti(/[\dA-Za-z]/),tI=ti(/[#-'*+\--9=?A-Z^-~]/);function Yo(t){return t!==null&&(t<32||t===127)}const Bc=ti(/\d/),nI=ti(/[\dA-Fa-f]/),iI=ti(/[!-/:-@[-`{-~]/);function ee(t){return t!==null&&t<-2}function _e(t){return t!==null&&(t<0||t===32)}function ce(t){return t===-2||t===-1||t===32}const gl=ti(new RegExp("\\p{P}|\\p{S}","u")),Qi=ti(/\s/);function ti(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function $r(t){const e=[];let n=-1,i=0,r=0;for(;++n55295&&s<57344){const o=t.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),r=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(i,n),encodeURIComponent(a)),i=n+r+1,a=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function pe(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return ce(l)?(t.enter(n),o(l)):e(l)}function o(l){return ce(l)&&s++a))return;const $=e.events.length;let H=$,q,C;for(;H--;)if(e.events[H][0]==="exit"&&e.events[H][1].type==="chunkFlow"){if(q){C=e.events[H][1].end;break}q=!0}for(k(i),w=$;wA;){const v=n[I];e.containerState=v[1],v[0].exit.call(e,t)}n.length=A}function T(){r.write([null]),s=void 0,r=void 0,e.containerState._closeFlow=void 0}}function lI(t,e,n){return pe(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qo(t){if(t===null||_e(t)||Qi(t))return 1;if(gl(t))return 2}function Ol(t,e,n){const i=[];let r=-1;for(;++r1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const h=Object.assign({},t[i][1].end),f=Object.assign({},t[n][1].start);rg(h,-l),rg(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},t[i][1].end)},o={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:f},s={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},t[i][1].end=Object.assign({},a.start),t[n][1].start=Object.assign({},o.end),u=[],t[i][1].end.offset-t[i][1].start.offset&&(u=It(u,[["enter",t[i][1],e],["exit",t[i][1],e]])),u=It(u,[["enter",r,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=It(u,Ol(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),u=It(u,[["exit",s,e],["enter",o,e],["exit",o,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=It(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,Mt(t,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&ce(w)?pe(t,T,"linePrefix",s+1)(w):T(w)}function T(w){return w===null||ee(w)?t.check(sg,g,I)(w):(t.enter("codeFlowValue"),A(w))}function A(w){return w===null||ee(w)?(t.exit("codeFlowValue"),T(w)):(t.consume(w),A)}function I(w){return t.exit("codeFenced"),e(w)}function v(w,$,H){let q=0;return C;function C(G){return w.enter("lineEnding"),w.consume(G),w.exit("lineEnding"),U}function U(G){return w.enter("codeFencedFence"),ce(G)?pe(w,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):B(G)}function B(G){return G===o?(w.enter("codeFencedFenceSequence"),K(G)):H(G)}function K(G){return G===o?(q++,w.consume(G),K):q>=a?(w.exit("codeFencedFenceSequence"),ce(G)?pe(w,J,"whitespace")(G):J(G)):H(G)}function J(G){return G===null||ee(G)?(w.exit("codeFencedFence"),$(G)):H(G)}}}function kI(t,e,n){const i=this;return r;function r(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return i.parser.lazy[i.now().line]?n(a):e(a)}}const hu={name:"codeIndented",tokenize:_I},SI={tokenize:EI,partial:!0};function _I(t,e,n){const i=this;return r;function r(u){return t.enter("codeIndented"),pe(t,s,"linePrefix",5)(u)}function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):ee(u)?t.attempt(SI,a,l)(u):(t.enter("codeFlowValue"),o(u))}function o(u){return u===null||ee(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),o)}function l(u){return t.exit("codeIndented"),e(u)}}function EI(t,e,n){const i=this;return r;function r(a){return i.parser.lazy[i.now().line]?n(a):ee(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r):pe(t,s,"linePrefix",5)(a)}function s(a){const o=i.events[i.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):ee(a)?r(a):n(a)}}const TI={name:"codeText",tokenize:AI,resolve:xI,previous:wI};function xI(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i=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 ethis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&ts(this.left,i),s.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),ts(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ts(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(i.parser.constructs.flow,n,e)(a)}}function uk(t,e,n,i,r,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return h;function h(k){return k===60?(t.enter(i),t.enter(r),t.enter(s),t.consume(k),t.exit(s),f):k===null||k===32||k===41||Yo(k)?n(k):(t.enter(i),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),g(k))}function f(k){return k===62?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),t.exit(i),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(t.exit("chunkString"),t.exit(o),f(k)):k===null||k===60||ee(k)?n(k):(t.consume(k),k===92?m:p)}function m(k){return k===60||k===62||k===92?(t.consume(k),p):p(k)}function g(k){return!c&&(k===null||k===41||_e(k))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(i),e(k)):c999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(t.exit(s),t.enter(r),t.consume(p),t.exit(r),t.exit(i),e):ee(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||ee(p)||o++>999?(t.exit("chunkString"),c(p)):(t.consume(p),l||(l=!ce(p)),p===92?f:h)}function f(p){return p===91||p===92||p===93?(t.consume(p),o++,h):h(p)}}function hk(t,e,n,i,r,s){let a;return o;function o(f){return f===34||f===39||f===40?(t.enter(i),t.enter(r),t.consume(f),t.exit(r),a=f===40?41:f,l):n(f)}function l(f){return f===a?(t.enter(r),t.consume(f),t.exit(r),t.exit(i),e):(t.enter(s),u(f))}function u(f){return f===a?(t.exit(s),l(a)):f===null?n(f):ee(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),pe(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||ee(f)?(t.exit("chunkString"),u(f)):(t.consume(f),f===92?h:c)}function h(f){return f===a||f===92?(t.consume(f),c):c(f)}}function ks(t,e){let n;return i;function i(r){return ee(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):ce(r)?pe(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const LI={name:"definition",tokenize:$I},DI={tokenize:MI,partial:!0};function $I(t,e,n){const i=this;let r;return s;function s(p){return t.enter("definition"),a(p)}function a(p){return ck.call(i,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return r=Ht(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return _e(p)?ks(t,u)(p):u(p)}function u(p){return uk(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return t.attempt(DI,h,h)(p)}function h(p){return ce(p)?pe(t,f,"whitespace")(p):f(p)}function f(p){return p===null||ee(p)?(t.exit("definition"),i.parser.defined.push(r),e(p)):n(p)}}function MI(t,e,n){return i;function i(o){return _e(o)?ks(t,r)(o):n(o)}function r(o){return hk(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ce(o)?pe(t,a,"whitespace")(o):a(o)}function a(o){return o===null||ee(o)?e(o):n(o)}}const BI={name:"hardBreakEscape",tokenize:UI};function UI(t,e,n){return i;function i(s){return t.enter("hardBreakEscape"),t.consume(s),r}function r(s){return ee(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const FI={name:"headingAtx",tokenize:zI,resolve:ZI};function ZI(t,e){let n=t.length-2,i=3,r,s;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},s={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},Mt(t,i,n-i+1,[["enter",r,e],["enter",s,e],["exit",s,e],["exit",r,e]])),t}function zI(t,e,n){let i=0;return r;function r(c){return t.enter("atxHeading"),s(c)}function s(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&i++<6?(t.consume(c),a):c===null||_e(c)?(t.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||ee(c)?(t.exit("atxHeading"),e(c)):ce(c)?pe(t,o,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),o(c))}function u(c){return c===null||c===35||_e(c)?(t.exit("atxHeadingText"),o(c)):(t.consume(c),u)}}const XI=["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"],og=["pre","script","style","textarea"],WI={name:"htmlFlow",tokenize:VI,resolveTo:qI,concrete:!0},HI={tokenize:GI,partial:!0},YI={tokenize:jI,partial:!0};function qI(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function VI(t,e,n){const i=this;let r,s,a,o,l;return u;function u(x){return c(x)}function c(x){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(x),h}function h(x){return x===33?(t.consume(x),f):x===47?(t.consume(x),s=!0,g):x===63?(t.consume(x),r=3,i.interrupt?e:E):ct(x)?(t.consume(x),a=String.fromCharCode(x),O):n(x)}function f(x){return x===45?(t.consume(x),r=2,p):x===91?(t.consume(x),r=5,o=0,m):ct(x)?(t.consume(x),r=4,i.interrupt?e:E):n(x)}function p(x){return x===45?(t.consume(x),i.interrupt?e:E):n(x)}function m(x){const He="CDATA[";return x===He.charCodeAt(o++)?(t.consume(x),o===He.length?i.interrupt?e:B:m):n(x)}function g(x){return ct(x)?(t.consume(x),a=String.fromCharCode(x),O):n(x)}function O(x){if(x===null||x===47||x===62||_e(x)){const He=x===47,vt=a.toLowerCase();return!He&&!s&&og.includes(vt)?(r=1,i.interrupt?e(x):B(x)):XI.includes(a.toLowerCase())?(r=6,He?(t.consume(x),k):i.interrupt?e(x):B(x)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(x):s?T(x):A(x))}return x===45||rt(x)?(t.consume(x),a+=String.fromCharCode(x),O):n(x)}function k(x){return x===62?(t.consume(x),i.interrupt?e:B):n(x)}function T(x){return ce(x)?(t.consume(x),T):C(x)}function A(x){return x===47?(t.consume(x),C):x===58||x===95||ct(x)?(t.consume(x),I):ce(x)?(t.consume(x),A):C(x)}function I(x){return x===45||x===46||x===58||x===95||rt(x)?(t.consume(x),I):v(x)}function v(x){return x===61?(t.consume(x),w):ce(x)?(t.consume(x),v):A(x)}function w(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),l=x,$):ce(x)?(t.consume(x),w):H(x)}function $(x){return x===l?(t.consume(x),l=null,q):x===null||ee(x)?n(x):(t.consume(x),$)}function H(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||_e(x)?v(x):(t.consume(x),H)}function q(x){return x===47||x===62||ce(x)?A(x):n(x)}function C(x){return x===62?(t.consume(x),U):n(x)}function U(x){return x===null||ee(x)?B(x):ce(x)?(t.consume(x),U):n(x)}function B(x){return x===45&&r===2?(t.consume(x),be):x===60&&r===1?(t.consume(x),ge):x===62&&r===4?(t.consume(x),Re):x===63&&r===3?(t.consume(x),E):x===93&&r===5?(t.consume(x),Ne):ee(x)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(HI,Me,K)(x)):x===null||ee(x)?(t.exit("htmlFlowData"),K(x)):(t.consume(x),B)}function K(x){return t.check(YI,J,Me)(x)}function J(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),G}function G(x){return x===null||ee(x)?K(x):(t.enter("htmlFlowData"),B(x))}function be(x){return x===45?(t.consume(x),E):B(x)}function ge(x){return x===47?(t.consume(x),a="",Ce):B(x)}function Ce(x){if(x===62){const He=a.toLowerCase();return og.includes(He)?(t.consume(x),Re):B(x)}return ct(x)&&a.length<8?(t.consume(x),a+=String.fromCharCode(x),Ce):B(x)}function Ne(x){return x===93?(t.consume(x),E):B(x)}function E(x){return x===62?(t.consume(x),Re):x===45&&r===2?(t.consume(x),E):B(x)}function Re(x){return x===null||ee(x)?(t.exit("htmlFlowData"),Me(x)):(t.consume(x),Re)}function Me(x){return t.exit("htmlFlow"),e(x)}}function jI(t,e,n){const i=this;return r;function r(a){return ee(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return i.parser.lazy[i.now().line]?n(a):e(a)}}function GI(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(fa,e,n)}}const KI={name:"htmlText",tokenize:JI};function JI(t,e,n){const i=this;let r,s,a;return o;function o(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),u):E===47?(t.consume(E),v):E===63?(t.consume(E),A):ct(E)?(t.consume(E),H):n(E)}function u(E){return E===45?(t.consume(E),c):E===91?(t.consume(E),s=0,m):ct(E)?(t.consume(E),T):n(E)}function c(E){return E===45?(t.consume(E),p):n(E)}function h(E){return E===null?n(E):E===45?(t.consume(E),f):ee(E)?(a=h,ge(E)):(t.consume(E),h)}function f(E){return E===45?(t.consume(E),p):h(E)}function p(E){return E===62?be(E):E===45?f(E):h(E)}function m(E){const Re="CDATA[";return E===Re.charCodeAt(s++)?(t.consume(E),s===Re.length?g:m):n(E)}function g(E){return E===null?n(E):E===93?(t.consume(E),O):ee(E)?(a=g,ge(E)):(t.consume(E),g)}function O(E){return E===93?(t.consume(E),k):g(E)}function k(E){return E===62?be(E):E===93?(t.consume(E),k):g(E)}function T(E){return E===null||E===62?be(E):ee(E)?(a=T,ge(E)):(t.consume(E),T)}function A(E){return E===null?n(E):E===63?(t.consume(E),I):ee(E)?(a=A,ge(E)):(t.consume(E),A)}function I(E){return E===62?be(E):A(E)}function v(E){return ct(E)?(t.consume(E),w):n(E)}function w(E){return E===45||rt(E)?(t.consume(E),w):$(E)}function $(E){return ee(E)?(a=$,ge(E)):ce(E)?(t.consume(E),$):be(E)}function H(E){return E===45||rt(E)?(t.consume(E),H):E===47||E===62||_e(E)?q(E):n(E)}function q(E){return E===47?(t.consume(E),be):E===58||E===95||ct(E)?(t.consume(E),C):ee(E)?(a=q,ge(E)):ce(E)?(t.consume(E),q):be(E)}function C(E){return E===45||E===46||E===58||E===95||rt(E)?(t.consume(E),C):U(E)}function U(E){return E===61?(t.consume(E),B):ee(E)?(a=U,ge(E)):ce(E)?(t.consume(E),U):q(E)}function B(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(t.consume(E),r=E,K):ee(E)?(a=B,ge(E)):ce(E)?(t.consume(E),B):(t.consume(E),J)}function K(E){return E===r?(t.consume(E),r=void 0,G):E===null?n(E):ee(E)?(a=K,ge(E)):(t.consume(E),K)}function J(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||_e(E)?q(E):(t.consume(E),J)}function G(E){return E===47||E===62||_e(E)?q(E):n(E)}function be(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):n(E)}function ge(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),Ce}function Ce(E){return ce(E)?pe(t,Ne,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Ne(E)}function Ne(E){return t.enter("htmlTextData"),a(E)}}const of={name:"labelEnd",tokenize:sQ,resolveTo:rQ,resolveAll:iQ},eQ={tokenize:aQ},tQ={tokenize:oQ},nQ={tokenize:lQ};function iQ(t){let e=-1;for(;++e=3&&(u===null||ee(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===r?(t.consume(u),i++,l):(t.exit("thematicBreakSequence"),ce(u)?pe(t,o,"whitespace")(u):o(u))}}const dt={name:"list",tokenize:OQ,continuation:{tokenize:bQ},exit:kQ},mQ={tokenize:SQ,partial:!0},gQ={tokenize:yQ,partial:!0};function OQ(t,e,n){const i=this,r=i.events[i.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,a=0;return o;function o(p){const m=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:Bc(p)){if(i.containerState.type||(i.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(fo,n,u)(p):u(p);if(!i.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return Bc(p)&&++a<10?(t.consume(p),l):(!i.interrupt||a<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),u(p)):n(p)}function u(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,t.check(fa,i.interrupt?n:c,t.attempt(mQ,f,h))}function c(p){return i.containerState.initialBlankLine=!0,s++,f(p)}function h(p){return ce(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return i.containerState.size=s+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function bQ(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(fa,r,s);function r(o){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,pe(t,e,"listItemIndent",i.containerState.size+1)(o)}function s(o){return i.containerState.furtherBlankLines||!ce(o)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(o)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(gQ,e,a)(o))}function a(o){return i.containerState._closeFlow=!0,i.interrupt=void 0,pe(t,t.attempt(dt,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function yQ(t,e,n){const i=this;return pe(t,r,"listItemIndent",i.containerState.size+1);function r(s){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?e(s):n(s)}}function kQ(t){t.exit(this.containerState.type)}function SQ(t,e,n){const i=this;return pe(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(s){const a=i.events[i.events.length-1];return!ce(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const lg={name:"setextUnderline",tokenize:EQ,resolveTo:_Q};function _Q(t,e){let n=t.length,i,r,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",s?(t.splice(r,0,["enter",a,e]),t.splice(s+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[s][1].end)):t[i][1]=a,t.push(["exit",a,e]),t}function EQ(t,e,n){const i=this;let r;return s;function s(u){let c=i.events.length,h;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){h=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||h)?(t.enter("setextHeadingLine"),r=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===r?(t.consume(u),o):(t.exit("setextHeadingLineSequence"),ce(u)?pe(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ee(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const TQ={tokenize:xQ};function xQ(t){const e=this,n=t.attempt(fa,i,t.attempt(this.parser.constructs.flowInitial,r,pe(t,t.attempt(this.parser.constructs.flow,r,t.attempt(vI,r)),"linePrefix")));return n;function i(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const wQ={resolveAll:dk()},AQ=fk("string"),CQ=fk("text");function fk(t){return{tokenize:e,resolveAll:dk(t==="text"?PQ:void 0)};function e(n){const i=this,r=this.parser.constructs[t],s=n.attempt(r,a,o);return a;function a(c){return u(c)?s(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const h=r[c];let f=-1;if(h)for(;++f-1){const o=a[0];typeof o=="string"?a[0]=o.slice(i):a.shift()}s>0&&a.push(t[r].slice(0,s))}return a}function IQ(t,e){let n=-1;const i=[];let r;for(;++n0){const zt=re.tokenStack[re.tokenStack.length-1];(zt[1]||cg).call(re,void 0,zt[0])}for(z.position={start:Nn(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:Nn(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function s6(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function a6(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function gk(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const a=r[r.length-1];return a&&a.type==="text"?a.value+=i:r.push({type:"text",value:i}),r}function o6(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return gk(t,e);const r={src:$r(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,s),t.applyData(e,s)}function l6(t,e){const n={src:$r(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function u6(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function c6(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return gk(t,e);const r={href:$r(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function h6(t,e){const n={href:$r(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function f6(t,e,n){const i=t.all(e),r=n?d6(n):Ok(e),s={},a=[];if(typeof e.checked=="boolean"){const c=i[0];let h;c&&c.type==="element"&&c.tagName==="p"?h=c:(h={type:"element",tagName:"p",properties:{},children:[]},i.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o1}function p6(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},o=gn(e.children[1]),l=ml(e.children[e.children.length-1]);o&&l&&(a.position={start:o,end:l}),r.push(a)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function y6(t,e,n){const i=n?n.children:void 0,s=(i?i.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return s.push(dg(e.slice(r),r>0,!1)),s.join("")}function dg(t,e,n){let i=0,r=t.length;if(e){let s=t.codePointAt(i);for(;s===hg||s===fg;)i++,s=t.codePointAt(i)}if(n){let s=t.codePointAt(r-1);for(;s===hg||s===fg;)r--,s=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function _6(t,e){const n={type:"text",value:S6(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function E6(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const T6={blockquote:JQ,break:e6,code:t6,delete:n6,emphasis:i6,footnoteReference:r6,heading:s6,html:a6,imageReference:o6,image:l6,inlineCode:u6,linkReference:c6,link:h6,listItem:f6,list:p6,paragraph:m6,root:g6,strong:O6,table:b6,tableCell:k6,tableRow:y6,text:_6,thematicBreak:E6,toml:Ya,yaml:Ya,definition:Ya,footnoteDefinition:Ya};function Ya(){}const bk=-1,bl=0,Vo=1,jo=2,lf=3,uf=4,cf=5,hf=6,yk=7,kk=8,pg=typeof self=="object"?self:globalThis,x6=(t,e)=>{const n=(r,s)=>(t.set(s,r),r),i=r=>{if(t.has(r))return t.get(r);const[s,a]=e[r];switch(s){case bl:case bk:return n(a,r);case Vo:{const o=n([],r);for(const l of a)o.push(i(l));return o}case jo:{const o=n({},r);for(const[l,u]of a)o[i(l)]=i(u);return o}case lf:return n(new Date(a),r);case uf:{const{source:o,flags:l}=a;return n(new RegExp(o,l),r)}case cf:{const o=n(new Map,r);for(const[l,u]of a)o.set(i(l),i(u));return o}case hf:{const o=n(new Set,r);for(const l of a)o.add(i(l));return o}case yk:{const{name:o,message:l}=a;return n(new pg[o](l),r)}case kk:return n(BigInt(a),r);case"BigInt":return n(Object(BigInt(a)),r)}return n(new pg[s](a),r)};return i},mg=t=>x6(new Map,t)(0),Yi="",{toString:w6}={},{keys:A6}=Object,ns=t=>{const e=typeof t;if(e!=="object"||!t)return[bl,e];const n=w6.call(t).slice(8,-1);switch(n){case"Array":return[Vo,Yi];case"Object":return[jo,Yi];case"Date":return[lf,Yi];case"RegExp":return[uf,Yi];case"Map":return[cf,Yi];case"Set":return[hf,Yi]}return n.includes("Array")?[Vo,n]:n.includes("Error")?[yk,n]:[jo,n]},qa=([t,e])=>t===bl&&(e==="function"||e==="symbol"),C6=(t,e,n,i)=>{const r=(a,o)=>{const l=i.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=ns(a);switch(o){case bl:{let c=a;switch(l){case"bigint":o=kk,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return r([bk],a)}return r([o,c],a)}case Vo:{if(l)return r([l,[...a]],a);const c=[],h=r([o,c],a);for(const f of a)c.push(s(f));return h}case jo:{if(l)switch(l){case"BigInt":return r([l,a.toString()],a);case"Boolean":case"Number":case"String":return r([l,a.valueOf()],a)}if(e&&"toJSON"in a)return s(a.toJSON());const c=[],h=r([o,c],a);for(const f of A6(a))(t||!qa(ns(a[f])))&&c.push([s(f),s(a[f])]);return h}case lf:return r([o,a.toISOString()],a);case uf:{const{source:c,flags:h}=a;return r([o,{source:c,flags:h}],a)}case cf:{const c=[],h=r([o,c],a);for(const[f,p]of a)(t||!(qa(ns(f))||qa(ns(p))))&&c.push([s(f),s(p)]);return h}case hf:{const c=[],h=r([o,c],a);for(const f of a)(t||!qa(ns(f)))&&c.push(s(f));return h}}const{message:u}=a;return r([o,{name:l,message:u}],a)};return s},gg=(t,{json:e,lossy:n}={})=>{const i=[];return C6(!(e||n),!!e,new Map,i)(t),i},Tr=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?mg(gg(t,e)):structuredClone(t):(t,e)=>mg(gg(t,e));function P6(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function v6(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function R6(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||P6,i=t.options.footnoteBackLabel||v6,r=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let T=typeof n=="string"?n:n(l,p);typeof T=="string"&&(T={type:"text",value:T}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const O=c[c.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const T=O.children[O.children.length-1];T&&T.type==="text"?T.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...m)}else c.push(...m);const k={type:"element",tagName:"li",properties:{id:e+"fn-"+f},children:t.wrap(c,!0)};t.patch(u,k),o.push(k)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Tr(a),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:t.wrap(o,!0)},{type:"text",value:` +`}]}}const yl=function(t){if(t==null)return L6;if(typeof t=="function")return kl(t);if(typeof t=="object")return Array.isArray(t)?I6(t):Q6(t);if(typeof t=="string")return N6(t);throw new Error("Expected function, string, or object as test")};function I6(t){const e=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let p=Sk,m,g,O;if((!e||s(l,u,c[c.length-1]||void 0))&&(p=B6(n(l,c)),p[0]===Fc))return p;if("children"in l&&l.children){const k=l;if(k.children&&p[0]!==M6)for(g=(i?k.children.length:-1)+a,O=c.concat(k);g>-1&&g0&&n.push({type:"text",value:` +`}),n}function Og(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function bg(t,e){const n=F6(t,e),i=n.one(t,void 0),r=R6(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:` +`},r),s}function H6(t,e){return t&&"run"in t?async function(n,i){const r=bg(n,{file:i,...e});await t.run(r,i)}:function(n,i){return bg(n,{file:i,...e||t})}}function yg(t){if(t)throw t}var po=Object.prototype.hasOwnProperty,Ek=Object.prototype.toString,kg=Object.defineProperty,Sg=Object.getOwnPropertyDescriptor,_g=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Ek.call(e)==="[object Array]"},Eg=function(e){if(!e||Ek.call(e)!=="[object Object]")return!1;var n=po.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&po.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var r;for(r in e);return typeof r>"u"||po.call(e,r)},Tg=function(e,n){kg&&n.name==="__proto__"?kg(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},xg=function(e,n){if(n==="__proto__")if(po.call(e,n)){if(Sg)return Sg(e,n).value}else return;return e[n]},Y6=function t(){var e,n,i,r,s,a,o=arguments[0],l=1,u=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});la.length;let l;o&&a.push(r);try{l=t.apply(this,a)}catch(u){const c=u;if(o&&n)throw c;return r(c)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,r):l instanceof Error?r(l):s(l))}function r(a,...o){n||(n=!0,e(a,...o))}function s(a){r(null,a)}}const rn={basename:j6,dirname:G6,extname:K6,join:J6,sep:"/"};function j6(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');da(t);let n=0,i=-1,r=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let a=-1,o=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else a<0&&(s=!0,a=r+1),o>-1&&(t.codePointAt(r)===e.codePointAt(o--)?o<0&&(i=r):(o=-1,i=a));return n===i?i=a:i<0&&(i=t.length),t.slice(n,i)}function G6(t){if(da(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function K6(t){da(t);let e=t.length,n=-1,i=0,r=-1,s=0,a;for(;e--;){const o=t.codePointAt(e);if(o===47){if(a){i=e+1;break}continue}n<0&&(a=!0,n=e+1),o===46?r<0?r=e:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function J6(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function t5(t,e){let n="",i=0,r=-1,s=0,a=-1,o,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),r=a,s=0;continue}}else if(n.length>0){n="",i=0,r=a,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,a):n=t.slice(r+1,a),i=a-r-1;r=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function da(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const n5={cwd:i5};function i5(){return"/"}function Xc(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function r5(t){if(typeof t=="string")t=new URL(t);else if(!Xc(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return s5(t)}function s5(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n0){let[p,...m]=c;const g=i[f][1];zc(g)&&zc(p)&&(p=du(!0,g,p)),i[f]=[u,p,...m]}}}}const u5=new ff().freeze();function Ou(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function bu(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function yu(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ag(t){if(!zc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Cg(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Va(t){return c5(t)?t:new Tk(t)}function c5(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function h5(t){return typeof t=="string"||f5(t)}function f5(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const d5="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pg=[],vg={allowDangerousHtml:!0},p5=/^(https?|ircs?|mailto|xmpp)$/i,m5=[{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 tM(t){const e=t.allowedElements,n=t.allowElement,i=t.children||"",r=t.className,s=t.components,a=t.disallowedElements,o=t.rehypePlugins||Pg,l=t.remarkPlugins||Pg,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...vg}:vg,c=t.skipHtml,h=t.unwrapDisallowed,f=t.urlTransform||g5,p=u5().use(KQ).use(l).use(H6,u).use(o),m=new Tk;typeof i=="string"&&(m.value=i);for(const T of m5)Object.hasOwn(t,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+d5+T.id,void 0);const g=p.parse(m);let O=p.runSync(g,m);return r&&(O={type:"element",tagName:"div",properties:{className:r},children:O.type==="root"?O.children:[O]}),Sl(O,k),N3(O,{Fragment:se.Fragment,components:s,ignoreInvalidStyle:!0,jsx:se.jsx,jsxs:se.jsxs,passKeys:!0,passNode:!0});function k(T,A,I){if(T.type==="raw"&&I&&typeof A=="number")return c?I.children.splice(A,1):I.children[A]={type:"text",value:T.value},A;if(T.type==="element"){let v;for(v in cu)if(Object.hasOwn(cu,v)&&Object.hasOwn(T.properties,v)){const w=T.properties[v],$=cu[v];($===null||$.includes(T.tagName))&&(T.properties[v]=f(String(w||""),v,T))}}if(T.type==="element"){let v=e?!e.includes(T.tagName):a?a.includes(T.tagName):!1;if(!v&&n&&typeof A=="number"&&(v=!n(T,A,I)),v&&I&&typeof A=="number")return h&&T.children?I.children.splice(A,1,...T.children):I.children.splice(A,1),A}}}function g5(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e<0||r>-1&&e>r||n>-1&&e>n||i>-1&&e>i||p5.test(t.slice(0,e))?t:""}const Rg=/[#.]/g;function O5(t,e){const n=t||"",i={};let r=0,s,a;for(;r-1&&ss)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s}}}function r(s){const a=s&&s.line,o=s&&s.column;if(typeof a=="number"&&typeof o=="number"&&!Number.isNaN(a)&&!Number.isNaN(o)&&a-1 in n){const l=(n[a-2]||0)+o-1||0;if(l>-1&&l=55296&&t<=57343}function z5(t){return t>=56320&&t<=57343}function X5(t,e){return(t-55296)*1024+9216+e}function Rk(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function Ik(t){return t>=64976&&t<=65007||Z5.has(t)}var R;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R=R||(R={}));const W5=65536;class H5{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=W5,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:n,col:i,offset:r}=this;return{code:e,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(z5(n))return this.pos++,this._addGap(),X5(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(R.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,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const i=this.html.charCodeAt(n);return i===b.CARRIAGE_RETURN?b.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;let e=this.html.charCodeAt(this.pos);return e===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):e===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vk(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===b.LINE_FEED||e===b.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Rk(e)?this._err(R.controlCharacterInInputStream):Ik(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const Ln=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(t=>t.charCodeAt(0))),Y5=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Su;const q5=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]]),V5=(Su=String.fromCodePoint)!==null&&Su!==void 0?Su:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function j5(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=q5.get(t))!==null&&e!==void 0?e:t}var qe;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(qe||(qe={}));const G5=32;var cn;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(cn||(cn={}));function Yc(t){return t>=qe.ZERO&&t<=qe.NINE}function K5(t){return t>=qe.UPPER_A&&t<=qe.UPPER_F||t>=qe.LOWER_A&&t<=qe.LOWER_F}function J5(t){return t>=qe.UPPER_A&&t<=qe.UPPER_Z||t>=qe.LOWER_A&&t<=qe.LOWER_Z||Yc(t)}function eN(t){return t===qe.EQUALS||J5(t)}var Ye;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Ye||(Ye={}));var yi;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(yi||(yi={}));class tN{constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i,this.state=Ye.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yi.Strict}startEntity(e){this.decodeMode=e,this.state=Ye.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Ye.EntityStart:return e.charCodeAt(n)===qe.NUM?(this.state=Ye.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Ye.NamedEntity,this.stateNamedEntity(e,n));case Ye.NumericStart:return this.stateNumericStart(e,n);case Ye.NumericDecimal:return this.stateNumericDecimal(e,n);case Ye.NumericHex:return this.stateNumericHex(e,n);case Ye.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|G5)===qe.LOWER_X?(this.state=Ye.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Ye.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,i,r){if(n!==i){const s=i-n;this.result=this.result*Math.pow(r,s)+parseInt(e.substr(n,s),r),this.consumed+=s}}stateNumericHex(e,n){const i=n;for(;n>14;for(;n>14,s!==0){if(a===qe.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==yi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:i}=this,r=(i[n]&cn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~cn.VALUE_LENGTH:r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){var e;switch(this.state){case Ye.NamedEntity:return this.result!==0&&(this.decodeMode!==yi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ye.NumericDecimal:return this.emitNumericEntity(0,2);case Ye.NumericHex:return this.emitNumericEntity(0,3);case Ye.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ye.EntityStart:return 0}}}function Nk(t){let e="";const n=new tN(t,i=>e+=V5(i));return function(r,s){let a=0,o=0;for(;(o=r.indexOf("&",o))>=0;){e+=r.slice(a,o),n.startEntity(s);const u=n.write(r,o+1);if(u<0){a=o+n.end();break}a=o+u,o=u===0?a+1:a}const l=e+r.slice(a);return e="",l}}function Lk(t,e,n,i){const r=(e&cn.BRANCH_LENGTH)>>7,s=e&cn.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){const l=i-s;return l<0||l>=r?-1:t[n+l]-1}let a=n,o=a+r-1;for(;a<=o;){const l=a+o>>>1,u=t[l];if(ui)o=l-1;else return t[l+r]}return-1}Nk(Ln);Nk(Y5);var N;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(N=N||(N={}));var Hn;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Hn=Hn||(Hn={}));var wt;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(wt=wt||(wt={}));var P;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(P=P||(P={}));var d;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(d=d||(d={}));const nN=new Map([[P.A,d.A],[P.ADDRESS,d.ADDRESS],[P.ANNOTATION_XML,d.ANNOTATION_XML],[P.APPLET,d.APPLET],[P.AREA,d.AREA],[P.ARTICLE,d.ARTICLE],[P.ASIDE,d.ASIDE],[P.B,d.B],[P.BASE,d.BASE],[P.BASEFONT,d.BASEFONT],[P.BGSOUND,d.BGSOUND],[P.BIG,d.BIG],[P.BLOCKQUOTE,d.BLOCKQUOTE],[P.BODY,d.BODY],[P.BR,d.BR],[P.BUTTON,d.BUTTON],[P.CAPTION,d.CAPTION],[P.CENTER,d.CENTER],[P.CODE,d.CODE],[P.COL,d.COL],[P.COLGROUP,d.COLGROUP],[P.DD,d.DD],[P.DESC,d.DESC],[P.DETAILS,d.DETAILS],[P.DIALOG,d.DIALOG],[P.DIR,d.DIR],[P.DIV,d.DIV],[P.DL,d.DL],[P.DT,d.DT],[P.EM,d.EM],[P.EMBED,d.EMBED],[P.FIELDSET,d.FIELDSET],[P.FIGCAPTION,d.FIGCAPTION],[P.FIGURE,d.FIGURE],[P.FONT,d.FONT],[P.FOOTER,d.FOOTER],[P.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[P.FORM,d.FORM],[P.FRAME,d.FRAME],[P.FRAMESET,d.FRAMESET],[P.H1,d.H1],[P.H2,d.H2],[P.H3,d.H3],[P.H4,d.H4],[P.H5,d.H5],[P.H6,d.H6],[P.HEAD,d.HEAD],[P.HEADER,d.HEADER],[P.HGROUP,d.HGROUP],[P.HR,d.HR],[P.HTML,d.HTML],[P.I,d.I],[P.IMG,d.IMG],[P.IMAGE,d.IMAGE],[P.INPUT,d.INPUT],[P.IFRAME,d.IFRAME],[P.KEYGEN,d.KEYGEN],[P.LABEL,d.LABEL],[P.LI,d.LI],[P.LINK,d.LINK],[P.LISTING,d.LISTING],[P.MAIN,d.MAIN],[P.MALIGNMARK,d.MALIGNMARK],[P.MARQUEE,d.MARQUEE],[P.MATH,d.MATH],[P.MENU,d.MENU],[P.META,d.META],[P.MGLYPH,d.MGLYPH],[P.MI,d.MI],[P.MO,d.MO],[P.MN,d.MN],[P.MS,d.MS],[P.MTEXT,d.MTEXT],[P.NAV,d.NAV],[P.NOBR,d.NOBR],[P.NOFRAMES,d.NOFRAMES],[P.NOEMBED,d.NOEMBED],[P.NOSCRIPT,d.NOSCRIPT],[P.OBJECT,d.OBJECT],[P.OL,d.OL],[P.OPTGROUP,d.OPTGROUP],[P.OPTION,d.OPTION],[P.P,d.P],[P.PARAM,d.PARAM],[P.PLAINTEXT,d.PLAINTEXT],[P.PRE,d.PRE],[P.RB,d.RB],[P.RP,d.RP],[P.RT,d.RT],[P.RTC,d.RTC],[P.RUBY,d.RUBY],[P.S,d.S],[P.SCRIPT,d.SCRIPT],[P.SECTION,d.SECTION],[P.SELECT,d.SELECT],[P.SOURCE,d.SOURCE],[P.SMALL,d.SMALL],[P.SPAN,d.SPAN],[P.STRIKE,d.STRIKE],[P.STRONG,d.STRONG],[P.STYLE,d.STYLE],[P.SUB,d.SUB],[P.SUMMARY,d.SUMMARY],[P.SUP,d.SUP],[P.TABLE,d.TABLE],[P.TBODY,d.TBODY],[P.TEMPLATE,d.TEMPLATE],[P.TEXTAREA,d.TEXTAREA],[P.TFOOT,d.TFOOT],[P.TD,d.TD],[P.TH,d.TH],[P.THEAD,d.THEAD],[P.TITLE,d.TITLE],[P.TR,d.TR],[P.TRACK,d.TRACK],[P.TT,d.TT],[P.U,d.U],[P.UL,d.UL],[P.SVG,d.SVG],[P.VAR,d.VAR],[P.WBR,d.WBR],[P.XMP,d.XMP]]);function Br(t){var e;return(e=nN.get(t))!==null&&e!==void 0?e:d.UNKNOWN}const M=d,iN={[N.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[N.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[N.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[N.XLINK]:new Set,[N.XML]:new Set,[N.XMLNS]:new Set};function Dk(t){return t===M.H1||t===M.H2||t===M.H3||t===M.H4||t===M.H5||t===M.H6}P.STYLE,P.SCRIPT,P.XMP,P.IFRAME,P.NOEMBED,P.NOFRAMES,P.PLAINTEXT;const rN=new Map([[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 y;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(y||(y={}));const $e={DATA:y.DATA,RCDATA:y.RCDATA,RAWTEXT:y.RAWTEXT,SCRIPT_DATA:y.SCRIPT_DATA,PLAINTEXT:y.PLAINTEXT,CDATA_SECTION:y.CDATA_SECTION};function Ss(t){return t>=b.DIGIT_0&&t<=b.DIGIT_9}function hs(t){return t>=b.LATIN_CAPITAL_A&&t<=b.LATIN_CAPITAL_Z}function sN(t){return t>=b.LATIN_SMALL_A&&t<=b.LATIN_SMALL_Z}function Dn(t){return sN(t)||hs(t)}function qc(t){return Dn(t)||Ss(t)}function $k(t){return t>=b.LATIN_CAPITAL_A&&t<=b.LATIN_CAPITAL_F}function Mk(t){return t>=b.LATIN_SMALL_A&&t<=b.LATIN_SMALL_F}function aN(t){return Ss(t)||$k(t)||Mk(t)}function ja(t){return t+32}function Bk(t){return t===b.SPACE||t===b.LINE_FEED||t===b.TABULATION||t===b.FORM_FEED}function oN(t){return t===b.EQUALS_SIGN||qc(t)}function Lg(t){return Bk(t)||t===b.SOLIDUS||t===b.GREATER_THAN_SIGN}class lN{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=y.DATA,this.returnState=y.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new H5(n),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(e))}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||e==null||e())}write(e,n,i){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,n){this.state=e,this._callState(n)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.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 le.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case le.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case le.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}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:le.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=n;return}this._createCharacterToken(e,n)}_emitCodePoint(e){const n=Bk(e)?le.WHITESPACE_CHARACTER:e===b.NULL?le.NULL_CHARACTER:le.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(le.CHARACTER,e)}_matchNamedCharacterReference(e){let n=null,i=0,r=!1;for(let s=0,a=Ln[0];s>=0&&(s=Lk(Ln,a,s+1,e),!(s<0));e=this._consume()){i+=1,a=Ln[s];const o=a&cn.VALUE_LENGTH;if(o){const l=(o>>14)-1;if(e!==b.SEMICOLON&&this._isCharacterReferenceInAttribute()&&oN(this.preprocessor.peek(1))?(n=[b.AMPERSAND],s+=l):(n=l===0?[Ln[s]&~cn.VALUE_LENGTH]:l===1?[Ln[++s]]:[Ln[++s],Ln[++s]],i=0,r=e!==b.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(i),r&&!this.preprocessor.endOfChunkHit&&this._err(R.missingSemicolonAfterCharacterReference),this._unconsume(1),n}_isCharacterReferenceInAttribute(){return this.returnState===y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case y.DATA:{this._stateData(e);break}case y.RCDATA:{this._stateRcdata(e);break}case y.RAWTEXT:{this._stateRawtext(e);break}case y.SCRIPT_DATA:{this._stateScriptData(e);break}case y.PLAINTEXT:{this._statePlaintext(e);break}case y.TAG_OPEN:{this._stateTagOpen(e);break}case y.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case y.TAG_NAME:{this._stateTagName(e);break}case y.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case y.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case y.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case y.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case y.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case y.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case y.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case y.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case y.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case y.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case y.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case y.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case y.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case y.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case y.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case y.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case y.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case y.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case y.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case y.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case y.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case y.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case y.BOGUS_COMMENT:{this._stateBogusComment(e);break}case y.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case y.COMMENT_START:{this._stateCommentStart(e);break}case y.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case y.COMMENT:{this._stateComment(e);break}case y.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case y.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case y.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case y.COMMENT_END:{this._stateCommentEnd(e);break}case y.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case y.DOCTYPE:{this._stateDoctype(e);break}case y.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case y.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case y.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case y.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case y.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case y.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case y.CDATA_SECTION:{this._stateCdataSection(e);break}case y.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case y.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case y.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case y.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case y.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case y.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case y.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case y.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case y.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case y.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case b.LESS_THAN_SIGN:{this.state=y.TAG_OPEN;break}case b.AMPERSAND:{this.returnState=y.DATA,this.state=y.CHARACTER_REFERENCE;break}case b.NULL:{this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case b.AMPERSAND:{this.returnState=y.RCDATA,this.state=y.CHARACTER_REFERENCE;break}case b.LESS_THAN_SIGN:{this.state=y.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case b.LESS_THAN_SIGN:{this.state=y.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case b.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Dn(e))this._createStartTagToken(),this.state=y.TAG_NAME,this._stateTagName(e);else switch(e){case b.EXCLAMATION_MARK:{this.state=y.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=y.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=y.BOGUS_COMMENT,this._stateBogusComment(e);break}case b.EOF:{this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=y.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Dn(e))this._createEndTagToken(),this.state=y.TAG_NAME,this._stateTagName(e);else switch(e){case b.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=y.DATA;break}case b.EOF:{this._err(R.eofBeforeTagName),this._emitChars("");break}case b.NULL:{this._err(R.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(Ie);break}case b.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===b.SOLIDUS?this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Dn(e)?(this._emitChars("<"),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Dn(e)?(this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case b.NULL:{this._err(R.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ie);break}case b.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===b.SOLIDUS?(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(ft.SCRIPT,!1)&&Lg(this.preprocessor.peek(ft.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n1114111)this._err(R.characterReferenceOutsideUnicodeRange),this.charRefCode=b.REPLACEMENT_CHARACTER;else if(vk(this.charRefCode))this._err(R.surrogateCharacterReference),this.charRefCode=b.REPLACEMENT_CHARACTER;else if(Ik(this.charRefCode))this._err(R.noncharacterCharacterReference);else if(Rk(this.charRefCode)||this.charRefCode===b.CARRIAGE_RETURN){this._err(R.controlCharacterReference);const n=rN.get(this.charRefCode);n!==void 0&&(this.charRefCode=n)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const Uk=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Dg=new Set([...Uk,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Ga=new Map([[d.APPLET,N.HTML],[d.CAPTION,N.HTML],[d.HTML,N.HTML],[d.MARQUEE,N.HTML],[d.OBJECT,N.HTML],[d.TABLE,N.HTML],[d.TD,N.HTML],[d.TEMPLATE,N.HTML],[d.TH,N.HTML],[d.ANNOTATION_XML,N.MATHML],[d.MI,N.MATHML],[d.MN,N.MATHML],[d.MO,N.MATHML],[d.MS,N.MATHML],[d.MTEXT,N.MATHML],[d.DESC,N.SVG],[d.FOREIGN_OBJECT,N.SVG],[d.TITLE,N.SVG]]),uN=[d.H1,d.H2,d.H3,d.H4,d.H5,d.H6],cN=[d.TR,d.TEMPLATE,d.HTML],hN=[d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML],fN=[d.TABLE,d.TEMPLATE,d.HTML],dN=[d.TD,d.TH];class pN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===N.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const i=this._indexOf(e);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(e,n,i){const r=this._indexOf(e)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==N.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(e.includes(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(e,n){const i=this._indexOfTagNames(e,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(fN,N.HTML)}clearBackToTableBodyContext(){this.clearBackTo(hN,N.HTML)}clearBackToTableRowContext(){this.clearBackTo(cN,N.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===N.HTML)return!0;if(Ga.get(i)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e],i=this.treeAdapter.getNamespaceURI(this.items[e]);if(Dk(n)&&i===N.HTML)return!0;if(Ga.get(n)===i)return!1}return!0}hasInListItemScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===N.HTML)return!0;if((i===d.UL||i===d.OL)&&r===N.HTML||Ga.get(i)===r)return!1}return!0}hasInButtonScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n],r=this.treeAdapter.getNamespaceURI(this.items[n]);if(i===e&&r===N.HTML)return!0;if(i===d.BUTTON&&r===N.HTML||Ga.get(i)===r)return!1}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===N.HTML){if(i===e)return!0;if(i===d.TABLE||i===d.TEMPLATE||i===d.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===N.HTML){if(n===d.TBODY||n===d.THEAD||n===d.TFOOT)return!0;if(n===d.TABLE||n===d.HTML)return!1}}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===N.HTML){if(i===e)return!0;if(i!==d.OPTION&&i!==d.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Uk.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Dg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&Dg.has(this.currentTagId);)this.pop()}}const _u=3;var Wt;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Wt=Wt||(Wt={}));const $g={type:Wt.Marker};class mN{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const i=[],r=n.length,s=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let o=0;o[a.name,a.value]));let s=0;for(let a=0;ar.get(l.name)===l.value)&&(s+=1,s>=_u&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift($g)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Wt.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Wt.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf($g);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const n=this.entries.find(i=>i.type===Wt.Marker||this.treeAdapter.getTagName(i.element)===e);return n&&n.type===Wt.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Wt.Element&&n.element===e)}}function Mg(t){return{nodeName:"#text",value:t,parentNode:null}}const Gi={createDocument(){return{nodeName:"#document",mode:wt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const i=t.childNodes.indexOf(n);t.childNodes.splice(i,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,i){const r=t.childNodes.find(s=>s.nodeName==="#documentType");if(r)r.name=e,r.publicId=n,r.systemId=i;else{const s={nodeName:"#documentType",name:e,publicId:n,systemId:i,parentNode:null};Gi.appendChild(t,s)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(Gi.isTextNode(n)){n.value+=e;return}}Gi.appendChild(t,Mg(e))},insertTextBefore(t,e,n){const i=t.childNodes[t.childNodes.indexOf(n)-1];i&&Gi.isTextNode(i)?i.value+=e:Gi.insertBefore(t,Mg(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(i=>i.name));for(let i=0;it.startsWith(n))}function SN(t){return t.name===Fk&&t.publicId===null&&(t.systemId===null||t.systemId===gN)}function _N(t){if(t.name!==Fk)return wt.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===ON)return wt.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),yN.has(n))return wt.QUIRKS;let i=e===null?bN:Zk;if(Bg(n,i))return wt.QUIRKS;if(i=e===null?zk:kN,Bg(n,i))return wt.LIMITED_QUIRKS}return wt.NO_QUIRKS}const Ug={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},EN="definitionurl",TN="definitionURL",xN=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(t=>[t.toLowerCase(),t])),wN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:N.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:N.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:N.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:N.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:N.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:N.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:N.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:N.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:N.XML}],["xml:space",{prefix:"xml",name:"space",namespace:N.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:N.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:N.XMLNS}]]),AN=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(t=>[t.toLowerCase(),t])),CN=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function PN(t){const e=t.tagID;return e===d.FONT&&t.attrs.some(({name:i})=>i===Hn.COLOR||i===Hn.SIZE||i===Hn.FACE)||CN.has(e)}function Xk(t){for(let e=0;e0&&this._setContextModes(e,n)}onItemPop(e,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,e,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(e,n){const i=e===this.document||this.treeAdapter.getNamespaceURI(e)===N.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,N.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=$e.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===P.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==N.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=$e.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=$e.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=$e.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=$e.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",i=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),e.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,e)}}_appendElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location)}_insertElement(e,n){const i=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID)}_insertFakeElement(e,n){const i=this.treeAdapter.createElement(e,N.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,N.HTML,e.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(P.HTML,N.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,d.HTML)}_appendCommentNode(e,n){const i=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_insertCharacters(e){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,e.chars,i):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(n),s=i?r.lastIndexOf(i):r.length,a=r[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:c}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,n){for(let i=this.treeAdapter.getFirstChild(e);i;i=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(e),s=n.type===le.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,e.tagID===d.SVG&&this.treeAdapter.getTagName(n)===P.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===N.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===d.MGLYPH||e.tagID===d.MALIGNMARK)&&!this._isIntegrationPoint(i,n,N.HTML)}_processToken(e){switch(e.type){case le.CHARACTER:{this.onCharacter(e);break}case le.NULL_CHARACTER:{this.onNullCharacter(e);break}case le.COMMENT:{this.onComment(e);break}case le.DOCTYPE:{this.onDoctype(e);break}case le.START_TAG:{this._processStartTag(e);break}case le.END_TAG:{this.onEndTag(e);break}case le.EOF:{this.onEof(e);break}case le.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,i){const r=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return QN(e,r,s,i)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===Wt.Marker||this.openElements.contains(r.element)),i=n<0?e-1:n-1;for(let r=i;r>=0;r--){const s=this.activeFormattingElements.entries[r];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case d.TR:{this.insertionMode=_.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=_.IN_TABLE;return}case d.BODY:{this.insertionMode=_.IN_BODY;return}case d.FRAMESET:{this.insertionMode=_.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(e);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return}case d.TD:case d.TH:{if(e>0){this.insertionMode=_.IN_CELL;return}break}case d.HEAD:{if(e>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===d.TEMPLATE)break;if(i===d.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(e){return Hk.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===N.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const i=this.treeAdapter.getNamespaceURI(e);return iN[i].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){d4(this,e);return}switch(this.insertionMode){case _.INITIAL:{is(this,e);break}case _.BEFORE_HTML:{_s(this,e);break}case _.BEFORE_HEAD:{Es(this,e);break}case _.IN_HEAD:{Ts(this,e);break}case _.IN_HEAD_NO_SCRIPT:{xs(this,e);break}case _.AFTER_HEAD:{ws(this,e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{qk(this,e);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Eu(this,e);break}case _.IN_TABLE_TEXT:{eS(this,e);break}case _.IN_COLUMN_GROUP:{Go(this,e);break}case _.AFTER_BODY:{Ko(this,e);break}case _.AFTER_AFTER_BODY:{go(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f4(this,e);return}switch(this.insertionMode){case _.INITIAL:{is(this,e);break}case _.BEFORE_HTML:{_s(this,e);break}case _.BEFORE_HEAD:{Es(this,e);break}case _.IN_HEAD:{Ts(this,e);break}case _.IN_HEAD_NO_SCRIPT:{xs(this,e);break}case _.AFTER_HEAD:{ws(this,e);break}case _.TEXT:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Eu(this,e);break}case _.IN_COLUMN_GROUP:{Go(this,e);break}case _.AFTER_BODY:{Ko(this,e);break}case _.AFTER_AFTER_BODY:{go(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vc(this,e);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{Vc(this,e);break}case _.IN_TABLE_TEXT:{rs(this,e);break}case _.AFTER_BODY:{XN(this,e);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{WN(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{HN(this,e);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(e,R.misplacedDoctype);break}case _.IN_TABLE_TEXT:{rs(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?p4(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{is(this,e);break}case _.BEFORE_HTML:{YN(this,e);break}case _.BEFORE_HEAD:{VN(this,e);break}case _.IN_HEAD:{Kt(this,e);break}case _.IN_HEAD_NO_SCRIPT:{KN(this,e);break}case _.AFTER_HEAD:{eL(this,e);break}case _.IN_BODY:{lt(this,e);break}case _.IN_TABLE:{xr(this,e);break}case _.IN_TABLE_TEXT:{rs(this,e);break}case _.IN_CAPTION:{jL(this,e);break}case _.IN_COLUMN_GROUP:{bf(this,e);break}case _.IN_TABLE_BODY:{Tl(this,e);break}case _.IN_ROW:{xl(this,e);break}case _.IN_CELL:{JL(this,e);break}case _.IN_SELECT:{iS(this,e);break}case _.IN_SELECT_IN_TABLE:{t4(this,e);break}case _.IN_TEMPLATE:{i4(this,e);break}case _.AFTER_BODY:{s4(this,e);break}case _.IN_FRAMESET:{a4(this,e);break}case _.AFTER_FRAMESET:{l4(this,e);break}case _.AFTER_AFTER_BODY:{c4(this,e);break}case _.AFTER_AFTER_FRAMESET:{h4(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?m4(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{is(this,e);break}case _.BEFORE_HTML:{qN(this,e);break}case _.BEFORE_HEAD:{jN(this,e);break}case _.IN_HEAD:{GN(this,e);break}case _.IN_HEAD_NO_SCRIPT:{JN(this,e);break}case _.AFTER_HEAD:{tL(this,e);break}case _.IN_BODY:{El(this,e);break}case _.TEXT:{UL(this,e);break}case _.IN_TABLE:{Ks(this,e);break}case _.IN_TABLE_TEXT:{rs(this,e);break}case _.IN_CAPTION:{GL(this,e);break}case _.IN_COLUMN_GROUP:{KL(this,e);break}case _.IN_TABLE_BODY:{jc(this,e);break}case _.IN_ROW:{nS(this,e);break}case _.IN_CELL:{e4(this,e);break}case _.IN_SELECT:{rS(this,e);break}case _.IN_SELECT_IN_TABLE:{n4(this,e);break}case _.IN_TEMPLATE:{r4(this,e);break}case _.AFTER_BODY:{aS(this,e);break}case _.IN_FRAMESET:{o4(this,e);break}case _.AFTER_FRAMESET:{u4(this,e);break}case _.AFTER_AFTER_BODY:{go(this,e);break}}}onEof(e){switch(this.insertionMode){case _.INITIAL:{is(this,e);break}case _.BEFORE_HTML:{_s(this,e);break}case _.BEFORE_HEAD:{Es(this,e);break}case _.IN_HEAD:{Ts(this,e);break}case _.IN_HEAD_NO_SCRIPT:{xs(this,e);break}case _.AFTER_HEAD:{ws(this,e);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{Kk(this,e);break}case _.TEXT:{FL(this,e);break}case _.IN_TABLE_TEXT:{rs(this,e);break}case _.IN_TEMPLATE:{sS(this,e);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Of(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===b.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Yk(this,e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Eu(this,e);break}case _.IN_TABLE_TEXT:{Jk(this,e);break}}}}function MN(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):Gk(t,e),n}function BN(t,e){let n=null,i=t.openElements.stackTop;for(;i>=0;i--){const r=t.openElements.items[i];if(r===e.element)break;t._isSpecialElement(r,t.openElements.tagIDs[i])&&(n=r)}return n||(t.openElements.shortenToLength(i<0?0:i),t.activeFormattingElements.removeEntry(e)),n}function UN(t,e,n){let i=e,r=t.openElements.getCommonAncestor(e);for(let s=0,a=r;a!==n;s++,a=r){r=t.openElements.getCommonAncestor(a);const o=t.activeFormattingElements.getElementEntry(a),l=o&&s>=DN;!o||l?(l&&t.activeFormattingElements.removeEntry(o),t.openElements.remove(a)):(a=FN(t,o),i===e&&(t.activeFormattingElements.bookmark=o),t.treeAdapter.detachNode(i),t.treeAdapter.appendChild(a,i),i=a)}return i}function FN(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),i=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,i),e.element=i,i}function ZN(t,e,n){const i=t.treeAdapter.getTagName(e),r=Br(i);if(t._isElementCausesFosterParenting(r))t._fosterParentElement(n);else{const s=t.treeAdapter.getNamespaceURI(e);r===d.TEMPLATE&&s===N.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function zN(t,e,n){const i=t.treeAdapter.getNamespaceURI(n.element),{token:r}=n,s=t.treeAdapter.createElement(r.tagName,i,r.attrs);t._adoptNodes(e,s),t.treeAdapter.appendChild(e,s),t.activeFormattingElements.insertElementAfterBookmark(s,r),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,s,r.tagID)}function gf(t,e){for(let n=0;n=n;i--)t._setEndLocation(t.openElements.items[i],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const i=t.openElements.items[0],r=t.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(t._setEndLocation(i,e),t.openElements.stackTop>=1)){const s=t.openElements.items[1],a=t.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&t._setEndLocation(s,e)}}}}function HN(t,e){t._setDocumentType(e);const n=e.forceQuirks?wt.QUIRKS:_N(e);SN(e)||t._err(e,R.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=_.BEFORE_HTML}function is(t,e){t._err(e,R.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,wt.QUIRKS),t.insertionMode=_.BEFORE_HTML,t._processToken(e)}function YN(t,e){e.tagID===d.HTML?(t._insertElement(e,N.HTML),t.insertionMode=_.BEFORE_HEAD):_s(t,e)}function qN(t,e){const n=e.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&_s(t,e)}function _s(t,e){t._insertFakeRootElement(),t.insertionMode=_.BEFORE_HEAD,t._processToken(e)}function VN(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.HEAD:{t._insertElement(e,N.HTML),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD;break}default:Es(t,e)}}function jN(t,e){const n=e.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?Es(t,e):t._err(e,R.endTagWithoutMatchingOpenElement)}function Es(t,e){t._insertFakeElement(P.HEAD,d.HEAD),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD,t._processToken(e)}function Kt(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{t._appendElement(e,N.HTML),e.ackSelfClosing=!0;break}case d.TITLE:{t._switchToTextParsing(e,$e.RCDATA);break}case d.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,$e.RAWTEXT):(t._insertElement(e,N.HTML),t.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{t._switchToTextParsing(e,$e.RAWTEXT);break}case d.SCRIPT:{t._switchToTextParsing(e,$e.SCRIPT_DATA);break}case d.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=_.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case d.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:Ts(t,e)}}function GN(t,e){switch(e.tagID){case d.HEAD:{t.openElements.pop(),t.insertionMode=_.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{Ts(t,e);break}case d.TEMPLATE:{Bi(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function Bi(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==d.TEMPLATE&&t._err(e,R.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(d.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,R.endTagWithoutMatchingOpenElement)}function Ts(t,e){t.openElements.pop(),t.insertionMode=_.AFTER_HEAD,t._processToken(e)}function KN(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{Kt(t,e);break}case d.NOSCRIPT:{t._err(e,R.nestedNoscriptInHead);break}default:xs(t,e)}}function JN(t,e){switch(e.tagID){case d.NOSCRIPT:{t.openElements.pop(),t.insertionMode=_.IN_HEAD;break}case d.BR:{xs(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function xs(t,e){const n=e.type===le.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=_.IN_HEAD,t._processToken(e)}function eL(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.BODY:{t._insertElement(e,N.HTML),t.framesetOk=!1,t.insertionMode=_.IN_BODY;break}case d.FRAMESET:{t._insertElement(e,N.HTML),t.insertionMode=_.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{t._err(e,R.abandonedHeadElementChild),t.openElements.push(t.headElement,d.HEAD),Kt(t,e),t.openElements.remove(t.headElement);break}case d.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:ws(t,e)}}function tL(t,e){switch(e.tagID){case d.BODY:case d.HTML:case d.BR:{ws(t,e);break}case d.TEMPLATE:{Bi(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function ws(t,e){t._insertFakeElement(P.BODY,d.BODY),t.insertionMode=_.IN_BODY,_l(t,e)}function _l(t,e){switch(e.type){case le.CHARACTER:{qk(t,e);break}case le.WHITESPACE_CHARACTER:{Yk(t,e);break}case le.COMMENT:{Vc(t,e);break}case le.START_TAG:{lt(t,e);break}case le.END_TAG:{El(t,e);break}case le.EOF:{Kk(t,e);break}}}function Yk(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function qk(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function nL(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function iL(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function rL(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,N.HTML),t.insertionMode=_.IN_FRAMESET)}function sL(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML)}function aL(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),Dk(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,N.HTML)}function oL(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function lL(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML),n||(t.formElement=t.openElements.current))}function uL(t,e){t.framesetOk=!1;const n=e.tagID;for(let i=t.openElements.stackTop;i>=0;i--){const r=t.openElements.tagIDs[i];if(n===d.LI&&r===d.LI||(n===d.DD||n===d.DT)&&(r===d.DD||r===d.DT)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r);break}if(r!==d.ADDRESS&&r!==d.DIV&&r!==d.P&&t._isSpecialElement(t.openElements.items[i],r))break}t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML)}function cL(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML),t.tokenizer.state=$e.PLAINTEXT}function hL(t,e){t.openElements.hasInScope(d.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(d.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML),t.framesetOk=!1}function fL(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(P.A);n&&(gf(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function dL(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function pL(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(d.NOBR)&&(gf(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,N.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function mL(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function gL(t,e){t.treeAdapter.getDocumentMode(t.document)!==wt.QUIRKS&&t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._insertElement(e,N.HTML),t.framesetOk=!1,t.insertionMode=_.IN_TABLE}function Vk(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,N.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function jk(t){const e=Qk(t,Hn.TYPE);return e!=null&&e.toLowerCase()===NN}function OL(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,N.HTML),jk(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function bL(t,e){t._appendElement(e,N.HTML),e.ackSelfClosing=!0}function yL(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._appendElement(e,N.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function kL(t,e){e.tagName=P.IMG,e.tagID=d.IMG,Vk(t,e)}function SL(t,e){t._insertElement(e,N.HTML),t.skipNextNewLine=!0,t.tokenizer.state=$e.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=_.TEXT}function _L(t,e){t.openElements.hasInButtonScope(d.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,$e.RAWTEXT)}function EL(t,e){t.framesetOk=!1,t._switchToTextParsing(e,$e.RAWTEXT)}function zg(t,e){t._switchToTextParsing(e,$e.RAWTEXT)}function TL(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===_.IN_TABLE||t.insertionMode===_.IN_CAPTION||t.insertionMode===_.IN_TABLE_BODY||t.insertionMode===_.IN_ROW||t.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function xL(t,e){t.openElements.currentTagId===d.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML)}function wL(t,e){t.openElements.hasInScope(d.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,N.HTML)}function AL(t,e){t.openElements.hasInScope(d.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(d.RTC),t._insertElement(e,N.HTML)}function CL(t,e){t._reconstructActiveFormattingElements(),Xk(e),mf(e),e.selfClosing?t._appendElement(e,N.MATHML):t._insertElement(e,N.MATHML),e.ackSelfClosing=!0}function PL(t,e){t._reconstructActiveFormattingElements(),Wk(e),mf(e),e.selfClosing?t._appendElement(e,N.SVG):t._insertElement(e,N.SVG),e.ackSelfClosing=!0}function Xg(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,N.HTML)}function lt(t,e){switch(e.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{dL(t,e);break}case d.A:{fL(t,e);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{aL(t,e);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{sL(t,e);break}case d.LI:case d.DD:case d.DT:{uL(t,e);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Vk(t,e);break}case d.HR:{yL(t,e);break}case d.RB:case d.RTC:{wL(t,e);break}case d.RT:case d.RP:{AL(t,e);break}case d.PRE:case d.LISTING:{oL(t,e);break}case d.XMP:{_L(t,e);break}case d.SVG:{PL(t,e);break}case d.HTML:{nL(t,e);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{Kt(t,e);break}case d.BODY:{iL(t,e);break}case d.FORM:{lL(t,e);break}case d.NOBR:{pL(t,e);break}case d.MATH:{CL(t,e);break}case d.TABLE:{gL(t,e);break}case d.INPUT:{OL(t,e);break}case d.PARAM:case d.TRACK:case d.SOURCE:{bL(t,e);break}case d.IMAGE:{kL(t,e);break}case d.BUTTON:{hL(t,e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{mL(t,e);break}case d.IFRAME:{EL(t,e);break}case d.SELECT:{TL(t,e);break}case d.OPTION:case d.OPTGROUP:{xL(t,e);break}case d.NOEMBED:{zg(t,e);break}case d.FRAMESET:{rL(t,e);break}case d.TEXTAREA:{SL(t,e);break}case d.NOSCRIPT:{t.options.scriptingEnabled?zg(t,e):Xg(t,e);break}case d.PLAINTEXT:{cL(t,e);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:Xg(t,e)}}function vL(t,e){if(t.openElements.hasInScope(d.BODY)&&(t.insertionMode=_.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function RL(t,e){t.openElements.hasInScope(d.BODY)&&(t.insertionMode=_.AFTER_BODY,aS(t,e))}function IL(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function QL(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(d.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(d.FORM):n&&t.openElements.remove(n))}function NL(t){t.openElements.hasInButtonScope(d.P)||t._insertFakeElement(P.P,d.P),t._closePElement()}function LL(t){t.openElements.hasInListItemScope(d.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(d.LI),t.openElements.popUntilTagNamePopped(d.LI))}function DL(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function $L(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function ML(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function BL(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(P.BR,d.BR),t.openElements.pop(),t.framesetOk=!1}function Gk(t,e){const n=e.tagName,i=e.tagID;for(let r=t.openElements.stackTop;r>0;r--){const s=t.openElements.items[r],a=t.openElements.tagIDs[r];if(i===a&&(i!==d.UNKNOWN||t.treeAdapter.getTagName(s)===n)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.stackTop>=r&&t.openElements.shortenToLength(r);break}if(t._isSpecialElement(s,a))break}}function El(t,e){switch(e.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{gf(t,e);break}case d.P:{NL(t);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{IL(t,e);break}case d.LI:{LL(t);break}case d.DD:case d.DT:{DL(t,e);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{$L(t);break}case d.BR:{BL(t);break}case d.BODY:{vL(t,e);break}case d.HTML:{RL(t,e);break}case d.FORM:{QL(t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{ML(t,e);break}case d.TEMPLATE:{Bi(t,e);break}default:Gk(t,e)}}function Kk(t,e){t.tmplInsertionModeStack.length>0?sS(t,e):Of(t,e)}function UL(t,e){var n;e.tagID===d.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function FL(t,e){t._err(e,R.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Eu(t,e){if(Hk.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=_.IN_TABLE_TEXT,e.type){case le.CHARACTER:{eS(t,e);break}case le.WHITESPACE_CHARACTER:{Jk(t,e);break}}else pa(t,e)}function ZL(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,N.HTML),t.insertionMode=_.IN_CAPTION}function zL(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,N.HTML),t.insertionMode=_.IN_COLUMN_GROUP}function XL(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(P.COLGROUP,d.COLGROUP),t.insertionMode=_.IN_COLUMN_GROUP,bf(t,e)}function WL(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,N.HTML),t.insertionMode=_.IN_TABLE_BODY}function HL(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(P.TBODY,d.TBODY),t.insertionMode=_.IN_TABLE_BODY,Tl(t,e)}function YL(t,e){t.openElements.hasInTableScope(d.TABLE)&&(t.openElements.popUntilTagNamePopped(d.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function qL(t,e){jk(e)?t._appendElement(e,N.HTML):pa(t,e),e.ackSelfClosing=!0}function VL(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,N.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function xr(t,e){switch(e.tagID){case d.TD:case d.TH:case d.TR:{HL(t,e);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{Kt(t,e);break}case d.COL:{XL(t,e);break}case d.FORM:{VL(t,e);break}case d.TABLE:{YL(t,e);break}case d.TBODY:case d.TFOOT:case d.THEAD:{WL(t,e);break}case d.INPUT:{qL(t,e);break}case d.CAPTION:{ZL(t,e);break}case d.COLGROUP:{zL(t,e);break}default:pa(t,e)}}function Ks(t,e){switch(e.tagID){case d.TABLE:{t.openElements.hasInTableScope(d.TABLE)&&(t.openElements.popUntilTagNamePopped(d.TABLE),t._resetInsertionMode());break}case d.TEMPLATE:{Bi(t,e);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:pa(t,e)}}function pa(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,_l(t,e),t.fosterParentingEnabled=n}function Jk(t,e){t.pendingCharacterTokens.push(e)}function eS(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function rs(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n0&&t.openElements.currentTagId===d.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===d.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===d.OPTGROUP&&t.openElements.pop();break}case d.OPTION:{t.openElements.currentTagId===d.OPTION&&t.openElements.pop();break}case d.SELECT:{t.openElements.hasInSelectScope(d.SELECT)&&(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode());break}case d.TEMPLATE:{Bi(t,e);break}}}function t4(t,e){const n=e.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode(),t._processStartTag(e)):iS(t,e)}function n4(t,e){const n=e.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(d.SELECT),t._resetInsertionMode(),t.onEndTag(e)):rS(t,e)}function i4(t,e){switch(e.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{Kt(t,e);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{t.tmplInsertionModeStack[0]=_.IN_TABLE,t.insertionMode=_.IN_TABLE,xr(t,e);break}case d.COL:{t.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,t.insertionMode=_.IN_COLUMN_GROUP,bf(t,e);break}case d.TR:{t.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,t.insertionMode=_.IN_TABLE_BODY,Tl(t,e);break}case d.TD:case d.TH:{t.tmplInsertionModeStack[0]=_.IN_ROW,t.insertionMode=_.IN_ROW,xl(t,e);break}default:t.tmplInsertionModeStack[0]=_.IN_BODY,t.insertionMode=_.IN_BODY,lt(t,e)}}function r4(t,e){e.tagID===d.TEMPLATE&&Bi(t,e)}function sS(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(d.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):Of(t,e)}function s4(t,e){e.tagID===d.HTML?lt(t,e):Ko(t,e)}function aS(t,e){var n;if(e.tagID===d.HTML){if(t.fragmentContext||(t.insertionMode=_.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===d.HTML){t._setEndLocation(t.openElements.items[0],e);const i=t.openElements.items[1];i&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&t._setEndLocation(i,e)}}else Ko(t,e)}function Ko(t,e){t.insertionMode=_.IN_BODY,_l(t,e)}function a4(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.FRAMESET:{t._insertElement(e,N.HTML);break}case d.FRAME:{t._appendElement(e,N.HTML),e.ackSelfClosing=!0;break}case d.NOFRAMES:{Kt(t,e);break}}}function o4(t,e){e.tagID===d.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==d.FRAMESET&&(t.insertionMode=_.AFTER_FRAMESET))}function l4(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.NOFRAMES:{Kt(t,e);break}}}function u4(t,e){e.tagID===d.HTML&&(t.insertionMode=_.AFTER_AFTER_FRAMESET)}function c4(t,e){e.tagID===d.HTML?lt(t,e):go(t,e)}function go(t,e){t.insertionMode=_.IN_BODY,_l(t,e)}function h4(t,e){switch(e.tagID){case d.HTML:{lt(t,e);break}case d.NOFRAMES:{Kt(t,e);break}}}function f4(t,e){e.chars=Ie,t._insertCharacters(e)}function d4(t,e){t._insertCharacters(e),t.framesetOk=!1}function oS(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==N.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function p4(t,e){if(PN(e))oS(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),i=t.treeAdapter.getNamespaceURI(n);i===N.MATHML?Xk(e):i===N.SVG&&(vN(e),Wk(e)),mf(e),e.selfClosing?t._appendElement(e,i):t._insertElement(e,i),e.ackSelfClosing=!0}}function m4(t,e){if(e.tagID===d.P||e.tagID===d.BR){oS(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const i=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(i)===N.HTML){t._endTagOutsideForeignContent(e);break}const r=t.treeAdapter.getTagName(i);if(r.toLowerCase()===e.tagName){e.tagName=r,t.openElements.shortenToLength(n);break}}}P.AREA,P.BASE,P.BASEFONT,P.BGSOUND,P.BR,P.COL,P.EMBED,P.FRAME,P.HR,P.IMG,P.INPUT,P.KEYGEN,P.LINK,P.META,P.PARAM,P.SOURCE,P.TRACK,P.WBR;const g4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wg={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function lS(t,e){const n=w4(t),i=Ck("type",{handlers:{root:O4,element:b4,text:y4,comment:cS,doctype:k4,raw:_4},unknown:E4}),r={parser:n?new Zg(Wg):Zg.getFragmentParser(void 0,Wg),handle(o){i(o,r)},stitches:!1,options:e||{}};i(t,r),Ur(r,gn());const s=n?r.parser.document:r.parser.getFragment(),a=C5(s,{file:r.options.file});return r.stitches&&Sl(a,"comment",function(o,l,u){const c=o;if(c.value.stitch&&u&&l!==void 0){const h=u.children;return h[l]=c.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===t.type?a.children[0]:a}function uS(t,e){let n=-1;if(t)for(;++n0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=I+1:(m!==I&&T.push({type:"text",value:u.value.slice(m,I)}),Array.isArray(w)?T.push(...w):w&&T.push(w),m=I+A[0].length,k=!0),!f.global)break;A=f.exec(u.value)}return k?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=Yg(t,"(");let s=Yg(t,")");for(;i!==-1&&r>s;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[t,n]}function dS(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Qi(n)||gl(n))&&(!e||n!==47)}pS.peek=eD;function X4(){return{enter:{gfmFootnoteDefinition:H4,gfmFootnoteDefinitionLabelString:Y4,gfmFootnoteCall:j4,gfmFootnoteCallString:G4},exit:{gfmFootnoteDefinition:V4,gfmFootnoteDefinitionLabelString:q4,gfmFootnoteCall:J4,gfmFootnoteCallString:K4}}}function W4(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:tD,footnoteReference:pS}}}function H4(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Y4(){this.buffer()}function q4(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ht(this.sliceSerialize(t)).toLowerCase()}function V4(t){this.exit(t)}function j4(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function G4(){this.buffer()}function K4(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ht(this.sliceSerialize(t)).toLowerCase()}function J4(t){this.exit(t)}function pS(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=r.move(n.safe(n.associationId(t),{...r.current(),before:s,after:"]"})),o(),a(),s+=r.move("]"),s}function eD(){return"["}function tD(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const a=n.enter("footnoteDefinition"),o=n.enter("label");return s+=r.move(n.safe(n.associationId(t),{...r.current(),before:s,after:"]"})),o(),s+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),s+=r.move(n.indentLines(n.containerFlow(t,r.current()),nD)),a(),s}function nD(t,e,n){return e===0?t:(n?"":" ")+t}const iD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mS.peek=lD;function rD(){return{canContainEols:["delete"],enter:{strikethrough:aD},exit:{strikethrough:oD}}}function sD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iD}],handlers:{delete:mS}}}function aD(t){this.enter({type:"delete",children:[]},t)}function oD(t){this.exit(t)}function mS(t,e,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let a=r.move("~~");return a+=n.containerPhrasing(t,{...r.current(),before:a,after:"~"}),a+=r.move("~~"),s(),a}function lD(){return"~"}function uD(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||hD,r=[],s=[],a=[],o=[];let l=0,u=-1;for(;++ul&&(l=t[u].length);++Oo[O])&&(o[O]=T)}m.push(k)}s[u]=m,a[u]=g}let c=-1;if(typeof n=="object"&&"length"in n)for(;++co[c]&&(o[c]=k),f[c]=k),h[c]=T}s.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u "),s.shift(2);const a=n.indentLines(n.containerFlow(t,s.current()),dD);return r(),a}function dD(t,e,n){return">"+(n?"":" ")+t}function pD(t,e){return Vg(t,e.inConstruct,!0)&&!Vg(t,e.notInConstruct,!1)}function Vg(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++ia&&(a=s):s=1,r=i+e.length,i=n.indexOf(e,r);return a}function gD(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function OD(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function bD(t,e,n,i){const r=OD(n),s=t.value||"",a=r==="`"?"GraveAccent":"Tilde";if(gD(t,n)){const h=n.enter("codeIndented"),f=n.indentLines(s,yD);return h(),f}const o=n.createTracker(i),l=r.repeat(Math.max(mD(s,r)+1,3)),u=n.enter("codeFenced");let c=o.move(l);if(t.lang){const h=n.enter(`codeFencedLang${a}`);c+=o.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...o.current()})),h()}if(t.lang&&t.meta){const h=n.enter(`codeFencedMeta${a}`);c+=o.move(" "),c+=o.move(n.safe(t.meta,{before:c,after:` +`,encode:["`"],...o.current()})),h()}return c+=o.move(` +`),s&&(c+=o.move(s+` +`)),c+=o.move(l),u(),c}function yD(t,e,n){return(n?"":" ")+t}function yf(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function kD(t,e,n,i){const r=yf(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(i);let u=l.move("[");return u+=l.move(n.safe(n.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!t.url||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":` +`,...l.current()}))),o(),t.title&&(o=n.enter(`title${s}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),o()),a(),u}function SD(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}gS.peek=_D;function gS(t,e,n,i){const r=SD(n),s=n.enter("emphasis"),a=n.createTracker(i);let o=a.move(r);return o+=a.move(n.containerPhrasing(t,{before:o,after:r,...a.current()})),o+=a.move(r),s(),o}function _D(t,e,n){return n.options.emphasis||"*"}function ED(t,e){let n=!1;return Sl(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Fc}),!!((!t.depth||t.depth<3)&&sf(t)&&(e.options.setext||n))}function TD(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(i);if(ED(t,n)){const c=n.enter("headingSetext"),h=n.enter("phrasing"),f=n.containerPhrasing(t,{...s.current(),before:` +`,after:` +`});return h(),c(),f+` +`+(r===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(` +`))+1))}const a="#".repeat(r),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(t,{before:"# ",after:` +`,...s.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),o(),u}OS.peek=xD;function OS(t){return t.value||""}function xD(){return"<"}bS.peek=wD;function bS(t,e,n,i){const r=yf(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(i);let u=l.move("![");return u+=l.move(n.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),o(),t.title&&(o=n.enter(`title${s}`),u+=l.move(" "+r),u+=l.move(n.safe(t.title,{before:u,after:r,...l.current()})),u+=l.move(r),o()),u+=l.move(")"),a(),u}function wD(){return"!"}yS.peek=AD;function yS(t,e,n,i){const r=t.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(i);let l=o.move("![");const u=n.safe(t.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(t),{before:l,after:"]",...o.current()});return a(),n.stack=c,s(),r==="full"||!u||u!==h?l+=o.move(h+"]"):r==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function AD(){return"!"}kS.peek=CD;function kS(t,e,n){let i=t.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s\u007F]/.test(t.url))}_S.peek=PD;function _S(t,e,n,i){const r=yf(n),s=r==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let o,l;if(SS(t,n)){const c=n.stack;n.stack=[],o=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(t,{before:h,after:">",...a.current()})),h+=a.move(">"),o(),n.stack=c,h}o=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(t,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),l(),t.title&&(l=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(t.title,{before:u,after:r,...a.current()})),u+=a.move(r),l()),u+=a.move(")"),o(),u}function PD(t,e,n){return SS(t,n)?"<":"["}ES.peek=vD;function ES(t,e,n,i){const r=t.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(i);let l=o.move("[");const u=n.containerPhrasing(t,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(t),{before:l,after:"]",...o.current()});return a(),n.stack=c,s(),r==="full"||!u||u!==h?l+=o.move(h+"]"):r==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function vD(){return"["}function kf(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function RD(t){const e=kf(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ID(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function TS(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function QD(t,e,n,i){const r=n.enter("list"),s=n.bulletCurrent;let a=t.ordered?ID(n):kf(n);const o=t.ordered?a==="."?")":".":RD(n);let l=e&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),TS(n)===a&&c){let h=-1;for(;++h-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let a=s.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(i);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,o.current()),c);return l(),u;function c(h,f,p){return f?(p?"":" ".repeat(a))+h:(p?s:s+" ".repeat(a-s.length))+h}}function DD(t,e,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(t,i);return s(),r(),a}const $D=yl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MD(t,e,n,i){return(t.children.some(function(a){return $D(a)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function BD(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}xS.peek=UD;function xS(t,e,n,i){const r=BD(n),s=n.enter("strong"),a=n.createTracker(i);let o=a.move(r+r);return o+=a.move(n.containerPhrasing(t,{before:o,after:r,...a.current()})),o+=a.move(r+r),s(),o}function UD(t,e,n){return n.options.strong||"*"}function FD(t,e,n,i){return n.safe(t.value,i)}function ZD(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function zD(t,e,n){const i=(TS(n)+(n.options.ruleSpaces?" ":"")).repeat(ZD(n));return n.options.ruleSpaces?i.slice(0,-1):i}const wS={blockquote:fD,break:jg,code:bD,definition:kD,emphasis:gS,hardBreak:jg,heading:TD,html:OS,image:bS,imageReference:yS,inlineCode:kS,link:_S,linkReference:ES,list:QD,listItem:LD,paragraph:DD,root:MD,strong:xS,text:FD,thematicBreak:zD};function XD(){return{enter:{table:WD,tableData:Gg,tableHeader:Gg,tableRow:YD},exit:{codeText:qD,table:HD,tableData:Au,tableHeader:Au,tableRow:Au}}}function WD(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function HD(t){this.exit(t),this.data.inTable=void 0}function YD(t){this.enter({type:"tableRow",children:[]},t)}function Au(t){this.exit(t)}function Gg(t){this.enter({type:"tableCell",children:[]},t)}function qD(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,VD));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function VD(t,e){return e==="|"?e:t}function jD(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:o}};function a(p,m,g,O){return u(c(p,g,O),p.align)}function o(p,m,g,O){const k=h(p,g,O),T=u([k]);return T.slice(0,T.indexOf(` +`))}function l(p,m,g,O){const k=g.enter("tableCell"),T=g.enter("phrasing"),A=g.containerPhrasing(p,{...O,before:s,after:s});return T(),k(),A}function u(p,m){return uD(p,{align:m,alignDelimiters:i,padding:n,stringLength:r})}function c(p,m,g){const O=p.children;let k=-1;const T=[],A=m.enter("table");for(;++k0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const p$={tokenize:_$,partial:!0};function m$(){return{document:{91:{tokenize:y$,continuation:{tokenize:k$},exit:S$}},text:{91:{tokenize:b$},93:{add:"after",tokenize:g$,resolveTo:O$}}}}function g$(t,e,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;r--;){const l=i.events[r][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const u=Ht(i.sliceSerialize({start:a.end,end:i.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function O$(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...o),t}function b$(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!a||h===null||h===91||_e(h))return n(h);if(h===93){t.exit("chunkString");const f=t.exit("gfmFootnoteCallString");return r.includes(Ht(i.sliceSerialize(f)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return _e(h)||(a=!0),s++,t.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(t.consume(h),s++,u):u(h)}}function y$(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!o||m===null||m===91||_e(m))return n(m);if(m===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return s=Ht(i.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),f}return _e(m)||(o=!0),a++,t.consume(m),m===92?h:c}function h(m){return m===91||m===92||m===93?(t.consume(m),a++,c):c(m)}function f(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(s)||r.push(s),pe(t,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return e(m)}}function k$(t,e,n){return t.check(fa,e,t.attempt(p$,e,n))}function S$(t){t.exit("gfmFootnoteDefinition")}function _$(t,e,n){const i=this;return pe(t,r,"gfmFootnoteDefinitionIndent",5);function r(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function E$(t){let n=(t||{}).singleTilde;const i={tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(a,o){let l=-1;for(;++l1?l(m):(a.consume(m),h++,p);if(h<2&&!n)return l(m);const O=a.exit("strikethroughSequenceTemporary"),k=qo(m);return O._open=!k||k===2&&!!g,O._close=!g||g===2&&!!k,o(m)}}}class T${constructor(){this.map=[]}add(e,n,i){x$(this,e,n,i)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let r=i.pop();for(;r;)e.push(...r),r=i.pop();this.map.length=0}}function x$(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const J=i.events[U][1].type;if(J==="lineEnding"||J==="linePrefix")U--;else break}const B=U>-1?i.events[U][1].type:null,K=B==="tableHead"||B==="tableRow"?w:l;return K===w&&i.parser.lazy[i.now().line]?n(C):K(C)}function l(C){return t.enter("tableHead"),t.enter("tableRow"),u(C)}function u(C){return C===124||(a=!0,s+=1),c(C)}function c(C){return C===null?n(C):ee(C)?s>1?(s=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),p):n(C):ce(C)?pe(t,c,"whitespace")(C):(s+=1,a&&(a=!1,r+=1),C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),a=!0,c):(t.enter("data"),h(C)))}function h(C){return C===null||C===124||_e(C)?(t.exit("data"),c(C)):(t.consume(C),C===92?f:h)}function f(C){return C===92||C===124?(t.consume(C),h):h(C)}function p(C){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(C):(t.enter("tableDelimiterRow"),a=!1,ce(C)?pe(t,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):m(C))}function m(C){return C===45||C===58?O(C):C===124?(a=!0,t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),g):v(C)}function g(C){return ce(C)?pe(t,O,"whitespace")(C):O(C)}function O(C){return C===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),k):C===45?(s+=1,k(C)):C===null||ee(C)?I(C):v(C)}function k(C){return C===45?(t.enter("tableDelimiterFiller"),T(C)):v(C)}function T(C){return C===45?(t.consume(C),T):C===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(C),t.exit("tableDelimiterMarker"),A):(t.exit("tableDelimiterFiller"),A(C))}function A(C){return ce(C)?pe(t,I,"whitespace")(C):I(C)}function I(C){return C===124?m(C):C===null||ee(C)?!a||r!==s?v(C):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(C)):v(C)}function v(C){return n(C)}function w(C){return t.enter("tableRow"),$(C)}function $(C){return C===124?(t.enter("tableCellDivider"),t.consume(C),t.exit("tableCellDivider"),$):C===null||ee(C)?(t.exit("tableRow"),e(C)):ce(C)?pe(t,$,"whitespace")(C):(t.enter("data"),H(C))}function H(C){return C===null||C===124||_e(C)?(t.exit("data"),$(C)):(t.consume(C),C===92?q:H)}function q(C){return C===92||C===124?(t.consume(C),H):H(C)}}function P$(t,e){let n=-1,i=!0,r=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,c,h;const f=new T$;for(;++nn[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;t.add(m,g,[])}}t.add(n[3]+1,0,[["exit",h,e]])}return r!==void 0&&(s.end=Object.assign({},Ki(e.events,r)),t.add(r,0,[["exit",s,e]]),s=void 0),s}function Jg(t,e,n,i,r){const s=[],a=Ki(e.events,n);r&&(r.end=Object.assign({},a),s.push(["exit",r,e])),i.end=Object.assign({},a),s.push(["exit",i,e]),t.add(n+1,0,s)}function Ki(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const v$={tokenize:I$};function R$(){return{text:{91:v$}}}function I$(t,e,n){const i=this;return r;function r(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return _e(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(l)}function o(l){return ee(l)?e(l):ce(l)?t.check({tokenize:Q$},e,n)(l):n(l)}}function Q$(t,e,n){return pe(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function N$(t){return ik([s$(),m$(),E$(t),A$(),R$()])}const L$={};function rM(t){const e=this,n=t||L$,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(N$(n)),s.push(t$()),a.push(n$(n))}const sM=["strong","summary","blockquote","details","table","tbody","thead","h1","h2","h3","h4","h5","h6","input","ul","li","div","pre","ul","ol","li","br","em","hr","td","th","tr","a","img","p","del","span","code","button"],Ja=t=>we.Children.map(t.children,e=>typeof e!="string"?e:null),e0=t=>{var e,n;return((n=(e=t==null?void 0:t.style)==null?void 0:e.textAlign)==null?void 0:n.replace(/\b(left|right)\b/,i=>i==="left"?"start":"end"))??"start"},aM={hr:({node:t,...e})=>se.jsx(Nt,{as:t==null?void 0:t.tagName,shadow:"topmost",borderWidth:"small",margin:"small none",padding:"none",borderColor:"primary",...e}),a:({node:t,...e})=>se.jsx(r_,{to:t.href,...e}),button:({node:t,...e})=>se.jsx(f_,{withBackground:!1,...e}),p:({node:t,...e})=>se.jsx(zi,{as:t.tagName,...e}),em:({node:t,...e})=>se.jsx(zi,{fontStyle:"italic",...e}),strong:({node:t,...e})=>se.jsx(zi,{weight:"bold",...e}),span:({node:t,...e})=>se.jsx(zi,{as:t.tagName,...e}),code:({node:t,...e})=>se.jsx(zi,{as:t.tagName,...e}),del:({node:t,...e})=>se.jsx(zi,{as:t.tagName,...e}),blockquote:({node:t,...e})=>{e={...e,children:Ja(e)};const n=/\[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/,i={NOTE:"info",TIP:"success",IMPORTANT:"info",WARNING:"warning",CAUTION:"error"},r=we.Children.toArray(e.children)[0];let s,a;De.isValidElement(r)?[s,a]=r.props.children.toString().split("--",2):[s,a]=r.toString().split("--",2);const o=s.match(n);return o?se.jsx(T_,{variant:i[o[1]],children:s.replace(`${o[0]}`,"")}):se.jsx(P_,{description:s,title:a,margin:"medium 0",...e,children:a?se.jsx(s_,{name:a}):se.jsx(se.Fragment,{})})},h1:({node:t,...e})=>se.jsx(Xi,{margin:"none none medium",level:t.tagName,...e}),h2:({node:t,...e})=>se.jsx(Xi,{margin:"small none",level:t.tagName,...e}),h3:({node:t,...e})=>se.jsx(Xi,{margin:"small none",level:t.tagName,...e}),h4:({node:t,...e})=>se.jsx(Xi,{level:t.tagName,...e}),h5:({node:t,...e})=>se.jsx(Xi,{level:t.tagName,...e}),h6:({node:t,...e})=>se.jsx(Xi,{as:"h6",...e}),img:({node:t,...e})=>se.jsx(V_,{src:t.src,...e}),div:({node:t,...e})=>se.jsx(Nt,{as:t.tagName,...e}),pre:({node:t,...e})=>{if(t.children.length===1&&t.children[0].tagName==="code"){let n=t.children[0].children[0].value;return n.endsWith(` +`)&&(n=n.slice(0,-1)),se.jsx(KR,{label:"Code",lineNumbers:!0,foldGutter:!0,editable:!0,readOnly:!0,defaultValue:n})}return se.jsx(Nt,{as:t.tagName,...e})},ul:({node:t,...e})=>{e={...e,children:Ja(e)};const{children:n,...i}=e,r=(i==null?void 0:i.className)==="contains-task-list"||!1;return se.jsx(Wr,{isUnstyled:r,...i,children:we.Children.map(n,s=>{const{children:a,...o}=s.props;if(r&&a){let l=!1;return se.jsx(Wr.Item,{margin:"0 0 small small",...o,children:we.Children.map(a,u=>{var c,h,f;if(((c=u==null?void 0:u.props)==null?void 0:c.type)==="checkbox"&&(l=((h=u==null?void 0:u.props)==null?void 0:h.checked)??!1),((f=u==null?void 0:u.props)==null?void 0:f.type)!=="checkbox"&&u!==" "&&u!=="[ ]"&&u!=="[X]")return se.jsx(z_,{label:u,disabled:!0,defaultChecked:l})})},s.key)}return se.jsx(Wr.Item,{...s.props},s.key)})})},ol:({node:t,...e})=>{e={...e,children:Ja(e)};const{children:n,...i}=e;return se.jsx(Wr,{as:t.tagName,...i,children:we.Children.map(n,r=>se.jsx(Wr.Item,{...r.props},r.key))})},input:({node:t,...e})=>se.jsx(t.tagName,{...e}),details:({node:t,...e})=>{e={...e,children:Ja(e)};const n=e.children.shift();return se.jsx(d_,{summary:n,children:se.jsx(Nt,{display:"block",padding:"small",...e})})},table:({node:t,...e})=>{const{children:n,...i}=e;return se.jsx(ii,{margin:"medium none",hover:!0,caption:"",...i,children:we.Children.map(n,r=>{const{children:s,...a}=r.props;return r.type==="thead"?se.jsx(ii.Head,{...a,children:we.Children.map(s,o=>{const{children:l,...u}=o.props;return se.jsx(ii.Row,{...u,children:we.Children.map(l,c=>se.jsx(ii.ColHeader,{id:c.key,textAlign:e0(c.props),...c.props},c.key))})})}):se.jsx(ii.Body,{...a,children:we.Children.map(s,o=>{const{children:l,...u}=o.props;return se.jsx(ii.Row,{...u,children:we.Children.map(l,c=>se.jsx(ii.Cell,{textAlign:e0(c.props),...c.props}))})})})})})}};export{tM as M,KR as S,iM as a,nM as b,sM as c,aM as m,rM as r}; diff --git a/assets/mdui-CVidgDKD.js b/assets/mdui-CVidgDKD.js new file mode 100644 index 00000000..c7f6cf3e --- /dev/null +++ b/assets/mdui-CVidgDKD.js @@ -0,0 +1,121 @@ +const __vite__fileDeps=["assets/error-pmzUJ_SX.js","assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css","assets/RenderTopNavBar-BKjAQtrP.js","assets/index-BIsQGgQp.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{a as T,r as m,j as n,V as C,_ as v}from"./index-DT1C1ZDw.js";import{c as S,a as A,g as R,R as N,b as M}from"./RenderTopNavBar-BKjAQtrP.js";import{M as I,c as L,m as P,S as B,r as H,a as G,b as D}from"./mdtoui-CrW6q7x2.js";import{G as w}from"./index-3znfDf88.js";const U={loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},markdown_source:{EN:"Markdown Source",ES_LA:"Fuente de Markdown",PT_BR:"Fonte de Markdown",DE:"Markdown-Quelle"},try_editor:{EN:"Try editing the markdown below.",ES_LA:"Intenta editar el markdown abajo.",PT_BR:"Tente editar o markdown abaixo.",DE:"Versuche den Markdown unten zu bearbeiten."},close:{EN:"Close",ES_LA:"Cerrar",PT_BR:"Fechar",DE:"Schließen"}},x=`# Markdown to Instructure UI + +> [!NOTE] +> Try editing the markdown on this page. + +This page is rendered from [github-flavored markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) and passing the content through [react-markdown](https://github.com/remarkjs/react-markdown) to [Instructure UI](https://instructure.design/). The result is accessible, well styled, and modular content created simply with markdown. + +:arrow_right: [Github](https://github.com/thedannywahl/instructure-security-package/blob/gh-pages/isp-site/src/components/mdtoui.jsx) + +
+ +## Tables + +### Normal table + +| First Header | Second Header | +| ---------------- | ---------------- | +| Content Cell A1 | Content Cell B1 | +| Content Cell A2 | Content Cell B2 | + +### Table with fancy formatting + +| Command | Description | +| --- | --- | +| \`git status\` | List all *new or modified* files | +| \`git diff\` | Show file differences that **haven't been** staged | + +### Table with columnar alignment + +| Left-aligned | Center-aligned | Right-aligned | +| :--- | :---: | ---: | +| git status | git status | git status | +| git diff | git diff | git diff | + +## Details + +
CLICK ME + +#### We can hide anything + +Hello world! + +
+ +## Quotes + +> Text that is a quote -- Author Name + +> Long quote w/ no attribution, and linebreaks in MD. Bacon ipsum dolor amet biltong pastrami shankle venison jowl meatloaf. +> Ham jowl leberkas salami fatback sausage chuck pancetta short loin meatball, filet mignon chislic. +> Tri-tip ham hock ball tip, frankfurter bacon buffalo hamburger chuck turkey filet mignon andouille rump ground round doner short ribs. +> Fatback short ribs bresaola, turducken ball tip drumstick meatloaf t-bone venison pork belly pig landjaeger chicken salami hamburger. +> Jowl pork shank t-bone short loin. + +### Alerts + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +## Code + +Use \`git status\` to list all new or modified files that haven't yet been committed. + +Some basic Git commands are: +\`\`\` +git status +git add +git commit +\`\`\` + +\`\`\`javascript +const msg = \`you need to know about \${err}.\` +alert(msg) +console.warn("User alerted:", msg) +\`\`\` + +
This is some preformatted text, but it is NOT code
+ +## Lists + +1. James Madison +2. James Monroe +3. John Quincy Adams + +* George Washington +* John Adams +* Thomas Jefferson + +- [x] #739 +- [ ] https://github.com/octo-org/octo-repo/issues/740 +- [ ] Add delight to the experience when all tasks are complete :tada: + +## Text + +Emoji: @octocat :+1: This PR looks great - it's ready to merge! + +Text style: *italic* **bold** ~struck~ + +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 + +**Bacon** ipsum dolor amet beef ribs porchetta shank prosciutto burgdoggen sirloin pork belly pancetta picanha drumstick shoulder meatloaf. Sausage ground round flank shank venison, turducken frankfurter sirloin landjaeger jerky bresaola swine picanha. Buffalo shank short ribs rump swine tail, meatloaf capicola venison pork loin cupim. Buffalo spare ribs ribeye sausage. Ground round porchetta cow, landjaeger pork belly jowl picanha salami. Pork belly pancetta spare ribs swine t-bone, meatloaf bresaola kielbasa pastrami burgdoggen turkey sausage ham hock. Ribeye shank tenderloin beef ribs tail venison drumstick tongue pastrami. + +Shank spare ribs sausage landjaeger strip steak jerky, fatback salami tenderloin ball tip pastrami pork. Meatball tri-tip ham tongue, beef ribs chuck boudin short ribs pork burgdoggen spare ribs shankle bacon picanha. Burgdoggen pork meatball boudin venison tenderloin tail pork loin short loin chicken. Salami pork loin shankle bresaola, ground round pork pork belly beef ribs flank tongue biltong pastrami cow. Hamburger cupim sausage tri-tip. Ham rump shoulder, ground round sausage flank hamburger spare ribs picanha bacon chuck strip steak.`;function F(){const e=S.c(25),d=T().language;let c,t;e[0]!==d?(t=A(d),c=R(U,t),e[0]=d,e[1]=c,e[2]=t):(c=e[1],t=e[2]);const _=c;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{document.title="Markdown to Instructure UI"},e[3]=u):u=e[3],m.useEffect(u);const[a,j]=m.useState(`${_.loading}`);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{j(x)},e[4]=g):g=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=[x],e[5]=h):h=e[5],m.useEffect(g,h);let r;e[6]!==t?(r=n.jsx(N,{language:t}),e[6]=t,e[7]=r):r=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=[H,G],e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=[D],e[9]=p):p=e[9];let o;e[10]!==a?(o=n.jsx(w.Col,{children:n.jsx(I,{remarkPlugins:b,rehypePlugins:p,allowedElements:L,components:P,children:a})}),e[10]=a,e[11]=o):o=e[11];const y=`${_.markdown_source}`;let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=E=>{j(E)},e[12]=f):f=e[12];let i;e[13]!==y||e[14]!==a?(i=n.jsx(w.Col,{children:n.jsx(B,{label:y,language:"markdown",readOnly:!1,editable:!0,lineNumbers:!0,foldGutter:!0,highlightActiveLineGutter:!0,highlightActiveLine:!0,lineWrapping:!0,value:a,onChange:f})}),e[13]=y,e[14]=a,e[15]=i):i=e[15];let s;e[16]!==o||e[17]!==i?(s=n.jsx(C,{id:"main",className:"mdui",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"100vw",margin:"0 auto",children:n.jsx(w,{startAt:"large",children:n.jsxs(w.Row,{children:[o,i]})})}),e[16]=o,e[17]=i,e[18]=s):s=e[18];let l;e[19]!==t?(l=n.jsx(M,{language:t}),e[19]=t,e[20]=l):l=e[20];let k;return e[21]!==r||e[22]!==s||e[23]!==l?(k=n.jsxs(n.Fragment,{children:[r,s,l]}),e[21]=r,e[22]=s,e[23]=l,e[24]=k):k=e[24],k}F.displayName="Route.MDUI";function O(){const e=m.lazy(()=>v(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([0,1,2,3,4])).then(d=>({default:d.Component})));return n.jsx(m.Suspense,{fallback:n.jsx("h1",{children:"Error."}),children:n.jsx(e,{})})}O.displayName="Error.Releases";export{F as Component,O as ErrorBoundary}; diff --git a/assets/redirectTo-_VcDkk4z.js b/assets/redirectTo-_VcDkk4z.js new file mode 100644 index 00000000..86542e55 --- /dev/null +++ b/assets/redirectTo-_VcDkk4z.js @@ -0,0 +1,2 @@ +const __vite__fileDeps=["assets/error-pmzUJ_SX.js","assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css","assets/RenderTopNavBar-BKjAQtrP.js","assets/index-BIsQGgQp.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{u as D,a as B,r as k,_ as L,j as o,V as y}from"./index-DT1C1ZDw.js";import{c as N,a as P,g as S,T as j,L as T,R as A,b}from"./RenderTopNavBar-BKjAQtrP.js";import{B as v}from"./index-BIsQGgQp.js";const $={downloading:{EN:"Downloading",ES_LA:"Descargando",PT_BR:"Baixando",DE:"Herunterladen"},redirecting:{EN:"Redirecting",ES_LA:"Redirigiendo",PT_BR:"Redirecionando",DE:"Weiterleitung"},youre_downloading_the:{EN:"You're downloading the",ES_LA:"¡Estás descargando el paquete de cumplimiento de",PT_BR:"Você está baixando o pacote de conformidade do",DE:"Sie laden das"},youre_downloading_a:{EN:"You're downloading a document from the",ES_LA:"Estás descargando un documento del paquete de cumplimiento de",PT_BR:"Você está baixando um documento do pacote de conformidade do",DE:"Sie laden ein Dokument aus dem"},compliance_package:{EN:"compliance package!",ES_LA:"!",PT_BR:"!",DE:"-Compliance-Paket herunter!"},didnt_work:{EN:"Didn't work?",ES_LA:"¿No funcionó?",PT_BR:"Não funcionou?",DE:"Hat nicht funktioniert?"},try_again:{EN:"Try again",ES_LA:"Inténtalo de nuevo",PT_BR:"Tente novamente",DE:"Versuchen Sie es erneut"},redirecting_to:{EN:"Redirecting you to",ES_LA:"Redirigiéndote a",PT_BR:"Redirecionando você para",DE:"Weiterleitung zu"}};function V(){const e=N.c(32),{path:E,brand:s,url:i}=D(),h=B().language;let l,a;e[0]!==h?(a=P(h),l=S($,a),e[0]=h,e[1]=l,e[2]=a):(l=e[1],a=e[2]);const n=l;let c;e[3]!==i?(c=i.split("?"),e[3]=i,e[4]=c):c=e[4];const x=c[0];let u;e[5]!==i?(u=i.slice(-4),e[5]=i,e[6]=u):u=e[6];const f=u,g=E.slice(-3)==="/dl";let _;e[7]!==i?(_=()=>{window.location.href=i},e[7]=i,e[8]=_):_=e[8],k.useEffect(_);let m;e[9]!==g||e[10]!==f||e[11]!==n.youre_downloading_the||e[12]!==n.compliance_package||e[13]!==n.youre_downloading_a||e[14]!==n.didnt_work||e[15]!==n.try_again||e[16]!==n.redirecting_to||e[17]!==s||e[18]!==i||e[19]!==x?(m=()=>g?o.jsxs(y,{as:"div",children:[o.jsx(j,{children:f===".zip"?`${n.youre_downloading_the} ${s} ${n.compliance_package}`:`${n.youre_downloading_a} ${s} ${n.compliance_package}`}),o.jsx("br",{}),o.jsxs(j,{size:"x-small",children:[n.didnt_work," ",o.jsx(T,{href:i,children:n.try_again})]})]}):o.jsx(y,{as:"div",children:o.jsxs(j,{children:[n.redirecting_to," ",o.jsx(T,{href:i,children:x})]})}),e[9]=g,e[10]=f,e[11]=n.youre_downloading_the,e[12]=n.compliance_package,e[13]=n.youre_downloading_a,e[14]=n.didnt_work,e[15]=n.try_again,e[16]=n.redirecting_to,e[17]=s,e[18]=i,e[19]=x,e[20]=m):m=e[20];const R=m;let t;e[21]!==a?(t=o.jsx(A,{language:a}),e[21]=a,e[22]=t):t=e[22];const w=g?n.downloading:n.redirecting;let r;e[23]!==w||e[24]!==R?(r=o.jsx(y,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:o.jsx(v,{size:"medium",heading:w,headingAs:"h1",message:R})}),e[23]=w,e[24]=R,e[25]=r):r=e[25];let d;e[26]!==a?(d=o.jsx(b,{language:a}),e[26]=a,e[27]=d):d=e[27];let p;return e[28]!==t||e[29]!==r||e[30]!==d?(p=o.jsxs(o.Fragment,{children:[t,r,d]}),e[28]=t,e[29]=r,e[30]=d,e[31]=p):p=e[31],p}V.displayName="Route.Redirect";function z(){const e=k.lazy(()=>L(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([0,1,2,3,4])).then(E=>({default:E.Component})));return o.jsx(k.Suspense,{fallback:o.jsx("h1",{children:"Error."}),children:o.jsx(e,{})})}z.displayName="Error.Redirect";export{V as Component,z as ErrorBoundary}; diff --git a/assets/releases-28YzCjnP.js b/assets/releases-28YzCjnP.js new file mode 100644 index 00000000..7ed20f7a --- /dev/null +++ b/assets/releases-28YzCjnP.js @@ -0,0 +1,16 @@ +const __vite__fileDeps=["assets/error-pmzUJ_SX.js","assets/index-DT1C1ZDw.js","assets/index-DXft5ptw.css","assets/RenderTopNavBar-BKjAQtrP.js","assets/index-BIsQGgQp.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{r as g,R as $,g as E,a as I,j as n,_ as N,V as T}from"./index-DT1C1ZDw.js";import{S as v,c as k,a as A,g as B,H as D,R as C,L as G,b as O}from"./RenderTopNavBar-BKjAQtrP.js";import{r as H,a as M,b as U,M as W,c as Z,m as z}from"./mdtoui-CrW6q7x2.js";import"./index-3znfDf88.js";var V;class f extends g.Component{constructor(...r){super(...r),this.ref=null,this.handleRef=a=>{const s=this.props.elementRef;this.ref=a,typeof s=="function"&&s(a)}}render(){return $.createElement(v,Object.assign({},this.props,{name:"IconRss",viewBox:"0 0 1920 1920",elementRef:this.handleRef}),V||(V=$.createElement("path",{d:"M1616.875 1813.333c-27.627-820.266-689.92-1482.56-1510.187-1510.186V107.52c928.213 27.733 1678.08 777.6 1705.813 1705.813h-195.626ZM53.355 0H.02v408.853h53.334c803.733 0 1457.706 653.974 1457.706 1457.814V1920h408.96v-53.333C1920.021 837.44 1082.581 0 53.355 0Zm933.984 1813.333c-26.667-473.493-407.147-853.973-880.64-880.746V736.853c581.226 27.094 1049.28 495.254 1076.373 1076.48H987.339ZM53.365 628.907H.032v408.853h53.333c456.96 0 828.8 371.947 828.8 828.907V1920h408.854v-53.333c0-682.454-555.2-1237.76-1237.654-1237.76ZM267.19 1812.288c-88 0-159.573-71.573-159.573-159.467 0-87.893 71.573-159.466 159.573-159.466 87.894 0 159.467 71.573 159.467 159.466 0 87.894-71.573 159.467-159.467 159.467m0-425.6c-146.773 0-266.24 119.36-266.24 266.133 0 146.774 119.467 266.134 266.24 266.134 146.774 0 266.134-119.36 266.134-266.134 0-146.773-119.36-266.133-266.134-266.133",fillRule:"evenodd"})))}}f.glyphName="rss";f.variant="Line";f.displayName="IconRssLine";f.propTypes={...v.propTypes};f.allowedProps=[...v.allowedProps];const F={releases:{EN:"Releases",ES_LA:"Versiones",PT_BR:"Lançamentos",DE:"Veröffentlichungen"},loading:{EN:"Loading...",ES_LA:"Cargando...",PT_BR:"Carregando...",DE:"Wird geladen..."},subscribe:{EN:"Subscribe",ES_LA:"Suscríbete",PT_BR:"Inscreva-se",DE:"Abonnieren Sie"}};var x={VITE_APP_VERSION:"4.0.0+1717539510",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};async function K(e,r){const a=`${E.api}/repos/${e}/${r}/releases`;try{const t=await(await fetch(a,{method:"GET",headers:{Accept:"application/vnd.github.v3+json",Authorization:x!=null&&x.VITE_GITHUB_TOKEN?`token ${x.VITE_GITHUB_TOKEN}`:""}})).json();return t.length>3?`${t.slice(0,3).map(P).join(`\r +\r +`).slice(0,-3)}---\r +\r +[Older Releases](https://github.com/thedannywahl/instructure-security-package/releases)`:t.map(P).join(`\r +\r +`).slice(0,-3)||null}catch(s){return s instanceof Error?console.error(`Error: ${s.message}`):console.error(`An unexpected error occurred: ${s}`),null}}function P(e){var a;let r=((a=e==null?void 0:e.author)==null?void 0:a.login)||"";return r==="gdenne"?r=" -- Gary Denne":r==="thedannywahl"&&(r=" -- Danny Wahl"),` +## ${e.name}\r + +> ${e.tag_name}${r}\r + + +${e.body}\r + +---`}async function q(){const e=E.owner,r=E.repo;return K(e,r)}function J(){const e=k.c(32),r=I().language;let a,s,t,l;e[0]!==r?(t=A(r),s=B(F,t),l=`https://github.com/${E.owner}/${E.repo}/releases.atom`,a=t.toUpperCase(),e[0]=r,e[1]=a,e[2]=s,e[3]=t,e[4]=l):(a=e[1],s=e[2],t=e[3],l=e[4]);const j=`.markdown .lang { display: none; } .markdown .lang.${a} { display: inherit; }`,[w,L]=g.useState(`${s.loading}`);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{q().then(S=>{L(S)}).catch(S=>console.error(S))},e[5]=R):R=e[5],g.useEffect(R);let o;e[6]!==t?(o=n.jsx(C,{language:t}),e[6]=t,e[7]=o):o=e[7];let i;e[8]!==s.subscribe?(i=n.jsx(f,{size:"small",color:"warning",title:s.subscribe}),e[8]=s.subscribe,e[9]=i):i=e[9];let c;e[10]!==l||e[11]!==i?(c=n.jsx(G,{href:l,children:i}),e[10]=l,e[11]=i,e[12]=c):c=e[12];let m;e[13]!==c||e[14]!==s.releases?(m=n.jsxs(D,{level:"h1",children:[c," ",s.releases]}),e[13]=c,e[14]=s.releases,e[15]=m):m=e[15];let d;e[16]!==j?(d=n.jsx("style",{children:j}),e[16]=j,e[17]=d):d=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=[H,M],e[18]=b):b=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=[U],e[19]=y):y=e[19];let h;e[20]!==w?(h=n.jsx(T,{as:"div",className:"markdown",children:n.jsx(W,{remarkPlugins:b,rehypePlugins:y,allowedElements:Z,components:z,children:w})}),e[20]=w,e[21]=h):h=e[21];let u;e[22]!==m||e[23]!==d||e[24]!==h?(u=n.jsxs(T,{id:"main",as:"div",padding:"medium medium xx-large",minWidth:"20rem",maxWidth:"59.25rem",margin:"0 auto",children:[m,d,h]}),e[22]=m,e[23]=d,e[24]=h,e[25]=u):u=e[25];let p;e[26]!==t?(p=n.jsx(O,{language:t}),e[26]=t,e[27]=p):p=e[27];let _;return e[28]!==o||e[29]!==u||e[30]!==p?(_=n.jsxs(n.Fragment,{children:[o,u,p,","]}),e[28]=o,e[29]=u,e[30]=p,e[31]=_):_=e[31],_}J.displayName="Route.Releases";function Q(){const e=g.lazy(()=>N(()=>import("./error-pmzUJ_SX.js"),__vite__mapDeps([0,1,2,3,4])).then(r=>({default:r.Component})));return n.jsx(g.Suspense,{fallback:n.jsx("h1",{children:"Error."}),children:n.jsx(e,{})})}Q.displayName="Error.Releases";export{J as Component,Q as ErrorBoundary}; diff --git a/index.html b/index.html index 6c843633..e19793ca 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + @@ -14,10 +14,10 @@ - + Instructure Compliance Packages - - + +