@illuma-ai/codeviz 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/CodeViz.d.ts +1 -1
  2. package/dist/CodeViz.d.ts.map +1 -1
  3. package/dist/ErrorPanel.d.ts +16 -0
  4. package/dist/ErrorPanel.d.ts.map +1 -0
  5. package/dist/PreviewPane.d.ts.map +1 -1
  6. package/dist/StatusBar.d.ts +8 -1
  7. package/dist/StatusBar.d.ts.map +1 -1
  8. package/dist/Toolbar.d.ts +16 -6
  9. package/dist/Toolbar.d.ts.map +1 -1
  10. package/dist/__tests__/transpiler-scenarios.test.d.ts +2 -0
  11. package/dist/__tests__/transpiler-scenarios.test.d.ts.map +1 -0
  12. package/dist/__tests__/transpiler.test.d.ts +2 -0
  13. package/dist/__tests__/transpiler.test.d.ts.map +1 -0
  14. package/dist/__tests__/ui-components.test.d.ts +2 -0
  15. package/dist/__tests__/ui-components.test.d.ts.map +1 -0
  16. package/dist/__tests__/utils.test.d.ts +2 -0
  17. package/dist/__tests__/utils.test.d.ts.map +1 -0
  18. package/dist/agentContext.d.ts +19 -1
  19. package/dist/agentContext.d.ts.map +1 -1
  20. package/dist/constants.d.ts +11 -0
  21. package/dist/constants.d.ts.map +1 -0
  22. package/dist/importMap.d.ts.map +1 -1
  23. package/dist/index.cjs +812 -769
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.ts +7 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +9622 -5429
  28. package/dist/index.js.map +1 -1
  29. package/dist/previewTemplate.d.ts +4 -0
  30. package/dist/previewTemplate.d.ts.map +1 -1
  31. package/dist/templates.d.ts +23 -12
  32. package/dist/templates.d.ts.map +1 -1
  33. package/dist/transpiler.d.ts +26 -4
  34. package/dist/transpiler.d.ts.map +1 -1
  35. package/dist/types.d.ts +26 -4
  36. package/dist/types.d.ts.map +1 -1
  37. package/dist/ui/components.d.ts +21 -0
  38. package/dist/ui/components.d.ts.map +1 -0
  39. package/dist/ui/index.d.ts +9 -0
  40. package/dist/ui/index.d.ts.map +1 -0
  41. package/dist/ui/theme.d.ts +14 -0
  42. package/dist/ui/theme.d.ts.map +1 -0
  43. package/dist/utils.d.ts +17 -0
  44. package/dist/utils.d.ts.map +1 -0
  45. package/package.json +8 -3
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),I=require("react");function hs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);r<t;r++)s[r]=e[r];return s}function Mi(e){if(Array.isArray(e))return e}function Fi(e,t,r){return(t=Vi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $i(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var s,i,a,u,d=[],h=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(h=(s=a.call(r)).done)&&(d.push(s.value),d.length!==t);h=!0);}catch(k){f=!0,i=k}finally{try{if(!h&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw i}}return d}}function Bi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ms(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function gs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ms(Object(r),!0).forEach(function(s){Fi(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ms(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function zi(e,t){if(e==null)return{};var r,s,i=qi(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qi(e,t){if(e==null)return{};var r={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;r[s]=e[s]}return r}function Ui(e,t){return Mi(e)||$i(e,t)||Wi(e,t)||Bi()}function Hi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vi(e){var t=Hi(e,"string");return typeof t=="symbol"?t:t+""}function Wi(e,t){if(e){if(typeof e=="string")return hs(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hs(e,t):void 0}}function Gi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ks(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function xs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ks(Object(r),!0).forEach(function(s){Gi(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ks(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function Xi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(s){return t.reduceRight(function(i,a){return a(i)},s)}}function Ut(e){return function t(){for(var r=this,s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return i.length>=e.length?e.apply(this,i):function(){for(var u=arguments.length,d=new Array(u),h=0;h<u;h++)d[h]=arguments[h];return t.apply(r,[].concat(i,d))}}}function bn(e){return{}.toString.call(e).includes("Object")}function Ji(e){return!Object.keys(e).length}function Xt(e){return typeof e=="function"}function Yi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qi(e,t){return bn(t)||rt("changeType"),Object.keys(t).some(function(r){return!Yi(e,r)})&&rt("changeField"),t}function Ki(e){Xt(e)||rt("selectorType")}function Zi(e){Xt(e)||bn(e)||rt("handlerType"),bn(e)&&Object.values(e).some(function(t){return!Xt(t)})&&rt("handlersType")}function ea(e){e||rt("initialIsRequired"),bn(e)||rt("initialType"),Ji(e)&&rt("initialContent")}function ta(e,t){throw new Error(e[t]||e.default)}var na={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},rt=Ut(ta)(na),ln={changes:Qi,selector:Ki,handler:Zi,initial:ea};function ra(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ln.initial(e),ln.handler(t);var r={current:e},s=Ut(ia)(r,t),i=Ut(oa)(r),a=Ut(ln.changes)(e),u=Ut(sa)(r);function d(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(k){return k};return ln.selector(f),f(r.current)}function h(f){Xi(s,i,a,u)(f)}return[d,h]}function sa(e,t){return Xt(t)?t(e.current):t}function oa(e,t){return e.current=xs(xs({},e.current),t),t}function ia(e,t,r){return Xt(t)?t(e.current):Object.keys(r).forEach(function(s){var i;return(i=t[s])===null||i===void 0?void 0:i.call(t,e.current[s])}),r}var aa={create:ra},ca={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function la(e){return function t(){for(var r=this,s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return i.length>=e.length?e.apply(this,i):function(){for(var u=arguments.length,d=new Array(u),h=0;h<u;h++)d[h]=arguments[h];return t.apply(r,[].concat(i,d))}}}function ua(e){return{}.toString.call(e).includes("Object")}function pa(e){return e||bs("configIsRequired"),ua(e)||bs("configType"),e.urls?(da(),{paths:{vs:e.urls.monacoBase}}):e}function da(){console.warn(Ws.deprecation)}function fa(e,t){throw new Error(e[t]||e.default)}var Ws={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),I=require("react");function Pi(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);r<t;r++)s[r]=e[r];return s}function Xc(e){if(Array.isArray(e))return e}function Yc(e,t,r){return(t=r1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kc(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var s,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(s=o.call(r)).done)&&(u.push(s.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function Qc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function Ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ni(Object(r),!0).forEach(function(s){Yc(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function Jc(e,t){if(e==null)return{};var r,s,i=Zc(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)r=o[s],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zc(e,t){if(e==null)return{};var r={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;r[s]=e[s]}return r}function e1(e,t){return Xc(e)||Kc(e,t)||n1(e,t)||Qc()}function t1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r1(e){var t=t1(e,"string");return typeof t=="symbol"?t:t+""}function n1(e,t){if(e){if(typeof e=="string")return Pi(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pi(e,t):void 0}}function s1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Li(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Li(Object(r),!0).forEach(function(s){s1(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Li(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function i1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(s){return t.reduceRight(function(i,o){return o(i)},s)}}function Br(e){return function t(){for(var r=this,s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return t.apply(r,[].concat(i,u))}}}function vn(e){return{}.toString.call(e).includes("Object")}function a1(e){return!Object.keys(e).length}function Gr(e){return typeof e=="function"}function o1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c1(e,t){return vn(t)||$t("changeType"),Object.keys(t).some(function(r){return!o1(e,r)})&&$t("changeField"),t}function l1(e){Gr(e)||$t("selectorType")}function u1(e){Gr(e)||vn(e)||$t("handlerType"),vn(e)&&Object.values(e).some(function(t){return!Gr(t)})&&$t("handlersType")}function p1(e){e||$t("initialIsRequired"),vn(e)||$t("initialType"),a1(e)&&$t("initialContent")}function h1(e,t){throw new Error(e[t]||e.default)}var f1={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},$t=Br(h1)(f1),pn={changes:c1,selector:l1,handler:u1,initial:p1};function d1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pn.initial(e),pn.handler(t);var r={current:e},s=Br(x1)(r,t),i=Br(g1)(r),o=Br(pn.changes)(e),c=Br(m1)(r);function u(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return pn.selector(h),h(r.current)}function f(h){i1(s,i,o,c)(h)}return[u,f]}function m1(e,t){return Gr(t)?t(e.current):t}function g1(e,t){return e.current=Di(Di({},e.current),t),t}function x1(e,t,r){return Gr(t)?t(e.current):Object.keys(r).forEach(function(s){var i;return(i=t[s])===null||i===void 0?void 0:i.call(t,e.current[s])}),r}var k1={create:d1},b1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function y1(e){return function t(){for(var r=this,s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return t.apply(r,[].concat(i,u))}}}function v1(e){return{}.toString.call(e).includes("Object")}function w1(e){return e||Oi("configIsRequired"),v1(e)||Oi("configType"),e.urls?(_1(),{paths:{vs:e.urls.monacoBase}}):e}function _1(){console.warn(ha.deprecation)}function S1(e,t){throw new Error(e[t]||e.default)}var ha={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
5
5
  Instead of using
@@ -8,7 +8,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8
8
  monaco.config({ paths: { vs: '...' } })
9
9
 
10
10
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
11
- `},bs=la(fa)(Ws),ha={config:pa},ma=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return function(i){return r.reduceRight(function(a,u){return u(a)},i)}};function Gs(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],Gs(e[r],t[r]))}),gs(gs({},e),t)}var ga={type:"cancelation",msg:"operation is manually canceled"};function fr(e){var t=!1,r=new Promise(function(s,i){e.then(function(a){return t?i(ga):s(a)}),e.catch(i)});return r.cancel=function(){return t=!0},r}var ka=["monaco"],xa=aa.create({config:ca,isInitialized:!1,resolve:null,reject:null,monaco:null}),Xs=Ui(xa,2),tn=Xs[0],Cn=Xs[1];function ba(e){var t=ha.config(e),r=t.monaco,s=zi(t,ka);Cn(function(i){return{config:Gs(i.config,s),monaco:r}})}function ya(){var e=tn(function(t){var r=t.monaco,s=t.isInitialized,i=t.resolve;return{monaco:r,isInitialized:s,resolve:i}});if(!e.isInitialized){if(Cn({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),fr(hr);if(window.monaco&&window.monaco.editor)return Js(window.monaco),e.resolve(window.monaco),fr(hr);ma(va,_a)(Ia)}return fr(hr)}function va(e){return document.body.appendChild(e)}function wa(e){var t=document.createElement("script");return e&&(t.src=e),t}function _a(e){var t=tn(function(s){var i=s.config,a=s.reject;return{config:i,reject:a}}),r=wa("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function Ia(){var e=tn(function(r){var s=r.config,i=r.resolve,a=r.reject;return{config:s,resolve:i,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var s=r.m||r;Js(s),e.resolve(s)},function(r){e.reject(r)})}function Js(e){tn().monaco||Cn({monaco:e})}function Sa(){return tn(function(e){var t=e.monaco;return t})}var hr=new Promise(function(e,t){return Cn({resolve:e,reject:t})}),Ys={config:ba,init:ya,__getMonacoInstance:Sa},Ta={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},mr=Ta,Aa={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Ea=Aa;function Ca({children:e}){return I.createElement("div",{style:Ea.container},e)}var Na=Ca,Pa=Na;function Ra({width:e,height:t,isEditorReady:r,loading:s,_ref:i,className:a,wrapperProps:u}){return I.createElement("section",{style:{...mr.wrapper,width:e,height:t},...u},!r&&I.createElement(Pa,null,s),I.createElement("div",{ref:i,style:{...mr.fullWidth,...!r&&mr.hide},className:a}))}var Da=Ra,Qs=I.memo(Da);function La(e){I.useEffect(e,[])}var Ks=La;function ja(e,t,r=!0){let s=I.useRef(!0);I.useEffect(s.current||!r?()=>{s.current=!1}:e,t)}var Me=ja;function Vt(){}function Ct(e,t,r,s){return Oa(e,s)||Ma(e,t,r,s)}function Oa(e,t){return e.editor.getModel(Zs(e,t))}function Ma(e,t,r,s){return e.editor.createModel(t,r,s?Zs(e,s):void 0)}function Zs(e,t){return e.Uri.parse(t)}function Fa({original:e,modified:t,language:r,originalLanguage:s,modifiedLanguage:i,originalModelPath:a,modifiedModelPath:u,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:h=!1,theme:f="light",loading:k="Loading...",options:w={},height:C="100%",width:R="100%",className:q,wrapperProps:L={},beforeMount:te=Vt,onMount:Z=Vt}){let[S,N]=I.useState(!1),[v,O]=I.useState(!0),U=I.useRef(null),j=I.useRef(null),ce=I.useRef(null),V=I.useRef(Z),H=I.useRef(te),pe=I.useRef(!1);Ks(()=>{let M=Ys.init();return M.then(ee=>(j.current=ee)&&O(!1)).catch(ee=>(ee==null?void 0:ee.type)!=="cancelation"&&console.error("Monaco initialization: error:",ee)),()=>U.current?be():M.cancel()}),Me(()=>{if(U.current&&j.current){let M=U.current.getOriginalEditor(),ee=Ct(j.current,e||"",s||r||"text",a||"");ee!==M.getModel()&&M.setModel(ee)}},[a],S),Me(()=>{if(U.current&&j.current){let M=U.current.getModifiedEditor(),ee=Ct(j.current,t||"",i||r||"text",u||"");ee!==M.getModel()&&M.setModel(ee)}},[u],S),Me(()=>{let M=U.current.getModifiedEditor();M.getOption(j.current.editor.EditorOption.readOnly)?M.setValue(t||""):t!==M.getValue()&&(M.executeEdits("",[{range:M.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),M.pushUndoStop())},[t],S),Me(()=>{var M,ee;(ee=(M=U.current)==null?void 0:M.getModel())==null||ee.original.setValue(e||"")},[e],S),Me(()=>{let{original:M,modified:ee}=U.current.getModel();j.current.editor.setModelLanguage(M,s||r||"text"),j.current.editor.setModelLanguage(ee,i||r||"text")},[r,s,i],S),Me(()=>{var M;(M=j.current)==null||M.editor.setTheme(f)},[f],S),Me(()=>{var M;(M=U.current)==null||M.updateOptions(w)},[w],S);let we=I.useCallback(()=>{var ge;if(!j.current)return;H.current(j.current);let M=Ct(j.current,e||"",s||r||"text",a||""),ee=Ct(j.current,t||"",i||r||"text",u||"");(ge=U.current)==null||ge.setModel({original:M,modified:ee})},[r,t,i,e,s,a,u]),he=I.useCallback(()=>{var M;!pe.current&&ce.current&&(U.current=j.current.editor.createDiffEditor(ce.current,{automaticLayout:!0,...w}),we(),(M=j.current)==null||M.editor.setTheme(f),N(!0),pe.current=!0)},[w,f,we]);I.useEffect(()=>{S&&V.current(U.current,j.current)},[S]),I.useEffect(()=>{!v&&!S&&he()},[v,S,he]);function be(){var ee,ge,X,_e;let M=(ee=U.current)==null?void 0:ee.getModel();d||((ge=M==null?void 0:M.original)==null||ge.dispose()),h||((X=M==null?void 0:M.modified)==null||X.dispose()),(_e=U.current)==null||_e.dispose()}return I.createElement(Qs,{width:R,height:C,isEditorReady:S,loading:k,_ref:ce,className:q,wrapperProps:L})}var $a=Fa;I.memo($a);function Ba(e){let t=I.useRef();return I.useEffect(()=>{t.current=e},[e]),t.current}var za=Ba,un=new Map;function qa({defaultValue:e,defaultLanguage:t,defaultPath:r,value:s,language:i,path:a,theme:u="light",line:d,loading:h="Loading...",options:f={},overrideServices:k={},saveViewState:w=!0,keepCurrentModel:C=!1,width:R="100%",height:q="100%",className:L,wrapperProps:te={},beforeMount:Z=Vt,onMount:S=Vt,onChange:N,onValidate:v=Vt}){let[O,U]=I.useState(!1),[j,ce]=I.useState(!0),V=I.useRef(null),H=I.useRef(null),pe=I.useRef(null),we=I.useRef(S),he=I.useRef(Z),be=I.useRef(),M=I.useRef(s),ee=za(a),ge=I.useRef(!1),X=I.useRef(!1);Ks(()=>{let J=Ys.init();return J.then(ne=>(V.current=ne)&&ce(!1)).catch(ne=>(ne==null?void 0:ne.type)!=="cancelation"&&console.error("Monaco initialization: error:",ne)),()=>H.current?Ae():J.cancel()}),Me(()=>{var ne,fe,Re,g;let J=Ct(V.current,e||s||"",t||i||"",a||r||"");J!==((ne=H.current)==null?void 0:ne.getModel())&&(w&&un.set(ee,(fe=H.current)==null?void 0:fe.saveViewState()),(Re=H.current)==null||Re.setModel(J),w&&((g=H.current)==null||g.restoreViewState(un.get(a))))},[a],O),Me(()=>{var J;(J=H.current)==null||J.updateOptions(f)},[f],O),Me(()=>{!H.current||s===void 0||(H.current.getOption(V.current.editor.EditorOption.readOnly)?H.current.setValue(s):s!==H.current.getValue()&&(X.current=!0,H.current.executeEdits("",[{range:H.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),H.current.pushUndoStop(),X.current=!1))},[s],O),Me(()=>{var ne,fe;let J=(ne=H.current)==null?void 0:ne.getModel();J&&i&&((fe=V.current)==null||fe.editor.setModelLanguage(J,i))},[i],O),Me(()=>{var J;d!==void 0&&((J=H.current)==null||J.revealLine(d))},[d],O),Me(()=>{var J;(J=V.current)==null||J.editor.setTheme(u)},[u],O);let _e=I.useCallback(()=>{var J;if(!(!pe.current||!V.current)&&!ge.current){he.current(V.current);let ne=a||r,fe=Ct(V.current,s||e||"",t||i||"",ne||"");H.current=(J=V.current)==null?void 0:J.editor.create(pe.current,{model:fe,automaticLayout:!0,...f},k),w&&H.current.restoreViewState(un.get(ne)),V.current.editor.setTheme(u),d!==void 0&&H.current.revealLine(d),U(!0),ge.current=!0}},[e,t,r,s,i,a,f,k,w,u,d]);I.useEffect(()=>{O&&we.current(H.current,V.current)},[O]),I.useEffect(()=>{!j&&!O&&_e()},[j,O,_e]),M.current=s,I.useEffect(()=>{var J,ne;O&&N&&((J=be.current)==null||J.dispose(),be.current=(ne=H.current)==null?void 0:ne.onDidChangeModelContent(fe=>{X.current||N(H.current.getValue(),fe)}))},[O,N]),I.useEffect(()=>{if(O){let J=V.current.editor.onDidChangeMarkers(ne=>{var Re;let fe=(Re=H.current.getModel())==null?void 0:Re.uri;if(fe&&ne.find(g=>g.path===fe.path)){let g=V.current.editor.getModelMarkers({resource:fe});v==null||v(g)}});return()=>{J==null||J.dispose()}}return()=>{}},[O,v]);function Ae(){var J,ne;(J=be.current)==null||J.dispose(),C?w&&un.set(a,H.current.saveViewState()):(ne=H.current.getModel())==null||ne.dispose(),H.current.dispose()}return I.createElement(Qs,{width:R,height:q,isEditorReady:O,loading:h,_ref:pe,className:L,wrapperProps:te})}var Ua=qa,Ha=I.memo(Ua),Va=Ha;const jr=I.memo(function({size:t="md",label:r="Loading preview..."}){const s=t==="sm"?8:t==="md"?12:16,i=t==="sm"?4:t==="md"?6:8;return P.jsxs("div",{style:pn.container,children:[P.jsx("div",{style:{...pn.cubes,gap:i},children:[0,1,2].map(a=>P.jsx("div",{style:{...pn.cube,width:s,height:s,animationDelay:`${a*.15}s`}},a))}),r&&P.jsx("div",{style:pn.label,children:r}),P.jsx("style",{children:Wa})]})}),Wa=`
11
+ `},Oi=y1(S1)(ha),I1={config:w1},E1=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return function(i){return r.reduceRight(function(o,c){return c(o)},i)}};function fa(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],fa(e[r],t[r]))}),Ri(Ri({},e),t)}var C1={type:"cancelation",msg:"operation is manually canceled"};function fs(e){var t=!1,r=new Promise(function(s,i){e.then(function(o){return t?i(C1):s(o)}),e.catch(i)});return r.cancel=function(){return t=!0},r}var T1=["monaco"],A1=k1.create({config:b1,isInitialized:!1,resolve:null,reject:null,monaco:null}),da=e1(A1,2),tn=da[0],jn=da[1];function P1(e){var t=I1.config(e),r=t.monaco,s=Jc(t,T1);jn(function(i){return{config:fa(i.config,s),monaco:r}})}function N1(){var e=tn(function(t){var r=t.monaco,s=t.isInitialized,i=t.resolve;return{monaco:r,isInitialized:s,resolve:i}});if(!e.isInitialized){if(jn({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),fs(ds);if(window.monaco&&window.monaco.editor)return ma(window.monaco),e.resolve(window.monaco),fs(ds);E1(R1,D1)(O1)}return fs(ds)}function R1(e){return document.body.appendChild(e)}function L1(e){var t=document.createElement("script");return e&&(t.src=e),t}function D1(e){var t=tn(function(s){var i=s.config,o=s.reject;return{config:i,reject:o}}),r=L1("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function O1(){var e=tn(function(r){var s=r.config,i=r.resolve,o=r.reject;return{config:s,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var s=r.m||r;ma(s),e.resolve(s)},function(r){e.reject(r)})}function ma(e){tn().monaco||jn({monaco:e})}function M1(){return tn(function(e){var t=e.monaco;return t})}var ds=new Promise(function(e,t){return jn({resolve:e,reject:t})}),ga={config:P1,init:N1,__getMonacoInstance:M1},j1={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ms=j1,F1={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},B1=F1;function V1({children:e}){return I.createElement("div",{style:B1.container},e)}var $1=V1,q1=$1;function U1({width:e,height:t,isEditorReady:r,loading:s,_ref:i,className:o,wrapperProps:c}){return I.createElement("section",{style:{...ms.wrapper,width:e,height:t},...c},!r&&I.createElement(q1,null,s),I.createElement("div",{ref:i,style:{...ms.fullWidth,...!r&&ms.hide},className:o}))}var z1=U1,xa=I.memo(z1);function H1(e){I.useEffect(e,[])}var ka=H1;function W1(e,t,r=!0){let s=I.useRef(!0);I.useEffect(s.current||!r?()=>{s.current=!1}:e,t)}var et=W1;function $r(){}function br(e,t,r,s){return G1(e,s)||X1(e,t,r,s)}function G1(e,t){return e.editor.getModel(ba(e,t))}function X1(e,t,r,s){return e.editor.createModel(t,r,s?ba(e,s):void 0)}function ba(e,t){return e.Uri.parse(t)}function Y1({original:e,modified:t,language:r,originalLanguage:s,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:c,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:f=!1,theme:h="light",loading:m="Loading...",options:x={},height:_="100%",width:y="100%",className:L,wrapperProps:O={},beforeMount:F=$r,onMount:K=$r}){let[P,j]=I.useState(!1),[D,W]=I.useState(!0),X=I.useRef(null),q=I.useRef(null),T=I.useRef(null),B=I.useRef(K),z=I.useRef(F),ye=I.useRef(!1);ka(()=>{let H=ga.init();return H.then(ce=>(q.current=ce)&&W(!1)).catch(ce=>(ce==null?void 0:ce.type)!=="cancelation"&&console.error("Monaco initialization: error:",ce)),()=>X.current?Oe():H.cancel()}),et(()=>{if(X.current&&q.current){let H=X.current.getOriginalEditor(),ce=br(q.current,e||"",s||r||"text",o||"");ce!==H.getModel()&&H.setModel(ce)}},[o],P),et(()=>{if(X.current&&q.current){let H=X.current.getModifiedEditor(),ce=br(q.current,t||"",i||r||"text",c||"");ce!==H.getModel()&&H.setModel(ce)}},[c],P),et(()=>{let H=X.current.getModifiedEditor();H.getOption(q.current.editor.EditorOption.readOnly)?H.setValue(t||""):t!==H.getValue()&&(H.executeEdits("",[{range:H.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),H.pushUndoStop())},[t],P),et(()=>{var H,ce;(ce=(H=X.current)==null?void 0:H.getModel())==null||ce.original.setValue(e||"")},[e],P),et(()=>{let{original:H,modified:ce}=X.current.getModel();q.current.editor.setModelLanguage(H,s||r||"text"),q.current.editor.setModelLanguage(ce,i||r||"text")},[r,s,i],P),et(()=>{var H;(H=q.current)==null||H.editor.setTheme(h)},[h],P),et(()=>{var H;(H=X.current)==null||H.updateOptions(x)},[x],P);let De=I.useCallback(()=>{var xe;if(!q.current)return;z.current(q.current);let H=br(q.current,e||"",s||r||"text",o||""),ce=br(q.current,t||"",i||r||"text",c||"");(xe=X.current)==null||xe.setModel({original:H,modified:ce})},[r,t,i,e,s,o,c]),$e=I.useCallback(()=>{var H;!ye.current&&T.current&&(X.current=q.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...x}),De(),(H=q.current)==null||H.editor.setTheme(h),j(!0),ye.current=!0)},[x,h,De]);I.useEffect(()=>{P&&B.current(X.current,q.current)},[P]),I.useEffect(()=>{!D&&!P&&$e()},[D,P,$e]);function Oe(){var ce,xe,ee,Pe;let H=(ce=X.current)==null?void 0:ce.getModel();u||((xe=H==null?void 0:H.original)==null||xe.dispose()),f||((ee=H==null?void 0:H.modified)==null||ee.dispose()),(Pe=X.current)==null||Pe.dispose()}return I.createElement(xa,{width:y,height:_,isEditorReady:P,loading:m,_ref:T,className:L,wrapperProps:O})}var K1=Y1;I.memo(K1);function Q1(e){let t=I.useRef();return I.useEffect(()=>{t.current=e},[e]),t.current}var J1=Q1,hn=new Map;function Z1({defaultValue:e,defaultLanguage:t,defaultPath:r,value:s,language:i,path:o,theme:c="light",line:u,loading:f="Loading...",options:h={},overrideServices:m={},saveViewState:x=!0,keepCurrentModel:_=!1,width:y="100%",height:L="100%",className:O,wrapperProps:F={},beforeMount:K=$r,onMount:P=$r,onChange:j,onValidate:D=$r}){let[W,X]=I.useState(!1),[q,T]=I.useState(!0),B=I.useRef(null),z=I.useRef(null),ye=I.useRef(null),De=I.useRef(P),$e=I.useRef(K),Oe=I.useRef(),H=I.useRef(s),ce=J1(o),xe=I.useRef(!1),ee=I.useRef(!1);ka(()=>{let te=ga.init();return te.then(ue=>(B.current=ue)&&T(!1)).catch(ue=>(ue==null?void 0:ue.type)!=="cancelation"&&console.error("Monaco initialization: error:",ue)),()=>z.current?Be():te.cancel()}),et(()=>{var ue,ke,Le,b;let te=br(B.current,e||s||"",t||i||"",o||r||"");te!==((ue=z.current)==null?void 0:ue.getModel())&&(x&&hn.set(ce,(ke=z.current)==null?void 0:ke.saveViewState()),(Le=z.current)==null||Le.setModel(te),x&&((b=z.current)==null||b.restoreViewState(hn.get(o))))},[o],W),et(()=>{var te;(te=z.current)==null||te.updateOptions(h)},[h],W),et(()=>{!z.current||s===void 0||(z.current.getOption(B.current.editor.EditorOption.readOnly)?z.current.setValue(s):s!==z.current.getValue()&&(ee.current=!0,z.current.executeEdits("",[{range:z.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),z.current.pushUndoStop(),ee.current=!1))},[s],W),et(()=>{var ue,ke;let te=(ue=z.current)==null?void 0:ue.getModel();te&&i&&((ke=B.current)==null||ke.editor.setModelLanguage(te,i))},[i],W),et(()=>{var te;u!==void 0&&((te=z.current)==null||te.revealLine(u))},[u],W),et(()=>{var te;(te=B.current)==null||te.editor.setTheme(c)},[c],W);let Pe=I.useCallback(()=>{var te;if(!(!ye.current||!B.current)&&!xe.current){$e.current(B.current);let ue=o||r,ke=br(B.current,s||e||"",t||i||"",ue||"");z.current=(te=B.current)==null?void 0:te.editor.create(ye.current,{model:ke,automaticLayout:!0,...h},m),x&&z.current.restoreViewState(hn.get(ue)),B.current.editor.setTheme(c),u!==void 0&&z.current.revealLine(u),X(!0),xe.current=!0}},[e,t,r,s,i,o,h,m,x,c,u]);I.useEffect(()=>{W&&De.current(z.current,B.current)},[W]),I.useEffect(()=>{!q&&!W&&Pe()},[q,W,Pe]),H.current=s,I.useEffect(()=>{var te,ue;W&&j&&((te=Oe.current)==null||te.dispose(),Oe.current=(ue=z.current)==null?void 0:ue.onDidChangeModelContent(ke=>{ee.current||j(z.current.getValue(),ke)}))},[W,j]),I.useEffect(()=>{if(W){let te=B.current.editor.onDidChangeMarkers(ue=>{var Le;let ke=(Le=z.current.getModel())==null?void 0:Le.uri;if(ke&&ue.find(b=>b.path===ke.path)){let b=B.current.editor.getModelMarkers({resource:ke});D==null||D(b)}});return()=>{te==null||te.dispose()}}return()=>{}},[W,D]);function Be(){var te,ue;(te=Oe.current)==null||te.dispose(),_?x&&hn.set(o,z.current.saveViewState()):(ue=z.current.getModel())==null||ue.dispose(),z.current.dispose()}return I.createElement(xa,{width:y,height:L,isEditorReady:W,loading:f,_ref:ye,className:O,wrapperProps:F})}var el=Z1,tl=I.memo(el),rl=tl;const Hs=I.memo(function({size:t="md",label:r="Loading preview..."}){const s=t==="sm"?8:t==="md"?12:16,i=t==="sm"?4:t==="md"?6:8;return E.jsxs("div",{style:fn.container,children:[E.jsx("div",{style:{...fn.cubes,gap:i},children:[0,1,2].map(o=>E.jsx("div",{style:{...fn.cube,width:s,height:s,animationDelay:`${o*.15}s`}},o))}),r&&E.jsx("div",{style:fn.label,children:r}),E.jsx("style",{children:nl})]})}),nl=`
12
12
  @keyframes codevizBounce {
13
13
  0%, 80%, 100% {
14
14
  transform: scale(0.6);
@@ -23,9 +23,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
23
23
  0%, 100% { opacity: 0.5; }
24
24
  50% { opacity: 1; }
25
25
  }
26
- `,pn={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,width:"100%",height:"100%",minHeight:120},cubes:{display:"flex",alignItems:"center"},cube:{borderRadius:2,backgroundColor:"#6366f1",animation:"codevizBounce 1.2s infinite ease-in-out"},label:{fontSize:12,color:"#94a3b8",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',animation:"codevizPulse 2s infinite ease-in-out"}},eo=I.memo(function({code:t,language:r,onChange:s,theme:i="dark",readOnly:a=!1,options:u,editorRef:d,baseCode:h}){const f=I.useRef(null),k=I.useRef([]),w=I.useCallback(L=>{const te=L.languages.typescript.typescriptDefaults,Z=L.languages.typescript.javascriptDefaults,S={noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0};te.setDiagnosticsOptions(S),Z.setDiagnosticsOptions(S);const N={jsx:L.languages.typescript.JsxEmit.ReactJSX,allowJs:!0,allowNonTsExtensions:!0,esModuleInterop:!0,noEmit:!0,target:L.languages.typescript.ScriptTarget.ESNext,moduleResolution:L.languages.typescript.ModuleResolutionKind.NodeJs};te.setCompilerOptions(N),Z.setCompilerOptions(N)},[]),C=I.useCallback(L=>{f.current=L,d&&(d.current=L),Xa()},[d]),R=I.useCallback(L=>{s==null||s(L??"")},[s]);I.useEffect(()=>{const L=f.current;if(!L||h==null){L&&k.current.length>0&&(k.current=L.deltaDecorations(k.current,[]));return}const te=Ga(h,t);k.current=L.deltaDecorations(k.current,te)},[h,t]);const q=Ja(r);return P.jsx("div",{style:Ya.container,children:P.jsx(Va,{height:"100%",language:q,value:t,theme:i==="dark"?"vs-dark":"vs",onChange:R,beforeMount:w,onMount:C,loading:P.jsx(jr,{size:"sm",label:"Loading editor..."}),options:{minimap:{enabled:!1},fontSize:13,lineHeight:20,padding:{top:8},scrollBeyondLastLine:!1,wordWrap:"on",tabSize:2,automaticLayout:!0,readOnly:a,domReadOnly:a,renderLineHighlight:"none",overviewRulerLanes:0,hideCursorInOverviewRuler:!0,glyphMargin:!0,scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8},...u}})})});function Ga(e,t){const r=e.split(`
26
+ `,fn={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,width:"100%",height:"100%",minHeight:120},cubes:{display:"flex",alignItems:"center"},cube:{borderRadius:2,backgroundColor:"#6366f1",animation:"codevizBounce 1.2s infinite ease-in-out"},label:{fontSize:12,color:"#94a3b8",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',animation:"codevizPulse 2s infinite ease-in-out"}},ya=I.memo(function({code:t,language:r,onChange:s,theme:i="dark",readOnly:o=!1,options:c,editorRef:u,baseCode:f}){const h=I.useRef(null),m=I.useRef([]),x=I.useCallback(O=>{const F=O.languages.typescript.typescriptDefaults,K=O.languages.typescript.javascriptDefaults,P={noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0};F.setDiagnosticsOptions(P),K.setDiagnosticsOptions(P);const j={jsx:O.languages.typescript.JsxEmit.ReactJSX,allowJs:!0,allowNonTsExtensions:!0,esModuleInterop:!0,noEmit:!0,target:O.languages.typescript.ScriptTarget.ESNext,moduleResolution:O.languages.typescript.ModuleResolutionKind.NodeJs};F.setCompilerOptions(j),K.setCompilerOptions(j)},[]),_=I.useCallback(O=>{h.current=O,u&&(u.current=O),il()},[u]),y=I.useCallback(O=>{s==null||s(O??"")},[s]);I.useEffect(()=>{const O=h.current;if(!O||f==null){O&&m.current.length>0&&(m.current=O.deltaDecorations(m.current,[]));return}const F=sl(f,t);m.current=O.deltaDecorations(m.current,F)},[f,t]);const L=al(r);return E.jsx("div",{style:ol.container,children:E.jsx(rl,{height:"100%",language:L,value:t,theme:i==="dark"?"vs-dark":"vs",onChange:y,beforeMount:x,onMount:_,loading:E.jsx(Hs,{size:"sm",label:"Loading editor..."}),options:{minimap:{enabled:!1},fontSize:13,lineHeight:20,padding:{top:8},scrollBeyondLastLine:!1,wordWrap:"on",tabSize:2,automaticLayout:!0,readOnly:o,domReadOnly:o,renderLineHighlight:"none",overviewRulerLanes:0,hideCursorInOverviewRuler:!0,glyphMargin:!0,scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8},...c}})})});function sl(e,t){const r=e.split(`
27
27
  `),s=t.split(`
28
- `),i=[];for(let a=0;a<s.length;a++){const u=a+1;a>=r.length?i.push({range:{startLineNumber:u,startColumn:1,endLineNumber:u,endColumn:1},options:{isWholeLine:!0,linesDecorationsClassName:"lp-diff-added-gutter",className:"lp-diff-added-line",overviewRuler:{color:"#22c55e",position:1}}}):s[a]!==r[a]&&i.push({range:{startLineNumber:u,startColumn:1,endLineNumber:u,endColumn:1},options:{isWholeLine:!0,linesDecorationsClassName:"lp-diff-modified-gutter",className:"lp-diff-modified-line",overviewRuler:{color:"#3b82f6",position:1}}})}if(r.length>s.length&&s.length>0){const a=s.length;i.push({range:{startLineNumber:a,startColumn:1,endLineNumber:a,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"lp-diff-deleted-gutter",overviewRuler:{color:"#ef4444",position:1}}})}return i}let ys=!1;function Xa(){if(ys)return;ys=!0;const e=document.createElement("style");e.textContent=`
28
+ `),i=[];for(let o=0;o<s.length;o++){const c=o+1;o>=r.length?i.push({range:{startLineNumber:c,startColumn:1,endLineNumber:c,endColumn:1},options:{isWholeLine:!0,linesDecorationsClassName:"lp-diff-added-gutter",className:"lp-diff-added-line",overviewRuler:{color:"#22c55e",position:1}}}):s[o]!==r[o]&&i.push({range:{startLineNumber:c,startColumn:1,endLineNumber:c,endColumn:1},options:{isWholeLine:!0,linesDecorationsClassName:"lp-diff-modified-gutter",className:"lp-diff-modified-line",overviewRuler:{color:"#3b82f6",position:1}}})}if(r.length>s.length&&s.length>0){const o=s.length;i.push({range:{startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"lp-diff-deleted-gutter",overviewRuler:{color:"#ef4444",position:1}}})}return i}let Mi=!1;function il(){if(Mi)return;Mi=!0;const e=document.createElement("style");e.textContent=`
29
29
  /* Green bar — added lines */
30
30
  .lp-diff-added-gutter {
31
31
  background-color: #22c55e !important;
@@ -53,13 +53,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
53
53
  border-left: 3px solid #ef4444 !important;
54
54
  margin-left: 3px;
55
55
  }
56
- `,document.head.appendChild(e)}function Ja(e){return{tsx:"typescript",ts:"typescript",jsx:"javascript",js:"javascript",html:"html",css:"css",json:"json",md:"markdown",markdown:"markdown",mermaid:"markdown",mmd:"markdown",svg:"xml",csv:"plaintext",tsv:"plaintext"}[e]||e}const Ya={container:{width:"100%",height:"100%",overflow:"hidden"}};var l;(function(e){e[e.NONE=0]="NONE";const r=1;e[e._abstract=r]="_abstract";const s=r+1;e[e._accessor=s]="_accessor";const i=s+1;e[e._as=i]="_as";const a=i+1;e[e._assert=a]="_assert";const u=a+1;e[e._asserts=u]="_asserts";const d=u+1;e[e._async=d]="_async";const h=d+1;e[e._await=h]="_await";const f=h+1;e[e._checks=f]="_checks";const k=f+1;e[e._constructor=k]="_constructor";const w=k+1;e[e._declare=w]="_declare";const C=w+1;e[e._enum=C]="_enum";const R=C+1;e[e._exports=R]="_exports";const q=R+1;e[e._from=q]="_from";const L=q+1;e[e._get=L]="_get";const te=L+1;e[e._global=te]="_global";const Z=te+1;e[e._implements=Z]="_implements";const S=Z+1;e[e._infer=S]="_infer";const N=S+1;e[e._interface=N]="_interface";const v=N+1;e[e._is=v]="_is";const O=v+1;e[e._keyof=O]="_keyof";const U=O+1;e[e._mixins=U]="_mixins";const j=U+1;e[e._module=j]="_module";const ce=j+1;e[e._namespace=ce]="_namespace";const V=ce+1;e[e._of=V]="_of";const H=V+1;e[e._opaque=H]="_opaque";const pe=H+1;e[e._out=pe]="_out";const we=pe+1;e[e._override=we]="_override";const he=we+1;e[e._private=he]="_private";const be=he+1;e[e._protected=be]="_protected";const M=be+1;e[e._proto=M]="_proto";const ee=M+1;e[e._public=ee]="_public";const ge=ee+1;e[e._readonly=ge]="_readonly";const X=ge+1;e[e._require=X]="_require";const _e=X+1;e[e._satisfies=_e]="_satisfies";const Ae=_e+1;e[e._set=Ae]="_set";const J=Ae+1;e[e._static=J]="_static";const ne=J+1;e[e._symbol=ne]="_symbol";const fe=ne+1;e[e._type=fe]="_type";const Re=fe+1;e[e._unique=Re]="_unique";const g=Re+1;e[e._using=g]="_using"})(l||(l={}));var n;(function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const r=16;e[e.IS_KEYWORD=r]="IS_KEYWORD";const s=32;e[e.IS_ASSIGN=s]="IS_ASSIGN";const i=64;e[e.IS_RIGHT_ASSOCIATIVE=i]="IS_RIGHT_ASSOCIATIVE";const a=128;e[e.IS_PREFIX=a]="IS_PREFIX";const u=256;e[e.IS_POSTFIX=u]="IS_POSTFIX";const d=512;e[e.IS_EXPRESSION_START=d]="IS_EXPRESSION_START";const h=512;e[e.num=h]="num";const f=1536;e[e.bigint=f]="bigint";const k=2560;e[e.decimal=k]="decimal";const w=3584;e[e.regexp=w]="regexp";const C=4608;e[e.string=C]="string";const R=5632;e[e.name=R]="name";const q=6144;e[e.eof=q]="eof";const L=7680;e[e.bracketL=L]="bracketL";const te=8192;e[e.bracketR=te]="bracketR";const Z=9728;e[e.braceL=Z]="braceL";const S=10752;e[e.braceBarL=S]="braceBarL";const N=11264;e[e.braceR=N]="braceR";const v=12288;e[e.braceBarR=v]="braceBarR";const O=13824;e[e.parenL=O]="parenL";const U=14336;e[e.parenR=U]="parenR";const j=15360;e[e.comma=j]="comma";const ce=16384;e[e.semi=ce]="semi";const V=17408;e[e.colon=V]="colon";const H=18432;e[e.doubleColon=H]="doubleColon";const pe=19456;e[e.dot=pe]="dot";const we=20480;e[e.question=we]="question";const he=21504;e[e.questionDot=he]="questionDot";const be=22528;e[e.arrow=be]="arrow";const M=23552;e[e.template=M]="template";const ee=24576;e[e.ellipsis=ee]="ellipsis";const ge=25600;e[e.backQuote=ge]="backQuote";const X=27136;e[e.dollarBraceL=X]="dollarBraceL";const _e=27648;e[e.at=_e]="at";const Ae=29184;e[e.hash=Ae]="hash";const J=29728;e[e.eq=J]="eq";const ne=30752;e[e.assign=ne]="assign";const fe=32640;e[e.preIncDec=fe]="preIncDec";const Re=33664;e[e.postIncDec=Re]="postIncDec";const g=34432;e[e.bang=g]="bang";const y=35456;e[e.tilde=y]="tilde";const _=35841;e[e.pipeline=_]="pipeline";const T=36866;e[e.nullishCoalescing=T]="nullishCoalescing";const E=37890;e[e.logicalOR=E]="logicalOR";const $=38915;e[e.logicalAND=$]="logicalAND";const B=39940;e[e.bitwiseOR=B]="bitwiseOR";const se=40965;e[e.bitwiseXOR=se]="bitwiseXOR";const de=41990;e[e.bitwiseAND=de]="bitwiseAND";const le=43015;e[e.equality=le]="equality";const Ie=44040;e[e.lessThan=Ie]="lessThan";const Se=45064;e[e.greaterThan=Se]="greaterThan";const oe=46088;e[e.relationalOrEqual=oe]="relationalOrEqual";const Ee=47113;e[e.bitShiftL=Ee]="bitShiftL";const ve=48137;e[e.bitShiftR=ve]="bitShiftR";const Be=49802;e[e.plus=Be]="plus";const tt=50826;e[e.minus=tt]="minus";const lt=51723;e[e.modulo=lt]="modulo";const Lt=52235;e[e.star=Lt]="star";const jt=53259;e[e.slash=jt]="slash";const Ot=54348;e[e.exponent=Ot]="exponent";const ut=55296;e[e.jsxName=ut]="jsxName";const _t=56320;e[e.jsxText=_t]="jsxText";const It=57344;e[e.jsxEmptyText=It]="jsxEmptyText";const Mt=58880;e[e.jsxTagStart=Mt]="jsxTagStart";const Ft=59392;e[e.jsxTagEnd=Ft]="jsxTagEnd";const St=60928;e[e.typeParameterStart=St]="typeParameterStart";const $t=61440;e[e.nonNullAssertion=$t]="nonNullAssertion";const Bt=62480;e[e._break=Bt]="_break";const Y=63504;e[e._case=Y]="_case";const Ce=64528;e[e._catch=Ce]="_catch";const De=65552;e[e._continue=De]="_continue";const Ke=66576;e[e._debugger=Ke]="_debugger";const qe=67600;e[e._default=qe]="_default";const Tt=68624;e[e._do=Tt]="_do";const Ze=69648;e[e._else=Ze]="_else";const $n=70672;e[e._finally=$n]="_finally";const Bn=71696;e[e._for=Bn]="_for";const zn=73232;e[e._function=zn]="_function";const qn=73744;e[e._if=qn]="_if";const Un=74768;e[e._return=Un]="_return";const Hn=75792;e[e._switch=Hn]="_switch";const Vn=77456;e[e._throw=Vn]="_throw";const Wn=77840;e[e._try=Wn]="_try";const Gn=78864;e[e._var=Gn]="_var";const Xn=79888;e[e._let=Xn]="_let";const Jn=80912;e[e._const=Jn]="_const";const Yn=81936;e[e._while=Yn]="_while";const Qn=82960;e[e._with=Qn]="_with";const Kn=84496;e[e._new=Kn]="_new";const Zn=85520;e[e._this=Zn]="_this";const er=86544;e[e._super=er]="_super";const tr=87568;e[e._class=tr]="_class";const nr=88080;e[e._extends=nr]="_extends";const rr=89104;e[e._export=rr]="_export";const sr=90640;e[e._import=sr]="_import";const or=91664;e[e._yield=or]="_yield";const ir=92688;e[e._null=ir]="_null";const ar=93712;e[e._true=ar]="_true";const cr=94736;e[e._false=cr]="_false";const lr=95256;e[e._in=lr]="_in";const ur=96280;e[e._instanceof=ur]="_instanceof";const pr=97936;e[e._typeof=pr]="_typeof";const dr=98960;e[e._void=dr]="_void";const vi=99984;e[e._delete=vi]="_delete";const wi=100880;e[e._async=wi]="_async";const _i=101904;e[e._get=_i]="_get";const Ii=102928;e[e._set=Ii]="_set";const Si=103952;e[e._declare=Si]="_declare";const Ti=104976;e[e._readonly=Ti]="_readonly";const Ai=106e3;e[e._abstract=Ai]="_abstract";const Ei=107024;e[e._static=Ei]="_static";const Ci=107536;e[e._public=Ci]="_public";const Ni=108560;e[e._private=Ni]="_private";const Pi=109584;e[e._protected=Pi]="_protected";const Ri=110608;e[e._override=Ri]="_override";const Di=112144;e[e._as=Di]="_as";const Li=113168;e[e._enum=Li]="_enum";const ji=114192;e[e._type=ji]="_type";const Oi=115216;e[e._implements=Oi]="_implements"})(n||(n={}));function Qa(e){switch(e){case n.num:return"num";case n.bigint:return"bigint";case n.decimal:return"decimal";case n.regexp:return"regexp";case n.string:return"string";case n.name:return"name";case n.eof:return"eof";case n.bracketL:return"[";case n.bracketR:return"]";case n.braceL:return"{";case n.braceBarL:return"{|";case n.braceR:return"}";case n.braceBarR:return"|}";case n.parenL:return"(";case n.parenR:return")";case n.comma:return",";case n.semi:return";";case n.colon:return":";case n.doubleColon:return"::";case n.dot:return".";case n.question:return"?";case n.questionDot:return"?.";case n.arrow:return"=>";case n.template:return"template";case n.ellipsis:return"...";case n.backQuote:return"`";case n.dollarBraceL:return"${";case n.at:return"@";case n.hash:return"#";case n.eq:return"=";case n.assign:return"_=";case n.preIncDec:return"++/--";case n.postIncDec:return"++/--";case n.bang:return"!";case n.tilde:return"~";case n.pipeline:return"|>";case n.nullishCoalescing:return"??";case n.logicalOR:return"||";case n.logicalAND:return"&&";case n.bitwiseOR:return"|";case n.bitwiseXOR:return"^";case n.bitwiseAND:return"&";case n.equality:return"==/!=";case n.lessThan:return"<";case n.greaterThan:return">";case n.relationalOrEqual:return"<=/>=";case n.bitShiftL:return"<<";case n.bitShiftR:return">>/>>>";case n.plus:return"+";case n.minus:return"-";case n.modulo:return"%";case n.star:return"*";case n.slash:return"/";case n.exponent:return"**";case n.jsxName:return"jsxName";case n.jsxText:return"jsxText";case n.jsxEmptyText:return"jsxEmptyText";case n.jsxTagStart:return"jsxTagStart";case n.jsxTagEnd:return"jsxTagEnd";case n.typeParameterStart:return"typeParameterStart";case n.nonNullAssertion:return"nonNullAssertion";case n._break:return"break";case n._case:return"case";case n._catch:return"catch";case n._continue:return"continue";case n._debugger:return"debugger";case n._default:return"default";case n._do:return"do";case n._else:return"else";case n._finally:return"finally";case n._for:return"for";case n._function:return"function";case n._if:return"if";case n._return:return"return";case n._switch:return"switch";case n._throw:return"throw";case n._try:return"try";case n._var:return"var";case n._let:return"let";case n._const:return"const";case n._while:return"while";case n._with:return"with";case n._new:return"new";case n._this:return"this";case n._super:return"super";case n._class:return"class";case n._extends:return"extends";case n._export:return"export";case n._import:return"import";case n._yield:return"yield";case n._null:return"null";case n._true:return"true";case n._false:return"false";case n._in:return"in";case n._instanceof:return"instanceof";case n._typeof:return"typeof";case n._void:return"void";case n._delete:return"delete";case n._async:return"async";case n._get:return"get";case n._set:return"set";case n._declare:return"declare";case n._readonly:return"readonly";case n._abstract:return"abstract";case n._static:return"static";case n._public:return"public";case n._private:return"private";case n._protected:return"protected";case n._override:return"override";case n._as:return"as";case n._enum:return"enum";case n._type:return"type";case n._implements:return"implements";default:return""}}class Ye{constructor(t,r,s){this.startTokenIndex=t,this.endTokenIndex=r,this.isFunctionScope=s}}class Ka{constructor(t,r,s,i,a,u,d,h,f,k,w,C,R){this.potentialArrowAt=t,this.noAnonFunctionType=r,this.inDisallowConditionalTypesContext=s,this.tokensLength=i,this.scopesLength=a,this.pos=u,this.type=d,this.contextualKeyword=h,this.start=f,this.end=k,this.isType=w,this.scopeDepth=C,this.error=R}}class Le{constructor(){Le.prototype.__init.call(this),Le.prototype.__init2.call(this),Le.prototype.__init3.call(this),Le.prototype.__init4.call(this),Le.prototype.__init5.call(this),Le.prototype.__init6.call(this),Le.prototype.__init7.call(this),Le.prototype.__init8.call(this),Le.prototype.__init9.call(this),Le.prototype.__init10.call(this),Le.prototype.__init11.call(this),Le.prototype.__init12.call(this),Le.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=n.eof}__init8(){this.contextualKeyword=l.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new Ka(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(t){this.potentialArrowAt=t.potentialArrowAt,this.noAnonFunctionType=t.noAnonFunctionType,this.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,this.tokens.length=t.tokensLength,this.scopes.length=t.scopesLength,this.pos=t.pos,this.type=t.type,this.contextualKeyword=t.contextualKeyword,this.start=t.start,this.end=t.end,this.isType=t.isType,this.scopeDepth=t.scopeDepth,this.error=t.error}}var p;(function(e){e[e.backSpace=8]="backSpace";const r=10;e[e.lineFeed=r]="lineFeed";const s=9;e[e.tab=s]="tab";const i=13;e[e.carriageReturn=i]="carriageReturn";const a=14;e[e.shiftOut=a]="shiftOut";const u=32;e[e.space=u]="space";const d=33;e[e.exclamationMark=d]="exclamationMark";const h=34;e[e.quotationMark=h]="quotationMark";const f=35;e[e.numberSign=f]="numberSign";const k=36;e[e.dollarSign=k]="dollarSign";const w=37;e[e.percentSign=w]="percentSign";const C=38;e[e.ampersand=C]="ampersand";const R=39;e[e.apostrophe=R]="apostrophe";const q=40;e[e.leftParenthesis=q]="leftParenthesis";const L=41;e[e.rightParenthesis=L]="rightParenthesis";const te=42;e[e.asterisk=te]="asterisk";const Z=43;e[e.plusSign=Z]="plusSign";const S=44;e[e.comma=S]="comma";const N=45;e[e.dash=N]="dash";const v=46;e[e.dot=v]="dot";const O=47;e[e.slash=O]="slash";const U=48;e[e.digit0=U]="digit0";const j=49;e[e.digit1=j]="digit1";const ce=50;e[e.digit2=ce]="digit2";const V=51;e[e.digit3=V]="digit3";const H=52;e[e.digit4=H]="digit4";const pe=53;e[e.digit5=pe]="digit5";const we=54;e[e.digit6=we]="digit6";const he=55;e[e.digit7=he]="digit7";const be=56;e[e.digit8=be]="digit8";const M=57;e[e.digit9=M]="digit9";const ee=58;e[e.colon=ee]="colon";const ge=59;e[e.semicolon=ge]="semicolon";const X=60;e[e.lessThan=X]="lessThan";const _e=61;e[e.equalsTo=_e]="equalsTo";const Ae=62;e[e.greaterThan=Ae]="greaterThan";const J=63;e[e.questionMark=J]="questionMark";const ne=64;e[e.atSign=ne]="atSign";const fe=65;e[e.uppercaseA=fe]="uppercaseA";const Re=66;e[e.uppercaseB=Re]="uppercaseB";const g=67;e[e.uppercaseC=g]="uppercaseC";const y=68;e[e.uppercaseD=y]="uppercaseD";const _=69;e[e.uppercaseE=_]="uppercaseE";const T=70;e[e.uppercaseF=T]="uppercaseF";const E=71;e[e.uppercaseG=E]="uppercaseG";const $=72;e[e.uppercaseH=$]="uppercaseH";const B=73;e[e.uppercaseI=B]="uppercaseI";const se=74;e[e.uppercaseJ=se]="uppercaseJ";const de=75;e[e.uppercaseK=de]="uppercaseK";const le=76;e[e.uppercaseL=le]="uppercaseL";const Ie=77;e[e.uppercaseM=Ie]="uppercaseM";const Se=78;e[e.uppercaseN=Se]="uppercaseN";const oe=79;e[e.uppercaseO=oe]="uppercaseO";const Ee=80;e[e.uppercaseP=Ee]="uppercaseP";const ve=81;e[e.uppercaseQ=ve]="uppercaseQ";const Be=82;e[e.uppercaseR=Be]="uppercaseR";const tt=83;e[e.uppercaseS=tt]="uppercaseS";const lt=84;e[e.uppercaseT=lt]="uppercaseT";const Lt=85;e[e.uppercaseU=Lt]="uppercaseU";const jt=86;e[e.uppercaseV=jt]="uppercaseV";const Ot=87;e[e.uppercaseW=Ot]="uppercaseW";const ut=88;e[e.uppercaseX=ut]="uppercaseX";const _t=89;e[e.uppercaseY=_t]="uppercaseY";const It=90;e[e.uppercaseZ=It]="uppercaseZ";const Mt=91;e[e.leftSquareBracket=Mt]="leftSquareBracket";const Ft=92;e[e.backslash=Ft]="backslash";const St=93;e[e.rightSquareBracket=St]="rightSquareBracket";const $t=94;e[e.caret=$t]="caret";const Bt=95;e[e.underscore=Bt]="underscore";const Y=96;e[e.graveAccent=Y]="graveAccent";const Ce=97;e[e.lowercaseA=Ce]="lowercaseA";const De=98;e[e.lowercaseB=De]="lowercaseB";const Ke=99;e[e.lowercaseC=Ke]="lowercaseC";const qe=100;e[e.lowercaseD=qe]="lowercaseD";const Tt=101;e[e.lowercaseE=Tt]="lowercaseE";const Ze=102;e[e.lowercaseF=Ze]="lowercaseF";const $n=103;e[e.lowercaseG=$n]="lowercaseG";const Bn=104;e[e.lowercaseH=Bn]="lowercaseH";const zn=105;e[e.lowercaseI=zn]="lowercaseI";const qn=106;e[e.lowercaseJ=qn]="lowercaseJ";const Un=107;e[e.lowercaseK=Un]="lowercaseK";const Hn=108;e[e.lowercaseL=Hn]="lowercaseL";const Vn=109;e[e.lowercaseM=Vn]="lowercaseM";const Wn=110;e[e.lowercaseN=Wn]="lowercaseN";const Gn=111;e[e.lowercaseO=Gn]="lowercaseO";const Xn=112;e[e.lowercaseP=Xn]="lowercaseP";const Jn=113;e[e.lowercaseQ=Jn]="lowercaseQ";const Yn=114;e[e.lowercaseR=Yn]="lowercaseR";const Qn=115;e[e.lowercaseS=Qn]="lowercaseS";const Kn=116;e[e.lowercaseT=Kn]="lowercaseT";const Zn=117;e[e.lowercaseU=Zn]="lowercaseU";const er=118;e[e.lowercaseV=er]="lowercaseV";const tr=119;e[e.lowercaseW=tr]="lowercaseW";const nr=120;e[e.lowercaseX=nr]="lowercaseX";const rr=121;e[e.lowercaseY=rr]="lowercaseY";const sr=122;e[e.lowercaseZ=sr]="lowercaseZ";const or=123;e[e.leftCurlyBrace=or]="leftCurlyBrace";const ir=124;e[e.verticalBar=ir]="verticalBar";const ar=125;e[e.rightCurlyBrace=ar]="rightCurlyBrace";const cr=126;e[e.tilde=cr]="tilde";const lr=160;e[e.nonBreakingSpace=lr]="nonBreakingSpace";const ur=5760;e[e.oghamSpaceMark=ur]="oghamSpaceMark";const pr=8232;e[e.lineSeparator=pr]="lineSeparator";const dr=8233;e[e.paragraphSeparator=dr]="paragraphSeparator"})(p||(p={}));let Nn,re,ie,o,A,to;function Jt(){return to++}function Za(e){if("pos"in e){const t=t1(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}class e1{constructor(t,r){this.line=t,this.column=r}}function t1(e){let t=1,r=1;for(let s=0;s<e;s++)A.charCodeAt(s)===p.lineFeed?(t++,r=1):r++;return new e1(t,r)}function n1(e,t,r,s){A=e,o=new Le,to=1,Nn=t,re=r,ie=s}function D(e){return o.contextualKeyword===e}function Or(e){const t=rn();return t.type===n.name&&t.contextualKeyword===e}function Te(e){return o.contextualKeyword===e&&m(n.name)}function ye(e){Te(e)||G()}function Fe(){return c(n.eof)||c(n.braceR)||je()}function je(){const e=o.tokens[o.tokens.length-1],t=e?e.end:0;for(let r=t;r<o.start;r++){const s=A.charCodeAt(r);if(s===p.lineFeed||s===p.carriageReturn||s===8232||s===8233)return!0}return!1}function no(){const e=Mr();for(let t=o.end;t<e;t++){const r=A.charCodeAt(t);if(r===p.lineFeed||r===p.carriageReturn||r===8232||r===8233)return!0}return!1}function Ge(){return m(n.semi)||Fe()}function me(){Ge()||G('Unexpected token, expected ";"')}function x(e){m(e)||G(`Unexpected token, expected "${Qa(e)}"`)}function G(e="Unexpected token",t=o.start){if(o.error)return;const r=new SyntaxError(e);r.pos=t,o.error=r,o.pos=A.length,W(n.eof)}const ro=[9,11,12,p.space,p.nonBreakingSpace,p.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],vs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,so=new Uint8Array(65536);for(const e of ro)so[e]=1;function r1(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const He=new Uint8Array(65536);for(let e=0;e<128;e++)He[e]=r1(e)?1:0;for(let e=128;e<65536;e++)He[e]=1;for(const e of ro)He[e]=0;He[8232]=0;He[8233]=0;const nn=He.slice();for(let e=p.digit0;e<=p.digit9;e++)nn[e]=0;const ws=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,l._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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p.lowercaseZ));){const i=ws[e+(t-p.lowercaseA)+1];if(i===-1)break;e=i,r++}const s=ws[e];if(s>-1&&!He[t]){o.pos=r,s&1?W(s>>>1):W(n.name,s>>>1);return}for(;r<A.length;){const i=A.charCodeAt(r);if(He[i])r++;else if(i===p.backslash){if(r+=2,A.charCodeAt(r)===p.leftCurlyBrace){for(;r<A.length&&A.charCodeAt(r)!==p.rightCurlyBrace;)r++;r++}}else if(i===p.atSign&&A.charCodeAt(r+1)===p.atSign)r+=2;else break}o.pos=r,W(n.name)}var F;(function(e){e[e.Access=0]="Access";const r=1;e[e.ExportAccess=r]="ExportAccess";const s=r+1;e[e.TopLevelDeclaration=s]="TopLevelDeclaration";const i=s+1;e[e.FunctionScopedDeclaration=i]="FunctionScopedDeclaration";const a=i+1;e[e.BlockScopedDeclaration=a]="BlockScopedDeclaration";const u=a+1;e[e.ObjectShorthandTopLevelDeclaration=u]="ObjectShorthandTopLevelDeclaration";const d=u+1;e[e.ObjectShorthandFunctionScopedDeclaration=d]="ObjectShorthandFunctionScopedDeclaration";const h=d+1;e[e.ObjectShorthandBlockScopedDeclaration=h]="ObjectShorthandBlockScopedDeclaration";const f=h+1;e[e.ObjectShorthand=f]="ObjectShorthand";const k=f+1;e[e.ImportDeclaration=k]="ImportDeclaration";const w=k+1;e[e.ObjectKey=w]="ObjectKey";const C=w+1;e[e.ImportAccess=C]="ImportAccess"})(F||(F={}));var Ue;(function(e){e[e.NoChildren=0]="NoChildren";const r=1;e[e.OneChild=r]="OneChild";const s=r+1;e[e.StaticChildren=s]="StaticChildren";const i=s+1;e[e.KeyAfterPropSpread=i]="KeyAfterPropSpread"})(Ue||(Ue={}));function oo(e){const t=e.identifierRole;return t===F.TopLevelDeclaration||t===F.FunctionScopedDeclaration||t===F.BlockScopedDeclaration||t===F.ObjectShorthandTopLevelDeclaration||t===F.ObjectShorthandFunctionScopedDeclaration||t===F.ObjectShorthandBlockScopedDeclaration}function o1(e){const t=e.identifierRole;return t===F.FunctionScopedDeclaration||t===F.BlockScopedDeclaration||t===F.ObjectShorthandFunctionScopedDeclaration||t===F.ObjectShorthandBlockScopedDeclaration}function io(e){const t=e.identifierRole;return t===F.TopLevelDeclaration||t===F.ObjectShorthandTopLevelDeclaration||t===F.ImportDeclaration}function i1(e){const t=e.identifierRole;return t===F.TopLevelDeclaration||t===F.BlockScopedDeclaration||t===F.ObjectShorthandTopLevelDeclaration||t===F.ObjectShorthandBlockScopedDeclaration}function a1(e){const t=e.identifierRole;return t===F.FunctionScopedDeclaration||t===F.ObjectShorthandFunctionScopedDeclaration}function c1(e){return e.identifierRole===F.ObjectShorthandTopLevelDeclaration||e.identifierRole===F.ObjectShorthandBlockScopedDeclaration||e.identifierRole===F.ObjectShorthandFunctionScopedDeclaration}class Pn{constructor(){this.type=o.type,this.contextualKeyword=o.contextualKeyword,this.start=o.start,this.end=o.end,this.scopeDepth=o.scopeDepth,this.isType=o.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function b(){o.tokens.push(new Pn),uo()}function nt(){o.tokens.push(new Pn),o.start=o.pos,S1()}function l1(){o.type===n.assign&&--o.pos,w1()}function K(e){for(let r=o.tokens.length-e;r<o.tokens.length;r++)o.tokens[r].isType=!0;const t=o.isType;return o.isType=!0,t}function Q(e){o.isType=e}function m(e){return c(e)?(b(),!0):!1}function ao(e){const t=o.isType;o.isType=!0,m(e),o.isType=t}function c(e){return o.type===e}function ke(){const e=o.snapshot();b();const t=o.type;return o.restoreFromSnapshot(e),t}class u1{constructor(t,r){this.type=t,this.contextualKeyword=r}}function rn(){const e=o.snapshot();b();const t=o.type,r=o.contextualKeyword;return o.restoreFromSnapshot(e),new u1(t,r)}function Mr(){return co(o.pos)}function co(e){vs.lastIndex=e;const t=vs.exec(A);return e+t[0].length}function lo(){return A.charCodeAt(Mr())}function uo(){if(fo(),o.start=o.pos,o.pos>=A.length){const e=o.tokens;e.length>=2&&e[e.length-1].start>=A.length&&e[e.length-2].start>=A.length&&G("Unexpectedly reached the end of input."),W(n.eof);return}p1(A.charCodeAt(o.pos))}function p1(e){nn[e]||e===p.backslash||e===p.atSign&&A.charCodeAt(o.pos+1)===p.atSign?s1():go(e)}function d1(){for(;A.charCodeAt(o.pos)!==p.asterisk||A.charCodeAt(o.pos+1)!==p.slash;)if(o.pos++,o.pos>A.length){G("Unterminated comment",o.pos-2);return}o.pos+=2}function po(e){let t=A.charCodeAt(o.pos+=e);if(o.pos<A.length)for(;t!==p.lineFeed&&t!==p.carriageReturn&&t!==p.lineSeparator&&t!==p.paragraphSeparator&&++o.pos<A.length;)t=A.charCodeAt(o.pos)}function fo(){for(;o.pos<A.length;){const e=A.charCodeAt(o.pos);switch(e){case p.carriageReturn:A.charCodeAt(o.pos+1)===p.lineFeed&&++o.pos;case p.lineFeed:case p.lineSeparator:case p.paragraphSeparator:++o.pos;break;case p.slash:switch(A.charCodeAt(o.pos+1)){case p.asterisk:o.pos+=2,d1();break;case p.slash:po(2);break;default:return}break;default:if(so[e])++o.pos;else return}}}function W(e,t=l.NONE){o.end=o.pos,o.type=e,o.contextualKeyword=t}function f1(){const e=A.charCodeAt(o.pos+1);if(e>=p.digit0&&e<=p.digit9){ko(!0);return}e===p.dot&&A.charCodeAt(o.pos+2)===p.dot?(o.pos+=3,W(n.ellipsis)):(++o.pos,W(n.dot))}function h1(){A.charCodeAt(o.pos+1)===p.equalsTo?ae(n.assign,2):ae(n.slash,1)}function m1(e){let t=e===p.asterisk?n.star:n.modulo,r=1,s=A.charCodeAt(o.pos+1);e===p.asterisk&&s===p.asterisk&&(r++,s=A.charCodeAt(o.pos+2),t=n.exponent),s===p.equalsTo&&A.charCodeAt(o.pos+2)!==p.greaterThan&&(r++,t=n.assign),ae(t,r)}function g1(e){const t=A.charCodeAt(o.pos+1);if(t===e){A.charCodeAt(o.pos+2)===p.equalsTo?ae(n.assign,3):ae(e===p.verticalBar?n.logicalOR:n.logicalAND,2);return}if(e===p.verticalBar){if(t===p.greaterThan){ae(n.pipeline,2);return}else if(t===p.rightCurlyBrace&&ie){ae(n.braceBarR,2);return}}if(t===p.equalsTo){ae(n.assign,2);return}ae(e===p.verticalBar?n.bitwiseOR:n.bitwiseAND,1)}function k1(){A.charCodeAt(o.pos+1)===p.equalsTo?ae(n.assign,2):ae(n.bitwiseXOR,1)}function x1(e){const t=A.charCodeAt(o.pos+1);if(t===e){ae(n.preIncDec,2);return}t===p.equalsTo?ae(n.assign,2):e===p.plusSign?ae(n.plus,1):ae(n.minus,1)}function b1(){const e=A.charCodeAt(o.pos+1);if(e===p.lessThan){if(A.charCodeAt(o.pos+2)===p.equalsTo){ae(n.assign,3);return}o.isType?ae(n.lessThan,1):ae(n.bitShiftL,2);return}e===p.equalsTo?ae(n.relationalOrEqual,2):ae(n.lessThan,1)}function ho(){if(o.isType){ae(n.greaterThan,1);return}const e=A.charCodeAt(o.pos+1);if(e===p.greaterThan){const t=A.charCodeAt(o.pos+2)===p.greaterThan?3:2;if(A.charCodeAt(o.pos+t)===p.equalsTo){ae(n.assign,t+1);return}ae(n.bitShiftR,t);return}e===p.equalsTo?ae(n.relationalOrEqual,2):ae(n.greaterThan,1)}function mo(){o.type===n.greaterThan&&(o.pos-=1,ho())}function y1(e){const t=A.charCodeAt(o.pos+1);if(t===p.equalsTo){ae(n.equality,A.charCodeAt(o.pos+2)===p.equalsTo?3:2);return}if(e===p.equalsTo&&t===p.greaterThan){o.pos+=2,W(n.arrow);return}ae(e===p.equalsTo?n.eq:n.bang,1)}function v1(){const e=A.charCodeAt(o.pos+1),t=A.charCodeAt(o.pos+2);e===p.questionMark&&!(ie&&o.isType)?t===p.equalsTo?ae(n.assign,3):ae(n.nullishCoalescing,2):e===p.dot&&!(t>=p.digit0&&t<=p.digit9)?(o.pos+=2,W(n.questionDot)):(++o.pos,W(n.question))}function go(e){switch(e){case p.numberSign:++o.pos,W(n.hash);return;case p.dot:f1();return;case p.leftParenthesis:++o.pos,W(n.parenL);return;case p.rightParenthesis:++o.pos,W(n.parenR);return;case p.semicolon:++o.pos,W(n.semi);return;case p.comma:++o.pos,W(n.comma);return;case p.leftSquareBracket:++o.pos,W(n.bracketL);return;case p.rightSquareBracket:++o.pos,W(n.bracketR);return;case p.leftCurlyBrace:ie&&A.charCodeAt(o.pos+1)===p.verticalBar?ae(n.braceBarL,2):(++o.pos,W(n.braceL));return;case p.rightCurlyBrace:++o.pos,W(n.braceR);return;case p.colon:A.charCodeAt(o.pos+1)===p.colon?ae(n.doubleColon,2):(++o.pos,W(n.colon));return;case p.questionMark:v1();return;case p.atSign:++o.pos,W(n.at);return;case p.graveAccent:++o.pos,W(n.backQuote);return;case p.digit0:{const t=A.charCodeAt(o.pos+1);if(t===p.lowercaseX||t===p.uppercaseX||t===p.lowercaseO||t===p.uppercaseO||t===p.lowercaseB||t===p.uppercaseB){_1();return}}case p.digit1:case p.digit2:case p.digit3:case p.digit4:case p.digit5:case p.digit6:case p.digit7:case p.digit8:case p.digit9:ko(!1);return;case p.quotationMark:case p.apostrophe:I1(e);return;case p.slash:h1();return;case p.percentSign:case p.asterisk:m1(e);return;case p.verticalBar:case p.ampersand:g1(e);return;case p.caret:k1();return;case p.plusSign:case p.dash:x1(e);return;case p.lessThan:b1();return;case p.greaterThan:ho();return;case p.equalsTo:case p.exclamationMark:y1(e);return;case p.tilde:ae(n.tilde,1);return}G(`Unexpected character '${String.fromCharCode(e)}'`,o.pos)}function ae(e,t){o.pos+=t,W(e)}function w1(){const e=o.pos;let t=!1,r=!1;for(;;){if(o.pos>=A.length){G("Unterminated regular expression",e);return}const s=A.charCodeAt(o.pos);if(t)t=!1;else{if(s===p.leftSquareBracket)r=!0;else if(s===p.rightSquareBracket&&r)r=!1;else if(s===p.slash&&!r)break;t=s===p.backslash}++o.pos}++o.pos,T1(),W(n.regexp)}function gr(){for(;;){const e=A.charCodeAt(o.pos);if(e>=p.digit0&&e<=p.digit9||e===p.underscore)o.pos++;else break}}function _1(){for(o.pos+=2;;){const t=A.charCodeAt(o.pos);if(t>=p.digit0&&t<=p.digit9||t>=p.lowercaseA&&t<=p.lowercaseF||t>=p.uppercaseA&&t<=p.uppercaseF||t===p.underscore)o.pos++;else break}A.charCodeAt(o.pos)===p.lowercaseN?(++o.pos,W(n.bigint)):W(n.num)}function ko(e){let t=!1,r=!1;e||gr();let s=A.charCodeAt(o.pos);if(s===p.dot&&(++o.pos,gr(),s=A.charCodeAt(o.pos)),(s===p.uppercaseE||s===p.lowercaseE)&&(s=A.charCodeAt(++o.pos),(s===p.plusSign||s===p.dash)&&++o.pos,gr(),s=A.charCodeAt(o.pos)),s===p.lowercaseN?(++o.pos,t=!0):s===p.lowercaseM&&(++o.pos,r=!0),t){W(n.bigint);return}if(r){W(n.decimal);return}W(n.num)}function I1(e){for(o.pos++;;){if(o.pos>=A.length){G("Unterminated string constant");return}const t=A.charCodeAt(o.pos);if(t===p.backslash)o.pos++;else if(t===e)break;o.pos++}o.pos++,W(n.string)}function S1(){for(;;){if(o.pos>=A.length){G("Unterminated template");return}const e=A.charCodeAt(o.pos);if(e===p.graveAccent||e===p.dollarSign&&A.charCodeAt(o.pos+1)===p.leftCurlyBrace){if(o.pos===o.start&&c(n.template))if(e===p.dollarSign){o.pos+=2,W(n.dollarBraceL);return}else{++o.pos,W(n.backQuote);return}W(n.template);return}e===p.backslash&&o.pos++,o.pos++}}function T1(){for(;o.pos<A.length;){const e=A.charCodeAt(o.pos);if(He[e])o.pos++;else if(e===p.backslash){if(o.pos+=2,A.charCodeAt(o.pos)===p.leftCurlyBrace){for(;o.pos<A.length&&A.charCodeAt(o.pos)!==p.rightCurlyBrace;)o.pos++;o.pos++}}else break}}function Yt(e,t=e.currentIndex()){let r=t+1;if(dn(e,r)){const s=e.identifierNameAtIndex(t);return{isType:!1,leftName:s,rightName:s,endIndex:r}}if(r++,dn(e,r))return{isType:!0,leftName:null,rightName:null,endIndex:r};if(r++,dn(e,r))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:r};if(r++,dn(e,r))return{isType:!0,leftName:null,rightName:null,endIndex:r};throw new Error(`Unexpected import/export specifier at ${t}`)}function dn(e,t){const r=e.tokens[t];return r.type===n.braceR||r.type===n.comma}const A1=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["iexcl","¡"],["cent","¢"],["pound","£"],["curren","¤"],["yen","¥"],["brvbar","¦"],["sect","§"],["uml","¨"],["copy","©"],["ordf","ª"],["laquo","«"],["not","¬"],["shy","­"],["reg","®"],["macr","¯"],["deg","°"],["plusmn","±"],["sup2","²"],["sup3","³"],["acute","´"],["micro","µ"],["para","¶"],["middot","·"],["cedil","¸"],["sup1","¹"],["ordm","º"],["raquo","»"],["frac14","¼"],["frac12","½"],["frac34","¾"],["iquest","¿"],["Agrave","À"],["Aacute","Á"],["Acirc","Â"],["Atilde","Ã"],["Auml","Ä"],["Aring","Å"],["AElig","Æ"],["Ccedil","Ç"],["Egrave","È"],["Eacute","É"],["Ecirc","Ê"],["Euml","Ë"],["Igrave","Ì"],["Iacute","Í"],["Icirc","Î"],["Iuml","Ï"],["ETH","Ð"],["Ntilde","Ñ"],["Ograve","Ò"],["Oacute","Ó"],["Ocirc","Ô"],["Otilde","Õ"],["Ouml","Ö"],["times","×"],["Oslash","Ø"],["Ugrave","Ù"],["Uacute","Ú"],["Ucirc","Û"],["Uuml","Ü"],["Yacute","Ý"],["THORN","Þ"],["szlig","ß"],["agrave","à"],["aacute","á"],["acirc","â"],["atilde","ã"],["auml","ä"],["aring","å"],["aelig","æ"],["ccedil","ç"],["egrave","è"],["eacute","é"],["ecirc","ê"],["euml","ë"],["igrave","ì"],["iacute","í"],["icirc","î"],["iuml","ï"],["eth","ð"],["ntilde","ñ"],["ograve","ò"],["oacute","ó"],["ocirc","ô"],["otilde","õ"],["ouml","ö"],["divide","÷"],["oslash","ø"],["ugrave","ù"],["uacute","ú"],["ucirc","û"],["uuml","ü"],["yacute","ý"],["thorn","þ"],["yuml","ÿ"],["OElig","Œ"],["oelig","œ"],["Scaron","Š"],["scaron","š"],["Yuml","Ÿ"],["fnof","ƒ"],["circ","ˆ"],["tilde","˜"],["Alpha","Α"],["Beta","Β"],["Gamma","Γ"],["Delta","Δ"],["Epsilon","Ε"],["Zeta","Ζ"],["Eta","Η"],["Theta","Θ"],["Iota","Ι"],["Kappa","Κ"],["Lambda","Λ"],["Mu","Μ"],["Nu","Ν"],["Xi","Ξ"],["Omicron","Ο"],["Pi","Π"],["Rho","Ρ"],["Sigma","Σ"],["Tau","Τ"],["Upsilon","Υ"],["Phi","Φ"],["Chi","Χ"],["Psi","Ψ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["iota","ι"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["omicron","ο"],["pi","π"],["rho","ρ"],["sigmaf","ς"],["sigma","σ"],["tau","τ"],["upsilon","υ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"],["thetasym","ϑ"],["upsih","ϒ"],["piv","ϖ"],["ensp"," "],["emsp"," "],["thinsp"," "],["zwnj","‌"],["zwj","‍"],["lrm","‎"],["rlm","‏"],["ndash","–"],["mdash","—"],["lsquo","‘"],["rsquo","’"],["sbquo","‚"],["ldquo","“"],["rdquo","”"],["bdquo","„"],["dagger","†"],["Dagger","‡"],["bull","•"],["hellip","…"],["permil","‰"],["prime","′"],["Prime","″"],["lsaquo","‹"],["rsaquo","›"],["oline","‾"],["frasl","⁄"],["euro","€"],["image","ℑ"],["weierp","℘"],["real","ℜ"],["trade","™"],["alefsym","ℵ"],["larr","←"],["uarr","↑"],["rarr","→"],["darr","↓"],["harr","↔"],["crarr","↵"],["lArr","⇐"],["uArr","⇑"],["rArr","⇒"],["dArr","⇓"],["hArr","⇔"],["forall","∀"],["part","∂"],["exist","∃"],["empty","∅"],["nabla","∇"],["isin","∈"],["notin","∉"],["ni","∋"],["prod","∏"],["sum","∑"],["minus","−"],["lowast","∗"],["radic","√"],["prop","∝"],["infin","∞"],["ang","∠"],["and","∧"],["or","∨"],["cap","∩"],["cup","∪"],["int","∫"],["there4","∴"],["sim","∼"],["cong","≅"],["asymp","≈"],["ne","≠"],["equiv","≡"],["le","≤"],["ge","≥"],["sub","⊂"],["sup","⊃"],["nsub","⊄"],["sube","⊆"],["supe","⊇"],["oplus","⊕"],["otimes","⊗"],["perp","⊥"],["sdot","⋅"],["lceil","⌈"],["rceil","⌉"],["lfloor","⌊"],["rfloor","⌋"],["lang","〈"],["rang","〉"],["loz","◊"],["spades","♠"],["clubs","♣"],["hearts","♥"],["diams","♦"]]);function xo(e){const[t,r]=_s(e.jsxPragma||"React.createElement"),[s,i]=_s(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:r,fragmentBase:s,fragmentSuffix:i}}function _s(e){let t=e.indexOf(".");return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}class Ve{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class ft extends Ve{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,r,s,i,a){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.nameManager=i,this.options=a,ft.prototype.__init.call(this),ft.prototype.__init2.call(this),ft.prototype.__init3.call(this),ft.prototype.__init4.call(this),ft.prototype.__init5.call(this),this.jsxPragmaInfo=xo(a),this.isAutomaticRuntime=a.jsxRuntime==="automatic",this.jsxImportSource=a.jsxImportSource||"react"}process(){return this.tokens.matches1(n.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let t="";if(this.filenameVarName&&(t+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[r,s]of Object.entries(this.cjsAutomaticModuleNameResolutions))t+=`var ${s} = require("${r}");`;else{const{createElement:r,...s}=this.esmAutomaticImportNameResolutions;r&&(t+=`import {createElement as ${r}} from "${this.jsxImportSource}";`);const i=Object.entries(s).map(([a,u])=>`${a} as ${u}`).join(", ");if(i){const a=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");t+=`import {${i}} from "${a}";`}}return t}processJSXTag(){const{jsxRole:t,start:r}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(r);this.isAutomaticRuntime&&t!==Ue.KeyAfterPropSpread?this.transformTagToJSXFunc(s,t):this.transformTagToCreateElement(s)}getElementLocationCode(t){return`lineNumber: ${this.getLineNumberForIndex(t)}`}getLineNumberForIndex(t){const r=this.tokens.code;for(;this.lastIndex<t&&this.lastIndex<r.length;)r[this.lastIndex]===`
57
- `&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(t,r){const s=r===Ue.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let i=null;if(this.tokens.matches1(n.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(r);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),i=this.processProps(!0),this.tokens.matches2(n.slash,n.jsxTagEnd))this.tokens.appendCode("}");else if(this.tokens.matches1(n.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(r);else throw new Error("Expected either /> or > at the end of the tag.");i&&this.tokens.appendCode(`, ${i}`)}for(this.options.production||(i===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${s}, ${this.getDevSource(t)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(t){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(n.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(t),!this.tokens.matches2(n.slash,n.jsxTagEnd))if(this.tokens.matches1(n.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(t){return this.options.production?t?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:t}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.base)||t.base}${t.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:t}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.fragmentBase)||t.fragmentBase)+t.fragmentSuffix}}claimAutoImportedFuncInvocation(t,r){const s=this.claimAutoImportedName(t,r);return this.importProcessor?`${s}.call(void 0, `:`${s}(`}claimAutoImportedName(t,r){if(this.importProcessor){const s=this.jsxImportSource+r;return this.cjsAutomaticModuleNameResolutions[s]||(this.cjsAutomaticModuleNameResolutions[s]=this.importProcessor.getFreeIdentifierForPath(s)),`${this.cjsAutomaticModuleNameResolutions[s]}.${t}`}else return this.esmAutomaticImportNameResolutions[t]||(this.esmAutomaticImportNameResolutions[t]=this.nameManager.claimFreeName(`_${t}`)),this.esmAutomaticImportNameResolutions[t]}processTagIntro(){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType||!this.tokens.matches2AtIndex(t-1,n.jsxName,n.jsxName)&&!this.tokens.matches2AtIndex(t-1,n.greaterThan,n.jsxName)&&!this.tokens.matches1AtIndex(t,n.braceL)&&!this.tokens.matches1AtIndex(t,n.jsxTagEnd)&&!this.tokens.matches2AtIndex(t,n.slash,n.jsxTagEnd);)t++;if(t===this.tokens.currentIndex()+1){const r=this.tokens.identifierName();bo(r)&&this.tokens.replaceToken(`'${r}'`)}for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(t){const r=this.options.production?"":`__self: this, __source: ${this.getDevSource(t)}`;if(!this.tokens.matches1(n.jsxName)&&!this.tokens.matches1(n.braceL)){r?this.tokens.appendCode(`, {${r}}`):this.tokens.appendCode(", null");return}this.tokens.appendCode(", {"),this.processProps(!1),r?this.tokens.appendCode(` ${r}}`):this.tokens.appendCode("}")}processProps(t){let r=null;for(;;){if(this.tokens.matches2(n.jsxName,n.eq)){const s=this.tokens.identifierName();if(t&&s==="key"){r!==null&&this.tokens.appendCode(r.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const i=this.tokens.snapshot();this.processPropValue(),r=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(i);continue}else this.processPropName(s),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(n.jsxName)){const s=this.tokens.identifierName();this.processPropName(s),this.tokens.appendCode(": true")}else if(this.tokens.matches1(n.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}return r}processPropName(t){t.includes("-")?this.tokens.replaceToken(`'${t}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(n.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(n.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const t=this.tokens.currentToken(),r=this.tokens.code.slice(t.start+1,t.end-1),s=Is(r),i=C1(r);this.tokens.replaceToken(i+s)}processAutomaticChildrenAndEndProps(t){t===Ue.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(t===Ue.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(t){let r=t;for(;;){if(this.tokens.matches2(n.jsxTagStart,n.slash))return;let s=!1;if(this.tokens.matches1(n.braceL))this.tokens.matches2(n.braceL,n.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(r?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),s=!0);else if(this.tokens.matches1(n.jsxTagStart))this.tokens.appendCode(r?", ":""),this.processJSXTag(),s=!0;else if(this.tokens.matches1(n.jsxText)||this.tokens.matches1(n.jsxEmptyText))s=this.processChildTextElement(r);else throw new Error("Unexpected token when processing JSX children.");s&&(r=!0)}}processChildTextElement(t){const r=this.tokens.currentToken(),s=this.tokens.code.slice(r.start,r.end),i=Is(s),a=E1(s);return a==='""'?(this.tokens.replaceToken(i),!1):(this.tokens.replaceToken(`${t?", ":""}${a}${i}`),!0)}getDevSource(t){return`{fileName: ${this.getFilenameVarName()}, ${t}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function bo(e){const t=e.charCodeAt(0);return t>=p.lowercaseA&&t<=p.lowercaseZ}function E1(e){let t="",r="",s=!1,i=!1;for(let a=0;a<e.length;a++){const u=e[a];if(u===" "||u===" "||u==="\r")s||(r+=u);else if(u===`
58
- `)r="",s=!0;else{if(i&&s&&(t+=" "),t+=r,r="",u==="&"){const{entity:d,newI:h}=yo(e,a+1);a=h-1,t+=d}else t+=u;i=!0,s=!1}}return s||(t+=r),JSON.stringify(t)}function Is(e){let t=0,r=0;for(const s of e)s===`
56
+ `,document.head.appendChild(e)}function al(e){return{tsx:"typescript",ts:"typescript",jsx:"javascript",js:"javascript",html:"html",css:"css",json:"json",md:"markdown",markdown:"markdown",mermaid:"markdown",mmd:"markdown",svg:"xml",csv:"plaintext",tsv:"plaintext",dot:"plaintext",gv:"plaintext",latex:"plaintext",tex:"plaintext",architecture:"xml",arch:"xml",drawio:"xml"}[e]||e}const ol={container:{width:"100%",height:"100%",overflow:"hidden"}};var d;(function(e){e[e.NONE=0]="NONE";const r=1;e[e._abstract=r]="_abstract";const s=r+1;e[e._accessor=s]="_accessor";const i=s+1;e[e._as=i]="_as";const o=i+1;e[e._assert=o]="_assert";const c=o+1;e[e._asserts=c]="_asserts";const u=c+1;e[e._async=u]="_async";const f=u+1;e[e._await=f]="_await";const h=f+1;e[e._checks=h]="_checks";const m=h+1;e[e._constructor=m]="_constructor";const x=m+1;e[e._declare=x]="_declare";const _=x+1;e[e._enum=_]="_enum";const y=_+1;e[e._exports=y]="_exports";const L=y+1;e[e._from=L]="_from";const O=L+1;e[e._get=O]="_get";const F=O+1;e[e._global=F]="_global";const K=F+1;e[e._implements=K]="_implements";const P=K+1;e[e._infer=P]="_infer";const j=P+1;e[e._interface=j]="_interface";const D=j+1;e[e._is=D]="_is";const W=D+1;e[e._keyof=W]="_keyof";const X=W+1;e[e._mixins=X]="_mixins";const q=X+1;e[e._module=q]="_module";const T=q+1;e[e._namespace=T]="_namespace";const B=T+1;e[e._of=B]="_of";const z=B+1;e[e._opaque=z]="_opaque";const ye=z+1;e[e._out=ye]="_out";const De=ye+1;e[e._override=De]="_override";const $e=De+1;e[e._private=$e]="_private";const Oe=$e+1;e[e._protected=Oe]="_protected";const H=Oe+1;e[e._proto=H]="_proto";const ce=H+1;e[e._public=ce]="_public";const xe=ce+1;e[e._readonly=xe]="_readonly";const ee=xe+1;e[e._require=ee]="_require";const Pe=ee+1;e[e._satisfies=Pe]="_satisfies";const Be=Pe+1;e[e._set=Be]="_set";const te=Be+1;e[e._static=te]="_static";const ue=te+1;e[e._symbol=ue]="_symbol";const ke=ue+1;e[e._type=ke]="_type";const Le=ke+1;e[e._unique=Le]="_unique";const b=Le+1;e[e._using=b]="_using"})(d||(d={}));var n;(function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const r=16;e[e.IS_KEYWORD=r]="IS_KEYWORD";const s=32;e[e.IS_ASSIGN=s]="IS_ASSIGN";const i=64;e[e.IS_RIGHT_ASSOCIATIVE=i]="IS_RIGHT_ASSOCIATIVE";const o=128;e[e.IS_PREFIX=o]="IS_PREFIX";const c=256;e[e.IS_POSTFIX=c]="IS_POSTFIX";const u=512;e[e.IS_EXPRESSION_START=u]="IS_EXPRESSION_START";const f=512;e[e.num=f]="num";const h=1536;e[e.bigint=h]="bigint";const m=2560;e[e.decimal=m]="decimal";const x=3584;e[e.regexp=x]="regexp";const _=4608;e[e.string=_]="string";const y=5632;e[e.name=y]="name";const L=6144;e[e.eof=L]="eof";const O=7680;e[e.bracketL=O]="bracketL";const F=8192;e[e.bracketR=F]="bracketR";const K=9728;e[e.braceL=K]="braceL";const P=10752;e[e.braceBarL=P]="braceBarL";const j=11264;e[e.braceR=j]="braceR";const D=12288;e[e.braceBarR=D]="braceBarR";const W=13824;e[e.parenL=W]="parenL";const X=14336;e[e.parenR=X]="parenR";const q=15360;e[e.comma=q]="comma";const T=16384;e[e.semi=T]="semi";const B=17408;e[e.colon=B]="colon";const z=18432;e[e.doubleColon=z]="doubleColon";const ye=19456;e[e.dot=ye]="dot";const De=20480;e[e.question=De]="question";const $e=21504;e[e.questionDot=$e]="questionDot";const Oe=22528;e[e.arrow=Oe]="arrow";const H=23552;e[e.template=H]="template";const ce=24576;e[e.ellipsis=ce]="ellipsis";const xe=25600;e[e.backQuote=xe]="backQuote";const ee=27136;e[e.dollarBraceL=ee]="dollarBraceL";const Pe=27648;e[e.at=Pe]="at";const Be=29184;e[e.hash=Be]="hash";const te=29728;e[e.eq=te]="eq";const ue=30752;e[e.assign=ue]="assign";const ke=32640;e[e.preIncDec=ke]="preIncDec";const Le=33664;e[e.postIncDec=Le]="postIncDec";const b=34432;e[e.bang=b]="bang";const S=35456;e[e.tilde=S]="tilde";const C=35841;e[e.pipeline=C]="pipeline";const A=36866;e[e.nullishCoalescing=A]="nullishCoalescing";const M=37890;e[e.logicalOR=M]="logicalOR";const Y=38915;e[e.logicalAND=Y]="logicalAND";const Z=39940;e[e.bitwiseOR=Z]="bitwiseOR";const le=40965;e[e.bitwiseXOR=le]="bitwiseXOR";const we=41990;e[e.bitwiseAND=we]="bitwiseAND";const oe=43015;e[e.equality=oe]="equality";const Ne=44040;e[e.lessThan=Ne]="lessThan";const Ee=45064;e[e.greaterThan=Ee]="greaterThan";const ve=46088;e[e.relationalOrEqual=ve]="relationalOrEqual";const qe=47113;e[e.bitShiftL=qe]="bitShiftL";const Me=48137;e[e.bitShiftR=Me]="bitShiftR";const nt=49802;e[e.plus=nt]="plus";const Dt=50826;e[e.minus=Dt]="minus";const Ot=51723;e[e.modulo=Ot]="modulo";const lr=52235;e[e.star=lr]="star";const ur=53259;e[e.slash=ur]="slash";const ut=54348;e[e.exponent=ut]="exponent";const je=55296;e[e.jsxName=je]="jsxName";const Tt=56320;e[e.jsxText=Tt]="jsxText";const Ze=57344;e[e.jsxEmptyText=Ze]="jsxEmptyText";const pr=58880;e[e.jsxTagStart=pr]="jsxTagStart";const Mt=59392;e[e.jsxTagEnd=Mt]="jsxTagEnd";const jt=60928;e[e.typeParameterStart=jt]="typeParameterStart";const Cr=61440;e[e.nonNullAssertion=Cr]="nonNullAssertion";const Ft=62480;e[e._break=Ft]="_break";const Tr=63504;e[e._case=Tr]="_case";const hr=64528;e[e._catch=hr]="_catch";const fr=65552;e[e._continue=fr]="_continue";const dr=66576;e[e._debugger=dr]="_debugger";const Ar=67600;e[e._default=Ar]="_default";const Pr=68624;e[e._do=Pr]="_do";const Nr=69648;e[e._else=Nr]="_else";const Xt=70672;e[e._finally=Xt]="_finally";const mr=71696;e[e._for=mr]="_for";const xt=73232;e[e._function=xt]="_function";const Rr=73744;e[e._if=Rr]="_if";const Lr=74768;e[e._return=Lr]="_return";const Dr=75792;e[e._switch=Dr]="_switch";const Yt=77456;e[e._throw=Yt]="_throw";const Or=77840;e[e._try=Or]="_try";const Mr=78864;e[e._var=Mr]="_var";const Q=79888;e[e._let=Q]="_let";const Ie=80912;e[e._const=Ie]="_const";const _e=81936;e[e._while=_e]="_while";const pt=82960;e[e._with=pt]="_with";const kt=84496;e[e._new=kt]="_new";const gr=85520;e[e._this=gr]="_this";const At=86544;e[e._super=At]="_super";const ts=87568;e[e._class=ts]="_class";const rs=88080;e[e._extends=rs]="_extends";const ns=89104;e[e._export=ns]="_export";const ss=90640;e[e._import=ss]="_import";const is=91664;e[e._yield=is]="_yield";const as=92688;e[e._null=as]="_null";const os=93712;e[e._true=os]="_true";const cs=94736;e[e._false=cs]="_false";const ls=95256;e[e._in=ls]="_in";const us=96280;e[e._instanceof=us]="_instanceof";const ps=97936;e[e._typeof=ps]="_typeof";const hs=98960;e[e._void=hs]="_void";const Rc=99984;e[e._delete=Rc]="_delete";const Lc=100880;e[e._async=Lc]="_async";const Dc=101904;e[e._get=Dc]="_get";const Oc=102928;e[e._set=Oc]="_set";const Mc=103952;e[e._declare=Mc]="_declare";const jc=104976;e[e._readonly=jc]="_readonly";const Fc=106e3;e[e._abstract=Fc]="_abstract";const Bc=107024;e[e._static=Bc]="_static";const Vc=107536;e[e._public=Vc]="_public";const $c=108560;e[e._private=$c]="_private";const qc=109584;e[e._protected=qc]="_protected";const Uc=110608;e[e._override=Uc]="_override";const zc=112144;e[e._as=zc]="_as";const Hc=113168;e[e._enum=Hc]="_enum";const Wc=114192;e[e._type=Wc]="_type";const Gc=115216;e[e._implements=Gc]="_implements"})(n||(n={}));function cl(e){switch(e){case n.num:return"num";case n.bigint:return"bigint";case n.decimal:return"decimal";case n.regexp:return"regexp";case n.string:return"string";case n.name:return"name";case n.eof:return"eof";case n.bracketL:return"[";case n.bracketR:return"]";case n.braceL:return"{";case n.braceBarL:return"{|";case n.braceR:return"}";case n.braceBarR:return"|}";case n.parenL:return"(";case n.parenR:return")";case n.comma:return",";case n.semi:return";";case n.colon:return":";case n.doubleColon:return"::";case n.dot:return".";case n.question:return"?";case n.questionDot:return"?.";case n.arrow:return"=>";case n.template:return"template";case n.ellipsis:return"...";case n.backQuote:return"`";case n.dollarBraceL:return"${";case n.at:return"@";case n.hash:return"#";case n.eq:return"=";case n.assign:return"_=";case n.preIncDec:return"++/--";case n.postIncDec:return"++/--";case n.bang:return"!";case n.tilde:return"~";case n.pipeline:return"|>";case n.nullishCoalescing:return"??";case n.logicalOR:return"||";case n.logicalAND:return"&&";case n.bitwiseOR:return"|";case n.bitwiseXOR:return"^";case n.bitwiseAND:return"&";case n.equality:return"==/!=";case n.lessThan:return"<";case n.greaterThan:return">";case n.relationalOrEqual:return"<=/>=";case n.bitShiftL:return"<<";case n.bitShiftR:return">>/>>>";case n.plus:return"+";case n.minus:return"-";case n.modulo:return"%";case n.star:return"*";case n.slash:return"/";case n.exponent:return"**";case n.jsxName:return"jsxName";case n.jsxText:return"jsxText";case n.jsxEmptyText:return"jsxEmptyText";case n.jsxTagStart:return"jsxTagStart";case n.jsxTagEnd:return"jsxTagEnd";case n.typeParameterStart:return"typeParameterStart";case n.nonNullAssertion:return"nonNullAssertion";case n._break:return"break";case n._case:return"case";case n._catch:return"catch";case n._continue:return"continue";case n._debugger:return"debugger";case n._default:return"default";case n._do:return"do";case n._else:return"else";case n._finally:return"finally";case n._for:return"for";case n._function:return"function";case n._if:return"if";case n._return:return"return";case n._switch:return"switch";case n._throw:return"throw";case n._try:return"try";case n._var:return"var";case n._let:return"let";case n._const:return"const";case n._while:return"while";case n._with:return"with";case n._new:return"new";case n._this:return"this";case n._super:return"super";case n._class:return"class";case n._extends:return"extends";case n._export:return"export";case n._import:return"import";case n._yield:return"yield";case n._null:return"null";case n._true:return"true";case n._false:return"false";case n._in:return"in";case n._instanceof:return"instanceof";case n._typeof:return"typeof";case n._void:return"void";case n._delete:return"delete";case n._async:return"async";case n._get:return"get";case n._set:return"set";case n._declare:return"declare";case n._readonly:return"readonly";case n._abstract:return"abstract";case n._static:return"static";case n._public:return"public";case n._private:return"private";case n._protected:return"protected";case n._override:return"override";case n._as:return"as";case n._enum:return"enum";case n._type:return"type";case n._implements:return"implements";default:return""}}let _t=class{constructor(t,r,s){this.startTokenIndex=t,this.endTokenIndex=r,this.isFunctionScope=s}};class ll{constructor(t,r,s,i,o,c,u,f,h,m,x,_,y){this.potentialArrowAt=t,this.noAnonFunctionType=r,this.inDisallowConditionalTypesContext=s,this.tokensLength=i,this.scopesLength=o,this.pos=c,this.type=u,this.contextualKeyword=f,this.start=h,this.end=m,this.isType=x,this.scopeDepth=_,this.error=y}}class We{constructor(){We.prototype.__init.call(this),We.prototype.__init2.call(this),We.prototype.__init3.call(this),We.prototype.__init4.call(this),We.prototype.__init5.call(this),We.prototype.__init6.call(this),We.prototype.__init7.call(this),We.prototype.__init8.call(this),We.prototype.__init9.call(this),We.prototype.__init10.call(this),We.prototype.__init11.call(this),We.prototype.__init12.call(this),We.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=n.eof}__init8(){this.contextualKeyword=d.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new ll(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(t){this.potentialArrowAt=t.potentialArrowAt,this.noAnonFunctionType=t.noAnonFunctionType,this.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,this.tokens.length=t.tokensLength,this.scopes.length=t.scopesLength,this.pos=t.pos,this.type=t.type,this.contextualKeyword=t.contextualKeyword,this.start=t.start,this.end=t.end,this.isType=t.isType,this.scopeDepth=t.scopeDepth,this.error=t.error}}var g;(function(e){e[e.backSpace=8]="backSpace";const r=10;e[e.lineFeed=r]="lineFeed";const s=9;e[e.tab=s]="tab";const i=13;e[e.carriageReturn=i]="carriageReturn";const o=14;e[e.shiftOut=o]="shiftOut";const c=32;e[e.space=c]="space";const u=33;e[e.exclamationMark=u]="exclamationMark";const f=34;e[e.quotationMark=f]="quotationMark";const h=35;e[e.numberSign=h]="numberSign";const m=36;e[e.dollarSign=m]="dollarSign";const x=37;e[e.percentSign=x]="percentSign";const _=38;e[e.ampersand=_]="ampersand";const y=39;e[e.apostrophe=y]="apostrophe";const L=40;e[e.leftParenthesis=L]="leftParenthesis";const O=41;e[e.rightParenthesis=O]="rightParenthesis";const F=42;e[e.asterisk=F]="asterisk";const K=43;e[e.plusSign=K]="plusSign";const P=44;e[e.comma=P]="comma";const j=45;e[e.dash=j]="dash";const D=46;e[e.dot=D]="dot";const W=47;e[e.slash=W]="slash";const X=48;e[e.digit0=X]="digit0";const q=49;e[e.digit1=q]="digit1";const T=50;e[e.digit2=T]="digit2";const B=51;e[e.digit3=B]="digit3";const z=52;e[e.digit4=z]="digit4";const ye=53;e[e.digit5=ye]="digit5";const De=54;e[e.digit6=De]="digit6";const $e=55;e[e.digit7=$e]="digit7";const Oe=56;e[e.digit8=Oe]="digit8";const H=57;e[e.digit9=H]="digit9";const ce=58;e[e.colon=ce]="colon";const xe=59;e[e.semicolon=xe]="semicolon";const ee=60;e[e.lessThan=ee]="lessThan";const Pe=61;e[e.equalsTo=Pe]="equalsTo";const Be=62;e[e.greaterThan=Be]="greaterThan";const te=63;e[e.questionMark=te]="questionMark";const ue=64;e[e.atSign=ue]="atSign";const ke=65;e[e.uppercaseA=ke]="uppercaseA";const Le=66;e[e.uppercaseB=Le]="uppercaseB";const b=67;e[e.uppercaseC=b]="uppercaseC";const S=68;e[e.uppercaseD=S]="uppercaseD";const C=69;e[e.uppercaseE=C]="uppercaseE";const A=70;e[e.uppercaseF=A]="uppercaseF";const M=71;e[e.uppercaseG=M]="uppercaseG";const Y=72;e[e.uppercaseH=Y]="uppercaseH";const Z=73;e[e.uppercaseI=Z]="uppercaseI";const le=74;e[e.uppercaseJ=le]="uppercaseJ";const we=75;e[e.uppercaseK=we]="uppercaseK";const oe=76;e[e.uppercaseL=oe]="uppercaseL";const Ne=77;e[e.uppercaseM=Ne]="uppercaseM";const Ee=78;e[e.uppercaseN=Ee]="uppercaseN";const ve=79;e[e.uppercaseO=ve]="uppercaseO";const qe=80;e[e.uppercaseP=qe]="uppercaseP";const Me=81;e[e.uppercaseQ=Me]="uppercaseQ";const nt=82;e[e.uppercaseR=nt]="uppercaseR";const Dt=83;e[e.uppercaseS=Dt]="uppercaseS";const Ot=84;e[e.uppercaseT=Ot]="uppercaseT";const lr=85;e[e.uppercaseU=lr]="uppercaseU";const ur=86;e[e.uppercaseV=ur]="uppercaseV";const ut=87;e[e.uppercaseW=ut]="uppercaseW";const je=88;e[e.uppercaseX=je]="uppercaseX";const Tt=89;e[e.uppercaseY=Tt]="uppercaseY";const Ze=90;e[e.uppercaseZ=Ze]="uppercaseZ";const pr=91;e[e.leftSquareBracket=pr]="leftSquareBracket";const Mt=92;e[e.backslash=Mt]="backslash";const jt=93;e[e.rightSquareBracket=jt]="rightSquareBracket";const Cr=94;e[e.caret=Cr]="caret";const Ft=95;e[e.underscore=Ft]="underscore";const Tr=96;e[e.graveAccent=Tr]="graveAccent";const hr=97;e[e.lowercaseA=hr]="lowercaseA";const fr=98;e[e.lowercaseB=fr]="lowercaseB";const dr=99;e[e.lowercaseC=dr]="lowercaseC";const Ar=100;e[e.lowercaseD=Ar]="lowercaseD";const Pr=101;e[e.lowercaseE=Pr]="lowercaseE";const Nr=102;e[e.lowercaseF=Nr]="lowercaseF";const Xt=103;e[e.lowercaseG=Xt]="lowercaseG";const mr=104;e[e.lowercaseH=mr]="lowercaseH";const xt=105;e[e.lowercaseI=xt]="lowercaseI";const Rr=106;e[e.lowercaseJ=Rr]="lowercaseJ";const Lr=107;e[e.lowercaseK=Lr]="lowercaseK";const Dr=108;e[e.lowercaseL=Dr]="lowercaseL";const Yt=109;e[e.lowercaseM=Yt]="lowercaseM";const Or=110;e[e.lowercaseN=Or]="lowercaseN";const Mr=111;e[e.lowercaseO=Mr]="lowercaseO";const Q=112;e[e.lowercaseP=Q]="lowercaseP";const Ie=113;e[e.lowercaseQ=Ie]="lowercaseQ";const _e=114;e[e.lowercaseR=_e]="lowercaseR";const pt=115;e[e.lowercaseS=pt]="lowercaseS";const kt=116;e[e.lowercaseT=kt]="lowercaseT";const gr=117;e[e.lowercaseU=gr]="lowercaseU";const At=118;e[e.lowercaseV=At]="lowercaseV";const ts=119;e[e.lowercaseW=ts]="lowercaseW";const rs=120;e[e.lowercaseX=rs]="lowercaseX";const ns=121;e[e.lowercaseY=ns]="lowercaseY";const ss=122;e[e.lowercaseZ=ss]="lowercaseZ";const is=123;e[e.leftCurlyBrace=is]="leftCurlyBrace";const as=124;e[e.verticalBar=as]="verticalBar";const os=125;e[e.rightCurlyBrace=os]="rightCurlyBrace";const cs=126;e[e.tilde=cs]="tilde";const ls=160;e[e.nonBreakingSpace=ls]="nonBreakingSpace";const us=5760;e[e.oghamSpaceMark=us]="oghamSpaceMark";const ps=8232;e[e.lineSeparator=ps]="lineSeparator";const hs=8233;e[e.paragraphSeparator=hs]="paragraphSeparator"})(g||(g={}));let Fn,pe,me,a,N,va;function Xr(){return va++}function ul(e){if("pos"in e){const t=hl(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}class pl{constructor(t,r){this.line=t,this.column=r}}function hl(e){let t=1,r=1;for(let s=0;s<e;s++)N.charCodeAt(s)===g.lineFeed?(t++,r=1):r++;return new pl(t,r)}function fl(e,t,r,s){N=e,a=new We,va=1,Fn=t,pe=r,me=s}function U(e){return a.contextualKeyword===e}function Ws(e){const t=nn();return t.type===n.name&&t.contextualKeyword===e}function Fe(e){return a.contextualKeyword===e&&k(n.name)}function Re(e){Fe(e)||ne()}function tt(){return p(n.eof)||p(n.braceR)||Xe()}function Xe(){const e=a.tokens[a.tokens.length-1],t=e?e.end:0;for(let r=t;r<a.start;r++){const s=N.charCodeAt(r);if(s===g.lineFeed||s===g.carriageReturn||s===8232||s===8233)return!0}return!1}function wa(){const e=Gs();for(let t=a.end;t<e;t++){const r=N.charCodeAt(t);if(r===g.lineFeed||r===g.carriageReturn||r===8232||r===8233)return!0}return!1}function yt(){return k(n.semi)||tt()}function Se(){yt()||ne('Unexpected token, expected ";"')}function v(e){k(e)||ne(`Unexpected token, expected "${cl(e)}"`)}function ne(e="Unexpected token",t=a.start){if(a.error)return;const r=new SyntaxError(e);r.pos=t,a.error=r,a.pos=N.length,re(n.eof)}const _a=[9,11,12,g.space,g.nonBreakingSpace,g.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],ji=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Sa=new Uint8Array(65536);for(const e of _a)Sa[e]=1;function dl(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const dt=new Uint8Array(65536);for(let e=0;e<128;e++)dt[e]=dl(e)?1:0;for(let e=128;e<65536;e++)dt[e]=1;for(const e of _a)dt[e]=0;dt[8232]=0;dt[8233]=0;const rn=dt.slice();for(let e=g.digit0;e<=g.digit9;e++)rn[e]=0;const Fi=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,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,-1,-1,-1,-1,-1,-1,(n._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(n._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function ml(){let e=0,t=0,r=a.pos;for(;r<N.length&&(t=N.charCodeAt(r),!(t<g.lowercaseA||t>g.lowercaseZ));){const i=Fi[e+(t-g.lowercaseA)+1];if(i===-1)break;e=i,r++}const s=Fi[e];if(s>-1&&!dt[t]){a.pos=r,s&1?re(s>>>1):re(n.name,s>>>1);return}for(;r<N.length;){const i=N.charCodeAt(r);if(dt[i])r++;else if(i===g.backslash){if(r+=2,N.charCodeAt(r)===g.leftCurlyBrace){for(;r<N.length&&N.charCodeAt(r)!==g.rightCurlyBrace;)r++;r++}}else if(i===g.atSign&&N.charCodeAt(r+1)===g.atSign)r+=2;else break}a.pos=r,re(n.name)}var G;(function(e){e[e.Access=0]="Access";const r=1;e[e.ExportAccess=r]="ExportAccess";const s=r+1;e[e.TopLevelDeclaration=s]="TopLevelDeclaration";const i=s+1;e[e.FunctionScopedDeclaration=i]="FunctionScopedDeclaration";const o=i+1;e[e.BlockScopedDeclaration=o]="BlockScopedDeclaration";const c=o+1;e[e.ObjectShorthandTopLevelDeclaration=c]="ObjectShorthandTopLevelDeclaration";const u=c+1;e[e.ObjectShorthandFunctionScopedDeclaration=u]="ObjectShorthandFunctionScopedDeclaration";const f=u+1;e[e.ObjectShorthandBlockScopedDeclaration=f]="ObjectShorthandBlockScopedDeclaration";const h=f+1;e[e.ObjectShorthand=h]="ObjectShorthand";const m=h+1;e[e.ImportDeclaration=m]="ImportDeclaration";const x=m+1;e[e.ObjectKey=x]="ObjectKey";const _=x+1;e[e.ImportAccess=_]="ImportAccess"})(G||(G={}));var ft;(function(e){e[e.NoChildren=0]="NoChildren";const r=1;e[e.OneChild=r]="OneChild";const s=r+1;e[e.StaticChildren=s]="StaticChildren";const i=s+1;e[e.KeyAfterPropSpread=i]="KeyAfterPropSpread"})(ft||(ft={}));function Ia(e){const t=e.identifierRole;return t===G.TopLevelDeclaration||t===G.FunctionScopedDeclaration||t===G.BlockScopedDeclaration||t===G.ObjectShorthandTopLevelDeclaration||t===G.ObjectShorthandFunctionScopedDeclaration||t===G.ObjectShorthandBlockScopedDeclaration}function gl(e){const t=e.identifierRole;return t===G.FunctionScopedDeclaration||t===G.BlockScopedDeclaration||t===G.ObjectShorthandFunctionScopedDeclaration||t===G.ObjectShorthandBlockScopedDeclaration}function Ea(e){const t=e.identifierRole;return t===G.TopLevelDeclaration||t===G.ObjectShorthandTopLevelDeclaration||t===G.ImportDeclaration}function xl(e){const t=e.identifierRole;return t===G.TopLevelDeclaration||t===G.BlockScopedDeclaration||t===G.ObjectShorthandTopLevelDeclaration||t===G.ObjectShorthandBlockScopedDeclaration}function kl(e){const t=e.identifierRole;return t===G.FunctionScopedDeclaration||t===G.ObjectShorthandFunctionScopedDeclaration}function bl(e){return e.identifierRole===G.ObjectShorthandTopLevelDeclaration||e.identifierRole===G.ObjectShorthandBlockScopedDeclaration||e.identifierRole===G.ObjectShorthandFunctionScopedDeclaration}let Bn=class{constructor(){this.type=a.type,this.contextualKeyword=a.contextualKeyword,this.start=a.start,this.end=a.end,this.scopeDepth=a.scopeDepth,this.isType=a.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function w(){a.tokens.push(new Bn),Pa()}function Bt(){a.tokens.push(new Bn),a.start=a.pos,Ml()}function yl(){a.type===n.assign&&--a.pos,Ll()}function ae(e){for(let r=a.tokens.length-e;r<a.tokens.length;r++)a.tokens[r].isType=!0;const t=a.isType;return a.isType=!0,t}function ie(e){a.isType=e}function k(e){return p(e)?(w(),!0):!1}function Ca(e){const t=a.isType;a.isType=!0,k(e),a.isType=t}function p(e){return a.type===e}function Te(){const e=a.snapshot();w();const t=a.type;return a.restoreFromSnapshot(e),t}class vl{constructor(t,r){this.type=t,this.contextualKeyword=r}}function nn(){const e=a.snapshot();w();const t=a.type,r=a.contextualKeyword;return a.restoreFromSnapshot(e),new vl(t,r)}function Gs(){return Ta(a.pos)}function Ta(e){ji.lastIndex=e;const t=ji.exec(N);return e+t[0].length}function Aa(){return N.charCodeAt(Gs())}function Pa(){if(Ra(),a.start=a.pos,a.pos>=N.length){const e=a.tokens;e.length>=2&&e[e.length-1].start>=N.length&&e[e.length-2].start>=N.length&&ne("Unexpectedly reached the end of input."),re(n.eof);return}wl(N.charCodeAt(a.pos))}function wl(e){rn[e]||e===g.backslash||e===g.atSign&&N.charCodeAt(a.pos+1)===g.atSign?ml():Oa(e)}function _l(){for(;N.charCodeAt(a.pos)!==g.asterisk||N.charCodeAt(a.pos+1)!==g.slash;)if(a.pos++,a.pos>N.length){ne("Unterminated comment",a.pos-2);return}a.pos+=2}function Na(e){let t=N.charCodeAt(a.pos+=e);if(a.pos<N.length)for(;t!==g.lineFeed&&t!==g.carriageReturn&&t!==g.lineSeparator&&t!==g.paragraphSeparator&&++a.pos<N.length;)t=N.charCodeAt(a.pos)}function Ra(){for(;a.pos<N.length;){const e=N.charCodeAt(a.pos);switch(e){case g.carriageReturn:N.charCodeAt(a.pos+1)===g.lineFeed&&++a.pos;case g.lineFeed:case g.lineSeparator:case g.paragraphSeparator:++a.pos;break;case g.slash:switch(N.charCodeAt(a.pos+1)){case g.asterisk:a.pos+=2,_l();break;case g.slash:Na(2);break;default:return}break;default:if(Sa[e])++a.pos;else return}}}function re(e,t=d.NONE){a.end=a.pos,a.type=e,a.contextualKeyword=t}function Sl(){const e=N.charCodeAt(a.pos+1);if(e>=g.digit0&&e<=g.digit9){Ma(!0);return}e===g.dot&&N.charCodeAt(a.pos+2)===g.dot?(a.pos+=3,re(n.ellipsis)):(++a.pos,re(n.dot))}function Il(){N.charCodeAt(a.pos+1)===g.equalsTo?ge(n.assign,2):ge(n.slash,1)}function El(e){let t=e===g.asterisk?n.star:n.modulo,r=1,s=N.charCodeAt(a.pos+1);e===g.asterisk&&s===g.asterisk&&(r++,s=N.charCodeAt(a.pos+2),t=n.exponent),s===g.equalsTo&&N.charCodeAt(a.pos+2)!==g.greaterThan&&(r++,t=n.assign),ge(t,r)}function Cl(e){const t=N.charCodeAt(a.pos+1);if(t===e){N.charCodeAt(a.pos+2)===g.equalsTo?ge(n.assign,3):ge(e===g.verticalBar?n.logicalOR:n.logicalAND,2);return}if(e===g.verticalBar){if(t===g.greaterThan){ge(n.pipeline,2);return}else if(t===g.rightCurlyBrace&&me){ge(n.braceBarR,2);return}}if(t===g.equalsTo){ge(n.assign,2);return}ge(e===g.verticalBar?n.bitwiseOR:n.bitwiseAND,1)}function Tl(){N.charCodeAt(a.pos+1)===g.equalsTo?ge(n.assign,2):ge(n.bitwiseXOR,1)}function Al(e){const t=N.charCodeAt(a.pos+1);if(t===e){ge(n.preIncDec,2);return}t===g.equalsTo?ge(n.assign,2):e===g.plusSign?ge(n.plus,1):ge(n.minus,1)}function Pl(){const e=N.charCodeAt(a.pos+1);if(e===g.lessThan){if(N.charCodeAt(a.pos+2)===g.equalsTo){ge(n.assign,3);return}a.isType?ge(n.lessThan,1):ge(n.bitShiftL,2);return}e===g.equalsTo?ge(n.relationalOrEqual,2):ge(n.lessThan,1)}function La(){if(a.isType){ge(n.greaterThan,1);return}const e=N.charCodeAt(a.pos+1);if(e===g.greaterThan){const t=N.charCodeAt(a.pos+2)===g.greaterThan?3:2;if(N.charCodeAt(a.pos+t)===g.equalsTo){ge(n.assign,t+1);return}ge(n.bitShiftR,t);return}e===g.equalsTo?ge(n.relationalOrEqual,2):ge(n.greaterThan,1)}function Da(){a.type===n.greaterThan&&(a.pos-=1,La())}function Nl(e){const t=N.charCodeAt(a.pos+1);if(t===g.equalsTo){ge(n.equality,N.charCodeAt(a.pos+2)===g.equalsTo?3:2);return}if(e===g.equalsTo&&t===g.greaterThan){a.pos+=2,re(n.arrow);return}ge(e===g.equalsTo?n.eq:n.bang,1)}function Rl(){const e=N.charCodeAt(a.pos+1),t=N.charCodeAt(a.pos+2);e===g.questionMark&&!(me&&a.isType)?t===g.equalsTo?ge(n.assign,3):ge(n.nullishCoalescing,2):e===g.dot&&!(t>=g.digit0&&t<=g.digit9)?(a.pos+=2,re(n.questionDot)):(++a.pos,re(n.question))}function Oa(e){switch(e){case g.numberSign:++a.pos,re(n.hash);return;case g.dot:Sl();return;case g.leftParenthesis:++a.pos,re(n.parenL);return;case g.rightParenthesis:++a.pos,re(n.parenR);return;case g.semicolon:++a.pos,re(n.semi);return;case g.comma:++a.pos,re(n.comma);return;case g.leftSquareBracket:++a.pos,re(n.bracketL);return;case g.rightSquareBracket:++a.pos,re(n.bracketR);return;case g.leftCurlyBrace:me&&N.charCodeAt(a.pos+1)===g.verticalBar?ge(n.braceBarL,2):(++a.pos,re(n.braceL));return;case g.rightCurlyBrace:++a.pos,re(n.braceR);return;case g.colon:N.charCodeAt(a.pos+1)===g.colon?ge(n.doubleColon,2):(++a.pos,re(n.colon));return;case g.questionMark:Rl();return;case g.atSign:++a.pos,re(n.at);return;case g.graveAccent:++a.pos,re(n.backQuote);return;case g.digit0:{const t=N.charCodeAt(a.pos+1);if(t===g.lowercaseX||t===g.uppercaseX||t===g.lowercaseO||t===g.uppercaseO||t===g.lowercaseB||t===g.uppercaseB){Dl();return}}case g.digit1:case g.digit2:case g.digit3:case g.digit4:case g.digit5:case g.digit6:case g.digit7:case g.digit8:case g.digit9:Ma(!1);return;case g.quotationMark:case g.apostrophe:Ol(e);return;case g.slash:Il();return;case g.percentSign:case g.asterisk:El(e);return;case g.verticalBar:case g.ampersand:Cl(e);return;case g.caret:Tl();return;case g.plusSign:case g.dash:Al(e);return;case g.lessThan:Pl();return;case g.greaterThan:La();return;case g.equalsTo:case g.exclamationMark:Nl(e);return;case g.tilde:ge(n.tilde,1);return}ne(`Unexpected character '${String.fromCharCode(e)}'`,a.pos)}function ge(e,t){a.pos+=t,re(e)}function Ll(){const e=a.pos;let t=!1,r=!1;for(;;){if(a.pos>=N.length){ne("Unterminated regular expression",e);return}const s=N.charCodeAt(a.pos);if(t)t=!1;else{if(s===g.leftSquareBracket)r=!0;else if(s===g.rightSquareBracket&&r)r=!1;else if(s===g.slash&&!r)break;t=s===g.backslash}++a.pos}++a.pos,jl(),re(n.regexp)}function gs(){for(;;){const e=N.charCodeAt(a.pos);if(e>=g.digit0&&e<=g.digit9||e===g.underscore)a.pos++;else break}}function Dl(){for(a.pos+=2;;){const t=N.charCodeAt(a.pos);if(t>=g.digit0&&t<=g.digit9||t>=g.lowercaseA&&t<=g.lowercaseF||t>=g.uppercaseA&&t<=g.uppercaseF||t===g.underscore)a.pos++;else break}N.charCodeAt(a.pos)===g.lowercaseN?(++a.pos,re(n.bigint)):re(n.num)}function Ma(e){let t=!1,r=!1;e||gs();let s=N.charCodeAt(a.pos);if(s===g.dot&&(++a.pos,gs(),s=N.charCodeAt(a.pos)),(s===g.uppercaseE||s===g.lowercaseE)&&(s=N.charCodeAt(++a.pos),(s===g.plusSign||s===g.dash)&&++a.pos,gs(),s=N.charCodeAt(a.pos)),s===g.lowercaseN?(++a.pos,t=!0):s===g.lowercaseM&&(++a.pos,r=!0),t){re(n.bigint);return}if(r){re(n.decimal);return}re(n.num)}function Ol(e){for(a.pos++;;){if(a.pos>=N.length){ne("Unterminated string constant");return}const t=N.charCodeAt(a.pos);if(t===g.backslash)a.pos++;else if(t===e)break;a.pos++}a.pos++,re(n.string)}function Ml(){for(;;){if(a.pos>=N.length){ne("Unterminated template");return}const e=N.charCodeAt(a.pos);if(e===g.graveAccent||e===g.dollarSign&&N.charCodeAt(a.pos+1)===g.leftCurlyBrace){if(a.pos===a.start&&p(n.template))if(e===g.dollarSign){a.pos+=2,re(n.dollarBraceL);return}else{++a.pos,re(n.backQuote);return}re(n.template);return}e===g.backslash&&a.pos++,a.pos++}}function jl(){for(;a.pos<N.length;){const e=N.charCodeAt(a.pos);if(dt[e])a.pos++;else if(e===g.backslash){if(a.pos+=2,N.charCodeAt(a.pos)===g.leftCurlyBrace){for(;a.pos<N.length&&N.charCodeAt(a.pos)!==g.rightCurlyBrace;)a.pos++;a.pos++}}else break}}function Yr(e,t=e.currentIndex()){let r=t+1;if(dn(e,r)){const s=e.identifierNameAtIndex(t);return{isType:!1,leftName:s,rightName:s,endIndex:r}}if(r++,dn(e,r))return{isType:!0,leftName:null,rightName:null,endIndex:r};if(r++,dn(e,r))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:r};if(r++,dn(e,r))return{isType:!0,leftName:null,rightName:null,endIndex:r};throw new Error(`Unexpected import/export specifier at ${t}`)}function dn(e,t){const r=e.tokens[t];return r.type===n.braceR||r.type===n.comma}const Fl=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["iexcl","¡"],["cent","¢"],["pound","£"],["curren","¤"],["yen","¥"],["brvbar","¦"],["sect","§"],["uml","¨"],["copy","©"],["ordf","ª"],["laquo","«"],["not","¬"],["shy","­"],["reg","®"],["macr","¯"],["deg","°"],["plusmn","±"],["sup2","²"],["sup3","³"],["acute","´"],["micro","µ"],["para","¶"],["middot","·"],["cedil","¸"],["sup1","¹"],["ordm","º"],["raquo","»"],["frac14","¼"],["frac12","½"],["frac34","¾"],["iquest","¿"],["Agrave","À"],["Aacute","Á"],["Acirc","Â"],["Atilde","Ã"],["Auml","Ä"],["Aring","Å"],["AElig","Æ"],["Ccedil","Ç"],["Egrave","È"],["Eacute","É"],["Ecirc","Ê"],["Euml","Ë"],["Igrave","Ì"],["Iacute","Í"],["Icirc","Î"],["Iuml","Ï"],["ETH","Ð"],["Ntilde","Ñ"],["Ograve","Ò"],["Oacute","Ó"],["Ocirc","Ô"],["Otilde","Õ"],["Ouml","Ö"],["times","×"],["Oslash","Ø"],["Ugrave","Ù"],["Uacute","Ú"],["Ucirc","Û"],["Uuml","Ü"],["Yacute","Ý"],["THORN","Þ"],["szlig","ß"],["agrave","à"],["aacute","á"],["acirc","â"],["atilde","ã"],["auml","ä"],["aring","å"],["aelig","æ"],["ccedil","ç"],["egrave","è"],["eacute","é"],["ecirc","ê"],["euml","ë"],["igrave","ì"],["iacute","í"],["icirc","î"],["iuml","ï"],["eth","ð"],["ntilde","ñ"],["ograve","ò"],["oacute","ó"],["ocirc","ô"],["otilde","õ"],["ouml","ö"],["divide","÷"],["oslash","ø"],["ugrave","ù"],["uacute","ú"],["ucirc","û"],["uuml","ü"],["yacute","ý"],["thorn","þ"],["yuml","ÿ"],["OElig","Œ"],["oelig","œ"],["Scaron","Š"],["scaron","š"],["Yuml","Ÿ"],["fnof","ƒ"],["circ","ˆ"],["tilde","˜"],["Alpha","Α"],["Beta","Β"],["Gamma","Γ"],["Delta","Δ"],["Epsilon","Ε"],["Zeta","Ζ"],["Eta","Η"],["Theta","Θ"],["Iota","Ι"],["Kappa","Κ"],["Lambda","Λ"],["Mu","Μ"],["Nu","Ν"],["Xi","Ξ"],["Omicron","Ο"],["Pi","Π"],["Rho","Ρ"],["Sigma","Σ"],["Tau","Τ"],["Upsilon","Υ"],["Phi","Φ"],["Chi","Χ"],["Psi","Ψ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["iota","ι"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["omicron","ο"],["pi","π"],["rho","ρ"],["sigmaf","ς"],["sigma","σ"],["tau","τ"],["upsilon","υ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"],["thetasym","ϑ"],["upsih","ϒ"],["piv","ϖ"],["ensp"," "],["emsp"," "],["thinsp"," "],["zwnj","‌"],["zwj","‍"],["lrm","‎"],["rlm","‏"],["ndash","–"],["mdash","—"],["lsquo","‘"],["rsquo","’"],["sbquo","‚"],["ldquo","“"],["rdquo","”"],["bdquo","„"],["dagger","†"],["Dagger","‡"],["bull","•"],["hellip","…"],["permil","‰"],["prime","′"],["Prime","″"],["lsaquo","‹"],["rsaquo","›"],["oline","‾"],["frasl","⁄"],["euro","€"],["image","ℑ"],["weierp","℘"],["real","ℜ"],["trade","™"],["alefsym","ℵ"],["larr","←"],["uarr","↑"],["rarr","→"],["darr","↓"],["harr","↔"],["crarr","↵"],["lArr","⇐"],["uArr","⇑"],["rArr","⇒"],["dArr","⇓"],["hArr","⇔"],["forall","∀"],["part","∂"],["exist","∃"],["empty","∅"],["nabla","∇"],["isin","∈"],["notin","∉"],["ni","∋"],["prod","∏"],["sum","∑"],["minus","−"],["lowast","∗"],["radic","√"],["prop","∝"],["infin","∞"],["ang","∠"],["and","∧"],["or","∨"],["cap","∩"],["cup","∪"],["int","∫"],["there4","∴"],["sim","∼"],["cong","≅"],["asymp","≈"],["ne","≠"],["equiv","≡"],["le","≤"],["ge","≥"],["sub","⊂"],["sup","⊃"],["nsub","⊄"],["sube","⊆"],["supe","⊇"],["oplus","⊕"],["otimes","⊗"],["perp","⊥"],["sdot","⋅"],["lceil","⌈"],["rceil","⌉"],["lfloor","⌊"],["rfloor","⌋"],["lang","〈"],["rang","〉"],["loz","◊"],["spades","♠"],["clubs","♣"],["hearts","♥"],["diams","♦"]]);function ja(e){const[t,r]=Bi(e.jsxPragma||"React.createElement"),[s,i]=Bi(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:r,fragmentBase:s,fragmentSuffix:i}}function Bi(e){let t=e.indexOf(".");return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}class mt{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class Kt extends mt{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,r,s,i,o){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.nameManager=i,this.options=o,Kt.prototype.__init.call(this),Kt.prototype.__init2.call(this),Kt.prototype.__init3.call(this),Kt.prototype.__init4.call(this),Kt.prototype.__init5.call(this),this.jsxPragmaInfo=ja(o),this.isAutomaticRuntime=o.jsxRuntime==="automatic",this.jsxImportSource=o.jsxImportSource||"react"}process(){return this.tokens.matches1(n.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let t="";if(this.filenameVarName&&(t+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[r,s]of Object.entries(this.cjsAutomaticModuleNameResolutions))t+=`var ${s} = require("${r}");`;else{const{createElement:r,...s}=this.esmAutomaticImportNameResolutions;r&&(t+=`import {createElement as ${r}} from "${this.jsxImportSource}";`);const i=Object.entries(s).map(([o,c])=>`${o} as ${c}`).join(", ");if(i){const o=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");t+=`import {${i}} from "${o}";`}}return t}processJSXTag(){const{jsxRole:t,start:r}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(r);this.isAutomaticRuntime&&t!==ft.KeyAfterPropSpread?this.transformTagToJSXFunc(s,t):this.transformTagToCreateElement(s)}getElementLocationCode(t){return`lineNumber: ${this.getLineNumberForIndex(t)}`}getLineNumberForIndex(t){const r=this.tokens.code;for(;this.lastIndex<t&&this.lastIndex<r.length;)r[this.lastIndex]===`
57
+ `&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(t,r){const s=r===ft.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let i=null;if(this.tokens.matches1(n.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(r);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),i=this.processProps(!0),this.tokens.matches2(n.slash,n.jsxTagEnd))this.tokens.appendCode("}");else if(this.tokens.matches1(n.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(r);else throw new Error("Expected either /> or > at the end of the tag.");i&&this.tokens.appendCode(`, ${i}`)}for(this.options.production||(i===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${s}, ${this.getDevSource(t)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(t){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(n.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(t),!this.tokens.matches2(n.slash,n.jsxTagEnd))if(this.tokens.matches1(n.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(t){return this.options.production?t?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:t}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.base)||t.base}${t.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:t}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.fragmentBase)||t.fragmentBase)+t.fragmentSuffix}}claimAutoImportedFuncInvocation(t,r){const s=this.claimAutoImportedName(t,r);return this.importProcessor?`${s}.call(void 0, `:`${s}(`}claimAutoImportedName(t,r){if(this.importProcessor){const s=this.jsxImportSource+r;return this.cjsAutomaticModuleNameResolutions[s]||(this.cjsAutomaticModuleNameResolutions[s]=this.importProcessor.getFreeIdentifierForPath(s)),`${this.cjsAutomaticModuleNameResolutions[s]}.${t}`}else return this.esmAutomaticImportNameResolutions[t]||(this.esmAutomaticImportNameResolutions[t]=this.nameManager.claimFreeName(`_${t}`)),this.esmAutomaticImportNameResolutions[t]}processTagIntro(){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType||!this.tokens.matches2AtIndex(t-1,n.jsxName,n.jsxName)&&!this.tokens.matches2AtIndex(t-1,n.greaterThan,n.jsxName)&&!this.tokens.matches1AtIndex(t,n.braceL)&&!this.tokens.matches1AtIndex(t,n.jsxTagEnd)&&!this.tokens.matches2AtIndex(t,n.slash,n.jsxTagEnd);)t++;if(t===this.tokens.currentIndex()+1){const r=this.tokens.identifierName();Fa(r)&&this.tokens.replaceToken(`'${r}'`)}for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(t){const r=this.options.production?"":`__self: this, __source: ${this.getDevSource(t)}`;if(!this.tokens.matches1(n.jsxName)&&!this.tokens.matches1(n.braceL)){r?this.tokens.appendCode(`, {${r}}`):this.tokens.appendCode(", null");return}this.tokens.appendCode(", {"),this.processProps(!1),r?this.tokens.appendCode(` ${r}}`):this.tokens.appendCode("}")}processProps(t){let r=null;for(;;){if(this.tokens.matches2(n.jsxName,n.eq)){const s=this.tokens.identifierName();if(t&&s==="key"){r!==null&&this.tokens.appendCode(r.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const i=this.tokens.snapshot();this.processPropValue(),r=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(i);continue}else this.processPropName(s),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(n.jsxName)){const s=this.tokens.identifierName();this.processPropName(s),this.tokens.appendCode(": true")}else if(this.tokens.matches1(n.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}return r}processPropName(t){t.includes("-")?this.tokens.replaceToken(`'${t}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(n.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(n.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const t=this.tokens.currentToken(),r=this.tokens.code.slice(t.start+1,t.end-1),s=Vi(r),i=Vl(r);this.tokens.replaceToken(i+s)}processAutomaticChildrenAndEndProps(t){t===ft.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(t===ft.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(t){let r=t;for(;;){if(this.tokens.matches2(n.jsxTagStart,n.slash))return;let s=!1;if(this.tokens.matches1(n.braceL))this.tokens.matches2(n.braceL,n.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(r?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),s=!0);else if(this.tokens.matches1(n.jsxTagStart))this.tokens.appendCode(r?", ":""),this.processJSXTag(),s=!0;else if(this.tokens.matches1(n.jsxText)||this.tokens.matches1(n.jsxEmptyText))s=this.processChildTextElement(r);else throw new Error("Unexpected token when processing JSX children.");s&&(r=!0)}}processChildTextElement(t){const r=this.tokens.currentToken(),s=this.tokens.code.slice(r.start,r.end),i=Vi(s),o=Bl(s);return o==='""'?(this.tokens.replaceToken(i),!1):(this.tokens.replaceToken(`${t?", ":""}${o}${i}`),!0)}getDevSource(t){return`{fileName: ${this.getFilenameVarName()}, ${t}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function Fa(e){const t=e.charCodeAt(0);return t>=g.lowercaseA&&t<=g.lowercaseZ}function Bl(e){let t="",r="",s=!1,i=!1;for(let o=0;o<e.length;o++){const c=e[o];if(c===" "||c===" "||c==="\r")s||(r+=c);else if(c===`
58
+ `)r="",s=!0;else{if(i&&s&&(t+=" "),t+=r,r="",c==="&"){const{entity:u,newI:f}=Ba(e,o+1);o=f-1,t+=u}else t+=c;i=!0,s=!1}}return s||(t+=r),JSON.stringify(t)}function Vi(e){let t=0,r=0;for(const s of e)s===`
59
59
  `?(t++,r=0):s===" "&&r++;return`
60
- `.repeat(t)+" ".repeat(r)}function C1(e){let t="";for(let r=0;r<e.length;r++){const s=e[r];if(s===`
60
+ `.repeat(t)+" ".repeat(r)}function Vl(e){let t="";for(let r=0;r<e.length;r++){const s=e[r];if(s===`
61
61
  `)if(/\s/.test(e[r+1]))for(t+=" ";r<e.length&&/\s/.test(e[r+1]);)r++;else t+=`
62
- `;else if(s==="&"){const{entity:i,newI:a}=yo(e,r+1);t+=i,r=a-1}else t+=s}return JSON.stringify(t)}function yo(e,t){let r="",s=0,i,a=t;if(e[a]==="#"){let u=10;a++;let d;if(e[a]==="x")for(u=16,a++,d=a;a<e.length&&P1(e.charCodeAt(a));)a++;else for(d=a;a<e.length&&N1(e.charCodeAt(a));)a++;if(e[a]===";"){const h=e.slice(d,a);h&&(a++,i=String.fromCodePoint(parseInt(h,u)))}}else for(;a<e.length&&s++<10;){const u=e[a];if(a++,u===";"){i=A1.get(r);break}r+=u}return i?{entity:i,newI:a}:{entity:"&",newI:t}}function N1(e){return e>=p.digit0&&e<=p.digit9}function P1(e){return e>=p.digit0&&e<=p.digit9||e>=p.lowercaseA&&e<=p.lowercaseF||e>=p.uppercaseA&&e<=p.uppercaseF}function vo(e,t){const r=xo(t),s=new Set;for(let i=0;i<e.tokens.length;i++){const a=e.tokens[i];if(a.type===n.name&&!a.isType&&(a.identifierRole===F.Access||a.identifierRole===F.ObjectShorthand||a.identifierRole===F.ExportAccess)&&!a.shadowsGlobal&&s.add(e.identifierNameForToken(a)),a.type===n.jsxTagStart&&s.add(r.base),a.type===n.jsxTagStart&&i+1<e.tokens.length&&e.tokens[i+1].type===n.jsxTagEnd&&(s.add(r.base),s.add(r.fragmentBase)),a.type===n.jsxName&&a.identifierRole===F.Access){const u=e.identifierNameForToken(a);(!bo(u)||e.tokens[i+1].type===n.dot)&&s.add(e.identifierNameForToken(a))}}return s}class ht{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,r,s,i,a,u,d){this.nameManager=t,this.tokens=r,this.enableLegacyTypeScriptModuleInterop=s,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=u,this.helperManager=d,ht.prototype.__init.call(this),ht.prototype.__init2.call(this),ht.prototype.__init3.call(this),ht.prototype.__init4.call(this),ht.prototype.__init5.call(this)}preprocessTokens(){for(let t=0;t<this.tokens.tokens.length;t++)this.tokens.matches1AtIndex(t,n._import)&&!this.tokens.matches3AtIndex(t,n._import,n.name,n.eq)&&this.preprocessImportAtIndex(t),this.tokens.matches1AtIndex(t,n._export)&&!this.tokens.matches2AtIndex(t,n._export,n.eq)&&this.preprocessExportAtIndex(t);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=vo(this.tokens,this.options);for(const[t,r]of this.importInfoByPath.entries()){if(r.hasBareImport||r.hasStarExport||r.exportStarNames.length>0||r.namedExports.length>0)continue;[...r.defaultNames,...r.wildcardNames,...r.namedImports.map(({localName:i})=>i)].every(i=>this.shouldAutomaticallyElideImportedName(i))&&this.importsToReplace.set(t,"")}}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}generateImportReplacements(){for(const[t,r]of this.importInfoByPath.entries()){const{defaultNames:s,wildcardNames:i,namedImports:a,namedExports:u,exportStarNames:d,hasStarExport:h}=r;if(s.length===0&&i.length===0&&a.length===0&&u.length===0&&d.length===0&&!h){this.importsToReplace.set(t,`require('${t}');`);continue}const f=this.getFreeIdentifierForPath(t);let k;this.enableLegacyTypeScriptModuleInterop?k=f:k=i.length>0?i[0]:this.getFreeIdentifierForPath(t);let w=`var ${f} = require('${t}');`;if(i.length>0)for(const C of i){const R=this.enableLegacyTypeScriptModuleInterop?f:`${this.helperManager.getHelperName("interopRequireWildcard")}(${f})`;w+=` var ${C} = ${R};`}else d.length>0&&k!==f?w+=` var ${k} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${f});`:s.length>0&&k!==f&&(w+=` var ${k} = ${this.helperManager.getHelperName("interopRequireDefault")}(${f});`);for(const{importedName:C,localName:R}of u)w+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${f}, '${R}', '${C}');`;for(const C of d)w+=` exports.${C} = ${k};`;h&&(w+=` ${this.helperManager.getHelperName("createStarExport")}(${f});`),this.importsToReplace.set(t,w);for(const C of s)this.identifierReplacements.set(C,`${k}.default`);for(const{importedName:C,localName:R}of a)this.identifierReplacements.set(R,`${f}.${C}`)}}getFreeIdentifierForPath(t){const r=t.split("/"),i=r[r.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${i}`)}preprocessImportAtIndex(t){const r=[],s=[],i=[];if(t++,(this.tokens.matchesContextualAtIndex(t,l._type)||this.tokens.matches1AtIndex(t,n._typeof))&&!this.tokens.matches1AtIndex(t+1,n.comma)&&!this.tokens.matchesContextualAtIndex(t+1,l._from)||this.tokens.matches1AtIndex(t,n.parenL))return;if(this.tokens.matches1AtIndex(t,n.name)&&(r.push(this.tokens.identifierNameAtIndex(t)),t++,this.tokens.matches1AtIndex(t,n.comma)&&t++),this.tokens.matches1AtIndex(t,n.star)&&(t+=2,s.push(this.tokens.identifierNameAtIndex(t)),t++),this.tokens.matches1AtIndex(t,n.braceL)){const d=this.getNamedImports(t+1);t=d.newIndex;for(const h of d.namedImports)h.importedName==="default"?r.push(h.localName):i.push(h)}if(this.tokens.matchesContextualAtIndex(t,l._from)&&t++,!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of import statement.");const a=this.tokens.stringValueAtIndex(t),u=this.getImportInfo(a);u.defaultNames.push(...r),u.wildcardNames.push(...s),u.namedImports.push(...i),r.length===0&&s.length===0&&i.length===0&&(u.hasBareImport=!0)}preprocessExportAtIndex(t){if(this.tokens.matches2AtIndex(t,n._export,n._var)||this.tokens.matches2AtIndex(t,n._export,n._let)||this.tokens.matches2AtIndex(t,n._export,n._const))this.preprocessVarExportAtIndex(t);else if(this.tokens.matches2AtIndex(t,n._export,n._function)||this.tokens.matches2AtIndex(t,n._export,n._class)){const r=this.tokens.identifierNameAtIndex(t+2);this.addExportBinding(r,r)}else if(this.tokens.matches3AtIndex(t,n._export,n.name,n._function)){const r=this.tokens.identifierNameAtIndex(t+3);this.addExportBinding(r,r)}else this.tokens.matches2AtIndex(t,n._export,n.braceL)?this.preprocessNamedExportAtIndex(t):this.tokens.matches2AtIndex(t,n._export,n.star)&&this.preprocessExportStarAtIndex(t)}preprocessVarExportAtIndex(t){let r=0;for(let s=t+2;;s++)if(this.tokens.matches1AtIndex(s,n.braceL)||this.tokens.matches1AtIndex(s,n.dollarBraceL)||this.tokens.matches1AtIndex(s,n.bracketL))r++;else if(this.tokens.matches1AtIndex(s,n.braceR)||this.tokens.matches1AtIndex(s,n.bracketR))r--;else{if(r===0&&!this.tokens.matches1AtIndex(s,n.name))break;if(this.tokens.matches1AtIndex(1,n.eq)){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected = token with an end index.");s=i-1}else{const i=this.tokens.tokens[s];if(oo(i)){const a=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(a,`exports.${a}`)}}}}preprocessNamedExportAtIndex(t){t+=2;const{newIndex:r,namedImports:s}=this.getNamedImports(t);if(t=r,this.tokens.matchesContextualAtIndex(t,l._from))t++;else{for(const{importedName:u,localName:d}of s)this.addExportBinding(u,d);return}if(!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(t);this.getImportInfo(i).namedExports.push(...s)}preprocessExportStarAtIndex(t){let r=null;if(this.tokens.matches3AtIndex(t,n._export,n.star,n._as)?(t+=3,r=this.tokens.identifierNameAtIndex(t),t+=2):t+=3,!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(t),i=this.getImportInfo(s);r!==null?i.exportStarNames.push(r):i.hasStarExport=!0}getNamedImports(t){const r=[];for(;;){if(this.tokens.matches1AtIndex(t,n.braceR)){t++;break}const s=Yt(this.tokens,t);if(t=s.endIndex,s.isType||r.push({importedName:s.leftName,localName:s.rightName}),this.tokens.matches2AtIndex(t,n.comma,n.braceR)){t+=2;break}else if(this.tokens.matches1AtIndex(t,n.braceR)){t++;break}else if(this.tokens.matches1AtIndex(t,n.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[t])}`)}return{newIndex:t,namedImports:r}}getImportInfo(t){const r=this.importInfoByPath.get(t);if(r)return r;const s={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(t,s),s}addExportBinding(t,r){this.exportBindingsByLocalName.has(t)||this.exportBindingsByLocalName.set(t,[]),this.exportBindingsByLocalName.get(t).push(r)}claimImportCode(t){const r=this.importsToReplace.get(t);return this.importsToReplace.set(t,""),r||""}getIdentifierReplacement(t){return this.identifierReplacements.get(t)||null}resolveExportBinding(t){const r=this.exportBindingsByLocalName.get(t);return!r||r.length===0?null:r.map(s=>`exports.${s}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var R1=44,D1=59,Ss="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo=new Uint8Array(64),L1=new Uint8Array(128);for(let e=0;e<Ss.length;e++){const t=Ss.charCodeAt(e);wo[e]=t,L1[t]=e}function zt(e,t,r){let s=t-r;s=s<0?-s<<1|1:s<<1;do{let i=s&31;s>>>=5,s>0&&(i|=32),e.write(wo[i])}while(s>0);return t}var Ts=1024*16,As=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}},j1=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Ts)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===Ts&&(this.out+=As.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:r}=this;return r>0?t+As.decode(e.subarray(0,r)):t}};function O1(e){const t=new j1;let r=0,s=0,i=0,a=0;for(let u=0;u<e.length;u++){const d=e[u];if(u>0&&t.write(D1),d.length===0)continue;let h=0;for(let f=0;f<d.length;f++){const k=d[f];f>0&&t.write(R1),h=zt(t,k[0],h),k.length!==1&&(r=zt(t,k[1],r),s=zt(t,k[2],s),i=zt(t,k[3],i),k.length!==4&&(a=zt(t,k[4],a)))}}return t.flush()}var gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},M1={exports:{}};(function(e,t){(function(r,s){e.exports=s()})(gt,function(){const r=/^[\w+.-]+:\/\//,s=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,i=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function a(S){return r.test(S)}function u(S){return S.startsWith("//")}function d(S){return S.startsWith("/")}function h(S){return S.startsWith("file:")}function f(S){return/^[.?#]/.test(S)}function k(S){const N=s.exec(S);return C(N[1],N[2]||"",N[3],N[4]||"",N[5]||"/",N[6]||"",N[7]||"")}function w(S){const N=i.exec(S),v=N[2];return C("file:","",N[1]||"","",d(v)?v:"/"+v,N[3]||"",N[4]||"")}function C(S,N,v,O,U,j,ce){return{scheme:S,user:N,host:v,port:O,path:U,query:j,hash:ce,type:7}}function R(S){if(u(S)){const v=k("http:"+S);return v.scheme="",v.type=6,v}if(d(S)){const v=k("http://foo.com"+S);return v.scheme="",v.host="",v.type=5,v}if(h(S))return w(S);if(a(S))return k(S);const N=k("http://foo.com/"+S);return N.scheme="",N.host="",N.type=S?S.startsWith("?")?3:S.startsWith("#")?2:4:1,N}function q(S){if(S.endsWith("/.."))return S;const N=S.lastIndexOf("/");return S.slice(0,N+1)}function L(S,N){te(N,N.type),S.path==="/"?S.path=N.path:S.path=q(N.path)+S.path}function te(S,N){const v=N<=4,O=S.path.split("/");let U=1,j=0,ce=!1;for(let H=1;H<O.length;H++){const pe=O[H];if(!pe){ce=!0;continue}if(ce=!1,pe!=="."){if(pe===".."){j?(ce=!0,j--,U--):v&&(O[U++]=pe);continue}O[U++]=pe,j++}}let V="";for(let H=1;H<U;H++)V+="/"+O[H];(!V||ce&&!V.endsWith("/.."))&&(V+="/"),S.path=V}function Z(S,N){if(!S&&!N)return"";const v=R(S);let O=v.type;if(N&&O!==7){const j=R(N),ce=j.type;switch(O){case 1:v.hash=j.hash;case 2:v.query=j.query;case 3:case 4:L(v,j);case 5:v.user=j.user,v.host=j.host,v.port=j.port;case 6:v.scheme=j.scheme}ce>O&&(O=ce)}te(v,O);const U=v.query+v.hash;switch(O){case 2:case 3:return U;case 4:{const j=v.path.slice(1);return j?f(N||S)&&!f(j)?"./"+j+U:j+U:U||"."}case 5:return v.path+U;default:return v.scheme+"//"+v.user+v.host+v.port+v.path+U}}return Z})})(M1);var kr=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function F1(e,t){return e._indexes[t]}function $1(e,t){const r=F1(e,t);if(r!==void 0)return r;const{array:s,_indexes:i}=e,a=s.push(t);return i[t]=a-1}var B1=0,z1=1,q1=2,U1=3,H1=4,_o=-1,V1=class{constructor({file:e,sourceRoot:t}={}){this._names=new kr,this._sources=new kr,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new kr}};var xr=(e,t,r,s,i,a,u,d)=>X1(!0,e,t,r,s,i,a);function W1(e){const{_mappings:t,_sources:r,_sourcesContent:s,_names:i,_ignoreList:a}=e;return Q1(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:r.array,sourcesContent:s,mappings:t,ignoreList:a.array}}function G1(e){const t=W1(e);return Object.assign({},t,{mappings:O1(t.mappings)})}function X1(e,t,r,s,i,a,u,d,h){const{_mappings:f,_sources:k,_sourcesContent:w,_names:C}=t,R=J1(f,r),q=Y1(R,s);if(!i)return K1(R,q)?void 0:Es(R,q,[s]);const L=$1(k,i),te=_o;if(L===w.length&&(w[L]=null),!Z1(R,q,L,a,u,te))return Es(R,q,[s,L,a,u])}function J1(e,t){for(let r=e.length;r<=t;r++)e[r]=[];return e[t]}function Y1(e,t){let r=e.length;for(let s=r-1;s>=0;r=s--){const i=e[s];if(t>=i[B1])break}return r}function Es(e,t,r){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=r}function Q1(e){const{length:t}=e;let r=t;for(let s=r-1;s>=0&&!(e[s].length>0);r=s,s--);r<t&&(e.length=r)}function K1(e,t){return t===0?!0:e[t-1].length===1}function Z1(e,t,r,s,i,a){if(t===0)return!1;const u=e[t-1];return u.length===1?!1:r===u[z1]&&s===u[q1]&&i===u[U1]&&a===(u.length===5?u[H1]:_o)}function ec({code:e,mappings:t},r,s,i,a){const u=tc(i,a),d=new V1({file:s.compiledFilename});let h=0,f=t[0];for(;f===void 0&&h<t.length-1;)h++,f=t[h];let k=0,w=0;f!==w&&xr(d,k,0,r,k,0);for(let L=0;L<e.length;L++){if(L===f){const te=f-w,Z=u[h];for(xr(d,k,te,r,k,Z);(f===L||f===void 0)&&h<t.length-1;)h++,f=t[h]}e.charCodeAt(L)===p.lineFeed&&(k++,w=L+1,f!==w&&xr(d,k,0,r,k,0))}const{sourceRoot:C,sourcesContent:R,...q}=G1(d);return q}function tc(e,t){const r=new Array(t.length);let s=0,i=t[s].start,a=0;for(let u=0;u<e.length;u++)u===i&&(r[s]=i-a,s++,i=t[s].start),e.charCodeAt(u)===p.lineFeed&&(a=u+1);return r}const nc={require:`
62
+ `;else if(s==="&"){const{entity:i,newI:o}=Ba(e,r+1);t+=i,r=o-1}else t+=s}return JSON.stringify(t)}function Ba(e,t){let r="",s=0,i,o=t;if(e[o]==="#"){let c=10;o++;let u;if(e[o]==="x")for(c=16,o++,u=o;o<e.length&&ql(e.charCodeAt(o));)o++;else for(u=o;o<e.length&&$l(e.charCodeAt(o));)o++;if(e[o]===";"){const f=e.slice(u,o);f&&(o++,i=String.fromCodePoint(parseInt(f,c)))}}else for(;o<e.length&&s++<10;){const c=e[o];if(o++,c===";"){i=Fl.get(r);break}r+=c}return i?{entity:i,newI:o}:{entity:"&",newI:t}}function $l(e){return e>=g.digit0&&e<=g.digit9}function ql(e){return e>=g.digit0&&e<=g.digit9||e>=g.lowercaseA&&e<=g.lowercaseF||e>=g.uppercaseA&&e<=g.uppercaseF}function Va(e,t){const r=ja(t),s=new Set;for(let i=0;i<e.tokens.length;i++){const o=e.tokens[i];if(o.type===n.name&&!o.isType&&(o.identifierRole===G.Access||o.identifierRole===G.ObjectShorthand||o.identifierRole===G.ExportAccess)&&!o.shadowsGlobal&&s.add(e.identifierNameForToken(o)),o.type===n.jsxTagStart&&s.add(r.base),o.type===n.jsxTagStart&&i+1<e.tokens.length&&e.tokens[i+1].type===n.jsxTagEnd&&(s.add(r.base),s.add(r.fragmentBase)),o.type===n.jsxName&&o.identifierRole===G.Access){const c=e.identifierNameForToken(o);(!Fa(c)||e.tokens[i+1].type===n.dot)&&s.add(e.identifierNameForToken(o))}}return s}class Qt{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,r,s,i,o,c,u){this.nameManager=t,this.tokens=r,this.enableLegacyTypeScriptModuleInterop=s,this.options=i,this.isTypeScriptTransformEnabled=o,this.keepUnusedImports=c,this.helperManager=u,Qt.prototype.__init.call(this),Qt.prototype.__init2.call(this),Qt.prototype.__init3.call(this),Qt.prototype.__init4.call(this),Qt.prototype.__init5.call(this)}preprocessTokens(){for(let t=0;t<this.tokens.tokens.length;t++)this.tokens.matches1AtIndex(t,n._import)&&!this.tokens.matches3AtIndex(t,n._import,n.name,n.eq)&&this.preprocessImportAtIndex(t),this.tokens.matches1AtIndex(t,n._export)&&!this.tokens.matches2AtIndex(t,n._export,n.eq)&&this.preprocessExportAtIndex(t);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Va(this.tokens,this.options);for(const[t,r]of this.importInfoByPath.entries()){if(r.hasBareImport||r.hasStarExport||r.exportStarNames.length>0||r.namedExports.length>0)continue;[...r.defaultNames,...r.wildcardNames,...r.namedImports.map(({localName:i})=>i)].every(i=>this.shouldAutomaticallyElideImportedName(i))&&this.importsToReplace.set(t,"")}}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}generateImportReplacements(){for(const[t,r]of this.importInfoByPath.entries()){const{defaultNames:s,wildcardNames:i,namedImports:o,namedExports:c,exportStarNames:u,hasStarExport:f}=r;if(s.length===0&&i.length===0&&o.length===0&&c.length===0&&u.length===0&&!f){this.importsToReplace.set(t,`require('${t}');`);continue}const h=this.getFreeIdentifierForPath(t);let m;this.enableLegacyTypeScriptModuleInterop?m=h:m=i.length>0?i[0]:this.getFreeIdentifierForPath(t);let x=`var ${h} = require('${t}');`;if(i.length>0)for(const _ of i){const y=this.enableLegacyTypeScriptModuleInterop?h:`${this.helperManager.getHelperName("interopRequireWildcard")}(${h})`;x+=` var ${_} = ${y};`}else u.length>0&&m!==h?x+=` var ${m} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${h});`:s.length>0&&m!==h&&(x+=` var ${m} = ${this.helperManager.getHelperName("interopRequireDefault")}(${h});`);for(const{importedName:_,localName:y}of c)x+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${h}, '${y}', '${_}');`;for(const _ of u)x+=` exports.${_} = ${m};`;f&&(x+=` ${this.helperManager.getHelperName("createStarExport")}(${h});`),this.importsToReplace.set(t,x);for(const _ of s)this.identifierReplacements.set(_,`${m}.default`);for(const{importedName:_,localName:y}of o)this.identifierReplacements.set(y,`${h}.${_}`)}}getFreeIdentifierForPath(t){const r=t.split("/"),i=r[r.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${i}`)}preprocessImportAtIndex(t){const r=[],s=[],i=[];if(t++,(this.tokens.matchesContextualAtIndex(t,d._type)||this.tokens.matches1AtIndex(t,n._typeof))&&!this.tokens.matches1AtIndex(t+1,n.comma)&&!this.tokens.matchesContextualAtIndex(t+1,d._from)||this.tokens.matches1AtIndex(t,n.parenL))return;if(this.tokens.matches1AtIndex(t,n.name)&&(r.push(this.tokens.identifierNameAtIndex(t)),t++,this.tokens.matches1AtIndex(t,n.comma)&&t++),this.tokens.matches1AtIndex(t,n.star)&&(t+=2,s.push(this.tokens.identifierNameAtIndex(t)),t++),this.tokens.matches1AtIndex(t,n.braceL)){const u=this.getNamedImports(t+1);t=u.newIndex;for(const f of u.namedImports)f.importedName==="default"?r.push(f.localName):i.push(f)}if(this.tokens.matchesContextualAtIndex(t,d._from)&&t++,!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of import statement.");const o=this.tokens.stringValueAtIndex(t),c=this.getImportInfo(o);c.defaultNames.push(...r),c.wildcardNames.push(...s),c.namedImports.push(...i),r.length===0&&s.length===0&&i.length===0&&(c.hasBareImport=!0)}preprocessExportAtIndex(t){if(this.tokens.matches2AtIndex(t,n._export,n._var)||this.tokens.matches2AtIndex(t,n._export,n._let)||this.tokens.matches2AtIndex(t,n._export,n._const))this.preprocessVarExportAtIndex(t);else if(this.tokens.matches2AtIndex(t,n._export,n._function)||this.tokens.matches2AtIndex(t,n._export,n._class)){const r=this.tokens.identifierNameAtIndex(t+2);this.addExportBinding(r,r)}else if(this.tokens.matches3AtIndex(t,n._export,n.name,n._function)){const r=this.tokens.identifierNameAtIndex(t+3);this.addExportBinding(r,r)}else this.tokens.matches2AtIndex(t,n._export,n.braceL)?this.preprocessNamedExportAtIndex(t):this.tokens.matches2AtIndex(t,n._export,n.star)&&this.preprocessExportStarAtIndex(t)}preprocessVarExportAtIndex(t){let r=0;for(let s=t+2;;s++)if(this.tokens.matches1AtIndex(s,n.braceL)||this.tokens.matches1AtIndex(s,n.dollarBraceL)||this.tokens.matches1AtIndex(s,n.bracketL))r++;else if(this.tokens.matches1AtIndex(s,n.braceR)||this.tokens.matches1AtIndex(s,n.bracketR))r--;else{if(r===0&&!this.tokens.matches1AtIndex(s,n.name))break;if(this.tokens.matches1AtIndex(1,n.eq)){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected = token with an end index.");s=i-1}else{const i=this.tokens.tokens[s];if(Ia(i)){const o=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(o,`exports.${o}`)}}}}preprocessNamedExportAtIndex(t){t+=2;const{newIndex:r,namedImports:s}=this.getNamedImports(t);if(t=r,this.tokens.matchesContextualAtIndex(t,d._from))t++;else{for(const{importedName:c,localName:u}of s)this.addExportBinding(c,u);return}if(!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(t);this.getImportInfo(i).namedExports.push(...s)}preprocessExportStarAtIndex(t){let r=null;if(this.tokens.matches3AtIndex(t,n._export,n.star,n._as)?(t+=3,r=this.tokens.identifierNameAtIndex(t),t+=2):t+=3,!this.tokens.matches1AtIndex(t,n.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(t),i=this.getImportInfo(s);r!==null?i.exportStarNames.push(r):i.hasStarExport=!0}getNamedImports(t){const r=[];for(;;){if(this.tokens.matches1AtIndex(t,n.braceR)){t++;break}const s=Yr(this.tokens,t);if(t=s.endIndex,s.isType||r.push({importedName:s.leftName,localName:s.rightName}),this.tokens.matches2AtIndex(t,n.comma,n.braceR)){t+=2;break}else if(this.tokens.matches1AtIndex(t,n.braceR)){t++;break}else if(this.tokens.matches1AtIndex(t,n.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[t])}`)}return{newIndex:t,namedImports:r}}getImportInfo(t){const r=this.importInfoByPath.get(t);if(r)return r;const s={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(t,s),s}addExportBinding(t,r){this.exportBindingsByLocalName.has(t)||this.exportBindingsByLocalName.set(t,[]),this.exportBindingsByLocalName.get(t).push(r)}claimImportCode(t){const r=this.importsToReplace.get(t);return this.importsToReplace.set(t,""),r||""}getIdentifierReplacement(t){return this.identifierReplacements.get(t)||null}resolveExportBinding(t){const r=this.exportBindingsByLocalName.get(t);return!r||r.length===0?null:r.map(s=>`exports.${s}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var Ul=44,zl=59,$i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=new Uint8Array(64),Hl=new Uint8Array(128);for(let e=0;e<$i.length;e++){const t=$i.charCodeAt(e);$a[e]=t,Hl[t]=e}function jr(e,t,r){let s=t-r;s=s<0?-s<<1|1:s<<1;do{let i=s&31;s>>>=5,s>0&&(i|=32),e.write($a[i])}while(s>0);return t}var qi=1024*16,Ui=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}},Wl=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(qi)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===qi&&(this.out+=Ui.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:r}=this;return r>0?t+Ui.decode(e.subarray(0,r)):t}};function Gl(e){const t=new Wl;let r=0,s=0,i=0,o=0;for(let c=0;c<e.length;c++){const u=e[c];if(c>0&&t.write(zl),u.length===0)continue;let f=0;for(let h=0;h<u.length;h++){const m=u[h];h>0&&t.write(Ul),f=jr(t,m[0],f),m.length!==1&&(r=jr(t,m[1],r),s=jr(t,m[2],s),i=jr(t,m[3],i),m.length!==4&&(o=jr(t,m[4],o)))}}return t.flush()}var Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xl={exports:{}};(function(e,t){(function(r,s){e.exports=s()})(Zt,function(){const r=/^[\w+.-]+:\/\//,s=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,i=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function o(P){return r.test(P)}function c(P){return P.startsWith("//")}function u(P){return P.startsWith("/")}function f(P){return P.startsWith("file:")}function h(P){return/^[.?#]/.test(P)}function m(P){const j=s.exec(P);return _(j[1],j[2]||"",j[3],j[4]||"",j[5]||"/",j[6]||"",j[7]||"")}function x(P){const j=i.exec(P),D=j[2];return _("file:","",j[1]||"","",u(D)?D:"/"+D,j[3]||"",j[4]||"")}function _(P,j,D,W,X,q,T){return{scheme:P,user:j,host:D,port:W,path:X,query:q,hash:T,type:7}}function y(P){if(c(P)){const D=m("http:"+P);return D.scheme="",D.type=6,D}if(u(P)){const D=m("http://foo.com"+P);return D.scheme="",D.host="",D.type=5,D}if(f(P))return x(P);if(o(P))return m(P);const j=m("http://foo.com/"+P);return j.scheme="",j.host="",j.type=P?P.startsWith("?")?3:P.startsWith("#")?2:4:1,j}function L(P){if(P.endsWith("/.."))return P;const j=P.lastIndexOf("/");return P.slice(0,j+1)}function O(P,j){F(j,j.type),P.path==="/"?P.path=j.path:P.path=L(j.path)+P.path}function F(P,j){const D=j<=4,W=P.path.split("/");let X=1,q=0,T=!1;for(let z=1;z<W.length;z++){const ye=W[z];if(!ye){T=!0;continue}if(T=!1,ye!=="."){if(ye===".."){q?(T=!0,q--,X--):D&&(W[X++]=ye);continue}W[X++]=ye,q++}}let B="";for(let z=1;z<X;z++)B+="/"+W[z];(!B||T&&!B.endsWith("/.."))&&(B+="/"),P.path=B}function K(P,j){if(!P&&!j)return"";const D=y(P);let W=D.type;if(j&&W!==7){const q=y(j),T=q.type;switch(W){case 1:D.hash=q.hash;case 2:D.query=q.query;case 3:case 4:O(D,q);case 5:D.user=q.user,D.host=q.host,D.port=q.port;case 6:D.scheme=q.scheme}T>W&&(W=T)}F(D,W);const X=D.query+D.hash;switch(W){case 2:case 3:return X;case 4:{const q=D.path.slice(1);return q?h(j||P)&&!h(q)?"./"+q+X:q+X:X||"."}case 5:return D.path+X;default:return D.scheme+"//"+D.user+D.host+D.port+D.path+X}}return K})})(Xl);var xs=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function Yl(e,t){return e._indexes[t]}function Kl(e,t){const r=Yl(e,t);if(r!==void 0)return r;const{array:s,_indexes:i}=e,o=s.push(t);return i[t]=o-1}var Ql=0,Jl=1,Zl=2,eu=3,tu=4,qa=-1,ru=class{constructor({file:e,sourceRoot:t}={}){this._names=new xs,this._sources=new xs,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new xs}};var ks=(e,t,r,s,i,o,c,u)=>iu(!0,e,t,r,s,i,o);function nu(e){const{_mappings:t,_sources:r,_sourcesContent:s,_names:i,_ignoreList:o}=e;return cu(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:r.array,sourcesContent:s,mappings:t,ignoreList:o.array}}function su(e){const t=nu(e);return Object.assign({},t,{mappings:Gl(t.mappings)})}function iu(e,t,r,s,i,o,c,u,f){const{_mappings:h,_sources:m,_sourcesContent:x,_names:_}=t,y=au(h,r),L=ou(y,s);if(!i)return lu(y,L)?void 0:zi(y,L,[s]);const O=Kl(m,i),F=qa;if(O===x.length&&(x[O]=null),!uu(y,L,O,o,c,F))return zi(y,L,[s,O,o,c])}function au(e,t){for(let r=e.length;r<=t;r++)e[r]=[];return e[t]}function ou(e,t){let r=e.length;for(let s=r-1;s>=0;r=s--){const i=e[s];if(t>=i[Ql])break}return r}function zi(e,t,r){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=r}function cu(e){const{length:t}=e;let r=t;for(let s=r-1;s>=0&&!(e[s].length>0);r=s,s--);r<t&&(e.length=r)}function lu(e,t){return t===0?!0:e[t-1].length===1}function uu(e,t,r,s,i,o){if(t===0)return!1;const c=e[t-1];return c.length===1?!1:r===c[Jl]&&s===c[Zl]&&i===c[eu]&&o===(c.length===5?c[tu]:qa)}function pu({code:e,mappings:t},r,s,i,o){const c=hu(i,o),u=new ru({file:s.compiledFilename});let f=0,h=t[0];for(;h===void 0&&f<t.length-1;)f++,h=t[f];let m=0,x=0;h!==x&&ks(u,m,0,r,m,0);for(let O=0;O<e.length;O++){if(O===h){const F=h-x,K=c[f];for(ks(u,m,F,r,m,K);(h===O||h===void 0)&&f<t.length-1;)f++,h=t[f]}e.charCodeAt(O)===g.lineFeed&&(m++,x=O+1,h!==x&&ks(u,m,0,r,m,0))}const{sourceRoot:_,sourcesContent:y,...L}=su(u);return L}function hu(e,t){const r=new Array(t.length);let s=0,i=t[s].start,o=0;for(let c=0;c<e.length;c++)c===i&&(r[s]=i-o,s++,i=t[s].start),e.charCodeAt(c)===g.lineFeed&&(o=c+1);return r}const fu={require:`
63
63
  import {createRequire as CREATE_REQUIRE_NAME} from "module";
64
64
  const require = CREATE_REQUIRE_NAME(import.meta.url);
65
65
  `,interopRequireWildcard:`
@@ -168,13 +168,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
168
168
  const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
169
169
  return result == null ? true : result;
170
170
  }
171
- `};class yn{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,yn.prototype.__init.call(this),yn.prototype.__init2.call(this)}getHelperName(t){let r=this.helperNames[t];return r||(r=this.nameManager.claimFreeName(`_${t}`),this.helperNames[t]=r,r)}emitHelpers(){let t="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[r,s]of Object.entries(nc)){const i=this.helperNames[r];let a=s;r==="optionalChainDelete"?a=a.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):r==="asyncOptionalChainDelete"?a=a.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):r==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),a=a.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),i&&(t+=" ",t+=a.replace(r,i).replace(/\s+/g," ").trim())}return t}}function Cs(e,t,r){rc(e,r)&&sc(e,t,r)}function rc(e,t){for(const r of e.tokens)if(r.type===n.name&&!r.isType&&o1(r)&&t.has(e.identifierNameForToken(r)))return!0;return!1}function sc(e,t,r){const s=[];let i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;s.length>0&&s[s.length-1].startTokenIndex===a+1;)s.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)s.push(t[i]),i--;if(a<0)break;const u=e.tokens[a],d=e.identifierNameForToken(u);if(s.length>1&&!u.isType&&u.type===n.name&&r.has(d)){if(i1(u))Ns(s[s.length-1],e,d);else if(a1(u)){let h=s.length-1;for(;h>0&&!s[h].isFunctionScope;)h--;if(h<0)throw new Error("Did not find parent function scope.");Ns(s[h],e,d)}}}if(s.length>0)throw new Error("Expected empty scope stack after processing file.")}function Ns(e,t,r){for(let s=e.startTokenIndex;s<e.endTokenIndex;s++){const i=t.tokens[s];(i.type===n.name||i.type===n.jsxName)&&t.identifierNameForToken(i)===r&&(i.shadowsGlobal=!0)}}function oc(e,t){const r=[];for(const s of t)s.type===n.name&&r.push(e.slice(s.start,s.end));return r}class Fr{__init(){this.usedNames=new Set}constructor(t,r){Fr.prototype.__init.call(this),this.usedNames=new Set(oc(t,r))}claimFreeName(t){const r=this.findFreeName(t);return this.usedNames.add(r),r}findFreeName(t){if(!this.usedNames.has(t))return t;let r=2;for(;this.usedNames.has(t+String(r));)r++;return t+String(r)}}var ue={},Ir={},Xe={},ic=gt&&gt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var a in i)i.hasOwnProperty(a)&&(s[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function s(){this.constructor=t}t.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}}();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.DetailContext=Xe.NoopContext=Xe.VError=void 0;var Io=function(e){ic(t,e);function t(r,s){var i=e.call(this,s)||this;return i.path=r,Object.setPrototypeOf(i,t.prototype),i}return t}(Error);Xe.VError=Io;var ac=function(){function e(){}return e.prototype.fail=function(t,r,s){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(t){},e}();Xe.NoopContext=ac;var So=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(t,r,s){return this._propNames.push(t),this._messages.push(r),this._score+=s,!1},e.prototype.unionResolver=function(){return new cc},e.prototype.resolveUnion=function(t){for(var r,s,i=t,a=null,u=0,d=i.contexts;u<d.length;u++){var h=d[u];(!a||h._score>=a._score)&&(a=h)}a&&a._score>0&&((r=this._propNames).push.apply(r,a._propNames),(s=this._messages).push.apply(s,a._messages))},e.prototype.getError=function(t){for(var r=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];t+=typeof i=="number"?"["+i+"]":i?"."+i:"";var a=this._messages[s];a&&r.push(t+" "+a)}return new Io(t,r.join("; "))},e.prototype.getErrorDetail=function(t){for(var r=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];t+=typeof i=="number"?"["+i+"]":i?"."+i:"";var a=this._messages[s];a&&r.push({path:t,message:a})}for(var u=null,s=r.length-1;s>=0;s--)u&&(r[s].nested=[u]),u=r[s];return u},e}();Xe.DetailContext=So;var cc=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var t=new So;return this.contexts.push(t),t},e}();(function(e){var t=gt&&gt.__extends||function(){var g=function(y,_){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,E){T.__proto__=E}||function(T,E){for(var $ in E)E.hasOwnProperty($)&&(T[$]=E[$])},g(y,_)};return function(y,_){g(y,_);function T(){this.constructor=y}y.prototype=_===null?Object.create(_):(T.prototype=_.prototype,new T)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var r=Xe,s=function(){function g(){}return g}();e.TType=s;function i(g){return typeof g=="string"?u(g):g}function a(g,y){var _=g[y];if(!_)throw new Error("Unknown type "+y);return _}function u(g){return new d(g)}e.name=u;var d=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.name=_,T._failMsg="is not a "+_,T}return y.prototype.getChecker=function(_,T,E){var $=this,B=a(_,this.name),se=B.getChecker(_,T,E);return B instanceof X||B instanceof y?se:function(de,le){return se(de,le)?!0:le.fail(null,$._failMsg,0)}},y}(s);e.TName=d;function h(g){return new f(g)}e.lit=h;var f=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.value=_,T.name=JSON.stringify(_),T._failMsg="is not "+T.name,T}return y.prototype.getChecker=function(_,T){var E=this;return function($,B){return $===E.value?!0:B.fail(null,E._failMsg,-1)}},y}(s);e.TLiteral=f;function k(g){return new w(i(g))}e.array=k;var w=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.ttype=_,T}return y.prototype.getChecker=function(_,T){var E=this.ttype.getChecker(_,T);return function($,B){if(!Array.isArray($))return B.fail(null,"is not an array",0);for(var se=0;se<$.length;se++){var de=E($[se],B);if(!de)return B.fail(se,null,1)}return!0}},y}(s);e.TArray=w;function C(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return new R(g.map(function(_){return i(_)}))}e.tuple=C;var R=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.ttypes=_,T}return y.prototype.getChecker=function(_,T){var E=this.ttypes.map(function(B){return B.getChecker(_,T)}),$=function(B,se){if(!Array.isArray(B))return se.fail(null,"is not an array",0);for(var de=0;de<E.length;de++){var le=E[de](B[de],se);if(!le)return se.fail(de,null,1)}return!0};return T?function(B,se){return $(B,se)?B.length<=E.length?!0:se.fail(E.length,"is extraneous",2):!1}:$},y}(s);e.TTuple=R;function q(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return new L(g.map(function(_){return i(_)}))}e.union=q;var L=function(g){t(y,g);function y(_){var T=g.call(this)||this;T.ttypes=_;var E=_.map(function(B){return B instanceof d||B instanceof f?B.name:null}).filter(function(B){return B}),$=_.length-E.length;return E.length?($>0&&E.push($+" more"),T._failMsg="is none of "+E.join(", ")):T._failMsg="is none of "+$+" types",T}return y.prototype.getChecker=function(_,T){var E=this,$=this.ttypes.map(function(B){return B.getChecker(_,T)});return function(B,se){for(var de=se.unionResolver(),le=0;le<$.length;le++){var Ie=$[le](B,de.createContext());if(Ie)return!0}return se.resolveUnion(de),se.fail(null,E._failMsg,0)}},y}(s);e.TUnion=L;function te(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return new Z(g.map(function(_){return i(_)}))}e.intersection=te;var Z=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.ttypes=_,T}return y.prototype.getChecker=function(_,T){var E=new Set,$=this.ttypes.map(function(B){return B.getChecker(_,T,E)});return function(B,se){var de=$.every(function(le){return le(B,se)});return de?!0:se.fail(null,null,0)}},y}(s);e.TIntersection=Z;function S(g){return new N(g)}e.enumtype=S;var N=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.members=_,T.validValues=new Set,T._failMsg="is not a valid enum value",T.validValues=new Set(Object.keys(_).map(function(E){return _[E]})),T}return y.prototype.getChecker=function(_,T){var E=this;return function($,B){return E.validValues.has($)?!0:B.fail(null,E._failMsg,0)}},y}(s);e.TEnumType=N;function v(g,y){return new O(g,y)}e.enumlit=v;var O=function(g){t(y,g);function y(_,T){var E=g.call(this)||this;return E.enumName=_,E.prop=T,E._failMsg="is not "+_+"."+T,E}return y.prototype.getChecker=function(_,T){var E=this,$=a(_,this.enumName);if(!($ instanceof N))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var B=$.members[this.prop];if(!$.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(se,de){return se===B?!0:de.fail(null,E._failMsg,-1)}},y}(s);e.TEnumLiteral=O;function U(g){return Object.keys(g).map(function(y){return j(y,g[y])})}function j(g,y){return y instanceof pe?new we(g,y.ttype,!0):new we(g,i(y),!1)}function ce(g,y){return new V(g,U(y))}e.iface=ce;var V=function(g){t(y,g);function y(_,T){var E=g.call(this)||this;return E.bases=_,E.props=T,E.propSet=new Set(T.map(function($){return $.name})),E}return y.prototype.getChecker=function(_,T,E){var $=this,B=this.bases.map(function(oe){return a(_,oe).getChecker(_,T)}),se=this.props.map(function(oe){return oe.ttype.getChecker(_,T)}),de=new r.NoopContext,le=this.props.map(function(oe,Ee){return!oe.isOpt&&!se[Ee](void 0,de)}),Ie=function(oe,Ee){if(typeof oe!="object"||oe===null)return Ee.fail(null,"is not an object",0);for(var ve=0;ve<B.length;ve++)if(!B[ve](oe,Ee))return!1;for(var ve=0;ve<se.length;ve++){var Be=$.props[ve].name,tt=oe[Be];if(tt===void 0){if(le[ve])return Ee.fail(Be,"is missing",1)}else{var lt=se[ve](tt,Ee);if(!lt)return Ee.fail(Be,null,1)}}return!0};if(!T)return Ie;var Se=this.propSet;return E&&(this.propSet.forEach(function(oe){return E.add(oe)}),Se=E),function(oe,Ee){if(!Ie(oe,Ee))return!1;for(var ve in oe)if(!Se.has(ve))return Ee.fail(ve,"is extraneous",2);return!0}},y}(s);e.TIface=V;function H(g){return new pe(i(g))}e.opt=H;var pe=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.ttype=_,T}return y.prototype.getChecker=function(_,T){var E=this.ttype.getChecker(_,T);return function($,B){return $===void 0||E($,B)}},y}(s);e.TOptional=pe;var we=function(){function g(y,_,T){this.name=y,this.ttype=_,this.isOpt=T}return g}();e.TProp=we;function he(g){for(var y=[],_=1;_<arguments.length;_++)y[_-1]=arguments[_];return new be(new ge(y),i(g))}e.func=he;var be=function(g){t(y,g);function y(_,T){var E=g.call(this)||this;return E.paramList=_,E.result=T,E}return y.prototype.getChecker=function(_,T){return function(E,$){return typeof E=="function"?!0:$.fail(null,"is not a function",0)}},y}(s);e.TFunc=be;function M(g,y,_){return new ee(g,i(y),!!_)}e.param=M;var ee=function(){function g(y,_,T){this.name=y,this.ttype=_,this.isOpt=T}return g}();e.TParam=ee;var ge=function(g){t(y,g);function y(_){var T=g.call(this)||this;return T.params=_,T}return y.prototype.getChecker=function(_,T){var E=this,$=this.params.map(function(le){return le.ttype.getChecker(_,T)}),B=new r.NoopContext,se=this.params.map(function(le,Ie){return!le.isOpt&&!$[Ie](void 0,B)}),de=function(le,Ie){if(!Array.isArray(le))return Ie.fail(null,"is not an array",0);for(var Se=0;Se<$.length;Se++){var oe=E.params[Se];if(le[Se]===void 0){if(se[Se])return Ie.fail(oe.name,"is missing",1)}else{var Ee=$[Se](le[Se],Ie);if(!Ee)return Ie.fail(oe.name,null,1)}}return!0};return T?function(le,Ie){return de(le,Ie)?le.length<=$.length?!0:Ie.fail($.length,"is extraneous",2):!1}:de},y}(s);e.TParamList=ge;var X=function(g){t(y,g);function y(_,T){var E=g.call(this)||this;return E.validator=_,E.message=T,E}return y.prototype.getChecker=function(_,T){var E=this;return function($,B){return E.validator($)?!0:B.fail(null,E.message,0)}},y}(s);e.BasicType=X,e.basicTypes={any:new X(function(g){return!0},"is invalid"),number:new X(function(g){return typeof g=="number"},"is not a number"),object:new X(function(g){return typeof g=="object"&&g},"is not an object"),boolean:new X(function(g){return typeof g=="boolean"},"is not a boolean"),string:new X(function(g){return typeof g=="string"},"is not a string"),symbol:new X(function(g){return typeof g=="symbol"},"is not a symbol"),void:new X(function(g){return g==null},"is not void"),undefined:new X(function(g){return g===void 0},"is not undefined"),null:new X(function(g){return g===null},"is not null"),never:new X(function(g){return!1},"is unexpected"),Date:new X(Ae("[object Date]"),"is not a Date"),RegExp:new X(Ae("[object RegExp]"),"is not a RegExp")};var _e=Object.prototype.toString;function Ae(g){return function(y){return typeof y=="object"&&y&&_e.call(y)===g}}typeof Buffer<"u"&&(e.basicTypes.Buffer=new X(function(g){return Buffer.isBuffer(g)},"is not a Buffer"));for(var J=function(g){e.basicTypes[g.name]=new X(function(y){return y instanceof g},"is not a "+g.name)},ne=0,fe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];ne<fe.length;ne++){var Re=fe[ne];J(Re)}})(Ir);(function(e){var t=gt&&gt.__spreadArrays||function(){for(var h=0,f=0,k=arguments.length;f<k;f++)h+=arguments[f].length;for(var w=Array(h),C=0,f=0;f<k;f++)for(var R=arguments[f],q=0,L=R.length;q<L;q++,C++)w[C]=R[q];return w};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var r=Ir,s=Xe,i=Ir;Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=Xe;Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function u(){for(var h=[],f=0;f<arguments.length;f++)h[f]=arguments[f];for(var k=Object.assign.apply(Object,t([{},r.basicTypes],h)),w={},C=0,R=h;C<R.length;C++)for(var q=R[C],L=0,te=Object.keys(q);L<te.length;L++){var Z=te[L];w[Z]=new d(k,q[Z])}return w}e.createCheckers=u;var d=function(){function h(f,k,w){if(w===void 0&&(w="value"),this.suite=f,this.ttype=k,this._path=w,this.props=new Map,k instanceof r.TIface)for(var C=0,R=k.props;C<R.length;C++){var q=R[C];this.props.set(q.name,q.ttype)}this.checkerPlain=this.ttype.getChecker(f,!1),this.checkerStrict=this.ttype.getChecker(f,!0)}return h.prototype.setReportedPath=function(f){this._path=f},h.prototype.check=function(f){return this._doCheck(this.checkerPlain,f)},h.prototype.test=function(f){return this.checkerPlain(f,new s.NoopContext)},h.prototype.validate=function(f){return this._doValidate(this.checkerPlain,f)},h.prototype.strictCheck=function(f){return this._doCheck(this.checkerStrict,f)},h.prototype.strictTest=function(f){return this.checkerStrict(f,new s.NoopContext)},h.prototype.strictValidate=function(f){return this._doValidate(this.checkerStrict,f)},h.prototype.getProp=function(f){var k=this.props.get(f);if(!k)throw new Error("Type has no property "+f);return new h(this.suite,k,this._path+"."+f)},h.prototype.methodArgs=function(f){var k=this._getMethod(f);return new h(this.suite,k.paramList)},h.prototype.methodResult=function(f){var k=this._getMethod(f);return new h(this.suite,k.result)},h.prototype.getArgs=function(){if(!(this.ttype instanceof r.TFunc))throw new Error("getArgs() applied to non-function");return new h(this.suite,this.ttype.paramList)},h.prototype.getResult=function(){if(!(this.ttype instanceof r.TFunc))throw new Error("getResult() applied to non-function");return new h(this.suite,this.ttype.result)},h.prototype.getType=function(){return this.ttype},h.prototype._doCheck=function(f,k){var w=new s.NoopContext;if(!f(k,w)){var C=new s.DetailContext;throw f(k,C),C.getError(this._path)}},h.prototype._doValidate=function(f,k){var w=new s.NoopContext;if(f(k,w))return null;var C=new s.DetailContext;return f(k,C),C.getErrorDetail(this._path)},h.prototype._getMethod=function(f){var k=this.props.get(f);if(!k)throw new Error("Type has no property "+f);if(!(k instanceof r.TFunc))throw new Error("Property "+f+" is not a method");return k},h}();e.Checker=d})(ue);const lc=ue.union(ue.lit("jsx"),ue.lit("typescript"),ue.lit("flow"),ue.lit("imports"),ue.lit("react-hot-loader"),ue.lit("jest")),uc=ue.iface([],{compiledFilename:"string"}),pc=ue.iface([],{transforms:ue.array("Transform"),disableESTransforms:ue.opt("boolean"),jsxRuntime:ue.opt(ue.union(ue.lit("classic"),ue.lit("automatic"),ue.lit("preserve"))),production:ue.opt("boolean"),jsxImportSource:ue.opt("string"),jsxPragma:ue.opt("string"),jsxFragmentPragma:ue.opt("string"),keepUnusedImports:ue.opt("boolean"),preserveDynamicImport:ue.opt("boolean"),injectCreateRequireForImportRequire:ue.opt("boolean"),enableLegacyTypeScriptModuleInterop:ue.opt("boolean"),enableLegacyBabel5ModuleInterop:ue.opt("boolean"),sourceMapOptions:ue.opt("SourceMapOptions"),filePath:ue.opt("string")}),dc={Transform:lc,SourceMapOptions:uc,Options:pc},{Options:fc}=ue.createCheckers(dc);function hc(e){fc.strictCheck(e)}function To(){b(),Pe(!1)}function Ao(e){b(),Rn(e)}function ct(e){z(),$r(e)}function vn(){z(),o.tokens[o.tokens.length-1].identifierRole=F.ImportDeclaration}function $r(e){let t;o.scopeDepth===0?t=F.TopLevelDeclaration:e?t=F.BlockScopedDeclaration:t=F.FunctionScopedDeclaration,o.tokens[o.tokens.length-1].identifierRole=t}function Rn(e){switch(o.type){case n._this:{const t=K(0);b(),Q(t);return}case n._yield:case n.name:{o.type=n.name,ct(e);return}case n.bracketL:{b(),Br(n.bracketR,e,!0);return}case n.braceL:Qr(!0,e);return;default:G()}}function Br(e,t,r=!1,s=!1,i=0){let a=!0,u=!1;const d=o.tokens.length;for(;!m(e)&&!o.error;)if(a?a=!1:(x(n.comma),o.tokens[o.tokens.length-1].contextId=i,!u&&o.tokens[d].isType&&(o.tokens[o.tokens.length-1].isType=!0,u=!0)),!(r&&c(n.comma))){if(m(e))break;if(c(n.ellipsis)){Ao(t),Eo(),m(n.comma),x(e);break}else mc(s,t)}}function mc(e,t){e&&zr([l._public,l._protected,l._private,l._readonly,l._override]),wn(t),Eo(),wn(t,!0)}function Eo(){ie?Du():re&&_l()}function wn(e,t=!1){if(t||Rn(e),!m(n.eq))return;const r=o.tokens.length-1;Pe(),o.tokens[r].rhsEndIndex=o.tokens.length}function Sr(){return c(n.name)}function gc(){return c(n.name)||!!(o.type&n.IS_KEYWORD)||c(n.string)||c(n.num)||c(n.bigint)||c(n.decimal)}function Co(){const e=o.snapshot();return b(),(c(n.bracketL)||c(n.braceL)||c(n.star)||c(n.ellipsis)||c(n.hash)||gc())&&!je()?!0:(o.restoreFromSnapshot(e),!1)}function zr(e){for(;No(e)!==null;);}function No(e){if(!c(n.name))return null;const t=o.contextualKeyword;if(e.indexOf(t)!==-1&&Co()){switch(t){case l._readonly:o.tokens[o.tokens.length-1].type=n._readonly;break;case l._abstract:o.tokens[o.tokens.length-1].type=n._abstract;break;case l._static:o.tokens[o.tokens.length-1].type=n._static;break;case l._public:o.tokens[o.tokens.length-1].type=n._public;break;case l._private:o.tokens[o.tokens.length-1].type=n._private;break;case l._protected:o.tokens[o.tokens.length-1].type=n._protected;break;case l._override:o.tokens[o.tokens.length-1].type=n._override;break;case l._declare:o.tokens[o.tokens.length-1].type=n._declare;break}return t}return null}function sn(){for(z();m(n.dot);)z()}function kc(){sn(),!je()&&c(n.lessThan)&&Rt()}function xc(){b(),on()}function bc(){b()}function yc(){x(n._typeof),c(n._import)?Po():sn(),!je()&&c(n.lessThan)&&Rt()}function Po(){x(n._import),x(n.parenL),x(n.string),x(n.parenR),m(n.dot)&&sn(),c(n.lessThan)&&Rt()}function vc(){m(n._const);const e=m(n._in),t=Te(l._out);m(n._const),(e||t)&&!c(n.name)?o.tokens[o.tokens.length-1].type=n.name:z(),m(n._extends)&&xe(),m(n.eq)&&xe()}function yt(){c(n.lessThan)&&Dn()}function Dn(){const e=K(0);for(c(n.lessThan)||c(n.typeParameterStart)?b():G();!m(n.greaterThan)&&!o.error;)vc(),m(n.comma);Q(e)}function qr(e){const t=e===n.arrow;yt(),x(n.parenL),o.scopeDepth++,wc(!1),o.scopeDepth--,(t||c(e))&&Qt(e)}function wc(e){Br(n.parenR,e)}function _n(){m(n.comma)||me()}function Ps(){qr(n.colon),_n()}function _c(){const e=o.snapshot();b();const t=m(n.name)&&c(n.colon);return o.restoreFromSnapshot(e),t}function Ro(){if(!(c(n.bracketL)&&_c()))return!1;const e=K(0);return x(n.bracketL),z(),on(),x(n.bracketR),Pt(),_n(),Q(e),!0}function Rs(e){m(n.question),!e&&(c(n.parenL)||c(n.lessThan))?(qr(n.colon),_n()):(Pt(),_n())}function Ic(){if(c(n.parenL)||c(n.lessThan)){Ps();return}if(c(n._new)){b(),c(n.parenL)||c(n.lessThan)?Ps():Rs(!1);return}const e=!!No([l._readonly]);Ro()||((D(l._get)||D(l._set))&&Co(),Kt(-1),Rs(e))}function Sc(){Do()}function Do(){for(x(n.braceL);!m(n.braceR)&&!o.error;)Ic()}function Tc(){const e=o.snapshot(),t=Ac();return o.restoreFromSnapshot(e),t}function Ac(){return b(),m(n.plus)||m(n.minus)?D(l._readonly):(D(l._readonly)&&b(),!c(n.bracketL)||(b(),!Sr())?!1:(b(),c(n._in)))}function Ec(){z(),x(n._in),xe()}function Cc(){x(n.braceL),c(n.plus)||c(n.minus)?(b(),ye(l._readonly)):Te(l._readonly),x(n.bracketL),Ec(),Te(l._as)&&xe(),x(n.bracketR),c(n.plus)||c(n.minus)?(b(),x(n.question)):m(n.question),Uc(),me(),x(n.braceR)}function Nc(){for(x(n.bracketL);!m(n.bracketR)&&!o.error;)Pc(),m(n.comma)}function Pc(){m(n.ellipsis)?xe():(xe(),m(n.question)),m(n.colon)&&xe()}function Rc(){x(n.parenL),xe(),x(n.parenR)}function Dc(){for(nt(),nt();!c(n.backQuote)&&!o.error;)x(n.dollarBraceL),xe(),nt(),nt();b()}var st;(function(e){e[e.TSFunctionType=0]="TSFunctionType";const r=1;e[e.TSConstructorType=r]="TSConstructorType";const s=r+1;e[e.TSAbstractConstructorType=s]="TSAbstractConstructorType"})(st||(st={}));function br(e){e===st.TSAbstractConstructorType&&ye(l._abstract),(e===st.TSConstructorType||e===st.TSAbstractConstructorType)&&x(n._new);const t=o.inDisallowConditionalTypesContext;o.inDisallowConditionalTypesContext=!1,qr(n.arrow),o.inDisallowConditionalTypesContext=t}function Lc(){switch(o.type){case n.name:kc();return;case n._void:case n._null:b();return;case n.string:case n.num:case n.bigint:case n.decimal:case n._true:case n._false:Nt();return;case n.minus:b(),Nt();return;case n._this:{bc(),D(l._is)&&!je()&&xc();return}case n._typeof:yc();return;case n._import:Po();return;case n.braceL:Tc()?Cc():Sc();return;case n.bracketL:Nc();return;case n.parenL:Rc();return;case n.backQuote:Dc();return;default:if(o.type&n.IS_KEYWORD){b(),o.tokens[o.tokens.length-1].type=n.name;return}break}G()}function jc(){for(Lc();!je()&&m(n.bracketL);)m(n.bracketR)||(xe(),x(n.bracketR))}function Oc(){if(ye(l._infer),z(),c(n._extends)){const e=o.snapshot();x(n._extends);const t=o.inDisallowConditionalTypesContext;o.inDisallowConditionalTypesContext=!0,xe(),o.inDisallowConditionalTypesContext=t,(o.error||!o.inDisallowConditionalTypesContext&&c(n.question))&&o.restoreFromSnapshot(e)}}function Tr(){if(D(l._keyof)||D(l._unique)||D(l._readonly))b(),Tr();else if(D(l._infer))Oc();else{const e=o.inDisallowConditionalTypesContext;o.inDisallowConditionalTypesContext=!1,jc(),o.inDisallowConditionalTypesContext=e}}function Ds(){if(m(n.bitwiseAND),Tr(),c(n.bitwiseAND))for(;m(n.bitwiseAND);)Tr()}function Mc(){if(m(n.bitwiseOR),Ds(),c(n.bitwiseOR))for(;m(n.bitwiseOR);)Ds()}function Fc(){return c(n.lessThan)?!0:c(n.parenL)&&Bc()}function $c(){if(c(n.name)||c(n._this))return b(),!0;if(c(n.braceL)||c(n.bracketL)){let e=1;for(b();e>0&&!o.error;)c(n.braceL)||c(n.bracketL)?e++:(c(n.braceR)||c(n.bracketR))&&e--,b();return!0}return!1}function Bc(){const e=o.snapshot(),t=zc();return o.restoreFromSnapshot(e),t}function zc(){return b(),!!(c(n.parenR)||c(n.ellipsis)||$c()&&(c(n.colon)||c(n.comma)||c(n.question)||c(n.eq)||c(n.parenR)&&(b(),c(n.arrow))))}function Qt(e){const t=K(0);x(e),Hc()||xe(),Q(t)}function qc(){c(n.colon)&&Qt(n.colon)}function Pt(){c(n.colon)&&on()}function Uc(){m(n.colon)&&xe()}function Hc(){const e=o.snapshot();return D(l._asserts)?(b(),Te(l._is)?(xe(),!0):Sr()||c(n._this)?(b(),Te(l._is)&&xe(),!0):(o.restoreFromSnapshot(e),!1)):Sr()||c(n._this)?(b(),D(l._is)&&!je()?(b(),xe(),!0):(o.restoreFromSnapshot(e),!1)):!1}function on(){const e=K(0);x(n.colon),xe(),Q(e)}function xe(){if(Ls(),o.inDisallowConditionalTypesContext||je()||!m(n._extends))return;const e=o.inDisallowConditionalTypesContext;o.inDisallowConditionalTypesContext=!0,Ls(),o.inDisallowConditionalTypesContext=e,x(n.question),xe(),x(n.colon),xe()}function Vc(){return D(l._abstract)&&ke()===n._new}function Ls(){if(Fc()){br(st.TSFunctionType);return}if(c(n._new)){br(st.TSConstructorType);return}else if(Vc()){br(st.TSAbstractConstructorType);return}Mc()}function Wc(){const e=K(1);xe(),x(n.greaterThan),Q(e),an()}function Gc(){if(m(n.jsxTagStart)){o.tokens[o.tokens.length-1].type=n.typeParameterStart;const e=K(1);for(;!c(n.greaterThan)&&!o.error;)xe(),m(n.comma);ze(),Q(e)}}function Lo(){for(;!c(n.braceL)&&!o.error;)Xc(),m(n.comma)}function Xc(){sn(),c(n.lessThan)&&Rt()}function Jc(){ct(!1),yt(),m(n._extends)&&Lo(),Do()}function Yc(){ct(!1),yt(),x(n.eq),xe(),me()}function Qc(){if(c(n.string)?Nt():z(),m(n.eq)){const e=o.tokens.length-1;Pe(),o.tokens[e].rhsEndIndex=o.tokens.length}}function Ur(){for(ct(!1),x(n.braceL);!m(n.braceR)&&!o.error;)Qc(),m(n.comma)}function Hr(){x(n.braceL),Mn(n.braceR)}function Ar(){ct(!1),m(n.dot)?Ar():Hr()}function jo(){D(l._global)?z():c(n.string)?et():G(),c(n.braceL)?Hr():me()}function Er(){vn(),x(n.eq),Zc(),me()}function Kc(){return D(l._require)&&ke()===n.parenL}function Zc(){Kc()?el():sn()}function el(){ye(l._require),x(n.parenL),c(n.string)||G(),Nt(),x(n.parenR)}function tl(){if(Ge())return!1;switch(o.type){case n._function:{const e=K(1);b();const t=o.start;return xt(t,!0),Q(e),!0}case n._class:{const e=K(1);return bt(!0,!1),Q(e),!0}case n._const:if(c(n._const)&&Or(l._enum)){const e=K(1);return x(n._const),ye(l._enum),o.tokens[o.tokens.length-1].type=n._enum,Ur(),Q(e),!0}case n._var:case n._let:{const e=K(1);return gn(o.type!==n._var),Q(e),!0}case n.name:{const e=K(1),t=o.contextualKeyword;let r=!1;return t===l._global?(jo(),r=!0):r=Ln(t,!0),Q(e),r}default:return!1}}function js(){return Ln(o.contextualKeyword,!0)}function nl(e){switch(e){case l._declare:{const t=o.tokens.length-1;if(tl())return o.tokens[t].type=n._declare,!0;break}case l._global:if(c(n.braceL))return Hr(),!0;break;default:return Ln(e,!1)}return!1}function Ln(e,t){switch(e){case l._abstract:if(At(t)&&c(n._class))return o.tokens[o.tokens.length-1].type=n._abstract,bt(!0,!1),!0;break;case l._enum:if(At(t)&&c(n.name))return o.tokens[o.tokens.length-1].type=n._enum,Ur(),!0;break;case l._interface:if(At(t)&&c(n.name)){const r=K(t?2:1);return Jc(),Q(r),!0}break;case l._module:if(At(t)){if(c(n.string)){const r=K(t?2:1);return jo(),Q(r),!0}else if(c(n.name)){const r=K(t?2:1);return Ar(),Q(r),!0}}break;case l._namespace:if(At(t)&&c(n.name)){const r=K(t?2:1);return Ar(),Q(r),!0}break;case l._type:if(At(t)&&c(n.name)){const r=K(t?2:1);return Yc(),Q(r),!0}break}return!1}function At(e){return e?(b(),!0):!Ge()}function rl(){const e=o.snapshot();return Dn(),Dt(),qc(),x(n.arrow),o.error?(o.restoreFromSnapshot(e),!1):(cn(!0),!0)}function Vr(){o.type===n.bitShiftL&&(o.pos-=1,W(n.lessThan)),Rt()}function Rt(){const e=K(0);for(x(n.lessThan);!c(n.greaterThan)&&!o.error;)xe(),m(n.comma);e?(x(n.greaterThan),Q(e)):(Q(e),mo(),x(n.greaterThan),o.tokens[o.tokens.length-1].isType=!0)}function Oo(){if(c(n.name))switch(o.contextualKeyword){case l._abstract:case l._declare:case l._enum:case l._interface:case l._module:case l._namespace:case l._type:return!0}return!1}function sl(e,t){if(c(n.colon)&&Qt(n.colon),!c(n.braceL)&&Ge()){let r=o.tokens.length-1;for(;r>=0&&(o.tokens[r].start>=e||o.tokens[r].type===n._default||o.tokens[r].type===n._export);)o.tokens[r].isType=!0,r--;return}cn(!1,t)}function ol(e,t,r){if(!je()&&m(n.bang)){o.tokens[o.tokens.length-1].type=n.nonNullAssertion;return}if(c(n.lessThan)||c(n.bitShiftL)){const s=o.snapshot();if(!t&&Ho()&&rl())return;if(Vr(),!t&&m(n.parenL)?(o.tokens[o.tokens.length-1].subscriptStartIndex=e,ot()):c(n.backQuote)?Yr():(o.type===n.greaterThan||o.type!==n.parenL&&o.type&n.IS_EXPRESSION_START&&!je())&&G(),o.error)o.restoreFromSnapshot(s);else return}else!t&&c(n.questionDot)&&ke()===n.lessThan&&(b(),o.tokens[e].isOptionalChainStart=!0,o.tokens[o.tokens.length-1].subscriptStartIndex=e,Rt(),x(n.parenL),ot());Gr(e,t,r)}function il(){if(m(n._import))return D(l._type)&&ke()!==n.eq&&ye(l._type),Er(),!0;if(m(n.eq))return Ne(),me(),!0;if(Te(l._as))return ye(l._namespace),z(),me(),!0;if(D(l._type)){const e=ke();(e===n.braceL||e===n.star)&&b()}return!1}function al(){if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-1].identifierRole=F.ImportDeclaration;return}if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-1].identifierRole=F.ImportDeclaration,o.tokens[o.tokens.length-2].isType=!0,o.tokens[o.tokens.length-1].isType=!0;return}if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-3].identifierRole=F.ImportAccess,o.tokens[o.tokens.length-1].identifierRole=F.ImportDeclaration;return}z(),o.tokens[o.tokens.length-3].identifierRole=F.ImportAccess,o.tokens[o.tokens.length-1].identifierRole=F.ImportDeclaration,o.tokens[o.tokens.length-4].isType=!0,o.tokens[o.tokens.length-3].isType=!0,o.tokens[o.tokens.length-2].isType=!0,o.tokens[o.tokens.length-1].isType=!0}function cl(){if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-1].identifierRole=F.ExportAccess;return}if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-1].identifierRole=F.ExportAccess,o.tokens[o.tokens.length-2].isType=!0,o.tokens[o.tokens.length-1].isType=!0;return}if(z(),c(n.comma)||c(n.braceR)){o.tokens[o.tokens.length-3].identifierRole=F.ExportAccess;return}z(),o.tokens[o.tokens.length-3].identifierRole=F.ExportAccess,o.tokens[o.tokens.length-4].isType=!0,o.tokens[o.tokens.length-3].isType=!0,o.tokens[o.tokens.length-2].isType=!0,o.tokens[o.tokens.length-1].isType=!0}function ll(){if(D(l._abstract)&&ke()===n._class)return o.type=n._abstract,b(),bt(!0,!0),!0;if(D(l._interface)){const e=K(2);return Ln(l._interface,!0),Q(e),!0}return!1}function ul(){if(o.type===n._const){const e=rn();if(e.type===n.name&&e.contextualKeyword===l._enum)return x(n._const),ye(l._enum),o.tokens[o.tokens.length-1].type=n._enum,Ur(),!0}return!1}function pl(e){const t=o.tokens.length;zr([l._abstract,l._readonly,l._declare,l._static,l._override]);const r=o.tokens.length;if(Ro()){const i=e?t-1:t;for(let a=i;a<r;a++)o.tokens[a].isType=!0;return!0}return!1}function dl(e){nl(e)||me()}function fl(){const e=Te(l._declare);e&&(o.tokens[o.tokens.length-1].type=n._declare);let t=!1;if(c(n.name))if(e){const r=K(2);t=js(),Q(r)}else t=js();if(!t)if(e){const r=K(2);$e(!0),Q(r)}else $e(!0)}function hl(e){if(e&&(c(n.lessThan)||c(n.bitShiftL))&&Vr(),Te(l._implements)){o.tokens[o.tokens.length-1].type=n._implements;const t=K(1);Lo(),Q(t)}}function ml(){yt()}function gl(){yt()}function kl(){const e=K(0);je()||m(n.bang),Pt(),Q(e)}function xl(){c(n.colon)&&on()}function bl(e,t){return Nn?yl(e,t):vl(e,t)}function yl(e,t){if(!c(n.lessThan))return Je(e,t);const r=o.snapshot();let s=Je(e,t);if(o.error)o.restoreFromSnapshot(r);else return s;return o.type=n.typeParameterStart,Dn(),s=Je(e,t),s||G(),s}function vl(e,t){if(!c(n.lessThan))return Je(e,t);const r=o.snapshot();Dn();const s=Je(e,t);if(s||G(),o.error)o.restoreFromSnapshot(r);else return s;return Je(e,t)}function wl(){if(c(n.colon)){const e=o.snapshot();Qt(n.colon),Fe()&&G(),c(n.arrow)||G(),o.error&&o.restoreFromSnapshot(e)}return m(n.arrow)}function _l(){const e=K(0);m(n.question),Pt(),Q(e)}function Il(){(c(n.lessThan)||c(n.bitShiftL))&&Vr(),ni()}function Sl(){let e=!1,t=!1;for(;;){if(o.pos>=A.length){G("Unterminated JSX contents");return}const r=A.charCodeAt(o.pos);if(r===p.lessThan||r===p.leftCurlyBrace){if(o.pos===o.start){if(r===p.lessThan){o.pos++,W(n.jsxTagStart);return}go(r);return}W(e&&!t?n.jsxEmptyText:n.jsxText);return}r===p.lineFeed?e=!0:r!==p.space&&r!==p.carriageReturn&&r!==p.tab&&(t=!0),o.pos++}}function Tl(e){for(o.pos++;;){if(o.pos>=A.length){G("Unterminated string constant");return}if(A.charCodeAt(o.pos)===e){o.pos++;break}o.pos++}W(n.string)}function Al(){let e;do{if(o.pos>A.length){G("Unexpectedly reached the end of input.");return}e=A.charCodeAt(++o.pos)}while(He[e]||e===p.dash);W(n.jsxName)}function Cr(){ze()}function Mo(e){if(Cr(),!m(n.colon)){o.tokens[o.tokens.length-1].identifierRole=e;return}Cr()}function Fo(){const e=o.tokens.length;Mo(F.Access);let t=!1;for(;c(n.dot);)t=!0,ze(),Cr();if(!t){const r=o.tokens[e],s=A.charCodeAt(r.start);s>=p.lowercaseA&&s<=p.lowercaseZ&&(r.identifierRole=null)}}function El(){switch(o.type){case n.braceL:b(),Ne(),ze();return;case n.jsxTagStart:Bo(),ze();return;case n.string:ze();return;default:G("JSX value should be either an expression or a quoted JSX text")}}function Cl(){x(n.ellipsis),Ne()}function Nl(e){if(c(n.jsxTagEnd))return!1;Fo(),re&&Gc();let t=!1;for(;!c(n.slash)&&!c(n.jsxTagEnd)&&!o.error;){if(m(n.braceL)){t=!0,x(n.ellipsis),Pe(),ze();continue}t&&o.end-o.start===3&&A.charCodeAt(o.start)===p.lowercaseK&&A.charCodeAt(o.start+1)===p.lowercaseE&&A.charCodeAt(o.start+2)===p.lowercaseY&&(o.tokens[e].jsxRole=Ue.KeyAfterPropSpread),Mo(F.ObjectKey),c(n.eq)&&(ze(),El())}const r=c(n.slash);return r&&ze(),r}function Pl(){c(n.jsxTagEnd)||Fo()}function $o(){const e=o.tokens.length-1;o.tokens[e].jsxRole=Ue.NoChildren;let t=0;if(!Nl(e))for(Et();;)switch(o.type){case n.jsxTagStart:if(ze(),c(n.slash)){ze(),Pl(),o.tokens[e].jsxRole!==Ue.KeyAfterPropSpread&&(t===1?o.tokens[e].jsxRole=Ue.OneChild:t>1&&(o.tokens[e].jsxRole=Ue.StaticChildren));return}t++,$o(),Et();break;case n.jsxText:t++,Et();break;case n.jsxEmptyText:Et();break;case n.braceL:b(),c(n.ellipsis)?(Cl(),Et(),t+=2):(c(n.braceR)||(t++,Ne()),Et());break;default:G();return}}function Bo(){ze(),$o()}function ze(){o.tokens.push(new Pn),fo(),o.start=o.pos;const e=A.charCodeAt(o.pos);if(nn[e])Al();else if(e===p.quotationMark||e===p.apostrophe)Tl(e);else switch(++o.pos,e){case p.greaterThan:W(n.jsxTagEnd);break;case p.lessThan:W(n.jsxTagStart);break;case p.slash:W(n.slash);break;case p.equalsTo:W(n.eq);break;case p.leftCurlyBrace:W(n.braceL);break;case p.dot:W(n.dot);break;case p.colon:W(n.colon);break;default:G()}}function Et(){o.tokens.push(new Pn),o.start=o.pos,Sl()}function Rl(e){if(c(n.question)){const t=ke();if(t===n.colon||t===n.comma||t===n.parenR)return}zo(e)}function Dl(){ao(n.question),c(n.colon)&&(re?on():ie&&vt())}class Ll{constructor(t){this.stop=t}}function Ne(e=!1){if(Pe(e),c(n.comma))for(;m(n.comma);)Pe(e)}function Pe(e=!1,t=!1){return re?bl(e,t):ie?$u(e,t):Je(e,t)}function Je(e,t){if(c(n._yield))return Yl(),!1;(c(n.parenL)||c(n.name)||c(n._yield))&&(o.potentialArrowAt=o.start);const r=jl(e);return t&&Jr(),o.type&n.IS_ASSIGN?(b(),Pe(e),!1):r}function jl(e){return Ml(e)?!0:(Ol(e),!1)}function Ol(e){re||ie?Rl(e):zo(e)}function zo(e){m(n.question)&&(Pe(),x(n.colon),Pe(e))}function Ml(e){const t=o.tokens.length;return an()?!0:(hn(t,-1,e),!1)}function hn(e,t,r){if(re&&(n._in&n.PRECEDENCE_MASK)>t&&!je()&&(Te(l._as)||Te(l._satisfies))){const i=K(1);xe(),Q(i),mo(),hn(e,t,r);return}const s=o.type&n.PRECEDENCE_MASK;if(s>0&&(!r||!c(n._in))&&s>t){const i=o.type;b(),i===n.nullishCoalescing&&(o.tokens[o.tokens.length-1].nullishStartIndex=e);const a=o.tokens.length;an(),hn(a,i&n.IS_RIGHT_ASSOCIATIVE?s-1:s,r),i===n.nullishCoalescing&&(o.tokens[e].numNullishCoalesceStarts++,o.tokens[o.tokens.length-1].numNullishCoalesceEnds++),hn(e,t,r)}}function an(){if(re&&!Nn&&m(n.lessThan))return Wc(),!1;if(D(l._module)&&lo()===p.leftCurlyBrace&&!no())return Ql(),!1;if(o.type&n.IS_PREFIX)return b(),an(),!1;if(qo())return!0;for(;o.type&n.IS_POSTFIX&&!Fe();)o.type===n.preIncDec&&(o.type=n.postIncDec),b();return!1}function qo(){const e=o.tokens.length;return et()?!0:(Wr(e),o.tokens.length>e&&o.tokens[e].isOptionalChainStart&&(o.tokens[o.tokens.length-1].isOptionalChainEnd=!0),!1)}function Wr(e,t=!1){ie?zu(e,t):Uo(e,t)}function Uo(e,t=!1){const r=new Ll(!1);do Fl(e,t,r);while(!r.stop&&!o.error)}function Fl(e,t,r){re?ol(e,t,r):ie?vu(e,t,r):Gr(e,t,r)}function Gr(e,t,r){if(!t&&m(n.doubleColon))Xr(),r.stop=!0,Wr(e,t);else if(c(n.questionDot)){if(o.tokens[e].isOptionalChainStart=!0,t&&ke()===n.parenL){r.stop=!0;return}b(),o.tokens[o.tokens.length-1].subscriptStartIndex=e,m(n.bracketL)?(Ne(),x(n.bracketR)):m(n.parenL)?ot():In()}else if(m(n.dot))o.tokens[o.tokens.length-1].subscriptStartIndex=e,In();else if(m(n.bracketL))o.tokens[o.tokens.length-1].subscriptStartIndex=e,Ne(),x(n.bracketR);else if(!t&&c(n.parenL))if(Ho()){const s=o.snapshot(),i=o.tokens.length;b(),o.tokens[o.tokens.length-1].subscriptStartIndex=e;const a=Jt();o.tokens[o.tokens.length-1].contextId=a,ot(),o.tokens[o.tokens.length-1].contextId=a,$l()&&(o.restoreFromSnapshot(s),r.stop=!0,o.scopeDepth++,Dt(),Bl(i))}else{b(),o.tokens[o.tokens.length-1].subscriptStartIndex=e;const s=Jt();o.tokens[o.tokens.length-1].contextId=s,ot(),o.tokens[o.tokens.length-1].contextId=s}else c(n.backQuote)?Yr():r.stop=!0}function Ho(){return o.tokens[o.tokens.length-1].contextualKeyword===l._async&&!Fe()}function ot(){let e=!0;for(;!m(n.parenR)&&!o.error;){if(e)e=!1;else if(x(n.comma),m(n.parenR))break;Xo(!1)}}function $l(){return c(n.colon)||c(n.arrow)}function Bl(e){re?xl():ie&&Fu(),x(n.arrow),Zt(e)}function Xr(){const e=o.tokens.length;et(),Wr(e,!0)}function et(){if(m(n.modulo))return z(),!1;if(c(n.jsxText)||c(n.jsxEmptyText))return Nt(),!1;if(c(n.lessThan)&&Nn)return o.type=n.jsxTagStart,Bo(),b(),!1;const e=o.potentialArrowAt===o.start;switch(o.type){case n.slash:case n.assign:l1();case n._super:case n._this:case n.regexp:case n.num:case n.bigint:case n.decimal:case n.string:case n._null:case n._true:case n._false:return b(),!1;case n._import:return b(),c(n.dot)&&(o.tokens[o.tokens.length-1].type=n.name,b(),z()),!1;case n.name:{const t=o.tokens.length,r=o.start,s=o.contextualKeyword;return z(),s===l._await?(Jl(),!1):s===l._async&&c(n._function)&&!Fe()?(b(),xt(r,!1),!1):e&&s===l._async&&!Fe()&&c(n.name)?(o.scopeDepth++,ct(!1),x(n.arrow),Zt(t),!0):c(n._do)&&!Fe()?(b(),it(),!1):e&&!Fe()&&c(n.arrow)?(o.scopeDepth++,$r(!1),x(n.arrow),Zt(t),!0):(o.tokens[o.tokens.length-1].identifierRole=F.Access,!1)}case n._do:return b(),it(),!1;case n.parenL:return Vo(e);case n.bracketL:return b(),Go(n.bracketR,!0),!1;case n.braceL:return Qr(!1,!1),!1;case n._function:return zl(),!1;case n.at:is();case n._class:return bt(!1),!1;case n._new:return Ul(),!1;case n.backQuote:return Yr(),!1;case n.doubleColon:return b(),Xr(),!1;case n.hash:{const t=lo();return nn[t]||t===p.backslash?In():b(),!1}default:return G(),!1}}function In(){m(n.hash),z()}function zl(){const e=o.start;z(),m(n.dot)&&z(),xt(e,!1)}function Nt(){b()}function jn(){x(n.parenL),Ne(),x(n.parenR)}function Vo(e){const t=o.snapshot(),r=o.tokens.length;x(n.parenL);let s=!0;for(;!c(n.parenR)&&!o.error;){if(s)s=!1;else if(x(n.comma),c(n.parenR))break;if(c(n.ellipsis)){Ao(!1),Jr();break}else Pe(!1,!0)}return x(n.parenR),e&&ql()&&Nr()?(o.restoreFromSnapshot(t),o.scopeDepth++,Dt(),Nr(),Zt(r),o.error?(o.restoreFromSnapshot(t),Vo(!1),!1):!0):!1}function ql(){return c(n.colon)||!Fe()}function Nr(){return re?wl():ie?Bu():m(n.arrow)}function Jr(){(re||ie)&&Dl()}function Ul(){if(x(n._new),m(n.dot)){z();return}Hl(),ie&&wu(),m(n.parenL)&&Go(n.parenR)}function Hl(){Xr(),m(n.questionDot)}function Yr(){for(nt(),nt();!c(n.backQuote)&&!o.error;)x(n.dollarBraceL),Ne(),nt(),nt();b()}function Qr(e,t){const r=Jt();let s=!0;for(b(),o.tokens[o.tokens.length-1].contextId=r;!m(n.braceR)&&!o.error;){if(s)s=!1;else if(x(n.comma),m(n.braceR))break;let i=!1;if(c(n.ellipsis)){const a=o.tokens.length;if(To(),e&&(o.tokens.length===a+2&&$r(t),m(n.braceR)))break;continue}e||(i=m(n.star)),!e&&D(l._async)?(i&&G(),z(),c(n.colon)||c(n.parenL)||c(n.braceR)||c(n.eq)||c(n.comma)||(c(n.star)&&(b(),i=!0),Kt(r))):Kt(r),Xl(e,t,r)}o.tokens[o.tokens.length-1].contextId=r}function Vl(e){return!e&&(c(n.string)||c(n.num)||c(n.bracketL)||c(n.name)||!!(o.type&n.IS_KEYWORD))}function Wl(e,t){const r=o.start;return c(n.parenL)?(e&&G(),Pr(r,!1),!0):Vl(e)?(Kt(t),Pr(r,!1),!0):!1}function Gl(e,t){if(m(n.colon)){e?wn(t):Pe(!1);return}let r;e?o.scopeDepth===0?r=F.ObjectShorthandTopLevelDeclaration:t?r=F.ObjectShorthandBlockScopedDeclaration:r=F.ObjectShorthandFunctionScopedDeclaration:r=F.ObjectShorthand,o.tokens[o.tokens.length-1].identifierRole=r,wn(t,!0)}function Xl(e,t,r){re?ml():ie&&Ru(),Wl(e,r)||Gl(e,t)}function Kt(e){ie&&os(),m(n.bracketL)?(o.tokens[o.tokens.length-1].contextId=e,Pe(),x(n.bracketR),o.tokens[o.tokens.length-1].contextId=e):(c(n.num)||c(n.string)||c(n.bigint)||c(n.decimal)?et():In(),o.tokens[o.tokens.length-1].identifierRole=F.ObjectKey,o.tokens[o.tokens.length-1].contextId=e)}function Pr(e,t){const r=Jt();o.scopeDepth++;const s=o.tokens.length;Dt(t,r),Wo(e,r);const a=o.tokens.length;o.scopes.push(new Ye(s,a,!0)),o.scopeDepth--}function Zt(e){cn(!0);const t=o.tokens.length;o.scopes.push(new Ye(e,t,!0)),o.scopeDepth--}function Wo(e,t=0){re?sl(e,t):ie?yu(t):cn(!1,t)}function cn(e,t=0){e&&!c(n.braceL)?Pe():it(!0,t)}function Go(e,t=!1){let r=!0;for(;!m(e)&&!o.error;){if(r)r=!1;else if(x(n.comma),m(e))break;Xo(t)}}function Xo(e){e&&c(n.comma)||(c(n.ellipsis)?(To(),Jr()):c(n.question)?b():Pe(!1,!0))}function z(){b(),o.tokens[o.tokens.length-1].type=n.name}function Jl(){an()}function Yl(){b(),!c(n.semi)&&!Fe()&&(m(n.star),Pe())}function Ql(){ye(l._module),x(n.braceL),Mn(n.braceR)}function Kl(e){return(e.type===n.name||!!(e.type&n.IS_KEYWORD))&&e.contextualKeyword!==l._from}function Qe(e){const t=K(0);x(e||n.colon),Oe(),Q(t)}function Os(){x(n.modulo),ye(l._checks),m(n.parenL)&&(Ne(),x(n.parenR))}function Kr(){const e=K(0);x(n.colon),c(n.modulo)?Os():(Oe(),c(n.modulo)&&Os()),Q(e)}function Zl(){b(),Zr(!0)}function eu(){b(),z(),c(n.lessThan)&&We(),x(n.parenL),Dr(),x(n.parenR),Kr(),me()}function Rr(){c(n._class)?Zl():c(n._function)?eu():c(n._var)?tu():Te(l._module)?m(n.dot)?su():nu():D(l._type)?ou():D(l._opaque)?iu():D(l._interface)?au():c(n._export)?ru():G()}function tu(){b(),Ko(),me()}function nu(){for(c(n.string)?et():z(),x(n.braceL);!c(n.braceR)&&!o.error;)c(n._import)?(b(),ci()):G();x(n.braceR)}function ru(){x(n._export),m(n._default)?c(n._function)||c(n._class)?Rr():(Oe(),me()):c(n._var)||c(n._function)||c(n._class)||D(l._opaque)?Rr():c(n.star)||c(n.braceL)||D(l._interface)||D(l._type)||D(l._opaque)?ii():G()}function su(){ye(l._exports),vt(),me()}function ou(){b(),ts()}function iu(){b(),ns(!0)}function au(){b(),Zr()}function Zr(e=!1){if(On(),c(n.lessThan)&&We(),m(n._extends))do mn();while(!e&&m(n.comma));if(D(l._mixins)){b();do mn();while(m(n.comma))}if(D(l._implements)){b();do mn();while(m(n.comma))}Sn(e,!1,e)}function mn(){Jo(!1),c(n.lessThan)&&kt()}function es(){Zr()}function On(){z()}function ts(){On(),c(n.lessThan)&&We(),Qe(n.eq),me()}function ns(e){ye(l._type),On(),c(n.lessThan)&&We(),c(n.colon)&&Qe(n.colon),e||Qe(n.eq),me()}function cu(){os(),Ko(),m(n.eq)&&Oe()}function We(){const e=K(0);c(n.lessThan)||c(n.typeParameterStart)?b():G();do cu(),c(n.greaterThan)||x(n.comma);while(!c(n.greaterThan)&&!o.error);x(n.greaterThan),Q(e)}function kt(){const e=K(0);for(x(n.lessThan);!c(n.greaterThan)&&!o.error;)Oe(),c(n.greaterThan)||x(n.comma);x(n.greaterThan),Q(e)}function lu(){if(ye(l._interface),m(n._extends))do mn();while(m(n.comma));Sn(!1,!1,!1)}function rs(){c(n.num)||c(n.string)?et():z()}function uu(){ke()===n.colon?(rs(),Qe()):Oe(),x(n.bracketR),Qe()}function pu(){rs(),x(n.bracketR),x(n.bracketR),c(n.lessThan)||c(n.parenL)?ss():(m(n.question),Qe())}function ss(){for(c(n.lessThan)&&We(),x(n.parenL);!c(n.parenR)&&!c(n.ellipsis)&&!o.error;)Tn(),c(n.parenR)||x(n.comma);m(n.ellipsis)&&Tn(),x(n.parenR),Qe()}function du(){ss()}function Sn(e,t,r){let s;for(t&&c(n.braceBarL)?(x(n.braceBarL),s=n.braceBarR):(x(n.braceL),s=n.braceR);!c(s)&&!o.error;){if(r&&D(l._proto)){const i=ke();i!==n.colon&&i!==n.question&&(b(),e=!1)}if(e&&D(l._static)){const i=ke();i!==n.colon&&i!==n.question&&b()}if(os(),m(n.bracketL))m(n.bracketL)?pu():uu();else if(c(n.parenL)||c(n.lessThan))du();else{if(D(l._get)||D(l._set)){const i=ke();(i===n.name||i===n.string||i===n.num)&&b()}fu()}hu()}x(s)}function fu(){if(c(n.ellipsis)){if(x(n.ellipsis),m(n.comma)||m(n.semi),c(n.braceR))return;Oe()}else rs(),c(n.lessThan)||c(n.parenL)?ss():(m(n.question),Qe())}function hu(){!m(n.semi)&&!m(n.comma)&&!c(n.braceR)&&!c(n.braceBarR)&&G()}function Jo(e){for(e||z();m(n.dot);)z()}function mu(){Jo(!0),c(n.lessThan)&&kt()}function gu(){x(n._typeof),Yo()}function ku(){for(x(n.bracketL);o.pos<A.length&&!c(n.bracketR)&&(Oe(),!c(n.bracketR));)x(n.comma);x(n.bracketR)}function Tn(){const e=ke();e===n.colon||e===n.question?(z(),m(n.question),Qe()):Oe()}function Dr(){for(;!c(n.parenR)&&!c(n.ellipsis)&&!o.error;)Tn(),c(n.parenR)||x(n.comma);m(n.ellipsis)&&Tn()}function Yo(){let e=!1;const t=o.noAnonFunctionType;switch(o.type){case n.name:{if(D(l._interface)){lu();return}z(),mu();return}case n.braceL:Sn(!1,!1,!1);return;case n.braceBarL:Sn(!1,!0,!1);return;case n.bracketL:ku();return;case n.lessThan:We(),x(n.parenL),Dr(),x(n.parenR),x(n.arrow),Oe();return;case n.parenL:if(b(),!c(n.parenR)&&!c(n.ellipsis))if(c(n.name)){const r=ke();e=r!==n.question&&r!==n.colon}else e=!0;if(e)if(o.noAnonFunctionType=!1,Oe(),o.noAnonFunctionType=t,o.noAnonFunctionType||!(c(n.comma)||c(n.parenR)&&ke()===n.arrow)){x(n.parenR);return}else m(n.comma);Dr(),x(n.parenR),x(n.arrow),Oe();return;case n.minus:b(),Nt();return;case n.string:case n.num:case n._true:case n._false:case n._null:case n._this:case n._void:case n.star:b();return;default:if(o.type===n._typeof){gu();return}else if(o.type&n.IS_KEYWORD){b(),o.tokens[o.tokens.length-1].type=n.name;return}}G()}function xu(){for(Yo();!Fe()&&(c(n.bracketL)||c(n.questionDot));)m(n.questionDot),x(n.bracketL),m(n.bracketR)||(Oe(),x(n.bracketR))}function Qo(){m(n.question)?Qo():xu()}function Ms(){Qo(),!o.noAnonFunctionType&&m(n.arrow)&&Oe()}function Fs(){for(m(n.bitwiseAND),Ms();m(n.bitwiseAND);)Ms()}function bu(){for(m(n.bitwiseOR),Fs();m(n.bitwiseOR);)Fs()}function Oe(){bu()}function vt(){Qe()}function Ko(){z(),c(n.colon)&&vt()}function os(){(c(n.plus)||c(n.minus))&&(b(),o.tokens[o.tokens.length-1].isType=!0)}function yu(e){c(n.colon)&&Kr(),cn(!1,e)}function vu(e,t,r){if(c(n.questionDot)&&ke()===n.lessThan){if(t){r.stop=!0;return}b(),kt(),x(n.parenL),ot();return}else if(!t&&c(n.lessThan)){const s=o.snapshot();if(kt(),x(n.parenL),ot(),o.error)o.restoreFromSnapshot(s);else return}Gr(e,t,r)}function wu(){if(c(n.lessThan)){const e=o.snapshot();kt(),o.error&&o.restoreFromSnapshot(e)}}function _u(){if(c(n.name)&&o.contextualKeyword===l._interface){const e=K(0);return b(),es(),Q(e),!0}else if(D(l._enum))return Zo(),!0;return!1}function Iu(){return D(l._enum)?(Zo(),!0):!1}function Su(e){if(e===l._declare){if(c(n._class)||c(n.name)||c(n._function)||c(n._var)||c(n._export)){const t=K(1);Rr(),Q(t)}}else if(c(n.name)){if(e===l._interface){const t=K(1);es(),Q(t)}else if(e===l._type){const t=K(1);ts(),Q(t)}else if(e===l._opaque){const t=K(1);ns(!1),Q(t)}}me()}function Tu(){return D(l._type)||D(l._interface)||D(l._opaque)||D(l._enum)}function Au(){return c(n.name)&&(o.contextualKeyword===l._type||o.contextualKeyword===l._interface||o.contextualKeyword===l._opaque||o.contextualKeyword===l._enum)}function Eu(){if(D(l._type)){const e=K(1);b(),c(n.braceL)?(as(),en()):ts(),Q(e)}else if(D(l._opaque)){const e=K(1);b(),ns(!1),Q(e)}else if(D(l._interface)){const e=K(1);b(),es(),Q(e)}else $e(!0)}function Cu(){return c(n.star)||D(l._type)&&ke()===n.star}function Nu(){if(Te(l._type)){const e=K(2);Lr(),Q(e)}else Lr()}function Pu(e){if(e&&c(n.lessThan)&&kt(),D(l._implements)){const t=K(0);b(),o.tokens[o.tokens.length-1].type=n._implements;do On(),c(n.lessThan)&&kt();while(m(n.comma));Q(t)}}function Ru(){c(n.lessThan)&&(We(),c(n.parenL)||G())}function Du(){const e=K(0);m(n.question),c(n.colon)&&vt(),Q(e)}function Lu(){if(c(n._typeof)||D(l._type)){const e=rn();(Kl(e)||e.type===n.braceL||e.type===n.star)&&b()}}function ju(){const e=o.contextualKeyword===l._type||o.type===n._typeof;e?b():z(),D(l._as)&&!Or(l._as)?(z(),e&&!c(n.name)&&!(o.type&n.IS_KEYWORD)||z()):(e&&(c(n.name)||o.type&n.IS_KEYWORD)&&z(),Te(l._as)&&z())}function Ou(){if(c(n.lessThan)){const e=K(0);We(),Q(e)}}function Mu(){c(n.colon)&&vt()}function Fu(){if(c(n.colon)){const e=o.noAnonFunctionType;o.noAnonFunctionType=!0,vt(),o.noAnonFunctionType=e}}function $u(e,t){if(c(n.lessThan)){const r=o.snapshot();let s=Je(e,t);if(o.error)o.restoreFromSnapshot(r),o.type=n.typeParameterStart;else return s;const i=K(0);if(We(),Q(i),s=Je(e,t),s)return!0;G()}return Je(e,t)}function Bu(){if(c(n.colon)){const e=K(0),t=o.snapshot(),r=o.noAnonFunctionType;o.noAnonFunctionType=!0,Kr(),o.noAnonFunctionType=r,Fe()&&G(),c(n.arrow)||G(),o.error&&o.restoreFromSnapshot(t),Q(e)}return m(n.arrow)}function zu(e,t=!1){if(o.tokens[o.tokens.length-1].contextualKeyword===l._async&&c(n.lessThan)){const r=o.snapshot();if(qu()&&!o.error)return;o.restoreFromSnapshot(r)}Uo(e,t)}function qu(){o.scopeDepth++;const e=o.tokens.length;return Dt(),Nr()?(Zt(e),!0):!1}function Zo(){ye(l._enum),o.tokens[o.tokens.length-1].type=n._enum,z(),Uu()}function Uu(){Te(l._of)&&b(),x(n.braceL),Hu(),x(n.braceR)}function Hu(){for(;!c(n.braceR)&&!o.error&&!m(n.ellipsis);)Vu(),c(n.braceR)||x(n.comma)}function Vu(){z(),m(n.eq)&&b()}function Wu(){if(Mn(n.eof),o.scopes.push(new Ye(0,o.tokens.length,!0)),o.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${o.scopeDepth}`);return new Rp(o.tokens,o.scopes)}function $e(e){ie&&_u()||(c(n.at)&&is(),Gu(e))}function Gu(e){if(re&&ul())return;const t=o.type;switch(t){case n._break:case n._continue:Ju();return;case n._debugger:Yu();return;case n._do:Qu();return;case n._for:Ku();return;case n._function:if(ke()===n.dot)break;e||G(),tp();return;case n._class:e||G(),bt(!0);return;case n._if:np();return;case n._return:rp();return;case n._switch:sp();return;case n._throw:op();return;case n._try:ap();return;case n._let:case n._const:e||G();case n._var:gn(t!==n._var);return;case n._while:cp();return;case n.braceL:it();return;case n.semi:lp();return;case n._export:case n._import:{const i=ke();if(i===n.parenL||i===n.dot)break;b(),t===n._import?ci():ii();return}case n.name:if(o.contextualKeyword===l._async){const i=o.start,a=o.snapshot();if(b(),c(n._function)&&!Fe()){x(n._function),xt(i,!0);return}else o.restoreFromSnapshot(a)}else if(o.contextualKeyword===l._using&&!no()&&ke()===n.name){gn(!0);return}else if(ei()){ye(l._await),gn(!0);return}}const r=o.tokens.length;Ne();let s=null;if(o.tokens.length===r+1){const i=o.tokens[o.tokens.length-1];i.type===n.name&&(s=i.contextualKeyword)}if(s==null){me();return}m(n.colon)?up():pp(s)}function ei(){if(!D(l._await))return!1;const e=o.snapshot();return b(),!D(l._using)||je()||(b(),!c(n.name)||je())?(o.restoreFromSnapshot(e),!1):(o.restoreFromSnapshot(e),!0)}function is(){for(;c(n.at);)ti()}function ti(){if(b(),m(n.parenL))Ne(),x(n.parenR);else{for(z();m(n.dot);)z();Xu()}}function Xu(){re?Il():ni()}function ni(){m(n.parenL)&&ot()}function Ju(){b(),Ge()||(z(),me())}function Yu(){b(),me()}function Qu(){b(),$e(!1),x(n._while),jn(),m(n.semi)}function Ku(){o.scopeDepth++;const e=o.tokens.length;ep();const t=o.tokens.length;o.scopes.push(new Ye(e,t,!1)),o.scopeDepth--}function Zu(){return!(!D(l._using)||Or(l._of))}function ep(){b();let e=!1;if(D(l._await)&&(e=!0,b()),x(n.parenL),c(n.semi)){e&&G(),yr();return}const t=ei();if(t||c(n._var)||c(n._let)||c(n._const)||Zu()){if(t&&ye(l._await),b(),ri(!0,o.type!==n._var),c(n._in)||D(l._of)){$s(e);return}yr();return}if(Ne(!0),c(n._in)||D(l._of)){$s(e);return}e&&G(),yr()}function tp(){const e=o.start;b(),xt(e,!0)}function np(){b(),jn(),$e(!1),m(n._else)&&$e(!1)}function rp(){b(),Ge()||(Ne(),me())}function sp(){b(),jn(),o.scopeDepth++;const e=o.tokens.length;for(x(n.braceL);!c(n.braceR)&&!o.error;)if(c(n._case)||c(n._default)){const r=c(n._case);b(),r&&Ne(),x(n.colon)}else $e(!0);b();const t=o.tokens.length;o.scopes.push(new Ye(e,t,!1)),o.scopeDepth--}function op(){b(),Ne(),me()}function ip(){Rn(!0),re&&Pt()}function ap(){if(b(),it(),c(n._catch)){b();let e=null;if(c(n.parenL)&&(o.scopeDepth++,e=o.tokens.length,x(n.parenL),ip(),x(n.parenR)),it(),e!=null){const t=o.tokens.length;o.scopes.push(new Ye(e,t,!1)),o.scopeDepth--}}m(n._finally)&&it()}function gn(e){b(),ri(!1,e),me()}function cp(){b(),jn(),$e(!1)}function lp(){b()}function up(){$e(!0)}function pp(e){re?dl(e):ie?Su(e):me()}function it(e=!1,t=0){const r=o.tokens.length;o.scopeDepth++,x(n.braceL),t&&(o.tokens[o.tokens.length-1].contextId=t),Mn(n.braceR),t&&(o.tokens[o.tokens.length-1].contextId=t);const s=o.tokens.length;o.scopes.push(new Ye(r,s,e)),o.scopeDepth--}function Mn(e){for(;!m(e)&&!o.error;)$e(!0)}function yr(){x(n.semi),c(n.semi)||Ne(),x(n.semi),c(n.parenR)||Ne(),x(n.parenR),$e(!1)}function $s(e){e?Te(l._of):b(),Ne(),x(n.parenR),$e(!1)}function ri(e,t){for(;;){if(dp(t),m(n.eq)){const r=o.tokens.length-1;Pe(e),o.tokens[r].rhsEndIndex=o.tokens.length}if(!m(n.comma))break}}function dp(e){Rn(e),re?kl():ie&&Mu()}function xt(e,t,r=!1){c(n.star)&&b(),t&&!r&&!c(n.name)&&!c(n._yield)&&G();let s=null;c(n.name)&&(t||(s=o.tokens.length,o.scopeDepth++),ct(!1));const i=o.tokens.length;o.scopeDepth++,Dt(),Wo(e);const a=o.tokens.length;o.scopes.push(new Ye(i,a,!0)),o.scopeDepth--,s!==null&&(o.scopes.push(new Ye(s,a,!0)),o.scopeDepth--)}function Dt(e=!1,t=0){re?gl():ie&&Ou(),x(n.parenL),t&&(o.tokens[o.tokens.length-1].contextId=t),Br(n.parenR,!1,!1,e,t),t&&(o.tokens[o.tokens.length-1].contextId=t)}function bt(e,t=!1){const r=Jt();b(),o.tokens[o.tokens.length-1].contextId=r,o.tokens[o.tokens.length-1].isExpression=!e;let s=null;e||(s=o.tokens.length,o.scopeDepth++),gp(e,t),kp();const i=o.tokens.length;if(fp(r),!o.error&&(o.tokens[i].contextId=r,o.tokens[o.tokens.length-1].contextId=r,s!==null)){const a=o.tokens.length;o.scopes.push(new Ye(s,a,!1)),o.scopeDepth--}}function si(){return c(n.eq)||c(n.semi)||c(n.braceR)||c(n.bang)||c(n.colon)}function oi(){return c(n.parenL)||c(n.lessThan)}function fp(e){for(x(n.braceL);!m(n.braceR)&&!o.error;){if(m(n.semi))continue;if(c(n.at)){ti();continue}const t=o.start;hp(t,e)}}function hp(e,t){re&&zr([l._declare,l._public,l._protected,l._private,l._override]);let r=!1;if(c(n.name)&&o.contextualKeyword===l._static){if(z(),oi()){Ht(e,!1);return}else if(si()){kn();return}if(o.tokens[o.tokens.length-1].type=n._static,r=!0,c(n.braceL)){o.tokens[o.tokens.length-1].contextId=t,it();return}}mp(e,r,t)}function mp(e,t,r){if(re&&pl(t))return;if(m(n.star)){qt(r),Ht(e,!1);return}qt(r);let s=!1;const i=o.tokens[o.tokens.length-1];i.contextualKeyword===l._constructor&&(s=!0),Bs(),oi()?Ht(e,s):si()?kn():i.contextualKeyword===l._async&&!Ge()?(o.tokens[o.tokens.length-1].type=n._async,c(n.star)&&b(),qt(r),Bs(),Ht(e,!1)):(i.contextualKeyword===l._get||i.contextualKeyword===l._set)&&!(Ge()&&c(n.star))?(i.contextualKeyword===l._get?o.tokens[o.tokens.length-1].type=n._get:o.tokens[o.tokens.length-1].type=n._set,qt(r),Ht(e,!1)):i.contextualKeyword===l._accessor&&!Ge()?(qt(r),kn()):Ge()?kn():G()}function Ht(e,t){re?yt():ie&&c(n.lessThan)&&We(),Pr(e,t)}function qt(e){Kt(e)}function Bs(){if(re){const e=K(0);m(n.question),Q(e)}}function kn(){if(re?(ao(n.bang),Pt()):ie&&c(n.colon)&&vt(),c(n.eq)){const e=o.tokens.length;b(),Pe(),o.tokens[e].rhsEndIndex=o.tokens.length}me()}function gp(e,t=!1){re&&(!e||t)&&D(l._implements)||(c(n.name)&&ct(!0),re?yt():ie&&c(n.lessThan)&&We())}function kp(){let e=!1;m(n._extends)?(qo(),e=!0):e=!1,re?hl(e):ie&&Pu(e)}function ii(){const e=o.tokens.length-1;re&&il()||(vp()?wp():yp()?(z(),c(n.comma)&&ke()===n.star?(x(n.comma),x(n.star),ye(l._as),z()):ai(),en()):m(n._default)?xp():Ip()?bp():(as(),en()),o.tokens[e].rhsEndIndex=o.tokens.length)}function xp(){if(re&&ll()||ie&&Iu())return;const e=o.start;m(n._function)?xt(e,!0,!0):D(l._async)&&ke()===n._function?(Te(l._async),m(n._function),xt(e,!0,!0)):c(n._class)?bt(!0,!0):c(n.at)?(is(),bt(!0,!0)):(Pe(),me())}function bp(){re?fl():ie?Eu():$e(!0)}function yp(){if(re&&Oo())return!1;if(ie&&Au())return!1;if(c(n.name))return o.contextualKeyword!==l._async;if(!c(n._default))return!1;const e=Mr(),t=rn(),r=t.type===n.name&&t.contextualKeyword===l._from;if(t.type===n.comma)return!0;if(r){const s=A.charCodeAt(co(e+4));return s===p.quotationMark||s===p.apostrophe}return!1}function ai(){m(n.comma)&&as()}function en(){Te(l._from)&&(et(),li()),me()}function vp(){return ie?Cu():c(n.star)}function wp(){ie?Nu():Lr()}function Lr(){x(n.star),D(l._as)?_p():en()}function _p(){b(),o.tokens[o.tokens.length-1].type=n._as,z(),ai(),en()}function Ip(){return re&&Oo()||ie&&Tu()||o.type===n._var||o.type===n._const||o.type===n._let||o.type===n._function||o.type===n._class||D(l._async)||c(n.at)}function as(){let e=!0;for(x(n.braceL);!m(n.braceR)&&!o.error;){if(e)e=!1;else if(x(n.comma),m(n.braceR))break;Sp()}}function Sp(){if(re){cl();return}z(),o.tokens[o.tokens.length-1].identifierRole=F.ExportAccess,Te(l._as)&&z()}function Tp(){const e=o.snapshot();return ye(l._module),Te(l._from)?D(l._from)?(o.restoreFromSnapshot(e),!0):(o.restoreFromSnapshot(e),!1):c(n.comma)?(o.restoreFromSnapshot(e),!1):(o.restoreFromSnapshot(e),!0)}function Ap(){D(l._module)&&Tp()&&b()}function ci(){if(re&&c(n.name)&&ke()===n.eq){Er();return}if(re&&D(l._type)){const e=rn();if(e.type===n.name&&e.contextualKeyword!==l._from){if(ye(l._type),ke()===n.eq){Er();return}}else(e.type===n.star||e.type===n.braceL)&&ye(l._type)}c(n.string)||(Ap(),Cp(),ye(l._from)),et(),li(),me()}function Ep(){return c(n.name)}function zs(){vn()}function Cp(){ie&&Lu();let e=!0;if(!(Ep()&&(zs(),!m(n.comma)))){if(c(n.star)){b(),ye(l._as),zs();return}for(x(n.braceL);!m(n.braceR)&&!o.error;){if(e)e=!1;else if(m(n.colon)&&G("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),x(n.comma),m(n.braceR))break;Np()}}}function Np(){if(re){al();return}if(ie){ju();return}vn(),D(l._as)&&(o.tokens[o.tokens.length-1].identifierRole=F.ImportAccess,b(),vn())}function li(){(c(n._with)||D(l._assert)&&!je())&&(b(),Qr(!1,!1))}function Pp(){return o.pos===0&&A.charCodeAt(0)===p.numberSign&&A.charCodeAt(1)===p.exclamationMark&&po(2),uo(),Wu()}class Rp{constructor(t,r){this.tokens=t,this.scopes=r}}function Dp(e,t,r,s){if(s&&r)throw new Error("Cannot combine flow and typescript plugins.");n1(e,t,r,s);const i=Pp();if(o.error)throw Za(o.error);return i}function Lp(e){let t=e.currentIndex(),r=0;const s=e.currentToken();do{const i=e.tokens[t];if(i.isOptionalChainStart&&r++,i.isOptionalChainEnd&&r--,r+=i.numNullishCoalesceStarts,r-=i.numNullishCoalesceEnds,i.contextualKeyword===l._await&&i.identifierRole==null&&i.scopeDepth===s.scopeDepth)return!0;t+=1}while(r>0&&t<e.tokens.length);return!1}class Wt{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,r,s,i,a){this.code=t,this.tokens=r,this.isFlowEnabled=s,this.disableESTransforms=i,this.helperManager=a,Wt.prototype.__init.call(this),Wt.prototype.__init2.call(this),Wt.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(t){this.resultCode=t.resultCode,this.tokenIndex=t.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(t){const r=this.resultCode.slice(t.resultCode.length);return this.resultCode=t.resultCode,r}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(t,r){return this.matches1AtIndex(t,n.name)&&this.tokens[t].contextualKeyword===r}identifierNameAtIndex(t){return this.identifierNameForToken(this.tokens[t])}identifierNameAtRelativeIndex(t){return this.identifierNameForToken(this.tokenAtRelativeIndex(t))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(t){return this.code.slice(t.start,t.end)}rawCodeForToken(t){return this.code.slice(t.start,t.end)}stringValueAtIndex(t){return this.stringValueForToken(this.tokens[t])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(t){return this.code.slice(t.start+1,t.end-1)}matches1AtIndex(t,r){return this.tokens[t].type===r}matches2AtIndex(t,r,s){return this.tokens[t].type===r&&this.tokens[t+1].type===s}matches3AtIndex(t,r,s,i){return this.tokens[t].type===r&&this.tokens[t+1].type===s&&this.tokens[t+2].type===i}matches1(t){return this.tokens[this.tokenIndex].type===t}matches2(t,r){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r}matches3(t,r,s){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s}matches4(t,r,s,i){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i}matches5(t,r,s,i,a){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i&&this.tokens[this.tokenIndex+4].type===a}matchesContextual(t){return this.matchesContextualAtIndex(this.tokenIndex,t)}matchesContextIdAndLabel(t,r){return this.matches1(t)&&this.currentToken().contextId===r}previousWhitespaceAndComments(){let t=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(t=t.replace(/@flow/g,"")),t}replaceToken(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(t){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let t=0;for(;!this.isAtEnd();){if(this.matches1(n.braceL))t++;else if(this.matches1(n.braceR)){if(t===0)return;t--}this.removeToken()}}copyExpectedToken(t){if(this.tokens[this.tokenIndex].type!==t)throw new Error(`Expected token ${t}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=t,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const t=this.currentToken();if((t.numNullishCoalesceStarts||t.isOptionalChainStart)&&(t.isAsyncOperation=Lp(this)),!this.disableESTransforms){if(t.numNullishCoalesceStarts)for(let r=0;r<t.numNullishCoalesceStarts;r++)t.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";t.isOptionalChainStart&&(t.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===n._delete?t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const t=this.currentToken();if(t.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),t.numNullishCoalesceEnds&&!this.disableESTransforms)for(let r=0;r<t.numNullishCoalesceEnds;r++)this.resultCode+="))"}appendCode(t){this.resultCode+=t}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const t=this.currentToken();return this.code.slice(t.start,t.end)}tokenAtRelativeIndex(t){return this.tokens[this.tokenIndex+t]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function jp(e,t,r,s){const i=t.snapshot(),a=Op(t);let u=[];const d=[],h=[];let f=null;const k=[],w=[],C=t.currentToken().contextId;if(C==null)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(n.braceR,C);)if(t.matchesContextual(l._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:u,constructorInsertPos:f}=qs(t));else if(t.matches1(n.semi))s||w.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{const R=t.currentIndex();let q=!1,L=!1,te=!1;for(;An(t.currentToken());)t.matches1(n._static)&&(q=!0),t.matches1(n.hash)&&(L=!0),(t.matches1(n._declare)||t.matches1(n._abstract))&&(te=!0),t.nextToken();if(q&&t.matches1(n.braceL)){vr(t,C);continue}if(L){vr(t,C);continue}if(t.matchesContextual(l._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:u,constructorInsertPos:f}=qs(t));continue}const Z=t.currentIndex();if(Mp(t),t.matches1(n.lessThan)||t.matches1(n.parenL)){vr(t,C);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(n.eq)){const S=t.currentIndex(),N=t.currentToken().rhsEndIndex;if(N==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<N;)e.processToken();let v;q?(v=r.claimFreeName("__initStatic"),h.push(v)):(v=r.claimFreeName("__init"),d.push(v)),k.push({initializerName:v,equalsIndex:S,start:Z,end:t.currentIndex()})}else(!s||te)&&w.push({start:R,end:t.currentIndex()})}return t.restoreToSnapshot(i),s?{headerInfo:a,constructorInitializerStatements:u,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:f,fields:[],rangesToRemove:w}:{headerInfo:a,constructorInitializerStatements:u,instanceInitializerNames:d,staticInitializerNames:h,constructorInsertPos:f,fields:k,rangesToRemove:w}}function vr(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;An(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Op(e){const t=e.currentToken(),r=t.contextId;if(r==null)throw new Error("Expected context ID on class token.");const s=t.isExpression;if(s==null)throw new Error("Expected isExpression on class token.");let i=null,a=!1;for(e.nextToken(),e.matches1(n.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(n.braceL,r);)e.matches1(n._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:s,className:i,hasSuperclass:a}}function qs(e){const t=[];e.nextToken();const r=e.currentToken().contextId;if(r==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(n.parenR,r);)if(e.currentToken().contextId===r){if(e.nextToken(),An(e.currentToken())){for(e.nextToken();An(e.currentToken());)e.nextToken();const a=e.currentToken();if(a.type!==n.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const u=e.identifierNameForToken(a);t.push(`this.${u} = ${u}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let s=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(n.braceR,r);){if(!i&&e.matches2(n._super,n.parenL)){e.nextToken();const a=e.currentToken().contextId;if(a==null)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(n.parenR,a);)e.nextToken();s=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:s}}function An(e){return[n._async,n._get,n._set,n.plus,n.minus,n._readonly,n._static,n._public,n._private,n._protected,n._override,n._abstract,n.star,n._declare,n.hash].includes(e.type)}function Mp(e){if(e.matches1(n.bracketL)){const r=e.currentToken().contextId;if(r==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(n.bracketR,r);)e.nextToken();e.nextToken()}else e.nextToken()}function ui(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(n.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(n.dot);)e.removeToken(),e.removeToken()}const pi={typeDeclarations:new Set,valueDeclarations:new Set};function di(e){const t=new Set,r=new Set;for(let s=0;s<e.tokens.length;s++){const i=e.tokens[s];i.type===n.name&&io(i)&&(i.isType?t.add(e.identifierNameForToken(i)):r.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:r}}function fi(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,n.braceR);)t++;return e.matchesContextualAtIndex(t+1,l._from)&&e.matches1AtIndex(t+2,n.string)}function mt(e){(e.matches2(n._with,n.braceL)||e.matches2(n.name,n.braceL)&&e.matchesContextual(l._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function hi(e,t,r,s){if(!e||t)return!1;const i=r.currentToken();if(i.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const a=i.rhsEndIndex-r.currentIndex();if(a!==3&&!(a===4&&r.matches1AtIndex(i.rhsEndIndex-1,n.semi)))return!1;const u=r.tokenAtRelativeIndex(2);if(u.type!==n.name)return!1;const d=r.identifierNameForToken(u);return s.typeDeclarations.has(d)&&!s.valueDeclarations.has(d)}class Gt extends Ve{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,r,s,i,a,u,d,h,f,k,w,C){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=u,this.enableLegacyBabel5ModuleInterop=d,this.enableLegacyTypeScriptModuleInterop=h,this.isTypeScriptTransformEnabled=f,this.isFlowTransformEnabled=k,this.preserveDynamicImport=w,this.keepUnusedImports=C,Gt.prototype.__init.call(this),Gt.prototype.__init2.call(this),Gt.prototype.__init3.call(this),this.declarationInfo=f?di(r):pi}getPrefixCode(){let t="";return this.hadExport&&(t+='Object.defineProperty(exports, "__esModule", {value: true});'),t}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
171
+ `};class wn{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,wn.prototype.__init.call(this),wn.prototype.__init2.call(this)}getHelperName(t){let r=this.helperNames[t];return r||(r=this.nameManager.claimFreeName(`_${t}`),this.helperNames[t]=r,r)}emitHelpers(){let t="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[r,s]of Object.entries(fu)){const i=this.helperNames[r];let o=s;r==="optionalChainDelete"?o=o.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):r==="asyncOptionalChainDelete"?o=o.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):r==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),o=o.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),i&&(t+=" ",t+=o.replace(r,i).replace(/\s+/g," ").trim())}return t}}function Hi(e,t,r){du(e,r)&&mu(e,t,r)}function du(e,t){for(const r of e.tokens)if(r.type===n.name&&!r.isType&&gl(r)&&t.has(e.identifierNameForToken(r)))return!0;return!1}function mu(e,t,r){const s=[];let i=t.length-1;for(let o=e.tokens.length-1;;o--){for(;s.length>0&&s[s.length-1].startTokenIndex===o+1;)s.pop();for(;i>=0&&t[i].endTokenIndex===o+1;)s.push(t[i]),i--;if(o<0)break;const c=e.tokens[o],u=e.identifierNameForToken(c);if(s.length>1&&!c.isType&&c.type===n.name&&r.has(u)){if(xl(c))Wi(s[s.length-1],e,u);else if(kl(c)){let f=s.length-1;for(;f>0&&!s[f].isFunctionScope;)f--;if(f<0)throw new Error("Did not find parent function scope.");Wi(s[f],e,u)}}}if(s.length>0)throw new Error("Expected empty scope stack after processing file.")}function Wi(e,t,r){for(let s=e.startTokenIndex;s<e.endTokenIndex;s++){const i=t.tokens[s];(i.type===n.name||i.type===n.jsxName)&&t.identifierNameForToken(i)===r&&(i.shadowsGlobal=!0)}}function gu(e,t){const r=[];for(const s of t)s.type===n.name&&r.push(e.slice(s.start,s.end));return r}class Xs{__init(){this.usedNames=new Set}constructor(t,r){Xs.prototype.__init.call(this),this.usedNames=new Set(gu(t,r))}claimFreeName(t){const r=this.findFreeName(t);return this.usedNames.add(r),r}findFreeName(t){if(!this.usedNames.has(t))return t;let r=2;for(;this.usedNames.has(t+String(r));)r++;return t+String(r)}}var be={},As={},vt={},xu=Zt&&Zt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var o in i)i.hasOwnProperty(o)&&(s[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function s(){this.constructor=t}t.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}}();Object.defineProperty(vt,"__esModule",{value:!0});vt.DetailContext=vt.NoopContext=vt.VError=void 0;var Ua=function(e){xu(t,e);function t(r,s){var i=e.call(this,s)||this;return i.path=r,Object.setPrototypeOf(i,t.prototype),i}return t}(Error);vt.VError=Ua;var ku=function(){function e(){}return e.prototype.fail=function(t,r,s){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(t){},e}();vt.NoopContext=ku;var za=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(t,r,s){return this._propNames.push(t),this._messages.push(r),this._score+=s,!1},e.prototype.unionResolver=function(){return new bu},e.prototype.resolveUnion=function(t){for(var r,s,i=t,o=null,c=0,u=i.contexts;c<u.length;c++){var f=u[c];(!o||f._score>=o._score)&&(o=f)}o&&o._score>0&&((r=this._propNames).push.apply(r,o._propNames),(s=this._messages).push.apply(s,o._messages))},e.prototype.getError=function(t){for(var r=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];t+=typeof i=="number"?"["+i+"]":i?"."+i:"";var o=this._messages[s];o&&r.push(t+" "+o)}return new Ua(t,r.join("; "))},e.prototype.getErrorDetail=function(t){for(var r=[],s=this._propNames.length-1;s>=0;s--){var i=this._propNames[s];t+=typeof i=="number"?"["+i+"]":i?"."+i:"";var o=this._messages[s];o&&r.push({path:t,message:o})}for(var c=null,s=r.length-1;s>=0;s--)c&&(r[s].nested=[c]),c=r[s];return c},e}();vt.DetailContext=za;var bu=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var t=new za;return this.contexts.push(t),t},e}();(function(e){var t=Zt&&Zt.__extends||function(){var b=function(S,C){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,M){A.__proto__=M}||function(A,M){for(var Y in M)M.hasOwnProperty(Y)&&(A[Y]=M[Y])},b(S,C)};return function(S,C){b(S,C);function A(){this.constructor=S}S.prototype=C===null?Object.create(C):(A.prototype=C.prototype,new A)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var r=vt,s=function(){function b(){}return b}();e.TType=s;function i(b){return typeof b=="string"?c(b):b}function o(b,S){var C=b[S];if(!C)throw new Error("Unknown type "+S);return C}function c(b){return new u(b)}e.name=c;var u=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.name=C,A._failMsg="is not a "+C,A}return S.prototype.getChecker=function(C,A,M){var Y=this,Z=o(C,this.name),le=Z.getChecker(C,A,M);return Z instanceof ee||Z instanceof S?le:function(we,oe){return le(we,oe)?!0:oe.fail(null,Y._failMsg,0)}},S}(s);e.TName=u;function f(b){return new h(b)}e.lit=f;var h=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.value=C,A.name=JSON.stringify(C),A._failMsg="is not "+A.name,A}return S.prototype.getChecker=function(C,A){var M=this;return function(Y,Z){return Y===M.value?!0:Z.fail(null,M._failMsg,-1)}},S}(s);e.TLiteral=h;function m(b){return new x(i(b))}e.array=m;var x=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.ttype=C,A}return S.prototype.getChecker=function(C,A){var M=this.ttype.getChecker(C,A);return function(Y,Z){if(!Array.isArray(Y))return Z.fail(null,"is not an array",0);for(var le=0;le<Y.length;le++){var we=M(Y[le],Z);if(!we)return Z.fail(le,null,1)}return!0}},S}(s);e.TArray=x;function _(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return new y(b.map(function(C){return i(C)}))}e.tuple=_;var y=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.ttypes=C,A}return S.prototype.getChecker=function(C,A){var M=this.ttypes.map(function(Z){return Z.getChecker(C,A)}),Y=function(Z,le){if(!Array.isArray(Z))return le.fail(null,"is not an array",0);for(var we=0;we<M.length;we++){var oe=M[we](Z[we],le);if(!oe)return le.fail(we,null,1)}return!0};return A?function(Z,le){return Y(Z,le)?Z.length<=M.length?!0:le.fail(M.length,"is extraneous",2):!1}:Y},S}(s);e.TTuple=y;function L(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return new O(b.map(function(C){return i(C)}))}e.union=L;var O=function(b){t(S,b);function S(C){var A=b.call(this)||this;A.ttypes=C;var M=C.map(function(Z){return Z instanceof u||Z instanceof h?Z.name:null}).filter(function(Z){return Z}),Y=C.length-M.length;return M.length?(Y>0&&M.push(Y+" more"),A._failMsg="is none of "+M.join(", ")):A._failMsg="is none of "+Y+" types",A}return S.prototype.getChecker=function(C,A){var M=this,Y=this.ttypes.map(function(Z){return Z.getChecker(C,A)});return function(Z,le){for(var we=le.unionResolver(),oe=0;oe<Y.length;oe++){var Ne=Y[oe](Z,we.createContext());if(Ne)return!0}return le.resolveUnion(we),le.fail(null,M._failMsg,0)}},S}(s);e.TUnion=O;function F(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return new K(b.map(function(C){return i(C)}))}e.intersection=F;var K=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.ttypes=C,A}return S.prototype.getChecker=function(C,A){var M=new Set,Y=this.ttypes.map(function(Z){return Z.getChecker(C,A,M)});return function(Z,le){var we=Y.every(function(oe){return oe(Z,le)});return we?!0:le.fail(null,null,0)}},S}(s);e.TIntersection=K;function P(b){return new j(b)}e.enumtype=P;var j=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.members=C,A.validValues=new Set,A._failMsg="is not a valid enum value",A.validValues=new Set(Object.keys(C).map(function(M){return C[M]})),A}return S.prototype.getChecker=function(C,A){var M=this;return function(Y,Z){return M.validValues.has(Y)?!0:Z.fail(null,M._failMsg,0)}},S}(s);e.TEnumType=j;function D(b,S){return new W(b,S)}e.enumlit=D;var W=function(b){t(S,b);function S(C,A){var M=b.call(this)||this;return M.enumName=C,M.prop=A,M._failMsg="is not "+C+"."+A,M}return S.prototype.getChecker=function(C,A){var M=this,Y=o(C,this.enumName);if(!(Y instanceof j))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var Z=Y.members[this.prop];if(!Y.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(le,we){return le===Z?!0:we.fail(null,M._failMsg,-1)}},S}(s);e.TEnumLiteral=W;function X(b){return Object.keys(b).map(function(S){return q(S,b[S])})}function q(b,S){return S instanceof ye?new De(b,S.ttype,!0):new De(b,i(S),!1)}function T(b,S){return new B(b,X(S))}e.iface=T;var B=function(b){t(S,b);function S(C,A){var M=b.call(this)||this;return M.bases=C,M.props=A,M.propSet=new Set(A.map(function(Y){return Y.name})),M}return S.prototype.getChecker=function(C,A,M){var Y=this,Z=this.bases.map(function(ve){return o(C,ve).getChecker(C,A)}),le=this.props.map(function(ve){return ve.ttype.getChecker(C,A)}),we=new r.NoopContext,oe=this.props.map(function(ve,qe){return!ve.isOpt&&!le[qe](void 0,we)}),Ne=function(ve,qe){if(typeof ve!="object"||ve===null)return qe.fail(null,"is not an object",0);for(var Me=0;Me<Z.length;Me++)if(!Z[Me](ve,qe))return!1;for(var Me=0;Me<le.length;Me++){var nt=Y.props[Me].name,Dt=ve[nt];if(Dt===void 0){if(oe[Me])return qe.fail(nt,"is missing",1)}else{var Ot=le[Me](Dt,qe);if(!Ot)return qe.fail(nt,null,1)}}return!0};if(!A)return Ne;var Ee=this.propSet;return M&&(this.propSet.forEach(function(ve){return M.add(ve)}),Ee=M),function(ve,qe){if(!Ne(ve,qe))return!1;for(var Me in ve)if(!Ee.has(Me))return qe.fail(Me,"is extraneous",2);return!0}},S}(s);e.TIface=B;function z(b){return new ye(i(b))}e.opt=z;var ye=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.ttype=C,A}return S.prototype.getChecker=function(C,A){var M=this.ttype.getChecker(C,A);return function(Y,Z){return Y===void 0||M(Y,Z)}},S}(s);e.TOptional=ye;var De=function(){function b(S,C,A){this.name=S,this.ttype=C,this.isOpt=A}return b}();e.TProp=De;function $e(b){for(var S=[],C=1;C<arguments.length;C++)S[C-1]=arguments[C];return new Oe(new xe(S),i(b))}e.func=$e;var Oe=function(b){t(S,b);function S(C,A){var M=b.call(this)||this;return M.paramList=C,M.result=A,M}return S.prototype.getChecker=function(C,A){return function(M,Y){return typeof M=="function"?!0:Y.fail(null,"is not a function",0)}},S}(s);e.TFunc=Oe;function H(b,S,C){return new ce(b,i(S),!!C)}e.param=H;var ce=function(){function b(S,C,A){this.name=S,this.ttype=C,this.isOpt=A}return b}();e.TParam=ce;var xe=function(b){t(S,b);function S(C){var A=b.call(this)||this;return A.params=C,A}return S.prototype.getChecker=function(C,A){var M=this,Y=this.params.map(function(oe){return oe.ttype.getChecker(C,A)}),Z=new r.NoopContext,le=this.params.map(function(oe,Ne){return!oe.isOpt&&!Y[Ne](void 0,Z)}),we=function(oe,Ne){if(!Array.isArray(oe))return Ne.fail(null,"is not an array",0);for(var Ee=0;Ee<Y.length;Ee++){var ve=M.params[Ee];if(oe[Ee]===void 0){if(le[Ee])return Ne.fail(ve.name,"is missing",1)}else{var qe=Y[Ee](oe[Ee],Ne);if(!qe)return Ne.fail(ve.name,null,1)}}return!0};return A?function(oe,Ne){return we(oe,Ne)?oe.length<=Y.length?!0:Ne.fail(Y.length,"is extraneous",2):!1}:we},S}(s);e.TParamList=xe;var ee=function(b){t(S,b);function S(C,A){var M=b.call(this)||this;return M.validator=C,M.message=A,M}return S.prototype.getChecker=function(C,A){var M=this;return function(Y,Z){return M.validator(Y)?!0:Z.fail(null,M.message,0)}},S}(s);e.BasicType=ee,e.basicTypes={any:new ee(function(b){return!0},"is invalid"),number:new ee(function(b){return typeof b=="number"},"is not a number"),object:new ee(function(b){return typeof b=="object"&&b},"is not an object"),boolean:new ee(function(b){return typeof b=="boolean"},"is not a boolean"),string:new ee(function(b){return typeof b=="string"},"is not a string"),symbol:new ee(function(b){return typeof b=="symbol"},"is not a symbol"),void:new ee(function(b){return b==null},"is not void"),undefined:new ee(function(b){return b===void 0},"is not undefined"),null:new ee(function(b){return b===null},"is not null"),never:new ee(function(b){return!1},"is unexpected"),Date:new ee(Be("[object Date]"),"is not a Date"),RegExp:new ee(Be("[object RegExp]"),"is not a RegExp")};var Pe=Object.prototype.toString;function Be(b){return function(S){return typeof S=="object"&&S&&Pe.call(S)===b}}typeof Buffer<"u"&&(e.basicTypes.Buffer=new ee(function(b){return Buffer.isBuffer(b)},"is not a Buffer"));for(var te=function(b){e.basicTypes[b.name]=new ee(function(S){return S instanceof b},"is not a "+b.name)},ue=0,ke=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];ue<ke.length;ue++){var Le=ke[ue];te(Le)}})(As);(function(e){var t=Zt&&Zt.__spreadArrays||function(){for(var f=0,h=0,m=arguments.length;h<m;h++)f+=arguments[h].length;for(var x=Array(f),_=0,h=0;h<m;h++)for(var y=arguments[h],L=0,O=y.length;L<O;L++,_++)x[_]=y[L];return x};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var r=As,s=vt,i=As;Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var o=vt;Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return o.VError}});function c(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];for(var m=Object.assign.apply(Object,t([{},r.basicTypes],f)),x={},_=0,y=f;_<y.length;_++)for(var L=y[_],O=0,F=Object.keys(L);O<F.length;O++){var K=F[O];x[K]=new u(m,L[K])}return x}e.createCheckers=c;var u=function(){function f(h,m,x){if(x===void 0&&(x="value"),this.suite=h,this.ttype=m,this._path=x,this.props=new Map,m instanceof r.TIface)for(var _=0,y=m.props;_<y.length;_++){var L=y[_];this.props.set(L.name,L.ttype)}this.checkerPlain=this.ttype.getChecker(h,!1),this.checkerStrict=this.ttype.getChecker(h,!0)}return f.prototype.setReportedPath=function(h){this._path=h},f.prototype.check=function(h){return this._doCheck(this.checkerPlain,h)},f.prototype.test=function(h){return this.checkerPlain(h,new s.NoopContext)},f.prototype.validate=function(h){return this._doValidate(this.checkerPlain,h)},f.prototype.strictCheck=function(h){return this._doCheck(this.checkerStrict,h)},f.prototype.strictTest=function(h){return this.checkerStrict(h,new s.NoopContext)},f.prototype.strictValidate=function(h){return this._doValidate(this.checkerStrict,h)},f.prototype.getProp=function(h){var m=this.props.get(h);if(!m)throw new Error("Type has no property "+h);return new f(this.suite,m,this._path+"."+h)},f.prototype.methodArgs=function(h){var m=this._getMethod(h);return new f(this.suite,m.paramList)},f.prototype.methodResult=function(h){var m=this._getMethod(h);return new f(this.suite,m.result)},f.prototype.getArgs=function(){if(!(this.ttype instanceof r.TFunc))throw new Error("getArgs() applied to non-function");return new f(this.suite,this.ttype.paramList)},f.prototype.getResult=function(){if(!(this.ttype instanceof r.TFunc))throw new Error("getResult() applied to non-function");return new f(this.suite,this.ttype.result)},f.prototype.getType=function(){return this.ttype},f.prototype._doCheck=function(h,m){var x=new s.NoopContext;if(!h(m,x)){var _=new s.DetailContext;throw h(m,_),_.getError(this._path)}},f.prototype._doValidate=function(h,m){var x=new s.NoopContext;if(h(m,x))return null;var _=new s.DetailContext;return h(m,_),_.getErrorDetail(this._path)},f.prototype._getMethod=function(h){var m=this.props.get(h);if(!m)throw new Error("Type has no property "+h);if(!(m instanceof r.TFunc))throw new Error("Property "+h+" is not a method");return m},f}();e.Checker=u})(be);const yu=be.union(be.lit("jsx"),be.lit("typescript"),be.lit("flow"),be.lit("imports"),be.lit("react-hot-loader"),be.lit("jest")),vu=be.iface([],{compiledFilename:"string"}),wu=be.iface([],{transforms:be.array("Transform"),disableESTransforms:be.opt("boolean"),jsxRuntime:be.opt(be.union(be.lit("classic"),be.lit("automatic"),be.lit("preserve"))),production:be.opt("boolean"),jsxImportSource:be.opt("string"),jsxPragma:be.opt("string"),jsxFragmentPragma:be.opt("string"),keepUnusedImports:be.opt("boolean"),preserveDynamicImport:be.opt("boolean"),injectCreateRequireForImportRequire:be.opt("boolean"),enableLegacyTypeScriptModuleInterop:be.opt("boolean"),enableLegacyBabel5ModuleInterop:be.opt("boolean"),sourceMapOptions:be.opt("SourceMapOptions"),filePath:be.opt("string")}),_u={Transform:yu,SourceMapOptions:vu,Options:wu},{Options:Su}=be.createCheckers(_u);function Iu(e){Su.strictCheck(e)}function Ha(){w(),ze(!1)}function Wa(e){w(),Vn(e)}function Wt(e){J(),Ys(e)}function _n(){J(),a.tokens[a.tokens.length-1].identifierRole=G.ImportDeclaration}function Ys(e){let t;a.scopeDepth===0?t=G.TopLevelDeclaration:e?t=G.BlockScopedDeclaration:t=G.FunctionScopedDeclaration,a.tokens[a.tokens.length-1].identifierRole=t}function Vn(e){switch(a.type){case n._this:{const t=ae(0);w(),ie(t);return}case n._yield:case n.name:{a.type=n.name,Wt(e);return}case n.bracketL:{w(),Ks(n.bracketR,e,!0);return}case n.braceL:oi(!0,e);return;default:ne()}}function Ks(e,t,r=!1,s=!1,i=0){let o=!0,c=!1;const u=a.tokens.length;for(;!k(e)&&!a.error;)if(o?o=!1:(v(n.comma),a.tokens[a.tokens.length-1].contextId=i,!c&&a.tokens[u].isType&&(a.tokens[a.tokens.length-1].isType=!0,c=!0)),!(r&&p(n.comma))){if(k(e))break;if(p(n.ellipsis)){Wa(t),Ga(),k(n.comma),v(e);break}else Eu(s,t)}}function Eu(e,t){e&&Qs([d._public,d._protected,d._private,d._readonly,d._override]),Sn(t),Ga(),Sn(t,!0)}function Ga(){me?zh():pe&&Dp()}function Sn(e,t=!1){if(t||Vn(e),!k(n.eq))return;const r=a.tokens.length-1;ze(),a.tokens[r].rhsEndIndex=a.tokens.length}function Ps(){return p(n.name)}function Cu(){return p(n.name)||!!(a.type&n.IS_KEYWORD)||p(n.string)||p(n.num)||p(n.bigint)||p(n.decimal)}function Xa(){const e=a.snapshot();return w(),(p(n.bracketL)||p(n.braceL)||p(n.star)||p(n.ellipsis)||p(n.hash)||Cu())&&!Xe()?!0:(a.restoreFromSnapshot(e),!1)}function Qs(e){for(;Ya(e)!==null;);}function Ya(e){if(!p(n.name))return null;const t=a.contextualKeyword;if(e.indexOf(t)!==-1&&Xa()){switch(t){case d._readonly:a.tokens[a.tokens.length-1].type=n._readonly;break;case d._abstract:a.tokens[a.tokens.length-1].type=n._abstract;break;case d._static:a.tokens[a.tokens.length-1].type=n._static;break;case d._public:a.tokens[a.tokens.length-1].type=n._public;break;case d._private:a.tokens[a.tokens.length-1].type=n._private;break;case d._protected:a.tokens[a.tokens.length-1].type=n._protected;break;case d._override:a.tokens[a.tokens.length-1].type=n._override;break;case d._declare:a.tokens[a.tokens.length-1].type=n._declare;break}return t}return null}function sn(){for(J();k(n.dot);)J()}function Tu(){sn(),!Xe()&&p(n.lessThan)&&wr()}function Au(){w(),an()}function Pu(){w()}function Nu(){v(n._typeof),p(n._import)?Ka():sn(),!Xe()&&p(n.lessThan)&&wr()}function Ka(){v(n._import),v(n.parenL),v(n.string),v(n.parenR),k(n.dot)&&sn(),p(n.lessThan)&&wr()}function Ru(){k(n._const);const e=k(n._in),t=Fe(d._out);k(n._const),(e||t)&&!p(n.name)?a.tokens[a.tokens.length-1].type=n.name:J(),k(n._extends)&&Ae(),k(n.eq)&&Ae()}function sr(){p(n.lessThan)&&$n()}function $n(){const e=ae(0);for(p(n.lessThan)||p(n.typeParameterStart)?w():ne();!k(n.greaterThan)&&!a.error;)Ru(),k(n.comma);ie(e)}function Js(e){const t=e===n.arrow;sr(),v(n.parenL),a.scopeDepth++,Lu(!1),a.scopeDepth--,(t||p(e))&&Kr(e)}function Lu(e){Ks(n.parenR,e)}function In(){k(n.comma)||Se()}function Gi(){Js(n.colon),In()}function Du(){const e=a.snapshot();w();const t=k(n.name)&&p(n.colon);return a.restoreFromSnapshot(e),t}function Qa(){if(!(p(n.bracketL)&&Du()))return!1;const e=ae(0);return v(n.bracketL),J(),an(),v(n.bracketR),vr(),In(),ie(e),!0}function Xi(e){k(n.question),!e&&(p(n.parenL)||p(n.lessThan))?(Js(n.colon),In()):(vr(),In())}function Ou(){if(p(n.parenL)||p(n.lessThan)){Gi();return}if(p(n._new)){w(),p(n.parenL)||p(n.lessThan)?Gi():Xi(!1);return}const e=!!Ya([d._readonly]);Qa()||((U(d._get)||U(d._set))&&Xa(),Qr(-1),Xi(e))}function Mu(){Ja()}function Ja(){for(v(n.braceL);!k(n.braceR)&&!a.error;)Ou()}function ju(){const e=a.snapshot(),t=Fu();return a.restoreFromSnapshot(e),t}function Fu(){return w(),k(n.plus)||k(n.minus)?U(d._readonly):(U(d._readonly)&&w(),!p(n.bracketL)||(w(),!Ps())?!1:(w(),p(n._in)))}function Bu(){J(),v(n._in),Ae()}function Vu(){v(n.braceL),p(n.plus)||p(n.minus)?(w(),Re(d._readonly)):Fe(d._readonly),v(n.bracketL),Bu(),Fe(d._as)&&Ae(),v(n.bracketR),p(n.plus)||p(n.minus)?(w(),v(n.question)):k(n.question),ep(),Se(),v(n.braceR)}function $u(){for(v(n.bracketL);!k(n.bracketR)&&!a.error;)qu(),k(n.comma)}function qu(){k(n.ellipsis)?Ae():(Ae(),k(n.question)),k(n.colon)&&Ae()}function Uu(){v(n.parenL),Ae(),v(n.parenR)}function zu(){for(Bt(),Bt();!p(n.backQuote)&&!a.error;)v(n.dollarBraceL),Ae(),Bt(),Bt();w()}var qt;(function(e){e[e.TSFunctionType=0]="TSFunctionType";const r=1;e[e.TSConstructorType=r]="TSConstructorType";const s=r+1;e[e.TSAbstractConstructorType=s]="TSAbstractConstructorType"})(qt||(qt={}));function bs(e){e===qt.TSAbstractConstructorType&&Re(d._abstract),(e===qt.TSConstructorType||e===qt.TSAbstractConstructorType)&&v(n._new);const t=a.inDisallowConditionalTypesContext;a.inDisallowConditionalTypesContext=!1,Js(n.arrow),a.inDisallowConditionalTypesContext=t}function Hu(){switch(a.type){case n.name:Tu();return;case n._void:case n._null:w();return;case n.string:case n.num:case n.bigint:case n.decimal:case n._true:case n._false:yr();return;case n.minus:w(),yr();return;case n._this:{Pu(),U(d._is)&&!Xe()&&Au();return}case n._typeof:Nu();return;case n._import:Ka();return;case n.braceL:ju()?Vu():Mu();return;case n.bracketL:$u();return;case n.parenL:Uu();return;case n.backQuote:zu();return;default:if(a.type&n.IS_KEYWORD){w(),a.tokens[a.tokens.length-1].type=n.name;return}break}ne()}function Wu(){for(Hu();!Xe()&&k(n.bracketL);)k(n.bracketR)||(Ae(),v(n.bracketR))}function Gu(){if(Re(d._infer),J(),p(n._extends)){const e=a.snapshot();v(n._extends);const t=a.inDisallowConditionalTypesContext;a.inDisallowConditionalTypesContext=!0,Ae(),a.inDisallowConditionalTypesContext=t,(a.error||!a.inDisallowConditionalTypesContext&&p(n.question))&&a.restoreFromSnapshot(e)}}function Ns(){if(U(d._keyof)||U(d._unique)||U(d._readonly))w(),Ns();else if(U(d._infer))Gu();else{const e=a.inDisallowConditionalTypesContext;a.inDisallowConditionalTypesContext=!1,Wu(),a.inDisallowConditionalTypesContext=e}}function Yi(){if(k(n.bitwiseAND),Ns(),p(n.bitwiseAND))for(;k(n.bitwiseAND);)Ns()}function Xu(){if(k(n.bitwiseOR),Yi(),p(n.bitwiseOR))for(;k(n.bitwiseOR);)Yi()}function Yu(){return p(n.lessThan)?!0:p(n.parenL)&&Qu()}function Ku(){if(p(n.name)||p(n._this))return w(),!0;if(p(n.braceL)||p(n.bracketL)){let e=1;for(w();e>0&&!a.error;)p(n.braceL)||p(n.bracketL)?e++:(p(n.braceR)||p(n.bracketR))&&e--,w();return!0}return!1}function Qu(){const e=a.snapshot(),t=Ju();return a.restoreFromSnapshot(e),t}function Ju(){return w(),!!(p(n.parenR)||p(n.ellipsis)||Ku()&&(p(n.colon)||p(n.comma)||p(n.question)||p(n.eq)||p(n.parenR)&&(w(),p(n.arrow))))}function Kr(e){const t=ae(0);v(e),tp()||Ae(),ie(t)}function Zu(){p(n.colon)&&Kr(n.colon)}function vr(){p(n.colon)&&an()}function ep(){k(n.colon)&&Ae()}function tp(){const e=a.snapshot();return U(d._asserts)?(w(),Fe(d._is)?(Ae(),!0):Ps()||p(n._this)?(w(),Fe(d._is)&&Ae(),!0):(a.restoreFromSnapshot(e),!1)):Ps()||p(n._this)?(w(),U(d._is)&&!Xe()?(w(),Ae(),!0):(a.restoreFromSnapshot(e),!1)):!1}function an(){const e=ae(0);v(n.colon),Ae(),ie(e)}function Ae(){if(Ki(),a.inDisallowConditionalTypesContext||Xe()||!k(n._extends))return;const e=a.inDisallowConditionalTypesContext;a.inDisallowConditionalTypesContext=!0,Ki(),a.inDisallowConditionalTypesContext=e,v(n.question),Ae(),v(n.colon),Ae()}function rp(){return U(d._abstract)&&Te()===n._new}function Ki(){if(Yu()){bs(qt.TSFunctionType);return}if(p(n._new)){bs(qt.TSConstructorType);return}else if(rp()){bs(qt.TSAbstractConstructorType);return}Xu()}function np(){const e=ae(1);Ae(),v(n.greaterThan),ie(e),on()}function sp(){if(k(n.jsxTagStart)){a.tokens[a.tokens.length-1].type=n.typeParameterStart;const e=ae(1);for(;!p(n.greaterThan)&&!a.error;)Ae(),k(n.comma);ot(),ie(e)}}function Za(){for(;!p(n.braceL)&&!a.error;)ip(),k(n.comma)}function ip(){sn(),p(n.lessThan)&&wr()}function ap(){Wt(!1),sr(),k(n._extends)&&Za(),Ja()}function op(){Wt(!1),sr(),v(n.eq),Ae(),Se()}function cp(){if(p(n.string)?yr():J(),k(n.eq)){const e=a.tokens.length-1;ze(),a.tokens[e].rhsEndIndex=a.tokens.length}}function Zs(){for(Wt(!1),v(n.braceL);!k(n.braceR)&&!a.error;)cp(),k(n.comma)}function ei(){v(n.braceL),Hn(n.braceR)}function Rs(){Wt(!1),k(n.dot)?Rs():ei()}function eo(){U(d._global)?J():p(n.string)?Pt():ne(),p(n.braceL)?ei():Se()}function Ls(){_n(),v(n.eq),up(),Se()}function lp(){return U(d._require)&&Te()===n.parenL}function up(){lp()?pp():sn()}function pp(){Re(d._require),v(n.parenL),p(n.string)||ne(),yr(),v(n.parenR)}function hp(){if(yt())return!1;switch(a.type){case n._function:{const e=ae(1);w();const t=a.start;return tr(t,!0),ie(e),!0}case n._class:{const e=ae(1);return rr(!0,!1),ie(e),!0}case n._const:if(p(n._const)&&Ws(d._enum)){const e=ae(1);return v(n._const),Re(d._enum),a.tokens[a.tokens.length-1].type=n._enum,Zs(),ie(e),!0}case n._var:case n._let:{const e=ae(1);return kn(a.type!==n._var),ie(e),!0}case n.name:{const e=ae(1),t=a.contextualKeyword;let r=!1;return t===d._global?(eo(),r=!0):r=qn(t,!0),ie(e),r}default:return!1}}function Qi(){return qn(a.contextualKeyword,!0)}function fp(e){switch(e){case d._declare:{const t=a.tokens.length-1;if(hp())return a.tokens[t].type=n._declare,!0;break}case d._global:if(p(n.braceL))return ei(),!0;break;default:return qn(e,!1)}return!1}function qn(e,t){switch(e){case d._abstract:if(xr(t)&&p(n._class))return a.tokens[a.tokens.length-1].type=n._abstract,rr(!0,!1),!0;break;case d._enum:if(xr(t)&&p(n.name))return a.tokens[a.tokens.length-1].type=n._enum,Zs(),!0;break;case d._interface:if(xr(t)&&p(n.name)){const r=ae(t?2:1);return ap(),ie(r),!0}break;case d._module:if(xr(t)){if(p(n.string)){const r=ae(t?2:1);return eo(),ie(r),!0}else if(p(n.name)){const r=ae(t?2:1);return Rs(),ie(r),!0}}break;case d._namespace:if(xr(t)&&p(n.name)){const r=ae(t?2:1);return Rs(),ie(r),!0}break;case d._type:if(xr(t)&&p(n.name)){const r=ae(t?2:1);return op(),ie(r),!0}break}return!1}function xr(e){return e?(w(),!0):!yt()}function dp(){const e=a.snapshot();return $n(),_r(),Zu(),v(n.arrow),a.error?(a.restoreFromSnapshot(e),!1):(cn(!0),!0)}function ti(){a.type===n.bitShiftL&&(a.pos-=1,re(n.lessThan)),wr()}function wr(){const e=ae(0);for(v(n.lessThan);!p(n.greaterThan)&&!a.error;)Ae(),k(n.comma);e?(v(n.greaterThan),ie(e)):(ie(e),Da(),v(n.greaterThan),a.tokens[a.tokens.length-1].isType=!0)}function to(){if(p(n.name))switch(a.contextualKeyword){case d._abstract:case d._declare:case d._enum:case d._interface:case d._module:case d._namespace:case d._type:return!0}return!1}function mp(e,t){if(p(n.colon)&&Kr(n.colon),!p(n.braceL)&&yt()){let r=a.tokens.length-1;for(;r>=0&&(a.tokens[r].start>=e||a.tokens[r].type===n._default||a.tokens[r].type===n._export);)a.tokens[r].isType=!0,r--;return}cn(!1,t)}function gp(e,t,r){if(!Xe()&&k(n.bang)){a.tokens[a.tokens.length-1].type=n.nonNullAssertion;return}if(p(n.lessThan)||p(n.bitShiftL)){const s=a.snapshot();if(!t&&lo()&&dp())return;if(ti(),!t&&k(n.parenL)?(a.tokens[a.tokens.length-1].subscriptStartIndex=e,Ut()):p(n.backQuote)?ai():(a.type===n.greaterThan||a.type!==n.parenL&&a.type&n.IS_EXPRESSION_START&&!Xe())&&ne(),a.error)a.restoreFromSnapshot(s);else return}else!t&&p(n.questionDot)&&Te()===n.lessThan&&(w(),a.tokens[e].isOptionalChainStart=!0,a.tokens[a.tokens.length-1].subscriptStartIndex=e,wr(),v(n.parenL),Ut());ni(e,t,r)}function xp(){if(k(n._import))return U(d._type)&&Te()!==n.eq&&Re(d._type),Ls(),!0;if(k(n.eq))return Ue(),Se(),!0;if(Fe(d._as))return Re(d._namespace),J(),Se(),!0;if(U(d._type)){const e=Te();(e===n.braceL||e===n.star)&&w()}return!1}function kp(){if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-1].identifierRole=G.ImportDeclaration;return}if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-1].identifierRole=G.ImportDeclaration,a.tokens[a.tokens.length-2].isType=!0,a.tokens[a.tokens.length-1].isType=!0;return}if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-3].identifierRole=G.ImportAccess,a.tokens[a.tokens.length-1].identifierRole=G.ImportDeclaration;return}J(),a.tokens[a.tokens.length-3].identifierRole=G.ImportAccess,a.tokens[a.tokens.length-1].identifierRole=G.ImportDeclaration,a.tokens[a.tokens.length-4].isType=!0,a.tokens[a.tokens.length-3].isType=!0,a.tokens[a.tokens.length-2].isType=!0,a.tokens[a.tokens.length-1].isType=!0}function bp(){if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-1].identifierRole=G.ExportAccess;return}if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-1].identifierRole=G.ExportAccess,a.tokens[a.tokens.length-2].isType=!0,a.tokens[a.tokens.length-1].isType=!0;return}if(J(),p(n.comma)||p(n.braceR)){a.tokens[a.tokens.length-3].identifierRole=G.ExportAccess;return}J(),a.tokens[a.tokens.length-3].identifierRole=G.ExportAccess,a.tokens[a.tokens.length-4].isType=!0,a.tokens[a.tokens.length-3].isType=!0,a.tokens[a.tokens.length-2].isType=!0,a.tokens[a.tokens.length-1].isType=!0}function yp(){if(U(d._abstract)&&Te()===n._class)return a.type=n._abstract,w(),rr(!0,!0),!0;if(U(d._interface)){const e=ae(2);return qn(d._interface,!0),ie(e),!0}return!1}function vp(){if(a.type===n._const){const e=nn();if(e.type===n.name&&e.contextualKeyword===d._enum)return v(n._const),Re(d._enum),a.tokens[a.tokens.length-1].type=n._enum,Zs(),!0}return!1}function wp(e){const t=a.tokens.length;Qs([d._abstract,d._readonly,d._declare,d._static,d._override]);const r=a.tokens.length;if(Qa()){const i=e?t-1:t;for(let o=i;o<r;o++)a.tokens[o].isType=!0;return!0}return!1}function _p(e){fp(e)||Se()}function Sp(){const e=Fe(d._declare);e&&(a.tokens[a.tokens.length-1].type=n._declare);let t=!1;if(p(n.name))if(e){const r=ae(2);t=Qi(),ie(r)}else t=Qi();if(!t)if(e){const r=ae(2);rt(!0),ie(r)}else rt(!0)}function Ip(e){if(e&&(p(n.lessThan)||p(n.bitShiftL))&&ti(),Fe(d._implements)){a.tokens[a.tokens.length-1].type=n._implements;const t=ae(1);Za(),ie(t)}}function Ep(){sr()}function Cp(){sr()}function Tp(){const e=ae(0);Xe()||k(n.bang),vr(),ie(e)}function Ap(){p(n.colon)&&an()}function Pp(e,t){return Fn?Np(e,t):Rp(e,t)}function Np(e,t){if(!p(n.lessThan))return wt(e,t);const r=a.snapshot();let s=wt(e,t);if(a.error)a.restoreFromSnapshot(r);else return s;return a.type=n.typeParameterStart,$n(),s=wt(e,t),s||ne(),s}function Rp(e,t){if(!p(n.lessThan))return wt(e,t);const r=a.snapshot();$n();const s=wt(e,t);if(s||ne(),a.error)a.restoreFromSnapshot(r);else return s;return wt(e,t)}function Lp(){if(p(n.colon)){const e=a.snapshot();Kr(n.colon),tt()&&ne(),p(n.arrow)||ne(),a.error&&a.restoreFromSnapshot(e)}return k(n.arrow)}function Dp(){const e=ae(0);k(n.question),vr(),ie(e)}function Op(){(p(n.lessThan)||p(n.bitShiftL))&&ti(),wo()}function Mp(){let e=!1,t=!1;for(;;){if(a.pos>=N.length){ne("Unterminated JSX contents");return}const r=N.charCodeAt(a.pos);if(r===g.lessThan||r===g.leftCurlyBrace){if(a.pos===a.start){if(r===g.lessThan){a.pos++,re(n.jsxTagStart);return}Oa(r);return}re(e&&!t?n.jsxEmptyText:n.jsxText);return}r===g.lineFeed?e=!0:r!==g.space&&r!==g.carriageReturn&&r!==g.tab&&(t=!0),a.pos++}}function jp(e){for(a.pos++;;){if(a.pos>=N.length){ne("Unterminated string constant");return}if(N.charCodeAt(a.pos)===e){a.pos++;break}a.pos++}re(n.string)}function Fp(){let e;do{if(a.pos>N.length){ne("Unexpectedly reached the end of input.");return}e=N.charCodeAt(++a.pos)}while(dt[e]||e===g.dash);re(n.jsxName)}function Ds(){ot()}function ro(e){if(Ds(),!k(n.colon)){a.tokens[a.tokens.length-1].identifierRole=e;return}Ds()}function no(){const e=a.tokens.length;ro(G.Access);let t=!1;for(;p(n.dot);)t=!0,ot(),Ds();if(!t){const r=a.tokens[e],s=N.charCodeAt(r.start);s>=g.lowercaseA&&s<=g.lowercaseZ&&(r.identifierRole=null)}}function Bp(){switch(a.type){case n.braceL:w(),Ue(),ot();return;case n.jsxTagStart:io(),ot();return;case n.string:ot();return;default:ne("JSX value should be either an expression or a quoted JSX text")}}function Vp(){v(n.ellipsis),Ue()}function $p(e){if(p(n.jsxTagEnd))return!1;no(),pe&&sp();let t=!1;for(;!p(n.slash)&&!p(n.jsxTagEnd)&&!a.error;){if(k(n.braceL)){t=!0,v(n.ellipsis),ze(),ot();continue}t&&a.end-a.start===3&&N.charCodeAt(a.start)===g.lowercaseK&&N.charCodeAt(a.start+1)===g.lowercaseE&&N.charCodeAt(a.start+2)===g.lowercaseY&&(a.tokens[e].jsxRole=ft.KeyAfterPropSpread),ro(G.ObjectKey),p(n.eq)&&(ot(),Bp())}const r=p(n.slash);return r&&ot(),r}function qp(){p(n.jsxTagEnd)||no()}function so(){const e=a.tokens.length-1;a.tokens[e].jsxRole=ft.NoChildren;let t=0;if(!$p(e))for(kr();;)switch(a.type){case n.jsxTagStart:if(ot(),p(n.slash)){ot(),qp(),a.tokens[e].jsxRole!==ft.KeyAfterPropSpread&&(t===1?a.tokens[e].jsxRole=ft.OneChild:t>1&&(a.tokens[e].jsxRole=ft.StaticChildren));return}t++,so(),kr();break;case n.jsxText:t++,kr();break;case n.jsxEmptyText:kr();break;case n.braceL:w(),p(n.ellipsis)?(Vp(),kr(),t+=2):(p(n.braceR)||(t++,Ue()),kr());break;default:ne();return}}function io(){ot(),so()}function ot(){a.tokens.push(new Bn),Ra(),a.start=a.pos;const e=N.charCodeAt(a.pos);if(rn[e])Fp();else if(e===g.quotationMark||e===g.apostrophe)jp(e);else switch(++a.pos,e){case g.greaterThan:re(n.jsxTagEnd);break;case g.lessThan:re(n.jsxTagStart);break;case g.slash:re(n.slash);break;case g.equalsTo:re(n.eq);break;case g.leftCurlyBrace:re(n.braceL);break;case g.dot:re(n.dot);break;case g.colon:re(n.colon);break;default:ne()}}function kr(){a.tokens.push(new Bn),a.start=a.pos,Mp()}function Up(e){if(p(n.question)){const t=Te();if(t===n.colon||t===n.comma||t===n.parenR)return}ao(e)}function zp(){Ca(n.question),p(n.colon)&&(pe?an():me&&ir())}class Hp{constructor(t){this.stop=t}}function Ue(e=!1){if(ze(e),p(n.comma))for(;k(n.comma);)ze(e)}function ze(e=!1,t=!1){return pe?Pp(e,t):me?Kh(e,t):wt(e,t)}function wt(e,t){if(p(n._yield))return oh(),!1;(p(n.parenL)||p(n.name)||p(n._yield))&&(a.potentialArrowAt=a.start);const r=Wp(e);return t&&ii(),a.type&n.IS_ASSIGN?(w(),ze(e),!1):r}function Wp(e){return Xp(e)?!0:(Gp(e),!1)}function Gp(e){pe||me?Up(e):ao(e)}function ao(e){k(n.question)&&(ze(),v(n.colon),ze(e))}function Xp(e){const t=a.tokens.length;return on()?!0:(gn(t,-1,e),!1)}function gn(e,t,r){if(pe&&(n._in&n.PRECEDENCE_MASK)>t&&!Xe()&&(Fe(d._as)||Fe(d._satisfies))){const i=ae(1);Ae(),ie(i),Da(),gn(e,t,r);return}const s=a.type&n.PRECEDENCE_MASK;if(s>0&&(!r||!p(n._in))&&s>t){const i=a.type;w(),i===n.nullishCoalescing&&(a.tokens[a.tokens.length-1].nullishStartIndex=e);const o=a.tokens.length;on(),gn(o,i&n.IS_RIGHT_ASSOCIATIVE?s-1:s,r),i===n.nullishCoalescing&&(a.tokens[e].numNullishCoalesceStarts++,a.tokens[a.tokens.length-1].numNullishCoalesceEnds++),gn(e,t,r)}}function on(){if(pe&&!Fn&&k(n.lessThan))return np(),!1;if(U(d._module)&&Aa()===g.leftCurlyBrace&&!wa())return ch(),!1;if(a.type&n.IS_PREFIX)return w(),on(),!1;if(oo())return!0;for(;a.type&n.IS_POSTFIX&&!tt();)a.type===n.preIncDec&&(a.type=n.postIncDec),w();return!1}function oo(){const e=a.tokens.length;return Pt()?!0:(ri(e),a.tokens.length>e&&a.tokens[e].isOptionalChainStart&&(a.tokens[a.tokens.length-1].isOptionalChainEnd=!0),!1)}function ri(e,t=!1){me?Jh(e,t):co(e,t)}function co(e,t=!1){const r=new Hp(!1);do Yp(e,t,r);while(!r.stop&&!a.error)}function Yp(e,t,r){pe?gp(e,t,r):me?Rh(e,t,r):ni(e,t,r)}function ni(e,t,r){if(!t&&k(n.doubleColon))si(),r.stop=!0,ri(e,t);else if(p(n.questionDot)){if(a.tokens[e].isOptionalChainStart=!0,t&&Te()===n.parenL){r.stop=!0;return}w(),a.tokens[a.tokens.length-1].subscriptStartIndex=e,k(n.bracketL)?(Ue(),v(n.bracketR)):k(n.parenL)?Ut():En()}else if(k(n.dot))a.tokens[a.tokens.length-1].subscriptStartIndex=e,En();else if(k(n.bracketL))a.tokens[a.tokens.length-1].subscriptStartIndex=e,Ue(),v(n.bracketR);else if(!t&&p(n.parenL))if(lo()){const s=a.snapshot(),i=a.tokens.length;w(),a.tokens[a.tokens.length-1].subscriptStartIndex=e;const o=Xr();a.tokens[a.tokens.length-1].contextId=o,Ut(),a.tokens[a.tokens.length-1].contextId=o,Kp()&&(a.restoreFromSnapshot(s),r.stop=!0,a.scopeDepth++,_r(),Qp(i))}else{w(),a.tokens[a.tokens.length-1].subscriptStartIndex=e;const s=Xr();a.tokens[a.tokens.length-1].contextId=s,Ut(),a.tokens[a.tokens.length-1].contextId=s}else p(n.backQuote)?ai():r.stop=!0}function lo(){return a.tokens[a.tokens.length-1].contextualKeyword===d._async&&!tt()}function Ut(){let e=!0;for(;!k(n.parenR)&&!a.error;){if(e)e=!1;else if(v(n.comma),k(n.parenR))break;fo(!1)}}function Kp(){return p(n.colon)||p(n.arrow)}function Qp(e){pe?Ap():me&&Yh(),v(n.arrow),Jr(e)}function si(){const e=a.tokens.length;Pt(),ri(e,!0)}function Pt(){if(k(n.modulo))return J(),!1;if(p(n.jsxText)||p(n.jsxEmptyText))return yr(),!1;if(p(n.lessThan)&&Fn)return a.type=n.jsxTagStart,io(),w(),!1;const e=a.potentialArrowAt===a.start;switch(a.type){case n.slash:case n.assign:yl();case n._super:case n._this:case n.regexp:case n.num:case n.bigint:case n.decimal:case n.string:case n._null:case n._true:case n._false:return w(),!1;case n._import:return w(),p(n.dot)&&(a.tokens[a.tokens.length-1].type=n.name,w(),J()),!1;case n.name:{const t=a.tokens.length,r=a.start,s=a.contextualKeyword;return J(),s===d._await?(ah(),!1):s===d._async&&p(n._function)&&!tt()?(w(),tr(r,!1),!1):e&&s===d._async&&!tt()&&p(n.name)?(a.scopeDepth++,Wt(!1),v(n.arrow),Jr(t),!0):p(n._do)&&!tt()?(w(),zt(),!1):e&&!tt()&&p(n.arrow)?(a.scopeDepth++,Ys(!1),v(n.arrow),Jr(t),!0):(a.tokens[a.tokens.length-1].identifierRole=G.Access,!1)}case n._do:return w(),zt(),!1;case n.parenL:return uo(e);case n.bracketL:return w(),ho(n.bracketR,!0),!1;case n.braceL:return oi(!1,!1),!1;case n._function:return Jp(),!1;case n.at:gi();case n._class:return rr(!1),!1;case n._new:return eh(),!1;case n.backQuote:return ai(),!1;case n.doubleColon:return w(),si(),!1;case n.hash:{const t=Aa();return rn[t]||t===g.backslash?En():w(),!1}default:return ne(),!1}}function En(){k(n.hash),J()}function Jp(){const e=a.start;J(),k(n.dot)&&J(),tr(e,!1)}function yr(){w()}function Un(){v(n.parenL),Ue(),v(n.parenR)}function uo(e){const t=a.snapshot(),r=a.tokens.length;v(n.parenL);let s=!0;for(;!p(n.parenR)&&!a.error;){if(s)s=!1;else if(v(n.comma),p(n.parenR))break;if(p(n.ellipsis)){Wa(!1),ii();break}else ze(!1,!0)}return v(n.parenR),e&&Zp()&&Os()?(a.restoreFromSnapshot(t),a.scopeDepth++,_r(),Os(),Jr(r),a.error?(a.restoreFromSnapshot(t),uo(!1),!1):!0):!1}function Zp(){return p(n.colon)||!tt()}function Os(){return pe?Lp():me?Qh():k(n.arrow)}function ii(){(pe||me)&&zp()}function eh(){if(v(n._new),k(n.dot)){J();return}th(),me&&Lh(),k(n.parenL)&&ho(n.parenR)}function th(){si(),k(n.questionDot)}function ai(){for(Bt(),Bt();!p(n.backQuote)&&!a.error;)v(n.dollarBraceL),Ue(),Bt(),Bt();w()}function oi(e,t){const r=Xr();let s=!0;for(w(),a.tokens[a.tokens.length-1].contextId=r;!k(n.braceR)&&!a.error;){if(s)s=!1;else if(v(n.comma),k(n.braceR))break;let i=!1;if(p(n.ellipsis)){const o=a.tokens.length;if(Ha(),e&&(a.tokens.length===o+2&&Ys(t),k(n.braceR)))break;continue}e||(i=k(n.star)),!e&&U(d._async)?(i&&ne(),J(),p(n.colon)||p(n.parenL)||p(n.braceR)||p(n.eq)||p(n.comma)||(p(n.star)&&(w(),i=!0),Qr(r))):Qr(r),ih(e,t,r)}a.tokens[a.tokens.length-1].contextId=r}function rh(e){return!e&&(p(n.string)||p(n.num)||p(n.bracketL)||p(n.name)||!!(a.type&n.IS_KEYWORD))}function nh(e,t){const r=a.start;return p(n.parenL)?(e&&ne(),Ms(r,!1),!0):rh(e)?(Qr(t),Ms(r,!1),!0):!1}function sh(e,t){if(k(n.colon)){e?Sn(t):ze(!1);return}let r;e?a.scopeDepth===0?r=G.ObjectShorthandTopLevelDeclaration:t?r=G.ObjectShorthandBlockScopedDeclaration:r=G.ObjectShorthandFunctionScopedDeclaration:r=G.ObjectShorthand,a.tokens[a.tokens.length-1].identifierRole=r,Sn(t,!0)}function ih(e,t,r){pe?Ep():me&&Uh(),nh(e,r)||sh(e,t)}function Qr(e){me&&mi(),k(n.bracketL)?(a.tokens[a.tokens.length-1].contextId=e,ze(),v(n.bracketR),a.tokens[a.tokens.length-1].contextId=e):(p(n.num)||p(n.string)||p(n.bigint)||p(n.decimal)?Pt():En(),a.tokens[a.tokens.length-1].identifierRole=G.ObjectKey,a.tokens[a.tokens.length-1].contextId=e)}function Ms(e,t){const r=Xr();a.scopeDepth++;const s=a.tokens.length;_r(t,r),po(e,r);const o=a.tokens.length;a.scopes.push(new _t(s,o,!0)),a.scopeDepth--}function Jr(e){cn(!0);const t=a.tokens.length;a.scopes.push(new _t(e,t,!0)),a.scopeDepth--}function po(e,t=0){pe?mp(e,t):me?Nh(t):cn(!1,t)}function cn(e,t=0){e&&!p(n.braceL)?ze():zt(!0,t)}function ho(e,t=!1){let r=!0;for(;!k(e)&&!a.error;){if(r)r=!1;else if(v(n.comma),k(e))break;fo(t)}}function fo(e){e&&p(n.comma)||(p(n.ellipsis)?(Ha(),ii()):p(n.question)?w():ze(!1,!0))}function J(){w(),a.tokens[a.tokens.length-1].type=n.name}function ah(){on()}function oh(){w(),!p(n.semi)&&!tt()&&(k(n.star),ze())}function ch(){Re(d._module),v(n.braceL),Hn(n.braceR)}function lh(e){return(e.type===n.name||!!(e.type&n.IS_KEYWORD))&&e.contextualKeyword!==d._from}function St(e){const t=ae(0);v(e||n.colon),Qe(),ie(t)}function Ji(){v(n.modulo),Re(d._checks),k(n.parenL)&&(Ue(),v(n.parenR))}function ci(){const e=ae(0);v(n.colon),p(n.modulo)?Ji():(Qe(),p(n.modulo)&&Ji()),ie(e)}function uh(){w(),li(!0)}function ph(){w(),J(),p(n.lessThan)&&gt(),v(n.parenL),Fs(),v(n.parenR),ci(),Se()}function js(){p(n._class)?uh():p(n._function)?ph():p(n._var)?hh():Fe(d._module)?k(n.dot)?mh():fh():U(d._type)?gh():U(d._opaque)?xh():U(d._interface)?kh():p(n._export)?dh():ne()}function hh(){w(),ko(),Se()}function fh(){for(p(n.string)?Pt():J(),v(n.braceL);!p(n.braceR)&&!a.error;)p(n._import)?(w(),To()):ne();v(n.braceR)}function dh(){v(n._export),k(n._default)?p(n._function)||p(n._class)?js():(Qe(),Se()):p(n._var)||p(n._function)||p(n._class)||U(d._opaque)?js():p(n.star)||p(n.braceL)||U(d._interface)||U(d._type)||U(d._opaque)?Eo():ne()}function mh(){Re(d._exports),ir(),Se()}function gh(){w(),pi()}function xh(){w(),hi(!0)}function kh(){w(),li()}function li(e=!1){if(zn(),p(n.lessThan)&&gt(),k(n._extends))do xn();while(!e&&k(n.comma));if(U(d._mixins)){w();do xn();while(k(n.comma))}if(U(d._implements)){w();do xn();while(k(n.comma))}Cn(e,!1,e)}function xn(){mo(!1),p(n.lessThan)&&er()}function ui(){li()}function zn(){J()}function pi(){zn(),p(n.lessThan)&&gt(),St(n.eq),Se()}function hi(e){Re(d._type),zn(),p(n.lessThan)&&gt(),p(n.colon)&&St(n.colon),e||St(n.eq),Se()}function bh(){mi(),ko(),k(n.eq)&&Qe()}function gt(){const e=ae(0);p(n.lessThan)||p(n.typeParameterStart)?w():ne();do bh(),p(n.greaterThan)||v(n.comma);while(!p(n.greaterThan)&&!a.error);v(n.greaterThan),ie(e)}function er(){const e=ae(0);for(v(n.lessThan);!p(n.greaterThan)&&!a.error;)Qe(),p(n.greaterThan)||v(n.comma);v(n.greaterThan),ie(e)}function yh(){if(Re(d._interface),k(n._extends))do xn();while(k(n.comma));Cn(!1,!1,!1)}function fi(){p(n.num)||p(n.string)?Pt():J()}function vh(){Te()===n.colon?(fi(),St()):Qe(),v(n.bracketR),St()}function wh(){fi(),v(n.bracketR),v(n.bracketR),p(n.lessThan)||p(n.parenL)?di():(k(n.question),St())}function di(){for(p(n.lessThan)&&gt(),v(n.parenL);!p(n.parenR)&&!p(n.ellipsis)&&!a.error;)Tn(),p(n.parenR)||v(n.comma);k(n.ellipsis)&&Tn(),v(n.parenR),St()}function _h(){di()}function Cn(e,t,r){let s;for(t&&p(n.braceBarL)?(v(n.braceBarL),s=n.braceBarR):(v(n.braceL),s=n.braceR);!p(s)&&!a.error;){if(r&&U(d._proto)){const i=Te();i!==n.colon&&i!==n.question&&(w(),e=!1)}if(e&&U(d._static)){const i=Te();i!==n.colon&&i!==n.question&&w()}if(mi(),k(n.bracketL))k(n.bracketL)?wh():vh();else if(p(n.parenL)||p(n.lessThan))_h();else{if(U(d._get)||U(d._set)){const i=Te();(i===n.name||i===n.string||i===n.num)&&w()}Sh()}Ih()}v(s)}function Sh(){if(p(n.ellipsis)){if(v(n.ellipsis),k(n.comma)||k(n.semi),p(n.braceR))return;Qe()}else fi(),p(n.lessThan)||p(n.parenL)?di():(k(n.question),St())}function Ih(){!k(n.semi)&&!k(n.comma)&&!p(n.braceR)&&!p(n.braceBarR)&&ne()}function mo(e){for(e||J();k(n.dot);)J()}function Eh(){mo(!0),p(n.lessThan)&&er()}function Ch(){v(n._typeof),go()}function Th(){for(v(n.bracketL);a.pos<N.length&&!p(n.bracketR)&&(Qe(),!p(n.bracketR));)v(n.comma);v(n.bracketR)}function Tn(){const e=Te();e===n.colon||e===n.question?(J(),k(n.question),St()):Qe()}function Fs(){for(;!p(n.parenR)&&!p(n.ellipsis)&&!a.error;)Tn(),p(n.parenR)||v(n.comma);k(n.ellipsis)&&Tn()}function go(){let e=!1;const t=a.noAnonFunctionType;switch(a.type){case n.name:{if(U(d._interface)){yh();return}J(),Eh();return}case n.braceL:Cn(!1,!1,!1);return;case n.braceBarL:Cn(!1,!0,!1);return;case n.bracketL:Th();return;case n.lessThan:gt(),v(n.parenL),Fs(),v(n.parenR),v(n.arrow),Qe();return;case n.parenL:if(w(),!p(n.parenR)&&!p(n.ellipsis))if(p(n.name)){const r=Te();e=r!==n.question&&r!==n.colon}else e=!0;if(e)if(a.noAnonFunctionType=!1,Qe(),a.noAnonFunctionType=t,a.noAnonFunctionType||!(p(n.comma)||p(n.parenR)&&Te()===n.arrow)){v(n.parenR);return}else k(n.comma);Fs(),v(n.parenR),v(n.arrow),Qe();return;case n.minus:w(),yr();return;case n.string:case n.num:case n._true:case n._false:case n._null:case n._this:case n._void:case n.star:w();return;default:if(a.type===n._typeof){Ch();return}else if(a.type&n.IS_KEYWORD){w(),a.tokens[a.tokens.length-1].type=n.name;return}}ne()}function Ah(){for(go();!tt()&&(p(n.bracketL)||p(n.questionDot));)k(n.questionDot),v(n.bracketL),k(n.bracketR)||(Qe(),v(n.bracketR))}function xo(){k(n.question)?xo():Ah()}function Zi(){xo(),!a.noAnonFunctionType&&k(n.arrow)&&Qe()}function ea(){for(k(n.bitwiseAND),Zi();k(n.bitwiseAND);)Zi()}function Ph(){for(k(n.bitwiseOR),ea();k(n.bitwiseOR);)ea()}function Qe(){Ph()}function ir(){St()}function ko(){J(),p(n.colon)&&ir()}function mi(){(p(n.plus)||p(n.minus))&&(w(),a.tokens[a.tokens.length-1].isType=!0)}function Nh(e){p(n.colon)&&ci(),cn(!1,e)}function Rh(e,t,r){if(p(n.questionDot)&&Te()===n.lessThan){if(t){r.stop=!0;return}w(),er(),v(n.parenL),Ut();return}else if(!t&&p(n.lessThan)){const s=a.snapshot();if(er(),v(n.parenL),Ut(),a.error)a.restoreFromSnapshot(s);else return}ni(e,t,r)}function Lh(){if(p(n.lessThan)){const e=a.snapshot();er(),a.error&&a.restoreFromSnapshot(e)}}function Dh(){if(p(n.name)&&a.contextualKeyword===d._interface){const e=ae(0);return w(),ui(),ie(e),!0}else if(U(d._enum))return bo(),!0;return!1}function Oh(){return U(d._enum)?(bo(),!0):!1}function Mh(e){if(e===d._declare){if(p(n._class)||p(n.name)||p(n._function)||p(n._var)||p(n._export)){const t=ae(1);js(),ie(t)}}else if(p(n.name)){if(e===d._interface){const t=ae(1);ui(),ie(t)}else if(e===d._type){const t=ae(1);pi(),ie(t)}else if(e===d._opaque){const t=ae(1);hi(!1),ie(t)}}Se()}function jh(){return U(d._type)||U(d._interface)||U(d._opaque)||U(d._enum)}function Fh(){return p(n.name)&&(a.contextualKeyword===d._type||a.contextualKeyword===d._interface||a.contextualKeyword===d._opaque||a.contextualKeyword===d._enum)}function Bh(){if(U(d._type)){const e=ae(1);w(),p(n.braceL)?(xi(),Zr()):pi(),ie(e)}else if(U(d._opaque)){const e=ae(1);w(),hi(!1),ie(e)}else if(U(d._interface)){const e=ae(1);w(),ui(),ie(e)}else rt(!0)}function Vh(){return p(n.star)||U(d._type)&&Te()===n.star}function $h(){if(Fe(d._type)){const e=ae(2);Bs(),ie(e)}else Bs()}function qh(e){if(e&&p(n.lessThan)&&er(),U(d._implements)){const t=ae(0);w(),a.tokens[a.tokens.length-1].type=n._implements;do zn(),p(n.lessThan)&&er();while(k(n.comma));ie(t)}}function Uh(){p(n.lessThan)&&(gt(),p(n.parenL)||ne())}function zh(){const e=ae(0);k(n.question),p(n.colon)&&ir(),ie(e)}function Hh(){if(p(n._typeof)||U(d._type)){const e=nn();(lh(e)||e.type===n.braceL||e.type===n.star)&&w()}}function Wh(){const e=a.contextualKeyword===d._type||a.type===n._typeof;e?w():J(),U(d._as)&&!Ws(d._as)?(J(),e&&!p(n.name)&&!(a.type&n.IS_KEYWORD)||J()):(e&&(p(n.name)||a.type&n.IS_KEYWORD)&&J(),Fe(d._as)&&J())}function Gh(){if(p(n.lessThan)){const e=ae(0);gt(),ie(e)}}function Xh(){p(n.colon)&&ir()}function Yh(){if(p(n.colon)){const e=a.noAnonFunctionType;a.noAnonFunctionType=!0,ir(),a.noAnonFunctionType=e}}function Kh(e,t){if(p(n.lessThan)){const r=a.snapshot();let s=wt(e,t);if(a.error)a.restoreFromSnapshot(r),a.type=n.typeParameterStart;else return s;const i=ae(0);if(gt(),ie(i),s=wt(e,t),s)return!0;ne()}return wt(e,t)}function Qh(){if(p(n.colon)){const e=ae(0),t=a.snapshot(),r=a.noAnonFunctionType;a.noAnonFunctionType=!0,ci(),a.noAnonFunctionType=r,tt()&&ne(),p(n.arrow)||ne(),a.error&&a.restoreFromSnapshot(t),ie(e)}return k(n.arrow)}function Jh(e,t=!1){if(a.tokens[a.tokens.length-1].contextualKeyword===d._async&&p(n.lessThan)){const r=a.snapshot();if(Zh()&&!a.error)return;a.restoreFromSnapshot(r)}co(e,t)}function Zh(){a.scopeDepth++;const e=a.tokens.length;return _r(),Os()?(Jr(e),!0):!1}function bo(){Re(d._enum),a.tokens[a.tokens.length-1].type=n._enum,J(),ef()}function ef(){Fe(d._of)&&w(),v(n.braceL),tf(),v(n.braceR)}function tf(){for(;!p(n.braceR)&&!a.error&&!k(n.ellipsis);)rf(),p(n.braceR)||v(n.comma)}function rf(){J(),k(n.eq)&&w()}function nf(){if(Hn(n.eof),a.scopes.push(new _t(0,a.tokens.length,!0)),a.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${a.scopeDepth}`);return new zf(a.tokens,a.scopes)}function rt(e){me&&Dh()||(p(n.at)&&gi(),sf(e))}function sf(e){if(pe&&vp())return;const t=a.type;switch(t){case n._break:case n._continue:of();return;case n._debugger:cf();return;case n._do:lf();return;case n._for:uf();return;case n._function:if(Te()===n.dot)break;e||ne(),ff();return;case n._class:e||ne(),rr(!0);return;case n._if:df();return;case n._return:mf();return;case n._switch:gf();return;case n._throw:xf();return;case n._try:bf();return;case n._let:case n._const:e||ne();case n._var:kn(t!==n._var);return;case n._while:yf();return;case n.braceL:zt();return;case n.semi:vf();return;case n._export:case n._import:{const i=Te();if(i===n.parenL||i===n.dot)break;w(),t===n._import?To():Eo();return}case n.name:if(a.contextualKeyword===d._async){const i=a.start,o=a.snapshot();if(w(),p(n._function)&&!tt()){v(n._function),tr(i,!0);return}else a.restoreFromSnapshot(o)}else if(a.contextualKeyword===d._using&&!wa()&&Te()===n.name){kn(!0);return}else if(yo()){Re(d._await),kn(!0);return}}const r=a.tokens.length;Ue();let s=null;if(a.tokens.length===r+1){const i=a.tokens[a.tokens.length-1];i.type===n.name&&(s=i.contextualKeyword)}if(s==null){Se();return}k(n.colon)?wf():_f(s)}function yo(){if(!U(d._await))return!1;const e=a.snapshot();return w(),!U(d._using)||Xe()||(w(),!p(n.name)||Xe())?(a.restoreFromSnapshot(e),!1):(a.restoreFromSnapshot(e),!0)}function gi(){for(;p(n.at);)vo()}function vo(){if(w(),k(n.parenL))Ue(),v(n.parenR);else{for(J();k(n.dot);)J();af()}}function af(){pe?Op():wo()}function wo(){k(n.parenL)&&Ut()}function of(){w(),yt()||(J(),Se())}function cf(){w(),Se()}function lf(){w(),rt(!1),v(n._while),Un(),k(n.semi)}function uf(){a.scopeDepth++;const e=a.tokens.length;hf();const t=a.tokens.length;a.scopes.push(new _t(e,t,!1)),a.scopeDepth--}function pf(){return!(!U(d._using)||Ws(d._of))}function hf(){w();let e=!1;if(U(d._await)&&(e=!0,w()),v(n.parenL),p(n.semi)){e&&ne(),ys();return}const t=yo();if(t||p(n._var)||p(n._let)||p(n._const)||pf()){if(t&&Re(d._await),w(),_o(!0,a.type!==n._var),p(n._in)||U(d._of)){ta(e);return}ys();return}if(Ue(!0),p(n._in)||U(d._of)){ta(e);return}e&&ne(),ys()}function ff(){const e=a.start;w(),tr(e,!0)}function df(){w(),Un(),rt(!1),k(n._else)&&rt(!1)}function mf(){w(),yt()||(Ue(),Se())}function gf(){w(),Un(),a.scopeDepth++;const e=a.tokens.length;for(v(n.braceL);!p(n.braceR)&&!a.error;)if(p(n._case)||p(n._default)){const r=p(n._case);w(),r&&Ue(),v(n.colon)}else rt(!0);w();const t=a.tokens.length;a.scopes.push(new _t(e,t,!1)),a.scopeDepth--}function xf(){w(),Ue(),Se()}function kf(){Vn(!0),pe&&vr()}function bf(){if(w(),zt(),p(n._catch)){w();let e=null;if(p(n.parenL)&&(a.scopeDepth++,e=a.tokens.length,v(n.parenL),kf(),v(n.parenR)),zt(),e!=null){const t=a.tokens.length;a.scopes.push(new _t(e,t,!1)),a.scopeDepth--}}k(n._finally)&&zt()}function kn(e){w(),_o(!1,e),Se()}function yf(){w(),Un(),rt(!1)}function vf(){w()}function wf(){rt(!0)}function _f(e){pe?_p(e):me?Mh(e):Se()}function zt(e=!1,t=0){const r=a.tokens.length;a.scopeDepth++,v(n.braceL),t&&(a.tokens[a.tokens.length-1].contextId=t),Hn(n.braceR),t&&(a.tokens[a.tokens.length-1].contextId=t);const s=a.tokens.length;a.scopes.push(new _t(r,s,e)),a.scopeDepth--}function Hn(e){for(;!k(e)&&!a.error;)rt(!0)}function ys(){v(n.semi),p(n.semi)||Ue(),v(n.semi),p(n.parenR)||Ue(),v(n.parenR),rt(!1)}function ta(e){e?Fe(d._of):w(),Ue(),v(n.parenR),rt(!1)}function _o(e,t){for(;;){if(Sf(t),k(n.eq)){const r=a.tokens.length-1;ze(e),a.tokens[r].rhsEndIndex=a.tokens.length}if(!k(n.comma))break}}function Sf(e){Vn(e),pe?Tp():me&&Xh()}function tr(e,t,r=!1){p(n.star)&&w(),t&&!r&&!p(n.name)&&!p(n._yield)&&ne();let s=null;p(n.name)&&(t||(s=a.tokens.length,a.scopeDepth++),Wt(!1));const i=a.tokens.length;a.scopeDepth++,_r(),po(e);const o=a.tokens.length;a.scopes.push(new _t(i,o,!0)),a.scopeDepth--,s!==null&&(a.scopes.push(new _t(s,o,!0)),a.scopeDepth--)}function _r(e=!1,t=0){pe?Cp():me&&Gh(),v(n.parenL),t&&(a.tokens[a.tokens.length-1].contextId=t),Ks(n.parenR,!1,!1,e,t),t&&(a.tokens[a.tokens.length-1].contextId=t)}function rr(e,t=!1){const r=Xr();w(),a.tokens[a.tokens.length-1].contextId=r,a.tokens[a.tokens.length-1].isExpression=!e;let s=null;e||(s=a.tokens.length,a.scopeDepth++),Tf(e,t),Af();const i=a.tokens.length;if(If(r),!a.error&&(a.tokens[i].contextId=r,a.tokens[a.tokens.length-1].contextId=r,s!==null)){const o=a.tokens.length;a.scopes.push(new _t(s,o,!1)),a.scopeDepth--}}function So(){return p(n.eq)||p(n.semi)||p(n.braceR)||p(n.bang)||p(n.colon)}function Io(){return p(n.parenL)||p(n.lessThan)}function If(e){for(v(n.braceL);!k(n.braceR)&&!a.error;){if(k(n.semi))continue;if(p(n.at)){vo();continue}const t=a.start;Ef(t,e)}}function Ef(e,t){pe&&Qs([d._declare,d._public,d._protected,d._private,d._override]);let r=!1;if(p(n.name)&&a.contextualKeyword===d._static){if(J(),Io()){Vr(e,!1);return}else if(So()){bn();return}if(a.tokens[a.tokens.length-1].type=n._static,r=!0,p(n.braceL)){a.tokens[a.tokens.length-1].contextId=t,zt();return}}Cf(e,r,t)}function Cf(e,t,r){if(pe&&wp(t))return;if(k(n.star)){Fr(r),Vr(e,!1);return}Fr(r);let s=!1;const i=a.tokens[a.tokens.length-1];i.contextualKeyword===d._constructor&&(s=!0),ra(),Io()?Vr(e,s):So()?bn():i.contextualKeyword===d._async&&!yt()?(a.tokens[a.tokens.length-1].type=n._async,p(n.star)&&w(),Fr(r),ra(),Vr(e,!1)):(i.contextualKeyword===d._get||i.contextualKeyword===d._set)&&!(yt()&&p(n.star))?(i.contextualKeyword===d._get?a.tokens[a.tokens.length-1].type=n._get:a.tokens[a.tokens.length-1].type=n._set,Fr(r),Vr(e,!1)):i.contextualKeyword===d._accessor&&!yt()?(Fr(r),bn()):yt()?bn():ne()}function Vr(e,t){pe?sr():me&&p(n.lessThan)&&gt(),Ms(e,t)}function Fr(e){Qr(e)}function ra(){if(pe){const e=ae(0);k(n.question),ie(e)}}function bn(){if(pe?(Ca(n.bang),vr()):me&&p(n.colon)&&ir(),p(n.eq)){const e=a.tokens.length;w(),ze(),a.tokens[e].rhsEndIndex=a.tokens.length}Se()}function Tf(e,t=!1){pe&&(!e||t)&&U(d._implements)||(p(n.name)&&Wt(!0),pe?sr():me&&p(n.lessThan)&&gt())}function Af(){let e=!1;k(n._extends)?(oo(),e=!0):e=!1,pe?Ip(e):me&&qh(e)}function Eo(){const e=a.tokens.length-1;pe&&xp()||(Lf()?Df():Rf()?(J(),p(n.comma)&&Te()===n.star?(v(n.comma),v(n.star),Re(d._as),J()):Co(),Zr()):k(n._default)?Pf():Mf()?Nf():(xi(),Zr()),a.tokens[e].rhsEndIndex=a.tokens.length)}function Pf(){if(pe&&yp()||me&&Oh())return;const e=a.start;k(n._function)?tr(e,!0,!0):U(d._async)&&Te()===n._function?(Fe(d._async),k(n._function),tr(e,!0,!0)):p(n._class)?rr(!0,!0):p(n.at)?(gi(),rr(!0,!0)):(ze(),Se())}function Nf(){pe?Sp():me?Bh():rt(!0)}function Rf(){if(pe&&to())return!1;if(me&&Fh())return!1;if(p(n.name))return a.contextualKeyword!==d._async;if(!p(n._default))return!1;const e=Gs(),t=nn(),r=t.type===n.name&&t.contextualKeyword===d._from;if(t.type===n.comma)return!0;if(r){const s=N.charCodeAt(Ta(e+4));return s===g.quotationMark||s===g.apostrophe}return!1}function Co(){k(n.comma)&&xi()}function Zr(){Fe(d._from)&&(Pt(),Ao()),Se()}function Lf(){return me?Vh():p(n.star)}function Df(){me?$h():Bs()}function Bs(){v(n.star),U(d._as)?Of():Zr()}function Of(){w(),a.tokens[a.tokens.length-1].type=n._as,J(),Co(),Zr()}function Mf(){return pe&&to()||me&&jh()||a.type===n._var||a.type===n._const||a.type===n._let||a.type===n._function||a.type===n._class||U(d._async)||p(n.at)}function xi(){let e=!0;for(v(n.braceL);!k(n.braceR)&&!a.error;){if(e)e=!1;else if(v(n.comma),k(n.braceR))break;jf()}}function jf(){if(pe){bp();return}J(),a.tokens[a.tokens.length-1].identifierRole=G.ExportAccess,Fe(d._as)&&J()}function Ff(){const e=a.snapshot();return Re(d._module),Fe(d._from)?U(d._from)?(a.restoreFromSnapshot(e),!0):(a.restoreFromSnapshot(e),!1):p(n.comma)?(a.restoreFromSnapshot(e),!1):(a.restoreFromSnapshot(e),!0)}function Bf(){U(d._module)&&Ff()&&w()}function To(){if(pe&&p(n.name)&&Te()===n.eq){Ls();return}if(pe&&U(d._type)){const e=nn();if(e.type===n.name&&e.contextualKeyword!==d._from){if(Re(d._type),Te()===n.eq){Ls();return}}else(e.type===n.star||e.type===n.braceL)&&Re(d._type)}p(n.string)||(Bf(),$f(),Re(d._from)),Pt(),Ao(),Se()}function Vf(){return p(n.name)}function na(){_n()}function $f(){me&&Hh();let e=!0;if(!(Vf()&&(na(),!k(n.comma)))){if(p(n.star)){w(),Re(d._as),na();return}for(v(n.braceL);!k(n.braceR)&&!a.error;){if(e)e=!1;else if(k(n.colon)&&ne("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),v(n.comma),k(n.braceR))break;qf()}}}function qf(){if(pe){kp();return}if(me){Wh();return}_n(),U(d._as)&&(a.tokens[a.tokens.length-1].identifierRole=G.ImportAccess,w(),_n())}function Ao(){(p(n._with)||U(d._assert)&&!Xe())&&(w(),oi(!1,!1))}function Uf(){return a.pos===0&&N.charCodeAt(0)===g.numberSign&&N.charCodeAt(1)===g.exclamationMark&&Na(2),Pa(),nf()}class zf{constructor(t,r){this.tokens=t,this.scopes=r}}function Hf(e,t,r,s){if(s&&r)throw new Error("Cannot combine flow and typescript plugins.");fl(e,t,r,s);const i=Uf();if(a.error)throw ul(a.error);return i}function Wf(e){let t=e.currentIndex(),r=0;const s=e.currentToken();do{const i=e.tokens[t];if(i.isOptionalChainStart&&r++,i.isOptionalChainEnd&&r--,r+=i.numNullishCoalesceStarts,r-=i.numNullishCoalesceEnds,i.contextualKeyword===d._await&&i.identifierRole==null&&i.scopeDepth===s.scopeDepth)return!0;t+=1}while(r>0&&t<e.tokens.length);return!1}class qr{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,r,s,i,o){this.code=t,this.tokens=r,this.isFlowEnabled=s,this.disableESTransforms=i,this.helperManager=o,qr.prototype.__init.call(this),qr.prototype.__init2.call(this),qr.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(t){this.resultCode=t.resultCode,this.tokenIndex=t.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(t){const r=this.resultCode.slice(t.resultCode.length);return this.resultCode=t.resultCode,r}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(t,r){return this.matches1AtIndex(t,n.name)&&this.tokens[t].contextualKeyword===r}identifierNameAtIndex(t){return this.identifierNameForToken(this.tokens[t])}identifierNameAtRelativeIndex(t){return this.identifierNameForToken(this.tokenAtRelativeIndex(t))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(t){return this.code.slice(t.start,t.end)}rawCodeForToken(t){return this.code.slice(t.start,t.end)}stringValueAtIndex(t){return this.stringValueForToken(this.tokens[t])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(t){return this.code.slice(t.start+1,t.end-1)}matches1AtIndex(t,r){return this.tokens[t].type===r}matches2AtIndex(t,r,s){return this.tokens[t].type===r&&this.tokens[t+1].type===s}matches3AtIndex(t,r,s,i){return this.tokens[t].type===r&&this.tokens[t+1].type===s&&this.tokens[t+2].type===i}matches1(t){return this.tokens[this.tokenIndex].type===t}matches2(t,r){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r}matches3(t,r,s){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s}matches4(t,r,s,i){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i}matches5(t,r,s,i,o){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===r&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i&&this.tokens[this.tokenIndex+4].type===o}matchesContextual(t){return this.matchesContextualAtIndex(this.tokenIndex,t)}matchesContextIdAndLabel(t,r){return this.matches1(t)&&this.currentToken().contextId===r}previousWhitespaceAndComments(){let t=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(t=t.replace(/@flow/g,"")),t}replaceToken(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(t){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let t=0;for(;!this.isAtEnd();){if(this.matches1(n.braceL))t++;else if(this.matches1(n.braceR)){if(t===0)return;t--}this.removeToken()}}copyExpectedToken(t){if(this.tokens[this.tokenIndex].type!==t)throw new Error(`Expected token ${t}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=t,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const t=this.currentToken();if((t.numNullishCoalesceStarts||t.isOptionalChainStart)&&(t.isAsyncOperation=Wf(this)),!this.disableESTransforms){if(t.numNullishCoalesceStarts)for(let r=0;r<t.numNullishCoalesceStarts;r++)t.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";t.isOptionalChainStart&&(t.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===n._delete?t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const t=this.currentToken();if(t.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),t.numNullishCoalesceEnds&&!this.disableESTransforms)for(let r=0;r<t.numNullishCoalesceEnds;r++)this.resultCode+="))"}appendCode(t){this.resultCode+=t}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const t=this.currentToken();return this.code.slice(t.start,t.end)}tokenAtRelativeIndex(t){return this.tokens[this.tokenIndex+t]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function Gf(e,t,r,s){const i=t.snapshot(),o=Xf(t);let c=[];const u=[],f=[];let h=null;const m=[],x=[],_=t.currentToken().contextId;if(_==null)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(n.braceR,_);)if(t.matchesContextual(d._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:c,constructorInsertPos:h}=sa(t));else if(t.matches1(n.semi))s||x.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{const y=t.currentIndex();let L=!1,O=!1,F=!1;for(;An(t.currentToken());)t.matches1(n._static)&&(L=!0),t.matches1(n.hash)&&(O=!0),(t.matches1(n._declare)||t.matches1(n._abstract))&&(F=!0),t.nextToken();if(L&&t.matches1(n.braceL)){vs(t,_);continue}if(O){vs(t,_);continue}if(t.matchesContextual(d._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:c,constructorInsertPos:h}=sa(t));continue}const K=t.currentIndex();if(Yf(t),t.matches1(n.lessThan)||t.matches1(n.parenL)){vs(t,_);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(n.eq)){const P=t.currentIndex(),j=t.currentToken().rhsEndIndex;if(j==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<j;)e.processToken();let D;L?(D=r.claimFreeName("__initStatic"),f.push(D)):(D=r.claimFreeName("__init"),u.push(D)),m.push({initializerName:D,equalsIndex:P,start:K,end:t.currentIndex()})}else(!s||F)&&x.push({start:y,end:t.currentIndex()})}return t.restoreToSnapshot(i),s?{headerInfo:o,constructorInitializerStatements:c,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:h,fields:[],rangesToRemove:x}:{headerInfo:o,constructorInitializerStatements:c,instanceInitializerNames:u,staticInitializerNames:f,constructorInsertPos:h,fields:m,rangesToRemove:x}}function vs(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;An(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Xf(e){const t=e.currentToken(),r=t.contextId;if(r==null)throw new Error("Expected context ID on class token.");const s=t.isExpression;if(s==null)throw new Error("Expected isExpression on class token.");let i=null,o=!1;for(e.nextToken(),e.matches1(n.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(n.braceL,r);)e.matches1(n._extends)&&!e.currentToken().isType&&(o=!0),e.nextToken();return{isExpression:s,className:i,hasSuperclass:o}}function sa(e){const t=[];e.nextToken();const r=e.currentToken().contextId;if(r==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(n.parenR,r);)if(e.currentToken().contextId===r){if(e.nextToken(),An(e.currentToken())){for(e.nextToken();An(e.currentToken());)e.nextToken();const o=e.currentToken();if(o.type!==n.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const c=e.identifierNameForToken(o);t.push(`this.${c} = ${c}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let s=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(n.braceR,r);){if(!i&&e.matches2(n._super,n.parenL)){e.nextToken();const o=e.currentToken().contextId;if(o==null)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(n.parenR,o);)e.nextToken();s=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:s}}function An(e){return[n._async,n._get,n._set,n.plus,n.minus,n._readonly,n._static,n._public,n._private,n._protected,n._override,n._abstract,n.star,n._declare,n.hash].includes(e.type)}function Yf(e){if(e.matches1(n.bracketL)){const r=e.currentToken().contextId;if(r==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(n.bracketR,r);)e.nextToken();e.nextToken()}else e.nextToken()}function Po(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(n.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(n.dot);)e.removeToken(),e.removeToken()}const No={typeDeclarations:new Set,valueDeclarations:new Set};function Ro(e){const t=new Set,r=new Set;for(let s=0;s<e.tokens.length;s++){const i=e.tokens[s];i.type===n.name&&Ea(i)&&(i.isType?t.add(e.identifierNameForToken(i)):r.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:r}}function Lo(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,n.braceR);)t++;return e.matchesContextualAtIndex(t+1,d._from)&&e.matches1AtIndex(t+2,n.string)}function Jt(e){(e.matches2(n._with,n.braceL)||e.matches2(n.name,n.braceL)&&e.matchesContextual(d._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function Do(e,t,r,s){if(!e||t)return!1;const i=r.currentToken();if(i.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const o=i.rhsEndIndex-r.currentIndex();if(o!==3&&!(o===4&&r.matches1AtIndex(i.rhsEndIndex-1,n.semi)))return!1;const c=r.tokenAtRelativeIndex(2);if(c.type!==n.name)return!1;const u=r.identifierNameForToken(c);return s.typeDeclarations.has(u)&&!s.valueDeclarations.has(u)}class Ur extends mt{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,r,s,i,o,c,u,f,h,m,x,_){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.nameManager=i,this.helperManager=o,this.reactHotLoaderTransformer=c,this.enableLegacyBabel5ModuleInterop=u,this.enableLegacyTypeScriptModuleInterop=f,this.isTypeScriptTransformEnabled=h,this.isFlowTransformEnabled=m,this.preserveDynamicImport=x,this.keepUnusedImports=_,Ur.prototype.__init.call(this),Ur.prototype.__init2.call(this),Ur.prototype.__init3.call(this),this.declarationInfo=h?Ro(r):No}getPrefixCode(){let t="";return this.hadExport&&(t+='Object.defineProperty(exports, "__esModule", {value: true});'),t}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
172
172
  module.exports = exports.default;
173
- `:""}process(){return this.tokens.matches3(n._import,n.name,n.eq)?this.processImportEquals():this.tokens.matches1(n._import)?(this.processImport(),!0):this.tokens.matches2(n._export,n.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(n._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(n.name,n.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(n.name)||this.tokens.matches1(n.jsxName)?this.processIdentifier():this.tokens.matches1(n.eq)?this.processAssignment():this.tokens.matches1(n.assign)?this.processComplexAssignment():this.tokens.matches1(n.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(t)?ui(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}const r=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${r}require`);const s=this.tokens.currentToken().contextId;if(s==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(n.parenR,s);)this.rootTransformer.processToken();this.tokens.replaceToken(r?")))":"))");return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const r=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(r)),this.tokens.appendCode(this.importProcessor.claimImportCode(r))}mt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(l._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,l._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(n.name)||this.tokens.matches1(n.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(n.string))return!1;let t=!1,r=!1;for(;!this.tokens.matches1(n.string);)(!t&&this.tokens.matches1(n.braceL)||this.tokens.matches1(n.comma))&&(this.tokens.removeToken(),this.tokens.matches1(n.braceR)||(r=!0),(this.tokens.matches2(n.name,n.comma)||this.tokens.matches2(n.name,n.braceR)||this.tokens.matches4(n.name,n.name,n.name,n.comma)||this.tokens.matches4(n.name,n.name,n.name,n.braceR))&&(t=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?r&&!t:!1}removeRemainingImport(){for(;!this.tokens.matches1(n.string);)this.tokens.removeToken()}processIdentifier(){const t=this.tokens.currentToken();if(t.shadowsGlobal)return!1;if(t.identifierRole===F.ObjectShorthand)return this.processObjectShorthand();if(t.identifierRole!==F.Access)return!1;const r=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(t));if(!r)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===n.parenR;)s++;return this.tokens.tokens[s].type===n.parenL?this.tokens.tokenAtRelativeIndex(1).type===n.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==n._new?(this.tokens.replaceToken(`${r}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR)):this.tokens.replaceToken(`(0, ${r})`):this.tokens.replaceToken(r),!0}processObjectShorthand(){const t=this.tokens.identifierName(),r=this.importProcessor.getIdentifierReplacement(t);return r?(this.tokens.replaceToken(`${t}: ${r}`),!0):!1}processExport(){if(this.tokens.matches2(n._export,n._enum)||this.tokens.matches3(n._export,n._const,n._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(n._export,n._default))return this.tokens.matches3(n._export,n._default,n._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(n._export,n.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(n._export,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,l._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(n.braceL)){for(;!this.tokens.matches1(n.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(n._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(l._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),mt(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(n._export,n._var)||this.tokens.matches2(n._export,n._let)||this.tokens.matches2(n._export,n._const))return this.processExportVar(),!0;if(this.tokens.matches2(n._export,n._function)||this.tokens.matches3(n._export,n.name,n._function))return this.processExportFunction(),!0;if(this.tokens.matches2(n._export,n._class)||this.tokens.matches3(n._export,n._abstract,n._class)||this.tokens.matches2(n._export,n.at))return this.processExportClass(),!0;if(this.tokens.matches2(n._export,n.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t-1];if(r.isType||r.type!==n.name||r.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,n.dot)||t>=2&&[n._var,n._let,n._const].includes(this.tokens.tokens[t-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(r));return s?(this.tokens.copyToken(),this.tokens.appendCode(` ${s} =`),!0):!1}processComplexAssignment(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t-1];if(r.type!==n.name||r.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,n.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(r));return s?(this.tokens.appendCode(` = ${s}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t+1];if(r.type!==n.name||r.shadowsGlobal||t+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(t+2,n.dot)||this.tokens.matches1AtIndex(t+2,n.bracketL)||this.tokens.matches1AtIndex(t+2,n.parenL)))return!1;const s=this.tokens.identifierNameForToken(r),i=this.importProcessor.resolveExportBinding(s);return i?(this.tokens.appendCode(`${i} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t],s=this.tokens.tokens[t+1];if(r.type!==n.name||r.shadowsGlobal||t>=1&&this.tokens.matches1AtIndex(t-1,n.dot))return!1;const i=this.tokens.identifierNameForToken(r),a=this.importProcessor.resolveExportBinding(i);if(!a)return!1;const u=this.tokens.rawCodeForToken(s),d=this.importProcessor.getIdentifierReplacement(i)||i;if(u==="++")this.tokens.replaceToken(`(${d} = ${a} = ${d} + 1, ${d} - 1)`);else if(u==="--")this.tokens.replaceToken(`(${d} = ${a} = ${d} - 1, ${d} + 1)`);else throw new Error(`Unexpected operator: ${u}`);return this.tokens.removeToken(),!0}processExportDefault(){let t=!0;if(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,l._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const r=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${r};`)}else if(this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name)||this.tokens.matches3(n._export,n._default,n.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const r=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${r};`)}else if(hi(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))t=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const r=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${r}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${r} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(r)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");t&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(n.at);)if(this.tokens.copyToken(),this.tokens.matches1(n.parenL))this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR);else{for(this.tokens.copyExpectedToken(n.name);this.tokens.matches1(n.dot);)this.tokens.copyExpectedToken(n.dot),this.tokens.copyExpectedToken(n.name);this.tokens.matches1(n.parenL)&&(this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let t=this.tokens.currentIndex();if(t++,t++,!this.tokens.matches1AtIndex(t,n.name))return!1;for(t++;t<this.tokens.tokens.length&&this.tokens.tokens[t].isType;)t++;return!!this.tokens.matches1AtIndex(t,n.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const t=this.tokens.identifierName();for(;!this.tokens.matches1(n.eq);)this.rootTransformer.processToken();const r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${t} = ${t}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=this.tokens.matches1(n.braceL);t&&this.tokens.appendCode("(");let r=0;for(;;)if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL)||this.tokens.matches1(n.bracketL))r++,this.tokens.copyToken();else if(this.tokens.matches1(n.braceR)||this.tokens.matches1(n.bracketR))r--,this.tokens.copyToken();else{if(r===0&&!this.tokens.matches1(n.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(n.eq)){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken()}else{const s=this.tokens.currentToken();if(oo(s)){const i=this.tokens.identifierName();let a=this.importProcessor.getIdentifierReplacement(i);if(a===null)throw new Error(`Expected a replacement for ${i} in \`export var\` syntax.`);c1(s)&&(a=`${i}: ${a}`),this.tokens.replaceToken(a)}else this.rootTransformer.processToken()}}if(t){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const t=this.processNamedFunction();this.tokens.appendCode(` exports.${t} = ${t};`)}processNamedFunction(){if(this.tokens.matches1(n._function))this.tokens.copyToken();else if(this.tokens.matches2(n.name,n._function)){if(!this.tokens.matchesContextual(l._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(n.star)&&this.tokens.copyToken(),!this.tokens.matches1(n.name))throw new Error("Expected identifier for exported function name.");const t=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(n.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),t}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const t=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${t} = ${t};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=fi(this.tokens),r=[];for(;;){if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}const s=Yt(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!t&&this.shouldElideExportedIdentifier(s.leftName))){const a=s.rightName;a==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;const u=s.leftName,d=this.importProcessor.getIdentifierReplacement(u);r.push(`exports.${a} = ${d||u};`)}if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(n.comma,n.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(n.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(l._from)){this.tokens.removeToken();const s=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(s)),mt(this.tokens)}else this.tokens.appendCode(r.join(" "));this.tokens.matches1(n.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(n.string);)this.tokens.removeToken();const t=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(t)),mt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(t)}}class Fp extends Ve{constructor(t,r,s,i,a,u,d,h){super(),this.tokens=t,this.nameManager=r,this.helperManager=s,this.reactHotLoaderTransformer=i,this.isTypeScriptTransformEnabled=a,this.isFlowTransformEnabled=u,this.keepUnusedImports=d,this.nonTypeIdentifiers=a&&!d?vo(t,h):new Set,this.declarationInfo=a&&!d?di(t):pi,this.injectCreateRequireForImportRequire=!!h.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(n._import,n.name,n.eq))return this.processImportEquals();if(this.tokens.matches4(n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,l._type)){this.tokens.removeInitialToken();for(let t=0;t<7;t++)this.tokens.removeToken();return!0}if(this.tokens.matches2(n._export,n.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(n._export,n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,l._type)){this.tokens.removeInitialToken();for(let t=0;t<8;t++)this.tokens.removeToken();return!0}if(this.tokens.matches1(n._import))return this.processImport();if(this.tokens.matches2(n._export,n._default))return this.processExportDefault();if(this.tokens.matches2(n._export,n.braceL))return this.processNamedExports();if(this.tokens.matches2(n._export,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,l._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(n.braceL)){for(;!this.tokens.matches1(n.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(n._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(l._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),mt(this.tokens)),!0}return!1}processImportEquals(){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(t)?ui(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL))return!1;const t=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(t);!this.tokens.matches1(n.string);)this.tokens.removeToken();this.tokens.removeToken(),mt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(n._import),this.tokens.matchesContextual(l._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,l._from))return!0;if(this.tokens.matches1(n.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(l._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,l._from)&&this.tokens.copyToken();let t=!1,r=!1,s=!1;if(this.tokens.matches1(n.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken()):(t=!0,this.tokens.copyToken(),this.tokens.matches1(n.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(n.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),t=!0,this.tokens.copyExpectedToken(n.star),this.tokens.copyExpectedToken(n.name),this.tokens.copyExpectedToken(n.name));else if(this.tokens.matches1(n.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(n.braceR);){r=!0;const i=Yt(this.tokens);if(i.isType||this.shouldAutomaticallyElideImportedName(i.rightName)){for(;this.tokens.currentIndex()<i.endIndex;)this.tokens.removeToken();this.tokens.matches1(n.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<i.endIndex;)this.tokens.copyToken();this.tokens.matches1(n.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(n.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?r&&!t:!1}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}processExportDefault(){if(hi(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,l._async)||this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name))&&this.reactHotLoaderTransformer){const r=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${r}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${r} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(r),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(n._export),this.tokens.copyExpectedToken(n.braceL);const t=fi(this.tokens);let r=!1;for(;!this.tokens.matches1(n.braceR);){const s=Yt(this.tokens);if(s.isType||!t&&this.shouldElideExportedName(s.leftName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(n.comma)&&this.tokens.removeToken()}else{for(r=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(n.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(n.braceR),!this.keepUnusedImports&&t&&!r&&(this.tokens.removeToken(),this.tokens.removeToken(),mt(this.tokens)),!0}shouldElideExportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(t)&&!this.declarationInfo.valueDeclarations.has(t)}}class $p extends Ve{constructor(t,r,s){super(),this.rootTransformer=t,this.tokens=r,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(n._enum)?(this.processEnum(),!0):this.tokens.matches2(n._export,n._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(n._export,n._default,n._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${t} = ${t};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${t};`):this.tokens.appendCode(` export default ${t};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(n.name);let t=!1;this.tokens.matchesContextual(l._of)&&(this.tokens.removeToken(),t=this.tokens.matchesContextual(l._symbol),this.tokens.removeToken());const r=this.tokens.matches3(n.braceL,n.name,n.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const s=!t&&!r;for(this.tokens.replaceTokenTrimmingLeftWhitespace(s?".Mirrored([":"({");!this.tokens.matches1(n.braceR);){if(this.tokens.matches1(n.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(t,r),this.tokens.matches1(n.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(s?"]);":"});")}processEnumElement(t,r){if(t){const s=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${s}")`)}else r?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}function Bp(e){let t,r=e[0],s=1;for(;s<e.length;){const i=e[s],a=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&r==null)return;i==="access"||i==="optionalAccess"?(t=r,r=a(r)):(i==="call"||i==="optionalCall")&&(r=a((...u)=>r.call(t,...u)),t=void 0)}return r}const fn="jest",zp=["mock","unmock","enableAutomock","disableAutomock"];class cs extends Ve{__init(){this.hoistedFunctionNames=[]}constructor(t,r,s,i){super(),this.rootTransformer=t,this.tokens=r,this.nameManager=s,this.importProcessor=i,cs.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(n.name,n.dot,n.name,n.parenL)&&this.tokens.identifierName()===fn?Bp([this,"access",t=>t.importProcessor,"optionalAccess",t=>t.getGlobalNames,"call",t=>t(),"optionalAccess",t=>t.has,"call",t=>t(fn)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(t=>`${t}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let t=!1;for(;this.tokens.matches3(n.dot,n.name,n.parenL);){const r=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(zp.includes(r)){const i=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(i),this.tokens.replaceToken(`function ${i}(){${fn}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.tokens.appendCode(";}"),t=!1}else t?this.tokens.copyToken():this.tokens.replaceToken(`${fn}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),t=!0}return!0}}class qp extends Ve{constructor(t){super(),this.tokens=t}process(){if(this.tokens.matches1(n.num)){const t=this.tokens.currentTokenCode();if(t.includes("_"))return this.tokens.replaceToken(t.replace(/_/g,"")),!0}return!1}}class Up extends Ve{constructor(t,r){super(),this.tokens=t,this.nameManager=r}process(){return this.tokens.matches2(n._catch,n.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class Hp extends Ve{constructor(t,r){super(),this.tokens=t,this.nameManager=r}process(){if(this.tokens.matches1(n.nullishCoalescing)){const s=this.tokens.currentToken();return this.tokens.tokens[s.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(n._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const r=this.tokens.currentToken().subscriptStartIndex;if(r!=null&&this.tokens.tokens[r].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==n._super){const s=this.nameManager.claimFreeName("_");let i;if(r>0&&this.tokens.matches1AtIndex(r-1,n._delete)&&this.isLastSubscriptInChain()?i=`${s} => delete ${s}`:i=`${s} => ${s}`,this.tokens.tokens[r].isAsyncOperation&&(i=`async ${i}`),this.tokens.matches2(n.questionDot,n.parenL)||this.tokens.matches2(n.questionDot,n.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${i}`);else if(this.tokens.matches2(n.questionDot,n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}`);else if(this.tokens.matches1(n.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}.`);else if(this.tokens.matches1(n.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}.`);else if(this.tokens.matches1(n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}[`);else if(this.tokens.matches1(n.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${i}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let t=0;for(let r=this.tokens.currentIndex()+1;;r++){if(r>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[r].isOptionalChainStart?t++:this.tokens.tokens[r].isOptionalChainEnd&&t--,t<0)return!0;if(t===0&&this.tokens.tokens[r].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let t=0,r=this.tokens.currentIndex()-1;for(;;){if(r<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[r].isOptionalChainStart?t--:this.tokens.tokens[r].isOptionalChainEnd&&t++,t<0)return!1;if(t===0&&this.tokens.tokens[r].subscriptStartIndex!=null)return this.tokens.tokens[r-1].type===n._super;r--}}}class Vp extends Ve{constructor(t,r,s,i){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.options=i}process(){const t=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const r=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return r?this.tokens.replaceToken(`(0, ${r})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}if(this.tokens.matches3(n.name,n.dot,n.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const r=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return this.tokens.replaceToken(r),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}return!1}tryProcessCreateClassCall(t){const r=this.findDisplayName(t);r&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(n.parenL),this.tokens.copyExpectedToken(n.braceL),this.tokens.appendCode(`displayName: '${r}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),this.tokens.copyExpectedToken(n.parenR))}findDisplayName(t){return t<2?null:this.tokens.matches2AtIndex(t-2,n.name,n.eq)?this.tokens.identifierNameAtIndex(t-2):t>=2&&this.tokens.tokens[t-2].identifierRole===F.ObjectKey?this.tokens.identifierNameAtIndex(t-2):this.tokens.matches2AtIndex(t-2,n._export,n._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const r=(this.options.filePath||"unknown").split("/"),s=r[r.length-1],i=s.lastIndexOf("."),a=i===-1?s:s.slice(0,i);return a==="index"&&r[r.length-2]?r[r.length-2]:a}classNeedsDisplayName(){let t=this.tokens.currentIndex();if(!this.tokens.matches2(n.parenL,n.braceL))return!1;const r=t+1,s=this.tokens.tokens[r].contextId;if(s==null)throw new Error("Expected non-null context ID on object open-brace.");for(;t<this.tokens.tokens.length;t++){const i=this.tokens.tokens[t];if(i.type===n.braceR&&i.contextId===s){t++;break}if(this.tokens.identifierNameAtIndex(t)==="displayName"&&this.tokens.tokens[t].identifierRole===F.ObjectKey&&i.contextId===s)return!1}if(t===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(t,n.parenR)||this.tokens.matches2AtIndex(t,n.comma,n.parenR)}}class ls extends Ve{__init(){this.extractedDefaultExportName=null}constructor(t,r){super(),this.tokens=t,this.filePath=r,ls.prototype.__init.call(this)}setExtractedDefaultExportName(t){this.extractedDefaultExportName=t}getPrefixCode(){return`
173
+ `:""}process(){return this.tokens.matches3(n._import,n.name,n.eq)?this.processImportEquals():this.tokens.matches1(n._import)?(this.processImport(),!0):this.tokens.matches2(n._export,n.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(n._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(n.name,n.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(n.name)||this.tokens.matches1(n.jsxName)?this.processIdentifier():this.tokens.matches1(n.eq)?this.processAssignment():this.tokens.matches1(n.assign)?this.processComplexAssignment():this.tokens.matches1(n.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(t)?Po(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}const r=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${r}require`);const s=this.tokens.currentToken().contextId;if(s==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(n.parenR,s);)this.rootTransformer.processToken();this.tokens.replaceToken(r?")))":"))");return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const r=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(r)),this.tokens.appendCode(this.importProcessor.claimImportCode(r))}Jt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(d._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,d._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(n.name)||this.tokens.matches1(n.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(n.string))return!1;let t=!1,r=!1;for(;!this.tokens.matches1(n.string);)(!t&&this.tokens.matches1(n.braceL)||this.tokens.matches1(n.comma))&&(this.tokens.removeToken(),this.tokens.matches1(n.braceR)||(r=!0),(this.tokens.matches2(n.name,n.comma)||this.tokens.matches2(n.name,n.braceR)||this.tokens.matches4(n.name,n.name,n.name,n.comma)||this.tokens.matches4(n.name,n.name,n.name,n.braceR))&&(t=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?r&&!t:!1}removeRemainingImport(){for(;!this.tokens.matches1(n.string);)this.tokens.removeToken()}processIdentifier(){const t=this.tokens.currentToken();if(t.shadowsGlobal)return!1;if(t.identifierRole===G.ObjectShorthand)return this.processObjectShorthand();if(t.identifierRole!==G.Access)return!1;const r=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(t));if(!r)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===n.parenR;)s++;return this.tokens.tokens[s].type===n.parenL?this.tokens.tokenAtRelativeIndex(1).type===n.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==n._new?(this.tokens.replaceToken(`${r}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR)):this.tokens.replaceToken(`(0, ${r})`):this.tokens.replaceToken(r),!0}processObjectShorthand(){const t=this.tokens.identifierName(),r=this.importProcessor.getIdentifierReplacement(t);return r?(this.tokens.replaceToken(`${t}: ${r}`),!0):!1}processExport(){if(this.tokens.matches2(n._export,n._enum)||this.tokens.matches3(n._export,n._const,n._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(n._export,n._default))return this.tokens.matches3(n._export,n._default,n._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(n._export,n.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(n._export,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,d._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(n.braceL)){for(;!this.tokens.matches1(n.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(n._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(d._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Jt(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(n._export,n._var)||this.tokens.matches2(n._export,n._let)||this.tokens.matches2(n._export,n._const))return this.processExportVar(),!0;if(this.tokens.matches2(n._export,n._function)||this.tokens.matches3(n._export,n.name,n._function))return this.processExportFunction(),!0;if(this.tokens.matches2(n._export,n._class)||this.tokens.matches3(n._export,n._abstract,n._class)||this.tokens.matches2(n._export,n.at))return this.processExportClass(),!0;if(this.tokens.matches2(n._export,n.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t-1];if(r.isType||r.type!==n.name||r.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,n.dot)||t>=2&&[n._var,n._let,n._const].includes(this.tokens.tokens[t-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(r));return s?(this.tokens.copyToken(),this.tokens.appendCode(` ${s} =`),!0):!1}processComplexAssignment(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t-1];if(r.type!==n.name||r.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,n.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(r));return s?(this.tokens.appendCode(` = ${s}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t+1];if(r.type!==n.name||r.shadowsGlobal||t+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(t+2,n.dot)||this.tokens.matches1AtIndex(t+2,n.bracketL)||this.tokens.matches1AtIndex(t+2,n.parenL)))return!1;const s=this.tokens.identifierNameForToken(r),i=this.importProcessor.resolveExportBinding(s);return i?(this.tokens.appendCode(`${i} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const t=this.tokens.currentIndex(),r=this.tokens.tokens[t],s=this.tokens.tokens[t+1];if(r.type!==n.name||r.shadowsGlobal||t>=1&&this.tokens.matches1AtIndex(t-1,n.dot))return!1;const i=this.tokens.identifierNameForToken(r),o=this.importProcessor.resolveExportBinding(i);if(!o)return!1;const c=this.tokens.rawCodeForToken(s),u=this.importProcessor.getIdentifierReplacement(i)||i;if(c==="++")this.tokens.replaceToken(`(${u} = ${o} = ${u} + 1, ${u} - 1)`);else if(c==="--")this.tokens.replaceToken(`(${u} = ${o} = ${u} - 1, ${u} + 1)`);else throw new Error(`Unexpected operator: ${c}`);return this.tokens.removeToken(),!0}processExportDefault(){let t=!0;if(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,d._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const r=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${r};`)}else if(this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name)||this.tokens.matches3(n._export,n._default,n.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const r=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${r};`)}else if(Do(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))t=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const r=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${r}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${r} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(r)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");t&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(n.at);)if(this.tokens.copyToken(),this.tokens.matches1(n.parenL))this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR);else{for(this.tokens.copyExpectedToken(n.name);this.tokens.matches1(n.dot);)this.tokens.copyExpectedToken(n.dot),this.tokens.copyExpectedToken(n.name);this.tokens.matches1(n.parenL)&&(this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let t=this.tokens.currentIndex();if(t++,t++,!this.tokens.matches1AtIndex(t,n.name))return!1;for(t++;t<this.tokens.tokens.length&&this.tokens.tokens[t].isType;)t++;return!!this.tokens.matches1AtIndex(t,n.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const t=this.tokens.identifierName();for(;!this.tokens.matches1(n.eq);)this.rootTransformer.processToken();const r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${t} = ${t}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=this.tokens.matches1(n.braceL);t&&this.tokens.appendCode("(");let r=0;for(;;)if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL)||this.tokens.matches1(n.bracketL))r++,this.tokens.copyToken();else if(this.tokens.matches1(n.braceR)||this.tokens.matches1(n.bracketR))r--,this.tokens.copyToken();else{if(r===0&&!this.tokens.matches1(n.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(n.eq)){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken()}else{const s=this.tokens.currentToken();if(Ia(s)){const i=this.tokens.identifierName();let o=this.importProcessor.getIdentifierReplacement(i);if(o===null)throw new Error(`Expected a replacement for ${i} in \`export var\` syntax.`);bl(s)&&(o=`${i}: ${o}`),this.tokens.replaceToken(o)}else this.rootTransformer.processToken()}}if(t){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const t=this.processNamedFunction();this.tokens.appendCode(` exports.${t} = ${t};`)}processNamedFunction(){if(this.tokens.matches1(n._function))this.tokens.copyToken();else if(this.tokens.matches2(n.name,n._function)){if(!this.tokens.matchesContextual(d._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(n.star)&&this.tokens.copyToken(),!this.tokens.matches1(n.name))throw new Error("Expected identifier for exported function name.");const t=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(n.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),t}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const t=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${t} = ${t};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=Lo(this.tokens),r=[];for(;;){if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}const s=Yr(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!t&&this.shouldElideExportedIdentifier(s.leftName))){const o=s.rightName;o==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;const c=s.leftName,u=this.importProcessor.getIdentifierReplacement(c);r.push(`exports.${o} = ${u||c};`)}if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(n.comma,n.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(n.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(d._from)){this.tokens.removeToken();const s=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(s)),Jt(this.tokens)}else this.tokens.appendCode(r.join(" "));this.tokens.matches1(n.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(n.string);)this.tokens.removeToken();const t=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(t)),Jt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(t)}}class Kf extends mt{constructor(t,r,s,i,o,c,u,f){super(),this.tokens=t,this.nameManager=r,this.helperManager=s,this.reactHotLoaderTransformer=i,this.isTypeScriptTransformEnabled=o,this.isFlowTransformEnabled=c,this.keepUnusedImports=u,this.nonTypeIdentifiers=o&&!u?Va(t,f):new Set,this.declarationInfo=o&&!u?Ro(t):No,this.injectCreateRequireForImportRequire=!!f.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(n._import,n.name,n.eq))return this.processImportEquals();if(this.tokens.matches4(n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,d._type)){this.tokens.removeInitialToken();for(let t=0;t<7;t++)this.tokens.removeToken();return!0}if(this.tokens.matches2(n._export,n.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(n._export,n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,d._type)){this.tokens.removeInitialToken();for(let t=0;t<8;t++)this.tokens.removeToken();return!0}if(this.tokens.matches1(n._import))return this.processImport();if(this.tokens.matches2(n._export,n._default))return this.processExportDefault();if(this.tokens.matches2(n._export,n.braceL))return this.processNamedExports();if(this.tokens.matches2(n._export,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,d._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(n.braceL)){for(;!this.tokens.matches1(n.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(n._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(d._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Jt(this.tokens)),!0}return!1}processImportEquals(){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(t)?Po(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL))return!1;const t=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(t);!this.tokens.matches1(n.string);)this.tokens.removeToken();this.tokens.removeToken(),Jt(this.tokens),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(n._import),this.tokens.matchesContextual(d._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,d._from))return!0;if(this.tokens.matches1(n.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(d._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,d._from)&&this.tokens.copyToken();let t=!1,r=!1,s=!1;if(this.tokens.matches1(n.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken()):(t=!0,this.tokens.copyToken(),this.tokens.matches1(n.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(n.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),t=!0,this.tokens.copyExpectedToken(n.star),this.tokens.copyExpectedToken(n.name),this.tokens.copyExpectedToken(n.name));else if(this.tokens.matches1(n.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(n.braceR);){r=!0;const i=Yr(this.tokens);if(i.isType||this.shouldAutomaticallyElideImportedName(i.rightName)){for(;this.tokens.currentIndex()<i.endIndex;)this.tokens.removeToken();this.tokens.matches1(n.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<i.endIndex;)this.tokens.copyToken();this.tokens.matches1(n.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(n.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?r&&!t:!1}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}processExportDefault(){if(Do(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,d._async)||this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name))&&this.reactHotLoaderTransformer){const r=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${r}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${r} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(r),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(n._export),this.tokens.copyExpectedToken(n.braceL);const t=Lo(this.tokens);let r=!1;for(;!this.tokens.matches1(n.braceR);){const s=Yr(this.tokens);if(s.isType||!t&&this.shouldElideExportedName(s.leftName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(n.comma)&&this.tokens.removeToken()}else{for(r=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(n.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(n.braceR),!this.keepUnusedImports&&t&&!r&&(this.tokens.removeToken(),this.tokens.removeToken(),Jt(this.tokens)),!0}shouldElideExportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(t)&&!this.declarationInfo.valueDeclarations.has(t)}}class Qf extends mt{constructor(t,r,s){super(),this.rootTransformer=t,this.tokens=r,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(n._enum)?(this.processEnum(),!0):this.tokens.matches2(n._export,n._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(n._export,n._default,n._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${t} = ${t};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${t};`):this.tokens.appendCode(` export default ${t};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(n.name);let t=!1;this.tokens.matchesContextual(d._of)&&(this.tokens.removeToken(),t=this.tokens.matchesContextual(d._symbol),this.tokens.removeToken());const r=this.tokens.matches3(n.braceL,n.name,n.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const s=!t&&!r;for(this.tokens.replaceTokenTrimmingLeftWhitespace(s?".Mirrored([":"({");!this.tokens.matches1(n.braceR);){if(this.tokens.matches1(n.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(t,r),this.tokens.matches1(n.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(s?"]);":"});")}processEnumElement(t,r){if(t){const s=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${s}")`)}else r?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}function Jf(e){let t,r=e[0],s=1;for(;s<e.length;){const i=e[s],o=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&r==null)return;i==="access"||i==="optionalAccess"?(t=r,r=o(r)):(i==="call"||i==="optionalCall")&&(r=o((...c)=>r.call(t,...c)),t=void 0)}return r}const mn="jest",Zf=["mock","unmock","enableAutomock","disableAutomock"];class ki extends mt{__init(){this.hoistedFunctionNames=[]}constructor(t,r,s,i){super(),this.rootTransformer=t,this.tokens=r,this.nameManager=s,this.importProcessor=i,ki.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(n.name,n.dot,n.name,n.parenL)&&this.tokens.identifierName()===mn?Jf([this,"access",t=>t.importProcessor,"optionalAccess",t=>t.getGlobalNames,"call",t=>t(),"optionalAccess",t=>t.has,"call",t=>t(mn)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(t=>`${t}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let t=!1;for(;this.tokens.matches3(n.dot,n.name,n.parenL);){const r=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(Zf.includes(r)){const i=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(i),this.tokens.replaceToken(`function ${i}(){${mn}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.tokens.appendCode(";}"),t=!1}else t?this.tokens.copyToken():this.tokens.replaceToken(`${mn}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),t=!0}return!0}}class ed extends mt{constructor(t){super(),this.tokens=t}process(){if(this.tokens.matches1(n.num)){const t=this.tokens.currentTokenCode();if(t.includes("_"))return this.tokens.replaceToken(t.replace(/_/g,"")),!0}return!1}}class td extends mt{constructor(t,r){super(),this.tokens=t,this.nameManager=r}process(){return this.tokens.matches2(n._catch,n.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class rd extends mt{constructor(t,r){super(),this.tokens=t,this.nameManager=r}process(){if(this.tokens.matches1(n.nullishCoalescing)){const s=this.tokens.currentToken();return this.tokens.tokens[s.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(n._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const r=this.tokens.currentToken().subscriptStartIndex;if(r!=null&&this.tokens.tokens[r].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==n._super){const s=this.nameManager.claimFreeName("_");let i;if(r>0&&this.tokens.matches1AtIndex(r-1,n._delete)&&this.isLastSubscriptInChain()?i=`${s} => delete ${s}`:i=`${s} => ${s}`,this.tokens.tokens[r].isAsyncOperation&&(i=`async ${i}`),this.tokens.matches2(n.questionDot,n.parenL)||this.tokens.matches2(n.questionDot,n.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${i}`);else if(this.tokens.matches2(n.questionDot,n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}`);else if(this.tokens.matches1(n.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}.`);else if(this.tokens.matches1(n.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}.`);else if(this.tokens.matches1(n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}[`);else if(this.tokens.matches1(n.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${i}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let t=0;for(let r=this.tokens.currentIndex()+1;;r++){if(r>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[r].isOptionalChainStart?t++:this.tokens.tokens[r].isOptionalChainEnd&&t--,t<0)return!0;if(t===0&&this.tokens.tokens[r].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let t=0,r=this.tokens.currentIndex()-1;for(;;){if(r<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[r].isOptionalChainStart?t--:this.tokens.tokens[r].isOptionalChainEnd&&t++,t<0)return!1;if(t===0&&this.tokens.tokens[r].subscriptStartIndex!=null)return this.tokens.tokens[r-1].type===n._super;r--}}}class nd extends mt{constructor(t,r,s,i){super(),this.rootTransformer=t,this.tokens=r,this.importProcessor=s,this.options=i}process(){const t=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const r=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return r?this.tokens.replaceToken(`(0, ${r})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}if(this.tokens.matches3(n.name,n.dot,n.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const r=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return this.tokens.replaceToken(r),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}return!1}tryProcessCreateClassCall(t){const r=this.findDisplayName(t);r&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(n.parenL),this.tokens.copyExpectedToken(n.braceL),this.tokens.appendCode(`displayName: '${r}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),this.tokens.copyExpectedToken(n.parenR))}findDisplayName(t){return t<2?null:this.tokens.matches2AtIndex(t-2,n.name,n.eq)?this.tokens.identifierNameAtIndex(t-2):t>=2&&this.tokens.tokens[t-2].identifierRole===G.ObjectKey?this.tokens.identifierNameAtIndex(t-2):this.tokens.matches2AtIndex(t-2,n._export,n._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const r=(this.options.filePath||"unknown").split("/"),s=r[r.length-1],i=s.lastIndexOf("."),o=i===-1?s:s.slice(0,i);return o==="index"&&r[r.length-2]?r[r.length-2]:o}classNeedsDisplayName(){let t=this.tokens.currentIndex();if(!this.tokens.matches2(n.parenL,n.braceL))return!1;const r=t+1,s=this.tokens.tokens[r].contextId;if(s==null)throw new Error("Expected non-null context ID on object open-brace.");for(;t<this.tokens.tokens.length;t++){const i=this.tokens.tokens[t];if(i.type===n.braceR&&i.contextId===s){t++;break}if(this.tokens.identifierNameAtIndex(t)==="displayName"&&this.tokens.tokens[t].identifierRole===G.ObjectKey&&i.contextId===s)return!1}if(t===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(t,n.parenR)||this.tokens.matches2AtIndex(t,n.comma,n.parenR)}}class bi extends mt{__init(){this.extractedDefaultExportName=null}constructor(t,r){super(),this.tokens=t,this.filePath=r,bi.prototype.__init.call(this)}setExtractedDefaultExportName(t){this.extractedDefaultExportName=t}getPrefixCode(){return`
174
174
  (function () {
175
175
  var enterModule = require('react-hot-loader').enterModule;
176
176
  enterModule && enterModule(module);
177
- })();`.replace(/\s+/g," ").trim()}getSuffixCode(){const t=new Set;for(const s of this.tokens.tokens)!s.isType&&io(s)&&s.identifierRole!==F.ImportDeclaration&&t.add(this.tokens.identifierNameForToken(s));const r=Array.from(t).map(s=>({variableName:s,uniqueLocalName:s}));return this.extractedDefaultExportName&&r.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
177
+ })();`.replace(/\s+/g," ").trim()}getSuffixCode(){const t=new Set;for(const s of this.tokens.tokens)!s.isType&&Ea(s)&&s.identifierRole!==G.ImportDeclaration&&t.add(this.tokens.identifierNameForToken(s));const r=Array.from(t).map(s=>({variableName:s,uniqueLocalName:s}));return this.extractedDefaultExportName&&r.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
178
178
  ;(function () {
179
179
  var reactHotLoader = require('react-hot-loader').default;
180
180
  var leaveModule = require('react-hot-loader').leaveModule;
@@ -184,13 +184,29 @@ module.exports = exports.default;
184
184
  ${r.map(({variableName:s,uniqueLocalName:i})=>` reactHotLoader.register(${s}, "${i}", ${JSON.stringify(this.filePath||"")});`).join(`
185
185
  `)}
186
186
  leaveModule(module);
187
- })();`}process(){return!1}}const Wp=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function Us(e){if(e.length===0||!nn[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!He[e.charCodeAt(t)])return!1;return!Wp.has(e)}class Gp extends Ve{constructor(t,r,s){super(),this.rootTransformer=t,this.tokens=r,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(n._public)||this.tokens.matches1(n._protected)||this.tokens.matches1(n._private)||this.tokens.matches1(n._abstract)||this.tokens.matches1(n._readonly)||this.tokens.matches1(n._override)||this.tokens.matches1(n.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(n._enum)||this.tokens.matches2(n._const,n._enum)?(this.processEnum(),!0):this.tokens.matches2(n._export,n._enum)||this.tokens.matches3(n._export,n._const,n._enum)?(this.processEnum(!0),!0):!1}processEnum(t=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(n._const)||this.tokens.matches1(n._enum);)this.tokens.removeToken();const r=this.tokens.identifierName();this.tokens.removeToken(),t&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${r}; (function (${r})`),this.tokens.copyExpectedToken(n.braceL),this.processEnumBody(r),this.tokens.copyExpectedToken(n.braceR),t&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${r} || (exports.${r} = ${r} = {}));`):this.tokens.appendCode(`)(${r} || (${r} = {}));`)}processEnumBody(t){let r=null;for(;!this.tokens.matches1(n.braceR);){const{nameStringCode:s,variableName:i}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(n.eq,n.string,n.comma)||this.tokens.matches3(n.eq,n.string,n.braceR)?this.processStringLiteralEnumMember(t,s,i):this.tokens.matches1(n.eq)?this.processExplicitValueEnumMember(t,s,i):this.processImplicitValueEnumMember(t,s,i,r),this.tokens.matches1(n.comma)&&this.tokens.removeToken(),i!=null?r=i:r=`${t}[${s}]`}}extractEnumKeyInfo(t){if(t.type===n.name){const r=this.tokens.identifierNameForToken(t);return{nameStringCode:`"${r}"`,variableName:Us(r)?r:null}}else if(t.type===n.string){const r=this.tokens.stringValueForToken(t);return{nameStringCode:this.tokens.code.slice(t.start,t.end),variableName:Us(r)?r:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(t,r,s){s!=null?(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${t}[${r}] = ${s};`)):(this.tokens.appendCode(`${t}[${r}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(t,r,s){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected rhsEndIndex on enum assign.");if(s!=null){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${t}[${t}[${r}] = ${s}] = ${r};`)}else{for(this.tokens.appendCode(`${t}[${t}[${r}]`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${r};`)}}processImplicitValueEnumMember(t,r,s,i){let a=i!=null?`${i} + 1`:"0";s!=null&&(this.tokens.appendCode(`const ${s} = ${a}; `),a=s),this.tokens.appendCode(`${t}[${t}[${r}] = ${a}] = ${r};`)}}class En{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,r,s,i){En.prototype.__init.call(this),En.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;const{tokenProcessor:a,importProcessor:u}=t;this.tokens=a,this.isImportsTransformEnabled=r.includes("imports"),this.isReactHotLoaderTransformEnabled=r.includes("react-hot-loader"),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new Hp(a,this.nameManager)),this.transformers.push(new qp(a)),this.transformers.push(new Up(a,this.nameManager))),r.includes("jsx")&&(i.jsxRuntime!=="preserve"&&this.transformers.push(new ft(this,a,u,this.nameManager,i)),this.transformers.push(new Vp(this,a,u,i)));let d=null;if(r.includes("react-hot-loader")){if(!i.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");d=new ls(a,i.filePath),this.transformers.push(d)}if(r.includes("imports")){if(u===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Gt(this,a,u,this.nameManager,this.helperManager,d,s,!!i.enableLegacyTypeScriptModuleInterop,r.includes("typescript"),r.includes("flow"),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new Fp(a,this.nameManager,this.helperManager,d,r.includes("typescript"),r.includes("flow"),!!i.keepUnusedImports,i));r.includes("flow")&&this.transformers.push(new $p(this,a,r.includes("imports"))),r.includes("typescript")&&this.transformers.push(new Gp(this,a,r.includes("imports"))),r.includes("jest")&&this.transformers.push(new cs(this,a,this.nameManager,u))}transform(){this.tokens.reset(),this.processBalancedCode();let r=this.isImportsTransformEnabled?'"use strict";':"";for(const u of this.transformers)r+=u.getPrefixCode();r+=this.helperManager.emitHelpers(),r+=this.generatedVariables.map(u=>` var ${u};`).join("");for(const u of this.transformers)r+=u.getHoistedCode();let s="";for(const u of this.transformers)s+=u.getSuffixCode();const i=this.tokens.finish();let{code:a}=i;if(a.startsWith("#!")){let u=a.indexOf(`
188
- `);return u===-1&&(u=a.length,a+=`
189
- `),{code:a.slice(0,u+1)+r+a.slice(u+1)+s,mappings:this.shiftMappings(i.mappings,r.length)}}else return{code:r+a+s,mappings:this.shiftMappings(i.mappings,r.length)}}processBalancedCode(){let t=0,r=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL))t++;else if(this.tokens.matches1(n.braceR)){if(t===0)return;t--}if(this.tokens.matches1(n.parenL))r++;else if(this.tokens.matches1(n.parenR)){if(r===0)return;r--}this.processToken()}}processToken(){if(this.tokens.matches1(n._class)){this.processClass();return}for(const t of this.transformers)if(t.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(n._class,n.name))throw new Error("Expected identifier for exported class name.");const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),t}processClass(){const t=jp(this,this.tokens,this.nameManager,this.disableESTransforms),r=(t.headerInfo.isExpression||!t.headerInfo.className)&&t.staticInitializerNames.length+t.instanceInitializerNames.length>0;let s=t.headerInfo.className;r&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(` (${s} =`));const a=this.tokens.currentToken().contextId;if(a==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(n._class);!this.tokens.matchesContextIdAndLabel(n.braceL,a);)this.processToken();this.processClassBody(t,s);const u=t.staticInitializerNames.map(d=>`${s}.${d}()`);r?this.tokens.appendCode(`, ${u.map(d=>`${d}, `).join("")}${s})`):t.staticInitializerNames.length>0&&this.tokens.appendCode(` ${u.map(d=>`${d};`).join(" ")}`)}processClassBody(t,r){const{headerInfo:s,constructorInsertPos:i,constructorInitializerStatements:a,fields:u,instanceInitializerNames:d,rangesToRemove:h}=t;let f=0,k=0;const w=this.tokens.currentToken().contextId;if(w==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(n.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const C=a.length+d.length>0;if(i===null&&C){const R=this.makeConstructorInitCode(a,d,r);if(s.hasSuperclass){const q=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${q}) { super(...${q}); ${R}; }`)}else this.tokens.appendCode(`constructor() { ${R}; }`)}for(;!this.tokens.matchesContextIdAndLabel(n.braceR,w);)if(f<u.length&&this.tokens.currentIndex()===u[f].start){let R=!1;for(this.tokens.matches1(n.bracketL)?this.tokens.copyTokenWithPrefix(`${u[f].initializerName}() {this`):this.tokens.matches1(n.string)||this.tokens.matches1(n.num)?(this.tokens.copyTokenWithPrefix(`${u[f].initializerName}() {this[`),R=!0):this.tokens.copyTokenWithPrefix(`${u[f].initializerName}() {this.`);this.tokens.currentIndex()<u[f].end;)R&&this.tokens.currentIndex()===u[f].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),f++}else if(k<h.length&&this.tokens.currentIndex()>=h[k].start){for(this.tokens.currentIndex()<h[k].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<h[k].end;)this.tokens.removeToken();k++}else this.tokens.currentIndex()===i?(this.tokens.copyToken(),C&&this.tokens.appendCode(`;${this.makeConstructorInitCode(a,d,r)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(n.braceR)}makeConstructorInitCode(t,r,s){return[...t,...r.map(i=>`${s}.prototype.${i}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(n.parenR,n.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,n.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(l._async)&&!this.tokens.matches1(n._async))return!1;const t=this.tokens.tokenAtRelativeIndex(1);if(t.type!==n.lessThan||!t.isType)return!1;let r=this.tokens.currentIndex()+1;for(;this.tokens.tokens[r].isType;)r++;if(this.tokens.matches1AtIndex(r,n.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<r;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(t,r){for(let s=0;s<t.length;s++){const i=t[s];i!==void 0&&(t[s]=i+r)}return t}}var Xp={};(function(e){e.__esModule=!0,e.LinesAndColumns=void 0;var t=`
190
- `,r="\r",s=function(){function i(a){this.string=a;for(var u=[0],d=0;d<a.length;)switch(a[d]){case t:d+=t.length,u.push(d);break;case r:d+=r.length,a[d]===t&&(d+=t.length),u.push(d);break;default:d++;break}this.offsets=u}return i.prototype.locationForIndex=function(a){if(a<0||a>this.string.length)return null;for(var u=0,d=this.offsets;d[u+1]<=a;)u++;var h=a-d[u];return{line:u,column:h}},i.prototype.indexForLocation=function(a){var u=a.line,d=a.column;return u<0||u>=this.offsets.length||d<0||d>this.lengthOfLine(u)?null:this.offsets[u]+d},i.prototype.lengthOfLine=function(a){var u=this.offsets[a],d=a===this.offsets.length-1?this.string.length:this.offsets[a+1];return d-u},i}();e.LinesAndColumns=s,e.default=s})(Xp);function Jp(e){const t=new Set;for(let r=0;r<e.tokens.length;r++)e.matches1AtIndex(r,n._import)&&!e.matches3AtIndex(r,n._import,n.name,n.eq)&&Yp(e,r,t);return t}function Yp(e,t,r){t++,!e.matches1AtIndex(t,n.parenL)&&(e.matches1AtIndex(t,n.name)&&(r.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,n.comma)&&t++),e.matches1AtIndex(t,n.star)&&(t+=2,r.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,n.braceL)&&(t++,Qp(e,t,r)))}function Qp(e,t,r){for(;;){if(e.matches1AtIndex(t,n.braceR))return;const s=Yt(e,t);if(t=s.endIndex,s.isType||r.add(s.rightName),e.matches2AtIndex(t,n.comma,n.braceR))return;if(e.matches1AtIndex(t,n.braceR))return;if(e.matches1AtIndex(t,n.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function Kp(e,t){hc(t);try{const r=Zp(e,t),i=new En(r,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform();let a={code:i.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");a={...a,sourceMap:ec(i,t.filePath,t.sourceMapOptions,e,r.tokenProcessor.tokens)}}return a}catch(r){throw t.filePath&&(r.message=`Error transforming ${t.filePath}: ${r.message}`),r}}function Zp(e,t){const r=t.transforms.includes("jsx"),s=t.transforms.includes("typescript"),i=t.transforms.includes("flow"),a=t.disableESTransforms===!0,u=Dp(e,r,s,i),d=u.tokens,h=u.scopes,f=new Fr(e,d),k=new yn(f),w=new Wt(e,d,i,a,k),C=!!t.enableLegacyTypeScriptModuleInterop;let R=null;return t.transforms.includes("imports")?(R=new ht(f,w,C,t,t.transforms.includes("typescript"),!!t.keepUnusedImports,k),R.preprocessTokens(),Cs(w,h,R.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&R.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&Cs(w,h,Jp(w)),{tokenProcessor:w,scopes:h,nameManager:f,importProcessor:R,helperManager:k}}let ed=0;function Fn(e,t={}){var d;const{filename:r="App.tsx",isTypeScript:s,isJSX:i}=t,a=((d=r.split(".").pop())==null?void 0:d.toLowerCase())??"",u=[];(s??(a==="tsx"||a==="ts"))&&u.push("typescript"),(i??(a==="tsx"||a==="jsx"))&&u.push("jsx");try{return{code:Kp(e,{transforms:u,jsxRuntime:"automatic",production:!1,filePath:r}).code,error:null}}catch(h){return{code:"",error:td(h,e)}}}function td(e,t){var d;const r=e.message||"Transpilation failed";let s,i;const a=r.match(/\((\d+):(\d+)\)/);if(a&&(s=parseInt(a[1],10),i=parseInt(a[2],10)),!s&&typeof e.pos=="number"){const h=t.substring(0,e.pos).split(`
191
- `);s=h.length,i=(((d=h[h.length-1])==null?void 0:d.length)??0)+1}let u;if(s){const h=t.split(`
192
- `),f=Math.max(0,s-6),k=Math.min(h.length,s+5);u=h.slice(f,k).map((w,C)=>`${f+C+1}: ${w}`).join(`
193
- `)}return{id:`transpile-${++ed}`,category:"transpilation",severity:"error",message:nd(r),line:s,column:i,sourceContext:u,timestamp:new Date().toISOString()}}function nd(e){return e.replace(/^\/[^:]+:\s*/,"").replace(/^Error:\s*/,"")}function rd(e){const t={};for(const[r,s]of Object.entries(e))t[r]=Fn(s,{filename:r});return t}const sd="https://esm.sh";function us(e={}){var d,h;const t=e.cdnBase||sd,r="18.2.0",s="?external=react,react-dom",i={react:`${t}/react@${r}`,"react/":`${t}/react@${r}/`,"react-dom":`${t}/react-dom@${r}`,"react-dom/":`${t}/react-dom@${r}/`,"react/jsx-runtime":`${t}/react@${r}/jsx-runtime`,"react/jsx-dev-runtime":`${t}/react@${r}/jsx-dev-runtime`,"class-variance-authority":`${t}/class-variance-authority@0.7.1`,clsx:`${t}/clsx@2.1.1`,"tailwind-merge":`${t}/tailwind-merge@2.6.0`,"lucide-react":`${t}/lucide-react@0.468.0${s}`,"react-icons/":`${t}/react-icons@5.4.0/`,"date-fns":`${t}/date-fns@4.1.0`,"date-fns/":`${t}/date-fns@4.1.0/`,"chart.js":`${t}/chart.js@4.4.8/auto`,"chart.js/auto":`${t}/chart.js@4.4.8/auto`,"chart.js/":`${t}/chart.js@4.4.8/`,"react-chartjs-2":`${t}/react-chartjs-2@5.3.0${s}`,recharts:`${t}/recharts@2.15.0${s}`,"recharts/":`${t}/recharts@2.15.0&external=react,react-dom/`,"framer-motion":`${t}/framer-motion@11.18.0${s}`,"framer-motion/":`${t}/framer-motion@11.18.0&external=react,react-dom/`,"react-hook-form":`${t}/react-hook-form@7.54.2${s}`,zod:`${t}/zod@3.24.1`,"@hookform/resolvers":`${t}/@hookform/resolvers@3.9.1${s}`,"@hookform/resolvers/":`${t}/@hookform/resolvers@3.9.1&external=react,react-dom/`,"@tanstack/react-table":`${t}/@tanstack/react-table@8.21.2${s}`,zustand:`${t}/zustand@5.0.3${s}`,"zustand/":`${t}/zustand@5.0.3&external=react,react-dom/`,"react-router-dom":`${t}/react-router-dom@6.28.2${s}`,"react-router-dom/":`${t}/react-router-dom@6.28.2&external=react,react-dom/`,sonner:`${t}/sonner@1.7.3${s}`,cmdk:`${t}/cmdk@1.0.4${s}`,"@dnd-kit/core":`${t}/@dnd-kit/core@6.3.1${s}`,"@dnd-kit/sortable":`${t}/@dnd-kit/sortable@10.0.0${s}`,"@dnd-kit/utilities":`${t}/@dnd-kit/utilities@3.2.2`,axios:`${t}/axios@1.7.9`,"axios/":`${t}/axios@1.7.9/`,"lodash-es":`${t}/lodash-es@4.17.21`,"lodash-es/":`${t}/lodash-es@4.17.21/`,nanoid:`${t}/nanoid@5.0.9`,uuid:`${t}/uuid@11.0.5`,"react-markdown":`${t}/react-markdown@9.0.3${s}`,"remark-gfm":`${t}/remark-gfm@4.0.0`,"react-syntax-highlighter":`${t}/react-syntax-highlighter@15.6.1${s}`,"react-syntax-highlighter/":`${t}/react-syntax-highlighter@15.6.1&external=react,react-dom/`,"react-leaflet":`${t}/react-leaflet@4.2.1${s}`,"react-leaflet/":`${t}/react-leaflet@4.2.1&external=react,react-dom/`,leaflet:`${t}/leaflet@1.9.4`,"leaflet/":`${t}/leaflet@1.9.4/`,"react-player":`${t}/react-player@2.16.0${s}`,"react-player/":`${t}/react-player@2.16.0&external=react,react-dom/`,"usehooks-ts":`${t}/usehooks-ts@3.1.0${s}`,"react-colorful":`${t}/react-colorful@5.6.1${s}`,"@radix-ui/react-slot":`${t}/@radix-ui/react-slot@1.1.1${s}`,"@radix-ui/react-accordion":`${t}/@radix-ui/react-accordion@1.2.2${s}`,"@radix-ui/react-alert-dialog":`${t}/@radix-ui/react-alert-dialog@1.1.4${s}`,"@radix-ui/react-aspect-ratio":`${t}/@radix-ui/react-aspect-ratio@1.1.1${s}`,"@radix-ui/react-avatar":`${t}/@radix-ui/react-avatar@1.1.2${s}`,"@radix-ui/react-checkbox":`${t}/@radix-ui/react-checkbox@1.1.3${s}`,"@radix-ui/react-collapsible":`${t}/@radix-ui/react-collapsible@1.1.2${s}`,"@radix-ui/react-context-menu":`${t}/@radix-ui/react-context-menu@2.2.4${s}`,"@radix-ui/react-dialog":`${t}/@radix-ui/react-dialog@1.1.4${s}`,"@radix-ui/react-dropdown-menu":`${t}/@radix-ui/react-dropdown-menu@2.1.4${s}`,"@radix-ui/react-hover-card":`${t}/@radix-ui/react-hover-card@1.1.4${s}`,"@radix-ui/react-label":`${t}/@radix-ui/react-label@2.1.1${s}`,"@radix-ui/react-menubar":`${t}/@radix-ui/react-menubar@1.1.4${s}`,"@radix-ui/react-navigation-menu":`${t}/@radix-ui/react-navigation-menu@1.2.3${s}`,"@radix-ui/react-popover":`${t}/@radix-ui/react-popover@1.1.4${s}`,"@radix-ui/react-progress":`${t}/@radix-ui/react-progress@1.1.1${s}`,"@radix-ui/react-radio-group":`${t}/@radix-ui/react-radio-group@1.2.2${s}`,"@radix-ui/react-scroll-area":`${t}/@radix-ui/react-scroll-area@1.2.2${s}`,"@radix-ui/react-select":`${t}/@radix-ui/react-select@2.1.4${s}`,"@radix-ui/react-separator":`${t}/@radix-ui/react-separator@1.1.1${s}`,"@radix-ui/react-slider":`${t}/@radix-ui/react-slider@1.2.2${s}`,"@radix-ui/react-switch":`${t}/@radix-ui/react-switch@1.1.2${s}`,"@radix-ui/react-tabs":`${t}/@radix-ui/react-tabs@1.1.2${s}`,"@radix-ui/react-toast":`${t}/@radix-ui/react-toast@1.2.4${s}`,"@radix-ui/react-toggle":`${t}/@radix-ui/react-toggle@1.1.1${s}`,"@radix-ui/react-toggle-group":`${t}/@radix-ui/react-toggle-group@1.1.1${s}`,"@radix-ui/react-tooltip":`${t}/@radix-ui/react-tooltip@1.1.6${s}`,"@radix-ui/react-portal":`${t}/@radix-ui/react-portal@1.1.3${s}`,"@radix-ui/react-visually-hidden":`${t}/@radix-ui/react-visually-hidden@1.1.1${s}`,"@radix-ui/react-collection":`${t}/@radix-ui/react-collection@1.1.1${s}`,"@radix-ui/react-context":`${t}/@radix-ui/react-context@1.1.1${s}`,"embla-carousel-react":`${t}/embla-carousel-react@8.5.1${s}`,"embla-carousel-autoplay":`${t}/embla-carousel-autoplay@8.5.1`,vaul:`${t}/vaul@1.1.2${s}`,"resize-observer-polyfill":`${t}/resize-observer-polyfill@1.5.1`,"react-resizable-panels":`${t}/react-resizable-panels@2.1.7${s}`,"react-day-picker":`${t}/react-day-picker@9.4.4${s}`,"input-otp":`${t}/input-otp@1.4.1${s}`,"react-dropzone":`${t}/react-dropzone@14.3.5${s}`,"qrcode.react":`${t}/qrcode.react@4.2.0${s}`};if(e.dependencies)for(const[f,k]of Object.entries(e.dependencies))k.startsWith("http")?i[f]=k:i[f]=`${t}/${f}@${k}${s}`;const a={...i,...((d=e.overrides)==null?void 0:d.imports)||{}},u={react:`${t}/react@${r}`,"react/":`${t}/react@${r}/`,"react-dom":`${t}/react-dom@${r}`,"react-dom/":`${t}/react-dom@${r}/`,"react/jsx-runtime":`${t}/react@${r}/jsx-runtime`,"react/jsx-dev-runtime":`${t}/react@${r}/jsx-dev-runtime`};return{imports:a,scopes:{[`${t}/`]:u,...((h=e.overrides)==null?void 0:h.scopes)||{}}}}function ps(e){return`<script type="importmap">${JSON.stringify(e,null,2)}<\/script>`}function mi(){return`Available packages (just import, no install needed):
187
+ })();`}process(){return!1}}const sd=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function ia(e){if(e.length===0||!rn[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!dt[e.charCodeAt(t)])return!1;return!sd.has(e)}class id extends mt{constructor(t,r,s){super(),this.rootTransformer=t,this.tokens=r,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(n._public)||this.tokens.matches1(n._protected)||this.tokens.matches1(n._private)||this.tokens.matches1(n._abstract)||this.tokens.matches1(n._readonly)||this.tokens.matches1(n._override)||this.tokens.matches1(n.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(n._enum)||this.tokens.matches2(n._const,n._enum)?(this.processEnum(),!0):this.tokens.matches2(n._export,n._enum)||this.tokens.matches3(n._export,n._const,n._enum)?(this.processEnum(!0),!0):!1}processEnum(t=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(n._const)||this.tokens.matches1(n._enum);)this.tokens.removeToken();const r=this.tokens.identifierName();this.tokens.removeToken(),t&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${r}; (function (${r})`),this.tokens.copyExpectedToken(n.braceL),this.processEnumBody(r),this.tokens.copyExpectedToken(n.braceR),t&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${r} || (exports.${r} = ${r} = {}));`):this.tokens.appendCode(`)(${r} || (${r} = {}));`)}processEnumBody(t){let r=null;for(;!this.tokens.matches1(n.braceR);){const{nameStringCode:s,variableName:i}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(n.eq,n.string,n.comma)||this.tokens.matches3(n.eq,n.string,n.braceR)?this.processStringLiteralEnumMember(t,s,i):this.tokens.matches1(n.eq)?this.processExplicitValueEnumMember(t,s,i):this.processImplicitValueEnumMember(t,s,i,r),this.tokens.matches1(n.comma)&&this.tokens.removeToken(),i!=null?r=i:r=`${t}[${s}]`}}extractEnumKeyInfo(t){if(t.type===n.name){const r=this.tokens.identifierNameForToken(t);return{nameStringCode:`"${r}"`,variableName:ia(r)?r:null}}else if(t.type===n.string){const r=this.tokens.stringValueForToken(t);return{nameStringCode:this.tokens.code.slice(t.start,t.end),variableName:ia(r)?r:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(t,r,s){s!=null?(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${t}[${r}] = ${s};`)):(this.tokens.appendCode(`${t}[${r}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(t,r,s){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected rhsEndIndex on enum assign.");if(s!=null){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${t}[${t}[${r}] = ${s}] = ${r};`)}else{for(this.tokens.appendCode(`${t}[${t}[${r}]`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${r};`)}}processImplicitValueEnumMember(t,r,s,i){let o=i!=null?`${i} + 1`:"0";s!=null&&(this.tokens.appendCode(`const ${s} = ${o}; `),o=s),this.tokens.appendCode(`${t}[${t}[${r}] = ${o}] = ${r};`)}}class Pn{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,r,s,i){Pn.prototype.__init.call(this),Pn.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;const{tokenProcessor:o,importProcessor:c}=t;this.tokens=o,this.isImportsTransformEnabled=r.includes("imports"),this.isReactHotLoaderTransformEnabled=r.includes("react-hot-loader"),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new rd(o,this.nameManager)),this.transformers.push(new ed(o)),this.transformers.push(new td(o,this.nameManager))),r.includes("jsx")&&(i.jsxRuntime!=="preserve"&&this.transformers.push(new Kt(this,o,c,this.nameManager,i)),this.transformers.push(new nd(this,o,c,i)));let u=null;if(r.includes("react-hot-loader")){if(!i.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");u=new bi(o,i.filePath),this.transformers.push(u)}if(r.includes("imports")){if(c===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Ur(this,o,c,this.nameManager,this.helperManager,u,s,!!i.enableLegacyTypeScriptModuleInterop,r.includes("typescript"),r.includes("flow"),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new Kf(o,this.nameManager,this.helperManager,u,r.includes("typescript"),r.includes("flow"),!!i.keepUnusedImports,i));r.includes("flow")&&this.transformers.push(new Qf(this,o,r.includes("imports"))),r.includes("typescript")&&this.transformers.push(new id(this,o,r.includes("imports"))),r.includes("jest")&&this.transformers.push(new ki(this,o,this.nameManager,c))}transform(){this.tokens.reset(),this.processBalancedCode();let r=this.isImportsTransformEnabled?'"use strict";':"";for(const c of this.transformers)r+=c.getPrefixCode();r+=this.helperManager.emitHelpers(),r+=this.generatedVariables.map(c=>` var ${c};`).join("");for(const c of this.transformers)r+=c.getHoistedCode();let s="";for(const c of this.transformers)s+=c.getSuffixCode();const i=this.tokens.finish();let{code:o}=i;if(o.startsWith("#!")){let c=o.indexOf(`
188
+ `);return c===-1&&(c=o.length,o+=`
189
+ `),{code:o.slice(0,c+1)+r+o.slice(c+1)+s,mappings:this.shiftMappings(i.mappings,r.length)}}else return{code:r+o+s,mappings:this.shiftMappings(i.mappings,r.length)}}processBalancedCode(){let t=0,r=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL))t++;else if(this.tokens.matches1(n.braceR)){if(t===0)return;t--}if(this.tokens.matches1(n.parenL))r++;else if(this.tokens.matches1(n.parenR)){if(r===0)return;r--}this.processToken()}}processToken(){if(this.tokens.matches1(n._class)){this.processClass();return}for(const t of this.transformers)if(t.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(n._class,n.name))throw new Error("Expected identifier for exported class name.");const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),t}processClass(){const t=Gf(this,this.tokens,this.nameManager,this.disableESTransforms),r=(t.headerInfo.isExpression||!t.headerInfo.className)&&t.staticInitializerNames.length+t.instanceInitializerNames.length>0;let s=t.headerInfo.className;r&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(` (${s} =`));const o=this.tokens.currentToken().contextId;if(o==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(n._class);!this.tokens.matchesContextIdAndLabel(n.braceL,o);)this.processToken();this.processClassBody(t,s);const c=t.staticInitializerNames.map(u=>`${s}.${u}()`);r?this.tokens.appendCode(`, ${c.map(u=>`${u}, `).join("")}${s})`):t.staticInitializerNames.length>0&&this.tokens.appendCode(` ${c.map(u=>`${u};`).join(" ")}`)}processClassBody(t,r){const{headerInfo:s,constructorInsertPos:i,constructorInitializerStatements:o,fields:c,instanceInitializerNames:u,rangesToRemove:f}=t;let h=0,m=0;const x=this.tokens.currentToken().contextId;if(x==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(n.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const _=o.length+u.length>0;if(i===null&&_){const y=this.makeConstructorInitCode(o,u,r);if(s.hasSuperclass){const L=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${L}) { super(...${L}); ${y}; }`)}else this.tokens.appendCode(`constructor() { ${y}; }`)}for(;!this.tokens.matchesContextIdAndLabel(n.braceR,x);)if(h<c.length&&this.tokens.currentIndex()===c[h].start){let y=!1;for(this.tokens.matches1(n.bracketL)?this.tokens.copyTokenWithPrefix(`${c[h].initializerName}() {this`):this.tokens.matches1(n.string)||this.tokens.matches1(n.num)?(this.tokens.copyTokenWithPrefix(`${c[h].initializerName}() {this[`),y=!0):this.tokens.copyTokenWithPrefix(`${c[h].initializerName}() {this.`);this.tokens.currentIndex()<c[h].end;)y&&this.tokens.currentIndex()===c[h].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),h++}else if(m<f.length&&this.tokens.currentIndex()>=f[m].start){for(this.tokens.currentIndex()<f[m].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<f[m].end;)this.tokens.removeToken();m++}else this.tokens.currentIndex()===i?(this.tokens.copyToken(),_&&this.tokens.appendCode(`;${this.makeConstructorInitCode(o,u,r)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(n.braceR)}makeConstructorInitCode(t,r,s){return[...t,...r.map(i=>`${s}.prototype.${i}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(n.parenR,n.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,n.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(d._async)&&!this.tokens.matches1(n._async))return!1;const t=this.tokens.tokenAtRelativeIndex(1);if(t.type!==n.lessThan||!t.isType)return!1;let r=this.tokens.currentIndex()+1;for(;this.tokens.tokens[r].isType;)r++;if(this.tokens.matches1AtIndex(r,n.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<r;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(t,r){for(let s=0;s<t.length;s++){const i=t[s];i!==void 0&&(t[s]=i+r)}return t}}var ad={};(function(e){e.__esModule=!0,e.LinesAndColumns=void 0;var t=`
190
+ `,r="\r",s=function(){function i(o){this.string=o;for(var c=[0],u=0;u<o.length;)switch(o[u]){case t:u+=t.length,c.push(u);break;case r:u+=r.length,o[u]===t&&(u+=t.length),c.push(u);break;default:u++;break}this.offsets=c}return i.prototype.locationForIndex=function(o){if(o<0||o>this.string.length)return null;for(var c=0,u=this.offsets;u[c+1]<=o;)c++;var f=o-u[c];return{line:c,column:f}},i.prototype.indexForLocation=function(o){var c=o.line,u=o.column;return c<0||c>=this.offsets.length||u<0||u>this.lengthOfLine(c)?null:this.offsets[c]+u},i.prototype.lengthOfLine=function(o){var c=this.offsets[o],u=o===this.offsets.length-1?this.string.length:this.offsets[o+1];return u-c},i}();e.LinesAndColumns=s,e.default=s})(ad);function od(e){const t=new Set;for(let r=0;r<e.tokens.length;r++)e.matches1AtIndex(r,n._import)&&!e.matches3AtIndex(r,n._import,n.name,n.eq)&&cd(e,r,t);return t}function cd(e,t,r){t++,!e.matches1AtIndex(t,n.parenL)&&(e.matches1AtIndex(t,n.name)&&(r.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,n.comma)&&t++),e.matches1AtIndex(t,n.star)&&(t+=2,r.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,n.braceL)&&(t++,ld(e,t,r)))}function ld(e,t,r){for(;;){if(e.matches1AtIndex(t,n.braceR))return;const s=Yr(e,t);if(t=s.endIndex,s.isType||r.add(s.rightName),e.matches2AtIndex(t,n.comma,n.braceR))return;if(e.matches1AtIndex(t,n.braceR))return;if(e.matches1AtIndex(t,n.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function ud(e,t){Iu(t);try{const r=pd(e,t),i=new Pn(r,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform();let o={code:i.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");o={...o,sourceMap:pu(i,t.filePath,t.sourceMapOptions,e,r.tokenProcessor.tokens)}}return o}catch(r){throw t.filePath&&(r.message=`Error transforming ${t.filePath}: ${r.message}`),r}}function pd(e,t){const r=t.transforms.includes("jsx"),s=t.transforms.includes("typescript"),i=t.transforms.includes("flow"),o=t.disableESTransforms===!0,c=Hf(e,r,s,i),u=c.tokens,f=c.scopes,h=new Xs(e,u),m=new wn(h),x=new qr(e,u,i,o,m),_=!!t.enableLegacyTypeScriptModuleInterop;let y=null;return t.transforms.includes("imports")?(y=new Qt(h,x,_,t,t.transforms.includes("typescript"),!!t.keepUnusedImports,m),y.preprocessTokens(),Hi(x,f,y.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&y.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&Hi(x,f,od(x)),{tokenProcessor:x,scopes:f,nameManager:h,importProcessor:y,helperManager:m}}var hd=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Oo=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],fd="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Mo="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ws={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},_s="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",dd={5:_s,"5module":_s+" export import",6:_s+" const class extends export import super"},jo=/^in(stanceof)?$/,md=new RegExp("["+Mo+"]"),gd=new RegExp("["+Mo+fd+"]");function Vs(e,t){for(var r=65536,s=0;s<t.length;s+=2){if(r+=t[s],r>e)return!1;if(r+=t[s+1],r>=e)return!0}return!1}function It(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&md.test(String.fromCharCode(e)):t===!1?!1:Vs(e,Oo)}function Ht(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&gd.test(String.fromCharCode(e)):t===!1?!1:Vs(e,Oo)||Vs(e,hd)}var de=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function st(e,t){return new de(e,{beforeExpr:!0,binop:t})}var it={beforeExpr:!0},Ke={startsExpr:!0},yi={};function fe(e,t){return t===void 0&&(t={}),t.keyword=e,yi[e]=new de(e,t)}var l={num:new de("num",Ke),regexp:new de("regexp",Ke),string:new de("string",Ke),name:new de("name",Ke),privateId:new de("privateId",Ke),eof:new de("eof"),bracketL:new de("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new de("]"),braceL:new de("{",{beforeExpr:!0,startsExpr:!0}),braceR:new de("}"),parenL:new de("(",{beforeExpr:!0,startsExpr:!0}),parenR:new de(")"),comma:new de(",",it),semi:new de(";",it),colon:new de(":",it),dot:new de("."),question:new de("?",it),questionDot:new de("?."),arrow:new de("=>",it),template:new de("template"),invalidTemplate:new de("invalidTemplate"),ellipsis:new de("...",it),backQuote:new de("`",Ke),dollarBraceL:new de("${",{beforeExpr:!0,startsExpr:!0}),eq:new de("=",{beforeExpr:!0,isAssign:!0}),assign:new de("_=",{beforeExpr:!0,isAssign:!0}),incDec:new de("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new de("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:st("||",1),logicalAND:st("&&",2),bitwiseOR:st("|",3),bitwiseXOR:st("^",4),bitwiseAND:st("&",5),equality:st("==/!=/===/!==",6),relational:st("</>/<=/>=",7),bitShift:st("<</>>/>>>",8),plusMin:new de("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:st("%",10),star:st("*",10),slash:st("/",10),starstar:new de("**",{beforeExpr:!0}),coalesce:st("??",1),_break:fe("break"),_case:fe("case",it),_catch:fe("catch"),_continue:fe("continue"),_debugger:fe("debugger"),_default:fe("default",it),_do:fe("do",{isLoop:!0,beforeExpr:!0}),_else:fe("else",it),_finally:fe("finally"),_for:fe("for",{isLoop:!0}),_function:fe("function",Ke),_if:fe("if"),_return:fe("return",it),_switch:fe("switch"),_throw:fe("throw",it),_try:fe("try"),_var:fe("var"),_const:fe("const"),_while:fe("while",{isLoop:!0}),_with:fe("with"),_new:fe("new",{beforeExpr:!0,startsExpr:!0}),_this:fe("this",Ke),_super:fe("super",Ke),_class:fe("class",Ke),_extends:fe("extends",it),_export:fe("export"),_import:fe("import",Ke),_null:fe("null",Ke),_true:fe("true",Ke),_false:fe("false",Ke),_in:fe("in",{beforeExpr:!0,binop:7}),_instanceof:fe("instanceof",{beforeExpr:!0,binop:7}),_typeof:fe("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:fe("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:fe("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Je=/\r\n?|\n|\u2028|\u2029/,xd=new RegExp(Je.source,"g");function Sr(e){return e===10||e===13||e===8232||e===8233}function Fo(e,t,r){r===void 0&&(r=e.length);for(var s=t;s<r;s++){var i=e.charCodeAt(s);if(Sr(i))return s<r-1&&i===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var Bo=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,He=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Vo=Object.prototype,kd=Vo.hasOwnProperty,bd=Vo.toString,Ir=Object.hasOwn||function(e,t){return kd.call(e,t)},aa=Array.isArray||function(e){return bd.call(e)==="[object Array]"},oa=Object.create(null);function Vt(e){return oa[e]||(oa[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Nt(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var yd=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,en=function(t,r){this.line=t,this.column=r};en.prototype.offset=function(t){return new en(this.line,this.column+t)};var Wn=function(t,r,s){this.start=r,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function $o(e,t){for(var r=1,s=0;;){var i=Fo(e,s,t);if(i<0)return new en(r,t-s);++r,s=i}}var $s={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ca=!1;function vd(e){var t={};for(var r in $s)t[r]=e&&Ir(e,r)?e[r]:$s[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ca&&typeof console=="object"&&console.warn&&(ca=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
191
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),aa(t.onToken)){var s=t.onToken;t.onToken=function(i){return s.push(i)}}if(aa(t.onComment)&&(t.onComment=wd(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function wd(e,t){return function(r,s,i,o,c,u){var f={type:r?"Block":"Line",value:s,start:i,end:o};e.locations&&(f.loc=new Wn(this,c,u)),e.ranges&&(f.range=[i,o]),t.push(f)}}var nr=1,ar=2,vi=4,qo=8,wi=16,Uo=32,Gn=64,zo=128,or=256,ln=512,Ho=1024,Xn=nr|ar|or;function _i(e,t){return ar|(e?vi:0)|(t?qo:0)}var Nn=0,Si=1,Lt=2,Wo=3,Go=4,Xo=5,Ve=function(t,r,s){this.options=t=vd(t),this.sourceFile=t.sourceFile,this.keywords=Vt(dd[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=ws[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=Vt(i);var o=(i?i+" ":"")+ws.strict;this.reservedWordsStrict=Vt(o),this.reservedWordsStrictBind=Vt(o+" "+ws.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
192
+ `,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Je).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=l.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?ar:nr),this.regexpState=null,this.privateNameStack=[]},ct={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ve.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};ct.inFunction.get=function(){return(this.currentVarScope().flags&ar)>0};ct.inGenerator.get=function(){return(this.currentVarScope().flags&qo)>0};ct.inAsync.get=function(){return(this.currentVarScope().flags&vi)>0};ct.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(or|ln))return!1;if(r&ar)return(r&vi)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ct.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&nr)};ct.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Gn)>0||this.options.allowSuperOutsideMethod};ct.allowDirectSuper.get=function(){return(this.currentThisScope().flags&zo)>0};ct.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ct.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(or|ln)||r&ar&&!(r&wi))return!0}return!1};ct.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Ho||!this.inModule&&t&nr)};ct.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&or)>0};Ve.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,i=0;i<t.length;i++)s=t[i](s);return s};Ve.parse=function(t,r){return new this(r,t).parse()};Ve.parseExpressionAt=function(t,r,s){var i=new this(s,t,r);return i.nextToken(),i.parseExpression()};Ve.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(Ve.prototype,ct);var Ye=Ve.prototype,_d=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ye.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){He.lastIndex=e,e+=He.exec(this.input)[0].length;var t=_d.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){He.lastIndex=e+t[0].length;var r=He.exec(this.input),s=r.index+r[0].length,i=this.input.charAt(s);return i===";"||i==="}"||Je.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,He.lastIndex=e,e+=He.exec(this.input)[0].length,this.input[e]===";"&&e++}};Ye.eat=function(e){return this.type===e?(this.next(),!0):!1};Ye.isContextual=function(e){return this.type===l.name&&this.value===e&&!this.containsEsc};Ye.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Ye.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Ye.canInsertSemicolon=function(){return this.type===l.eof||this.type===l.braceR||Je.test(this.input.slice(this.lastTokEnd,this.start))};Ye.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Ye.semicolon=function(){!this.eat(l.semi)&&!this.insertSemicolon()&&this.unexpected()};Ye.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Ye.expect=function(e){this.eat(e)||this.unexpected()};Ye.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Yn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ye.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};Ye.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,s=e.doubleProto;if(!t)return r>=0||s>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};Ye.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Ye.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var $=Ve.prototype;$.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==l.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var s=0,i=Object.keys(this.undefinedExports);s<i.length;s+=1){var o=i[s];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Ii={kind:"loop"},Sd={kind:"switch"};$.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;He.lastIndex=this.pos;var t=He.exec(this.input),r=this.pos+t[0].length,s=this.fullCharCodeAt(r);if(s===91||s===92)return!0;if(e)return!1;if(s===123)return!0;if(It(s)){var i=r;do r+=s<=65535?1:2;while(Ht(s=this.fullCharCodeAt(r)));if(s===92)return!0;var o=this.input.slice(i,r);if(!jo.test(o))return!0}return!1};$.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;He.lastIndex=this.pos;var e=He.exec(this.input),t=this.pos+e[0].length,r;return!Je.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Ht(r=this.fullCharCodeAt(t+8))||r===92))};$.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;He.lastIndex=this.pos;var r=He.exec(this.input),s=this.pos+r[0].length;if(Je.test(this.input.slice(this.pos,s)))return!1;if(e){var i=s+5,o;if(this.input.slice(s,i)!=="using"||i===this.input.length||Ht(o=this.fullCharCodeAt(i))||o===92)return!1;He.lastIndex=i;var c=He.exec(this.input);if(s=i+c[0].length,c&&Je.test(this.input.slice(i,s)))return!1}var u=this.fullCharCodeAt(s);if(!It(u)&&u!==92)return!1;var f=s;do s+=u<=65535?1:2;while(Ht(u=this.fullCharCodeAt(s)));if(u===92)return!0;var h=this.input.slice(f,s);return!(jo.test(h)||t&&h==="of")};$.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};$.isUsing=function(e){return this.isUsingKeyword(!1,e)};$.parseStatement=function(e,t,r){var s=this.type,i=this.startNode(),o;switch(this.isLet(e)&&(s=l._var,o="let"),s){case l._break:case l._continue:return this.parseBreakContinueStatement(i,s.keyword);case l._debugger:return this.parseDebuggerStatement(i);case l._do:return this.parseDoStatement(i);case l._for:return this.parseForStatement(i);case l._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case l._class:return e&&this.unexpected(),this.parseClass(i,!0);case l._if:return this.parseIfStatement(i);case l._return:return this.parseReturnStatement(i);case l._switch:return this.parseSwitchStatement(i);case l._throw:return this.parseThrowStatement(i);case l._try:return this.parseTryStatement(i);case l._const:case l._var:return o=o||this.value,e&&o!=="var"&&this.unexpected(),this.parseVarStatement(i,o);case l._while:return this.parseWhileStatement(i);case l._with:return this.parseWithStatement(i);case l.braceL:return this.parseBlock(!0,i);case l.semi:return this.parseEmptyStatement(i);case l._export:case l._import:if(this.options.ecmaVersion>10&&s===l._import){He.lastIndex=this.pos;var c=He.exec(this.input),u=this.pos+c[0].length,f=this.input.charCodeAt(u);if(f===40||f===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===l._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var h=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(h)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),h==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,h),this.semicolon(),this.finishNode(i,"VariableDeclaration");var m=this.value,x=this.parseExpression();return s===l.name&&x.type==="Identifier"&&this.eat(l.colon)?this.parseLabeledStatement(i,m,x,e):this.parseExpressionStatement(i,x)}};$.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(l.semi)||this.insertSemicolon()?e.label=null:this.type!==l.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var i=this.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||e.label&&r))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};$.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};$.parseDoStatement=function(e){return this.next(),this.labels.push(Ii),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(l._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(l.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};$.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ii),this.enterScope(0),this.expect(l.parenL),this.type===l.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===l._var||this.type===l._const||r){var s=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(e,s,t)}var o=this.isContextual("let"),c=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var f=this.startNode();return this.next(),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(f,!0,u),this.finishNode(f,"VariableDeclaration"),this.parseForAfterInit(e,f,t)}var h=this.containsEsc,m=new Yn,x=this.start,_=t>-1?this.parseExprSubscripts(m,"await"):this.parseExpression(!0,m);return this.type===l._in||(c=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===l._in&&this.unexpected(t),e.await=!0):c&&this.options.ecmaVersion>=8&&(_.start===x&&!h&&_.type==="Identifier"&&_.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),o&&c&&this.raise(_.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_,!1,m),this.checkLValPattern(_),this.parseForIn(e,_)):(this.checkExpressionErrors(m,!0),t>-1&&this.unexpected(t),this.parseFor(e,_))};$.parseForAfterInit=function(e,t,r){return(this.type===l._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===l._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};$.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,zr|(r?0:qs),!1,t)};$.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(l._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};$.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(l.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};$.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(l.braceL),this.labels.push(Sd),this.enterScope(Ho);for(var t,r=!1;this.type!==l.braceR;)if(this.type===l._case||this.type===l._default){var s=this.type===l._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(l.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};$.parseThrowStatement=function(e){return this.next(),Je.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Id=[];$.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Uo:0),this.checkLValPattern(e,t?Go:Lt),this.expect(l.parenR),e};$.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===l._catch){var t=this.startNode();this.next(),this.eat(l.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(l._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};$.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};$.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ii),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};$.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};$.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};$.parseLabeledStatement=function(e,t,r,s){for(var i=0,o=this.labels;i<o.length;i+=1){var c=o[i];c.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===l._switch?"switch":null,f=this.labels.length-1;f>=0;f--){var h=this.labels[f];if(h.statementStart===e.start)h.statementStart=this.start,h.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};$.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};$.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(l.braceL),e&&this.enterScope(0);this.type!==l.braceR;){var s=this.parseStatement(null);t.body.push(s)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};$.parseFor=function(e,t){return e.init=t,this.expect(l.semi),e.test=this.type===l.semi?null:this.parseExpression(),this.expect(l.semi),e.update=this.type===l.parenR?null:this.parseExpression(),this.expect(l.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};$.parseForIn=function(e,t){var r=this.type===l._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(l.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};$.parseVar=function(e,t,r,s){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(l.eq)?i.init=this.parseMaybeAssign(t):!s&&r==="const"&&!(this.type===l._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==l._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!s&&i.id.type!=="Identifier"&&!(t&&(this.type===l._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(l.comma))break}return e};$.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Si:Lt,!1)};var zr=1,qs=2,Yo=4;$.parseFunction=function(e,t,r,s,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===l.star&&t&qs&&this.unexpected(),e.generator=this.eat(l.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&zr&&(e.id=t&Yo&&this.type!==l.name?null:this.parseIdent(),e.id&&!(t&qs)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Si:Lt:Wo));var o=this.yieldPos,c=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_i(e.async,e.generator)),t&zr||(e.id=this.type===l.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=o,this.awaitPos=c,this.awaitIdentPos=u,this.finishNode(e,t&zr?"FunctionDeclaration":"FunctionExpression")};$.parseFunctionParams=function(e){this.expect(l.parenL),e.params=this.parseBindingList(l.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};$.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),i=this.startNode(),o=!1;for(i.body=[],this.expect(l.braceL);this.type!==l.braceR;){var c=this.parseClassElement(e.superClass!==null);c&&(i.body.push(c),c.type==="MethodDefinition"&&c.kind==="constructor"?(o&&this.raiseRecoverable(c.start,"Duplicate constructor in the same class"),o=!0):c.key&&c.key.type==="PrivateIdentifier"&&Ed(s,c)&&this.raiseRecoverable(c.key.start,"Identifier '#"+c.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};$.parseClassElement=function(e){if(this.eat(l.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),s="",i=!1,o=!1,c="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(l.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===l.star?u=!0:s="static"}if(r.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===l.star)&&!this.canInsertSemicolon()?o=!0:s="async"),!s&&(t>=9||!o)&&this.eat(l.star)&&(i=!0),!s&&!o&&!i){var f=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?c=f:s=f)}if(s?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=s,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===l.parenL||c!=="method"||i||o){var h=!r.static&&Rn(r,"constructor"),m=h&&e;h&&c!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=h?"constructor":c,this.parseClassMethod(r,i,o,m)}else this.parseClassField(r);return r};$.isClassElementNameStart=function(){return this.type===l.name||this.type===l.privateId||this.type===l.num||this.type===l.string||this.type===l.bracketL||this.type.keyword};$.parseClassElementName=function(e){this.type===l.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};$.parseClassMethod=function(e,t,r,s){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Rn(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,r,s);return e.kind==="get"&&o.params.length!==0&&this.raiseRecoverable(o.start,"getter should have no params"),e.kind==="set"&&o.params.length!==1&&this.raiseRecoverable(o.start,"setter should have exactly one param"),e.kind==="set"&&o.params[0].type==="RestElement"&&this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};$.parseClassField=function(e){return Rn(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Rn(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(l.eq)?(this.enterScope(ln|Gn),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};$.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(or|Gn);this.type!==l.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};$.parseClassId=function(e,t){this.type===l.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Lt,!1)):(t===!0&&this.unexpected(),e.id=null)};$.parseClassSuper=function(e){e.superClass=this.eat(l._extends)?this.parseExprSubscripts(null,!1):null};$.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};$.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,i=s===0?null:this.privateNameStack[s-1],o=0;o<r.length;++o){var c=r[o];Ir(t,c.name)||(i?i.used.push(c):this.raiseRecoverable(c.start,"Private field '#"+c.name+"' must be declared in an enclosing class"))}};function Ed(e,t){var r=t.key.name,s=e[r],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),s==="iget"&&i==="iset"||s==="iset"&&i==="iget"||s==="sget"&&i==="sset"||s==="sset"&&i==="sget"?(e[r]="true",!1):s?!0:(e[r]=i,!1)}function Rn(e,t){var r=e.computed,s=e.key;return!r&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}$.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==l.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};$.parseExport=function(e,t){if(this.next(),this.eat(l.star))return this.parseExportAllDeclaration(e,t);if(this.eat(l._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==l.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,s=e.specifiers;r<s.length;r+=1){var i=s[r];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};$.parseExportDeclaration=function(e){return this.parseStatement(null)};$.parseExportDefaultDeclaration=function(){var e;if(this.type===l._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,zr|Yo,!1,e)}else if(this.type===l._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};$.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Ir(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};$.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var s=0,i=t.properties;s<i.length;s+=1){var o=i[s];this.checkPatternExport(e,o)}else if(r==="ArrayPattern")for(var c=0,u=t.elements;c<u.length;c+=1){var f=u[c];f&&this.checkPatternExport(e,f)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};$.checkVariableExport=function(e,t){if(e)for(var r=0,s=t;r<s.length;r+=1){var i=s[r];this.checkPatternExport(e,i.id)}};$.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};$.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};$.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(r)r=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;t.push(this.parseExportSpecifier(e))}return t};$.parseImport=function(e){return this.next(),this.type===l.string?(e.specifiers=Id,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===l.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};$.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Lt),this.finishNode(e,"ImportSpecifier")};$.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Lt),this.finishNode(e,"ImportDefaultSpecifier")};$.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Lt),this.finishNode(e,"ImportNamespaceSpecifier")};$.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===l.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(l.comma)))return e;if(this.type===l.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(l.braceL);!this.eat(l.braceR);){if(t)t=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;e.push(this.parseImportSpecifier())}return e};$.parseWithClause=function(){var e=[];if(!this.eat(l._with))return e;this.expect(l.braceL);for(var t={},r=!0;!this.eat(l.braceR);){if(r)r=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;var s=this.parseImportAttribute(),i=s.key.type==="Identifier"?s.key.name:s.key.value;Ir(t,i)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(s)}return e};$.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===l.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(l.colon),this.type!==l.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};$.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===l.string){var e=this.parseLiteral(this.value);return yd.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};$.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};$.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var lt=Ve.prototype;lt.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var s=0,i=e.properties;s<i.length;s+=1){var o=i[s];this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern")&&this.raise(o.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};lt.toAssignableList=function(e,t){for(var r=e.length,s=0;s<r;s++){var i=e[s];i&&this.toAssignable(i,t)}if(r){var o=e[r-1];this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier"&&this.unexpected(o.argument.start)}return e};lt.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};lt.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==l.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};lt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case l.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(l.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case l.braceL:return this.parseObj(!0)}return this.parseIdent()};lt.parseBindingList=function(e,t,r,s){for(var i=[],o=!0;!this.eat(e);)if(o?o=!1:this.expect(l.comma),t&&this.type===l.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===l.ellipsis){var c=this.parseRestBinding();this.parseBindingListItem(c),i.push(c),this.type===l.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(s))}return i};lt.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};lt.parseBindingListItem=function(e){return e};lt.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(l.eq))return r;var s=this.startNodeAt(e,t);return s.left=r,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};lt.checkLValSimple=function(e,t,r){t===void 0&&(t=Nn);var s=t!==Nn;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===Lt&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(Ir(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==Xo&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};lt.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Nn),e.type){case"ObjectPattern":for(var s=0,i=e.properties;s<i.length;s+=1){var o=i[s];this.checkLValInnerPattern(o,t,r)}break;case"ArrayPattern":for(var c=0,u=e.elements;c<u.length;c+=1){var f=u[c];f&&this.checkLValInnerPattern(f,t,r)}break;default:this.checkLValSimple(e,t,r)}};lt.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Nn),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var ht=function(t,r,s,i,o){this.token=t,this.isExpr=!!r,this.preserveSpace=!!s,this.override=i,this.generator=!!o},Ce={b_stat:new ht("{",!1),b_expr:new ht("{",!0),b_tmpl:new ht("${",!1),p_stat:new ht("(",!1),p_expr:new ht("(",!0),q_tmpl:new ht("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ht("function",!1),f_expr:new ht("function",!0),f_expr_gen:new ht("function",!0,!1,null,!0),f_gen:new ht("function",!1,!1,null,!0)},Er=Ve.prototype;Er.initialContext=function(){return[Ce.b_stat]};Er.curContext=function(){return this.context[this.context.length-1]};Er.braceIsBlock=function(e){var t=this.curContext();return t===Ce.f_expr||t===Ce.f_stat?!0:e===l.colon&&(t===Ce.b_stat||t===Ce.b_expr)?!t.isExpr:e===l._return||e===l.name&&this.exprAllowed?Je.test(this.input.slice(this.lastTokEnd,this.start)):e===l._else||e===l.semi||e===l.eof||e===l.parenR||e===l.arrow?!0:e===l.braceL?t===Ce.b_stat:e===l._var||e===l._const||e===l.name?!1:!this.exprAllowed};Er.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Er.updateContext=function(e){var t,r=this.type;r.keyword&&e===l.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};Er.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};l.parenR.updateContext=l.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===Ce.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};l.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Ce.b_stat:Ce.b_expr),this.exprAllowed=!0};l.dollarBraceL.updateContext=function(){this.context.push(Ce.b_tmpl),this.exprAllowed=!0};l.parenL.updateContext=function(e){var t=e===l._if||e===l._for||e===l._with||e===l._while;this.context.push(t?Ce.p_stat:Ce.p_expr),this.exprAllowed=!0};l.incDec.updateContext=function(){};l._function.updateContext=l._class.updateContext=function(e){e.beforeExpr&&e!==l._else&&!(e===l.semi&&this.curContext()!==Ce.p_stat)&&!(e===l._return&&Je.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===l.colon||e===l.braceL)&&this.curContext()===Ce.b_stat)?this.context.push(Ce.f_expr):this.context.push(Ce.f_stat),this.exprAllowed=!1};l.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};l.backQuote.updateContext=function(){this.curContext()===Ce.q_tmpl?this.context.pop():this.context.push(Ce.q_tmpl),this.exprAllowed=!1};l.star.updateContext=function(e){if(e===l._function){var t=this.context.length-1;this.context[t]===Ce.f_expr?this.context[t]=Ce.f_expr_gen:this.context[t]=Ce.f_gen}this.exprAllowed=!0};l.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==l.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=Ve.prototype;se.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s=e.key,i;switch(s.type){case"Identifier":i=s.name;break;case"Literal":i=String(s.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&o==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var c=t[i];if(c){var u;o==="init"?u=this.strict&&c.init||c.get||c.set:u=c.init||c[o],u&&this.raiseRecoverable(s.start,"Redefinition of property")}else c=t[i]={init:!1,get:!1,set:!1};c[o]=!0}};se.parseExpression=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===l.comma){var o=this.startNodeAt(r,s);for(o.expressions=[i];this.eat(l.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return i};se.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,i=-1,o=-1,c=-1;t?(i=t.parenthesizedAssign,o=t.trailingComma,c=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Yn,s=!0);var u=this.start,f=this.startLoc;(this.type===l.parenL||this.type===l.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var h=this.parseMaybeConditional(e,t);if(r&&(h=r.call(this,h,u,f)),this.type.isAssign){var m=this.startNodeAt(u,f);return m.operator=this.value,this.type===l.eq&&(h=this.toAssignable(h,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=h.start&&(t.shorthandAssign=-1),this.type===l.eq?this.checkLValPattern(h):this.checkLValSimple(h),m.left=h,this.next(),m.right=this.parseMaybeAssign(e),c>-1&&(t.doubleProto=c),this.finishNode(m,"AssignmentExpression")}else s&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),h};se.parseMaybeConditional=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(l.question)){var o=this.startNodeAt(r,s);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(l.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};se.parseExprOps=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,s,-1,e)};se.parseExprOp=function(e,t,r,s,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==l._in)&&o>s){var c=this.type===l.logicalOR||this.type===l.logicalAND,u=this.type===l.coalesce;u&&(o=l.logicalAND.binop);var f=this.value;this.next();var h=this.start,m=this.startLoc,x=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),h,m,o,i),_=this.buildBinary(t,r,e,x,f,c||u);return(c&&this.type===l.coalesce||u&&(this.type===l.logicalOR||this.type===l.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(_,t,r,s,i)}return e};se.buildBinary=function(e,t,r,s,i,o){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var c=this.startNodeAt(e,t);return c.left=r,c.operator=i,c.right=s,this.finishNode(c,o?"LogicalExpression":"BinaryExpression")};se.parseMaybeUnary=function(e,t,r,s){var i=this.start,o=this.startLoc,c;if(this.isContextual("await")&&this.canAwait)c=this.parseAwait(s),t=!0;else if(this.type.prefix){var u=this.startNode(),f=this.type===l.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,f,s),this.checkExpressionErrors(e,!0),f?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Ko(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Us(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,c=this.finishNode(u,f?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===l.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),c=this.parsePrivateIdent(),this.type!==l._in&&this.unexpected();else{if(c=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return c;for(;this.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(i,o);h.operator=this.value,h.prefix=!1,h.argument=c,this.checkLValSimple(c),this.next(),c=this.finishNode(h,"UpdateExpression")}}if(!r&&this.eat(l.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,c,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return c};function Ko(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ko(e.expression)}function Us(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Us(e.expression)||e.type==="ParenthesizedExpression"&&Us(e.expression)}se.parseExprSubscripts=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,r,s,!1,t);return e&&o.type==="MemberExpression"&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1),e.trailingComma>=o.start&&(e.trailingComma=-1)),o};se.parseSubscripts=function(e,t,r,s,i){for(var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,c=!1;;){var u=this.parseSubscript(e,t,r,s,o,c,i);if(u.optional&&(c=!0),u===e||u.type==="ArrowFunctionExpression"){if(c){var f=this.startNodeAt(t,r);f.expression=u,u=this.finishNode(f,"ChainExpression")}return u}e=u}};se.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(l.arrow)};se.parseSubscriptAsyncArrow=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,s)};se.parseSubscript=function(e,t,r,s,i,o,c){var u=this.options.ecmaVersion>=11,f=u&&this.eat(l.questionDot);s&&f&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(l.bracketL);if(h||f&&this.type!==l.parenL&&this.type!==l.backQuote||this.eat(l.dot)){var m=this.startNodeAt(t,r);m.object=e,h?(m.property=this.parseExpression(),this.expect(l.bracketR)):this.type===l.privateId&&e.type!=="Super"?m.property=this.parsePrivateIdent():m.property=this.parseIdent(this.options.allowReserved!=="never"),m.computed=!!h,u&&(m.optional=f),e=this.finishNode(m,"MemberExpression")}else if(!s&&this.eat(l.parenL)){var x=new Yn,_=this.yieldPos,y=this.awaitPos,L=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var O=this.parseExprList(l.parenR,this.options.ecmaVersion>=8,!1,x);if(i&&!f&&this.shouldParseAsyncArrow())return this.checkPatternErrors(x,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=_,this.awaitPos=y,this.awaitIdentPos=L,this.parseSubscriptAsyncArrow(t,r,O,c);this.checkExpressionErrors(x,!0),this.yieldPos=_||this.yieldPos,this.awaitPos=y||this.awaitPos,this.awaitIdentPos=L||this.awaitIdentPos;var F=this.startNodeAt(t,r);F.callee=e,F.arguments=O,u&&(F.optional=f),e=this.finishNode(F,"CallExpression")}else if(this.type===l.backQuote){(f||o)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var K=this.startNodeAt(t,r);K.tag=e,K.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(K,"TaggedTemplateExpression")}return e};se.parseExprAtom=function(e,t,r){this.type===l.slash&&this.readRegexp();var s,i=this.potentialArrowAt===this.start;switch(this.type){case l._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===l.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==l.dot&&this.type!==l.bracketL&&this.type!==l.parenL&&this.unexpected(),this.finishNode(s,"Super");case l._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case l.name:var o=this.start,c=this.startLoc,u=this.containsEsc,f=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&f.name==="async"&&!this.canInsertSemicolon()&&this.eat(l._function))return this.overrideContext(Ce.f_expr),this.parseFunction(this.startNodeAt(o,c),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(l.arrow))return this.parseArrowExpression(this.startNodeAt(o,c),[f],!1,t);if(this.options.ecmaVersion>=8&&f.name==="async"&&this.type===l.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return f=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(l.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(o,c),[f],!0,t)}return f;case l.regexp:var h=this.value;return s=this.parseLiteral(h.value),s.regex={pattern:h.pattern,flags:h.flags},s;case l.num:case l.string:return this.parseLiteral(this.value);case l._null:case l._true:case l._false:return s=this.startNode(),s.value=this.type===l._null?null:this.type===l._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case l.parenL:var m=this.start,x=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(x)&&(e.parenthesizedAssign=m),e.parenthesizedBind<0&&(e.parenthesizedBind=m)),x;case l.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(l.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case l.braceL:return this.overrideContext(Ce.b_expr),this.parseObj(!1,e);case l._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case l._class:return this.parseClass(this.startNode(),!1);case l._new:return this.parseNew();case l.backQuote:return this.parseTemplate();case l._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};se.parseExprAtomDefault=function(){this.unexpected()};se.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===l.parenL&&!e)return this.parseDynamicImport(t);if(this.type===l.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};se.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(l.parenR)?e.options=null:(this.expect(l.comma),this.afterTrailingComma(l.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(l.parenR)||(this.expect(l.comma),this.afterTrailingComma(l.parenR)||this.unexpected())));else if(!this.eat(l.parenR)){var t=this.start;this.eat(l.comma)&&this.eat(l.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};se.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};se.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};se.parseParenExpression=function(){this.expect(l.parenL);var e=this.parseExpression();return this.expect(l.parenR),e};se.shouldParseArrow=function(e){return!this.canInsertSemicolon()};se.parseParenAndDistinguishExpression=function(e,t){var r=this.start,s=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var c=this.start,u=this.startLoc,f=[],h=!0,m=!1,x=new Yn,_=this.yieldPos,y=this.awaitPos,L;for(this.yieldPos=0,this.awaitPos=0;this.type!==l.parenR;)if(h?h=!1:this.expect(l.comma),o&&this.afterTrailingComma(l.parenR,!0)){m=!0;break}else if(this.type===l.ellipsis){L=this.start,f.push(this.parseParenItem(this.parseRestBinding())),this.type===l.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else f.push(this.parseMaybeAssign(!1,x,this.parseParenItem));var O=this.lastTokEnd,F=this.lastTokEndLoc;if(this.expect(l.parenR),e&&this.shouldParseArrow(f)&&this.eat(l.arrow))return this.checkPatternErrors(x,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=_,this.awaitPos=y,this.parseParenArrowList(r,s,f,t);(!f.length||m)&&this.unexpected(this.lastTokStart),L&&this.unexpected(L),this.checkExpressionErrors(x,!0),this.yieldPos=_||this.yieldPos,this.awaitPos=y||this.awaitPos,f.length>1?(i=this.startNodeAt(c,u),i.expressions=f,this.finishNodeAt(i,"SequenceExpression",O,F)):i=f[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var K=this.startNodeAt(r,s);return K.expression=i,this.finishNode(K,"ParenthesizedExpression")}else return i};se.parseParenItem=function(e){return e};se.parseParenArrowList=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,s)};var Cd=[];se.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===l.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,i,!0,!1),this.eat(l.parenL)?e.arguments=this.parseExprList(l.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Cd,this.finishNode(e,"NewExpression")};se.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===l.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
193
+ `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
194
+ `),cooked:this.value},this.next(),r.tail=this.type===l.backQuote,this.finishNode(r,"TemplateElement")};se.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(r.quasis=[s];!s.tail;)this.type===l.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(l.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(l.braceR),r.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};se.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===l.name||this.type===l.num||this.type===l.string||this.type===l.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===l.star)&&!Je.test(this.input.slice(this.lastTokEnd,this.start))};se.parseObj=function(e,t){var r=this.startNode(),s=!0,i={};for(r.properties=[],this.next();!this.eat(l.braceR);){if(s)s=!1;else if(this.expect(l.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(l.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,i,t),r.properties.push(o)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};se.parseProperty=function(e,t){var r=this.startNode(),s,i,o,c;if(this.options.ecmaVersion>=9&&this.eat(l.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===l.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===l.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(o=this.start,c=this.startLoc),e||(s=this.eat(l.star)));var u=this.containsEsc;return this.parsePropertyName(r),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(r)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(l.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,s,i,o,c,t,u),this.finishNode(r,"Property")};se.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};se.parsePropertyValue=function(e,t,r,s,i,o,c,u){(r||s)&&this.type===l.colon&&this.unexpected(),this.eat(l.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,c),e.kind="init"):this.options.ecmaVersion>=6&&this.type===l.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,s),e.kind="init"):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==l.comma&&this.type!==l.braceR&&this.type!==l.eq?((r||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key)):this.type===l.eq&&c?(c.shorthandAssign<0&&(c.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};se.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(l.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(l.bracketR),e.key;e.computed=!1}return e.key=this.type===l.num||this.type===l.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};se.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};se.parseMethod=function(e,t,r){var s=this.startNode(),i=this.yieldPos,o=this.awaitPos,c=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_i(t,s.generator)|Gn|(r?zo:0)),this.expect(l.parenL),s.params=this.parseBindingList(l.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=c,this.finishNode(s,"FunctionExpression")};se.parseArrowExpression=function(e,t,r,s){var i=this.yieldPos,o=this.awaitPos,c=this.awaitIdentPos;return this.enterScope(_i(r,!1)|wi),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=c,this.finishNode(e,"ArrowFunctionExpression")};se.parseFunctionBody=function(e,t,r,s){var i=t&&this.type!==l.braceL,o=this.strict,c=!1;if(i)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!o||u)&&(c=this.strictDirective(this.end),c&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var f=this.labels;this.labels=[],c&&(this.strict=!0),this.checkParams(e,!o&&!c&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Xo),e.body=this.parseBlock(!1,void 0,c&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=f}this.exitScope()};se.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var s=r[t];if(s.type!=="Identifier")return!1}return!0};se.checkParams=function(e,t){for(var r=Object.create(null),s=0,i=e.params;s<i.length;s+=1){var o=i[s];this.checkLValInnerPattern(o,Si,t?null:r)}};se.parseExprList=function(e,t,r,s){for(var i=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(l.comma),t&&this.afterTrailingComma(e))break;var c=void 0;r&&this.type===l.comma?c=null:this.type===l.ellipsis?(c=this.parseSpread(s),s&&this.type===l.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):c=this.parseMaybeAssign(!1,s),i.push(c)}return i};se.checkUnreserved=function(e){var t=e.start,r=e.end,s=e.name;if(this.inGenerator&&s==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Xn)&&s==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(s==="arguments"||s==="await")&&this.raise(t,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(t,"Unexpected keyword '"+s+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(s)&&(!this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+s+"' is reserved"))}};se.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};se.parseIdentNode=function(){var e=this.startNode();return this.type===l.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=l.name):this.unexpected(),e};se.parsePrivateIdent=function(){var e=this.startNode();return this.type===l.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};se.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===l.semi||this.canInsertSemicolon()||this.type!==l.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(l.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};se.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Ln=Ve.prototype;Ln.raise=function(e,t){var r=$o(this.input,e);t+=" ("+r.line+":"+r.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var s=new SyntaxError(t);throw s.pos=e,s.loc=r,s.raisedAt=this.pos,s};Ln.raiseRecoverable=Ln.raise;Ln.curPosition=function(){if(this.options.locations)return new en(this.curLine,this.pos-this.lineStart)};var Gt=Ve.prototype,Td=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};Gt.enterScope=function(e){this.scopeStack.push(new Td(e))};Gt.exitScope=function(){this.scopeStack.pop()};Gt.treatFunctionsAsVarInScope=function(e){return e.flags&ar||!this.inModule&&e.flags&nr};Gt.declareName=function(e,t,r){var s=!1;if(t===Lt){var i=this.currentScope();s=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&nr&&delete this.undefinedExports[e]}else if(t===Go){var o=this.currentScope();o.lexical.push(e)}else if(t===Wo){var c=this.currentScope();this.treatFunctionsAsVar?s=c.lexical.indexOf(e)>-1:s=c.lexical.indexOf(e)>-1||c.var.indexOf(e)>-1,c.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var f=this.scopeStack[u];if(f.lexical.indexOf(e)>-1&&!(f.flags&Uo&&f.lexical[0]===e)||!this.treatFunctionsAsVarInScope(f)&&f.functions.indexOf(e)>-1){s=!0;break}if(f.var.push(e),this.inModule&&f.flags&nr&&delete this.undefinedExports[e],f.flags&Xn)break}s&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};Gt.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Gt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Gt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Xn|ln|or))return t}};Gt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Xn|ln|or)&&!(t.flags&wi))return t}};var Kn=function(t,r,s){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new Wn(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},un=Ve.prototype;un.startNode=function(){return new Kn(this,this.start,this.startLoc)};un.startNodeAt=function(e,t){return new Kn(this,e,t)};function Qo(e,t,r,s){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=r),e}un.finishNode=function(e,t){return Qo.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};un.finishNodeAt=function(e,t,r,s){return Qo.call(this,e,t,r,s)};un.copyNode=function(e){var t=new Kn(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var Ad="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Jo="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Zo=Jo+" Extended_Pictographic",ec=Zo,tc=ec+" EBase EComp EMod EPres ExtPict",rc=tc,Pd=rc,Nd={9:Jo,10:Zo,11:ec,12:tc,13:rc,14:Pd},Rd="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ld={9:"",10:"",11:"",12:"",13:"",14:Rd},la="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",nc="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",sc=nc+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ic=sc+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ac=ic+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",oc=ac+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Dd=oc+" "+Ad,Od={9:nc,10:sc,11:ic,12:ac,13:oc,14:Dd},cc={};function Md(e){var t=cc[e]={binary:Vt(Nd[e]+" "+la),binaryOfStrings:Vt(Ld[e]),nonBinary:{General_Category:Vt(la),Script:Vt(Od[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Ss=0,ua=[9,10,11,12,13,14];Ss<ua.length;Ss+=1){var jd=ua[Ss];Md(jd)}var V=Ve.prototype,Dn=function(t,r){this.parent=t,this.base=r||this};Dn.prototype.separatedFrom=function(t){for(var r=this;r;r=r.parent)for(var s=t;s;s=s.parent)if(r.base===s.base&&r!==s)return!0;return!1};Dn.prototype.sibling=function(){return new Dn(this.parent,this.base)};var Et=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=cc[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Et.prototype.reset=function(t,r,s){var i=s.indexOf("v")!==-1,o=s.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9)};Et.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Et.prototype.at=function(t,r){r===void 0&&(r=!1);var s=this.source,i=s.length;if(t>=i)return-1;var o=s.charCodeAt(t);if(!(r||this.switchU)||o<=55295||o>=57344||t+1>=i)return o;var c=s.charCodeAt(t+1);return c>=56320&&c<=57343?(o<<10)+c-56613888:o};Et.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var s=this.source,i=s.length;if(t>=i)return i;var o=s.charCodeAt(t),c;return!(r||this.switchU)||o<=55295||o>=57344||t+1>=i||(c=s.charCodeAt(t+1))<56320||c>57343?t+1:t+2};Et.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Et.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Et.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Et.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};Et.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var s=this.pos,i=0,o=t;i<o.length;i+=1){var c=o[i],u=this.at(s,r);if(u===-1||u!==c)return!1;s=this.nextIndex(s,r)}return this.pos=s,!0};V.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,s=!1,i=!1,o=0;o<r.length;o++){var c=r.charAt(o);t.indexOf(c)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(c,o+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),c==="u"&&(s=!0),c==="v"&&(i=!0)}this.options.ecmaVersion>=15&&s&&i&&this.raise(e.start,"Invalid regular expression flag")};function Fd(e){for(var t in e)return!0;return!1}V.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Fd(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};V.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var s=r[t];e.groupNames[s]||e.raise("Invalid named capture referenced")}};V.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Dn(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};V.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};V.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};V.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};V.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};V.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};V.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var s=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<s&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};V.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};V.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};V.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),s=e.eat(45);if(r||s){for(var i=0;i<r.length;i++){var o=r.charAt(i);r.indexOf(o,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(s){var c=this.regexp_eatModifiers(e);!r&&!c&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<c.length;u++){var f=c.charAt(u);(c.indexOf(f,u+1)>-1||r.indexOf(f)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};V.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};V.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&Bd(r);)t+=Nt(r),e.advance();return t};function Bd(e){return e===105||e===109||e===115}V.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};V.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};V.regexp_eatSyntaxCharacter=function(e){var t=e.current();return lc(t)?(e.lastIntValue=t,e.advance(),!0):!1};function lc(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}V.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!lc(r);)e.advance();return e.pos!==t};V.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};V.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var s=0,i=r;s<i.length;s+=1){var o=i[s];o.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};V.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};V.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Nt(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Nt(e.lastIntValue);return!0}return!1};V.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,s=e.current(r);return e.advance(r),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(s=e.lastIntValue),Vd(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Vd(e){return It(e,!0)||e===36||e===95}V.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,s=e.current(r);return e.advance(r),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(s=e.lastIntValue),$d(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function $d(e){return Ht(e,!0)||e===36||e===95||e===8204||e===8205}V.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};V.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};V.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};V.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};V.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};V.regexp_eatZero=function(e){return e.current()===48&&!Qn(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};V.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};V.regexp_eatControlLetter=function(e){var t=e.current();return uc(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function uc(e){return e>=65&&e<=90||e>=97&&e<=122}V.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(s&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var c=e.lastIntValue;if(c>=56320&&c<=57343)return e.lastIntValue=(i-55296)*1024+(c-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&qd(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function qd(e){return e>=0&&e<=1114111}V.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};V.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var pc=0,Rt=1,at=2;V.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Ud(t))return e.lastIntValue=-1,e.advance(),Rt;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&s===at&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return pc};function Ud(e){return e===100||e===68||e===115||e===83||e===119||e===87}V.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,s),Rt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return pc};V.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){Ir(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};V.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Rt;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return at;e.raise("Invalid property name")};V.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";hc(t=e.current());)e.lastStringValue+=Nt(t),e.advance();return e.lastStringValue!==""};function hc(e){return uc(e)||e===95}V.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";zd(t=e.current());)e.lastStringValue+=Nt(t),e.advance();return e.lastStringValue!==""};function zd(e){return hc(e)||Qn(e)}V.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};V.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===at&&e.raise("Negated character class may contain strings"),!0}return!1};V.regexp_classContents=function(e){return e.current()===93?Rt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Rt)};V.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};V.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||mc(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};V.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};V.regexp_classSetExpression=function(e){var t=Rt,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===at&&(t=at);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==at&&(t=Rt);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===at&&(t=at)}};V.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return r!==-1&&s!==-1&&r>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};V.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Rt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};V.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return r&&s===at&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};V.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};V.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===at&&(t=at);return t};V.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Rt:at};V.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Hd(r)||Wd(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Hd(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Wd(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}V.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Gd(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Gd(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}V.regexp_eatClassControlLetter=function(e){var t=e.current();return Qn(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};V.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};V.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Qn(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function Qn(e){return e>=48&&e<=57}V.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;fc(r=e.current());)e.lastIntValue=16*e.lastIntValue+dc(r),e.advance();return e.pos!==t};function fc(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function dc(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}V.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};V.regexp_eatOctalDigit=function(e){var t=e.current();return mc(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function mc(e){return e>=48&&e<=55}V.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var i=e.current();if(!fc(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+dc(i),e.advance()}return!0};var Ei=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Wn(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},he=Ve.prototype;he.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ei(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};he.getToken=function(){return this.next(),new Ei(this)};typeof Symbol<"u"&&(he[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===l.eof,value:t}}}});he.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(l.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};he.readToken=function(e){return It(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};he.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};he.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};he.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var s=void 0,i=t;(s=Fo(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};he.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Sr(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};he.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Bo.test(String.fromCharCode(e)))++this.pos;else break e}}};he.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};he.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(l.ellipsis)):(++this.pos,this.finishToken(l.dot))};he.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(l.assign,2):this.finishOp(l.slash,1)};he.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,s=e===42?l.star:l.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,s=l.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(l.assign,r+1):this.finishOp(s,r)};he.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(l.assign,3)}return this.finishOp(e===124?l.logicalOR:l.logicalAND,2)}return t===61?this.finishOp(l.assign,2):this.finishOp(e===124?l.bitwiseOR:l.bitwiseAND,1)};he.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(l.assign,2):this.finishOp(l.bitwiseXOR,1)};he.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Je.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(l.incDec,2):t===61?this.finishOp(l.assign,2):this.finishOp(l.plusMin,1)};he.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(l.assign,r+1):this.finishOp(l.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(l.relational,r))};he.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(l.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(l.arrow)):this.finishOp(e===61?l.eq:l.prefix,1)};he.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(l.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(l.assign,3)}return this.finishOp(l.coalesce,2)}}return this.finishOp(l.question,1)};he.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),It(t,!0)||t===92))return this.finishToken(l.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Nt(t)+"'")};he.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(l.parenL);case 41:return++this.pos,this.finishToken(l.parenR);case 59:return++this.pos,this.finishToken(l.semi);case 44:return++this.pos,this.finishToken(l.comma);case 91:return++this.pos,this.finishToken(l.bracketL);case 93:return++this.pos,this.finishToken(l.bracketR);case 123:return++this.pos,this.finishToken(l.braceL);case 125:return++this.pos,this.finishToken(l.braceR);case 58:return++this.pos,this.finishToken(l.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(l.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(l.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Nt(e)+"'")};he.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};he.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(Je.test(s)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var o=this.pos,c=this.readWord1();this.containsEsc&&this.unexpected(o);var u=this.regexpState||(this.regexpState=new Et(this));u.reset(r,i,c),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var f=null;try{f=new RegExp(i,c)}catch{}return this.finishToken(l.regexp,{pattern:i,flags:c,value:f})};he.readInt=function(e,t,r){for(var s=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,o=this.pos,c=0,u=0,f=0,h=t??1/0;f<h;++f,++this.pos){var m=this.input.charCodeAt(this.pos),x=void 0;if(s&&m===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),f===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=m;continue}if(m>=97?x=m-97+10:m>=65?x=m-65+10:m>=48&&m<=57?x=m-48:x=1/0,x>=e)break;u=m,c=c*e+x}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===o||t!=null&&this.pos-o!==t?null:c};function Xd(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function gc(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}he.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=gc(this.input.slice(t,this.pos)),++this.pos):It(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.num,r)};he.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&s===110){var i=gc(this.input.slice(t,this.pos));return++this.pos,It(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),s===46&&!r&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!r&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),It(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o=Xd(this.input.slice(t,this.pos),r);return this.finishToken(l.num,o)};he.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};he.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Sr(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(l.string,t)};var xc={};he.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===xc)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};he.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw xc;this.raise(e,t)};he.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===l.template||this.type===l.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(l.dollarBraceL)):(++this.pos,this.finishToken(l.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(l.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Sr(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
195
+ `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};he.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(l.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
196
+ `&&++this.pos;case`
197
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};he.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
198
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Nt(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);return i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Sr(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};he.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};he.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Ht(i,s))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var o=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var c=this.readCodePoint();(t?It:Ht)(c,s)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=Nt(c),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};he.readWord=function(){var e=this.readWord1(),t=l.name;return this.keywords.test(e)&&(t=yi[e]),this.finishToken(t,e)};var Yd="8.16.0";Ve.acorn={Parser:Ve,version:Yd,defaultOptions:$s,Position:en,SourceLocation:Wn,getLineInfo:$o,Node:Kn,TokenType:de,tokTypes:l,keywordTypes:yi,TokContext:ht,tokContexts:Ce,isIdentifierChar:Ht,isIdentifierStart:It,Token:Ei,isNewLine:Sr,lineBreak:Je,lineBreakG:xd,nonASCIIwhitespace:Bo};function kc(e,t){return Ve.parse(e,t)}function Is(e,t,r,s,i){r||(r=R),function o(c,u,f){var h=f||c.type;bc(r,h,c,u,o),t[h]&&t[h](c,u)}(e,s,i)}function Kd(e,t,r,s,i){var o=[];r||(r=R),function c(u,f,h){var m=h||u.type,x=u!==o[o.length-1];x&&o.push(u),bc(r,m,u,f,c),t[m]&&t[m](u,f||o,o),x&&o.pop()}(e,s,i)}function Ci(e,t,r){r(e,t)}function cr(e,t,r){}function bc(e,t,r,s,i){if(e[t]==null)throw new Error("No walker function defined for node type "+t);e[t](r,s,i)}var R={};R.Program=R.BlockStatement=R.StaticBlock=function(e,t,r){for(var s=0,i=e.body;s<i.length;s+=1){var o=i[s];r(o,t,"Statement")}};R.Statement=Ci;R.EmptyStatement=cr;R.ExpressionStatement=R.ParenthesizedExpression=R.ChainExpression=function(e,t,r){return r(e.expression,t,"Expression")};R.IfStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Statement"),e.alternate&&r(e.alternate,t,"Statement")};R.LabeledStatement=function(e,t,r){return r(e.body,t,"Statement")};R.BreakStatement=R.ContinueStatement=cr;R.WithStatement=function(e,t,r){r(e.object,t,"Expression"),r(e.body,t,"Statement")};R.SwitchStatement=function(e,t,r){r(e.discriminant,t,"Expression");for(var s=0,i=e.cases;s<i.length;s+=1){var o=i[s];r(o,t)}};R.SwitchCase=function(e,t,r){e.test&&r(e.test,t,"Expression");for(var s=0,i=e.consequent;s<i.length;s+=1){var o=i[s];r(o,t,"Statement")}};R.ReturnStatement=R.YieldExpression=R.AwaitExpression=function(e,t,r){e.argument&&r(e.argument,t,"Expression")};R.ThrowStatement=R.SpreadElement=function(e,t,r){return r(e.argument,t,"Expression")};R.TryStatement=function(e,t,r){r(e.block,t,"Statement"),e.handler&&r(e.handler,t),e.finalizer&&r(e.finalizer,t,"Statement")};R.CatchClause=function(e,t,r){e.param&&r(e.param,t,"Pattern"),r(e.body,t,"Statement")};R.WhileStatement=R.DoWhileStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.body,t,"Statement")};R.ForStatement=function(e,t,r){e.init&&r(e.init,t,"ForInit"),e.test&&r(e.test,t,"Expression"),e.update&&r(e.update,t,"Expression"),r(e.body,t,"Statement")};R.ForInStatement=R.ForOfStatement=function(e,t,r){r(e.left,t,"ForInit"),r(e.right,t,"Expression"),r(e.body,t,"Statement")};R.ForInit=function(e,t,r){e.type==="VariableDeclaration"?r(e,t):r(e,t,"Expression")};R.DebuggerStatement=cr;R.FunctionDeclaration=function(e,t,r){return r(e,t,"Function")};R.VariableDeclaration=function(e,t,r){for(var s=0,i=e.declarations;s<i.length;s+=1){var o=i[s];r(o,t)}};R.VariableDeclarator=function(e,t,r){r(e.id,t,"Pattern"),e.init&&r(e.init,t,"Expression")};R.Function=function(e,t,r){e.id&&r(e.id,t,"Pattern");for(var s=0,i=e.params;s<i.length;s+=1){var o=i[s];r(o,t,"Pattern")}r(e.body,t,e.expression?"Expression":"Statement")};R.Pattern=function(e,t,r){e.type==="Identifier"?r(e,t,"VariablePattern"):e.type==="MemberExpression"?r(e,t,"MemberPattern"):r(e,t)};R.VariablePattern=cr;R.MemberPattern=Ci;R.RestElement=function(e,t,r){return r(e.argument,t,"Pattern")};R.ArrayPattern=function(e,t,r){for(var s=0,i=e.elements;s<i.length;s+=1){var o=i[s];o&&r(o,t,"Pattern")}};R.ObjectPattern=function(e,t,r){for(var s=0,i=e.properties;s<i.length;s+=1){var o=i[s];o.type==="Property"?(o.computed&&r(o.key,t,"Expression"),r(o.value,t,"Pattern")):o.type==="RestElement"&&r(o.argument,t,"Pattern")}};R.Expression=Ci;R.ThisExpression=R.Super=R.MetaProperty=cr;R.ArrayExpression=function(e,t,r){for(var s=0,i=e.elements;s<i.length;s+=1){var o=i[s];o&&r(o,t,"Expression")}};R.ObjectExpression=function(e,t,r){for(var s=0,i=e.properties;s<i.length;s+=1){var o=i[s];r(o,t)}};R.FunctionExpression=R.ArrowFunctionExpression=R.FunctionDeclaration;R.SequenceExpression=function(e,t,r){for(var s=0,i=e.expressions;s<i.length;s+=1){var o=i[s];r(o,t,"Expression")}};R.TemplateLiteral=function(e,t,r){for(var s=0,i=e.quasis;s<i.length;s+=1){var o=i[s];r(o,t)}for(var c=0,u=e.expressions;c<u.length;c+=1){var f=u[c];r(f,t,"Expression")}};R.TemplateElement=cr;R.UnaryExpression=R.UpdateExpression=function(e,t,r){r(e.argument,t,"Expression")};R.BinaryExpression=R.LogicalExpression=function(e,t,r){r(e.left,t,"Expression"),r(e.right,t,"Expression")};R.AssignmentExpression=R.AssignmentPattern=function(e,t,r){r(e.left,t,"Pattern"),r(e.right,t,"Expression")};R.ConditionalExpression=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Expression"),r(e.alternate,t,"Expression")};R.NewExpression=R.CallExpression=function(e,t,r){if(r(e.callee,t,"Expression"),e.arguments)for(var s=0,i=e.arguments;s<i.length;s+=1){var o=i[s];r(o,t,"Expression")}};R.MemberExpression=function(e,t,r){r(e.object,t,"Expression"),e.computed&&r(e.property,t,"Expression")};R.ExportNamedDeclaration=R.ExportDefaultDeclaration=function(e,t,r){if(e.declaration&&r(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&r(e.source,t,"Expression"),e.attributes)for(var s=0,i=e.attributes;s<i.length;s+=1){var o=i[s];r(o,t)}};R.ExportAllDeclaration=function(e,t,r){if(e.exported&&r(e.exported,t),r(e.source,t,"Expression"),e.attributes)for(var s=0,i=e.attributes;s<i.length;s+=1){var o=i[s];r(o,t)}};R.ImportAttribute=function(e,t,r){r(e.value,t,"Expression")};R.ImportDeclaration=function(e,t,r){for(var s=0,i=e.specifiers;s<i.length;s+=1){var o=i[s];r(o,t)}if(r(e.source,t,"Expression"),e.attributes)for(var c=0,u=e.attributes;c<u.length;c+=1){var f=u[c];r(f,t)}};R.ImportExpression=function(e,t,r){r(e.source,t,"Expression"),e.options&&r(e.options,t,"Expression")};R.ImportSpecifier=R.ImportDefaultSpecifier=R.ImportNamespaceSpecifier=R.Identifier=R.PrivateIdentifier=R.Literal=cr;R.TaggedTemplateExpression=function(e,t,r){r(e.tag,t,"Expression"),r(e.quasi,t,"Expression")};R.ClassDeclaration=R.ClassExpression=function(e,t,r){return r(e,t,"Class")};R.Class=function(e,t,r){e.id&&r(e.id,t,"Pattern"),e.superClass&&r(e.superClass,t,"Expression"),r(e.body,t)};R.ClassBody=function(e,t,r){for(var s=0,i=e.body;s<i.length;s+=1){var o=i[s];r(o,t)}};R.MethodDefinition=R.PropertyDefinition=R.Property=function(e,t,r){e.computed&&r(e.key,t,"Expression"),e.value&&r(e.value,t,"Expression")};let Hr=0;const yc=new Set(["React","Fragment","window","document","navigator","location","history","localStorage","sessionStorage","console","fetch","URL","URLSearchParams","FormData","Headers","Request","Response","Blob","File","FileReader","FileList","AbortController","AbortSignal","Event","CustomEvent","EventTarget","MutationObserver","IntersectionObserver","ResizeObserver","requestAnimationFrame","cancelAnimationFrame","setTimeout","setInterval","clearTimeout","clearInterval","HTMLElement","SVGElement","Element","Node","NodeList","Math","Date","JSON","Array","Object","String","Number","Boolean","BigInt","Symbol","RegExp","Promise","Set","Map","WeakSet","WeakMap","Proxy","Reflect","Error","TypeError","ReferenceError","RangeError","SyntaxError","URIError","parseInt","parseFloat","isNaN","isFinite","NaN","Infinity","undefined","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","btoa","atob","structuredClone","queueMicrotask","Record","Partial","Required","Readonly","Pick","Omit","Exclude","Extract","require","module","exports","globalThis","self","_jsxDEV","_jsxs","_jsx","_Fragment","DataTable","MetricCard","StatusBadge","DetailCard","StepWizard"]);function Qd(e){const t=new Set(yc),r=/import\s*\{([^}]+)\}\s*from\s*['"][^'"]+['"]/g;let s;for(;s=r.exec(e);)for(const L of s[1].split(",")){const O=L.trim();if(!O)continue;const F=O.split(/\s+as\s+/);t.add(F[F.length-1].trim())}const i=/import\s+([A-Z]\w*)\s+from\s*['"][^'"]+['"]/g;for(;s=i.exec(e);)t.add(s[1]);const o=/import\s*\*\s*as\s+(\w+)\s+from\s*['"][^'"]+['"]/g;for(;s=o.exec(e);)t.add(s[1]);const c=/(?:const|let|var)\s+(\w+)/g;for(;s=c.exec(e);)t.add(s[1]);const u=/function\s+(\w+)/g;for(;s=u.exec(e);)t.add(s[1]);const f=/class\s+(\w+)/g;for(;s=f.exec(e);)t.add(s[1]);const h=/enum\s+(\w+)/g;for(;s=h.exec(e);)t.add(s[1]);const m=/(?:type|interface)\s+(\w+)/g;for(;s=m.exec(e);)t.add(s[1]);const x=/<([A-Z]\w*)/g,_=[],y=new Set;for(;s=x.exec(e);){const L=s[1];if(t.has(L)||y.has(L))continue;y.add(L);const F=e.substring(0,s.index).split(`
199
+ `).length;_.push({name:L,line:F})}return _}function Jd(e,t){let r;try{r=kc(e,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch{return[]}const s=new Set(yc);Is(r,{ImportDeclaration(c){for(const u of c.specifiers)s.add(u.local.name)},VariableDeclarator(c){bt(c.id,s)},FunctionDeclaration(c){c.id&&s.add(c.id.name)},ClassDeclaration(c){c.id&&s.add(c.id.name)}}),Is(r,{FunctionDeclaration(c){Es(c.params,s)},FunctionExpression(c){Es(c.params,s)},ArrowFunctionExpression(c){Es(c.params,s)},CatchClause(c){c.param&&bt(c.param,s)},ForInStatement(c){if(c.left.type==="VariableDeclaration")for(const u of c.left.declarations)bt(u.id,s)},ForOfStatement(c){if(c.left.type==="VariableDeclaration")for(const u of c.left.declarations)bt(u.id,s)}});const i=[],o=new Set;return Is(r,{Identifier(c){const u=c.name;s.has(u)||o.has(u)}}),Kd(r,{Identifier(c,u,f){var y,L;const h=c.name;if(s.has(h)||o.has(h))return;const m=f[f.length-2];if(!m||m.type==="MemberExpression"&&m.property===c&&!m.computed||m.type==="Property"&&m.key===c&&!m.computed||m.type==="ImportSpecifier"||m.type==="ImportDefaultSpecifier"||m.type==="ImportNamespaceSpecifier"||m.type==="VariableDeclarator"&&m.id===c||m.type==="FunctionDeclaration"&&m.id===c||m.type==="ClassDeclaration"&&m.id===c||m.type==="LabeledStatement"&&m.label===c||(m.type==="BreakStatement"||m.type==="ContinueStatement")&&m.label===c||m.type==="MethodDefinition"&&m.key===c||m.type==="JSXAttribute"&&m.name===c||m.type==="JSXOpeningElement"&&m.name===c||m.type==="JSXClosingElement"&&m.name===c)return;o.add(h);const x=((L=(y=c.loc)==null?void 0:y.start)==null?void 0:L.line)??1,_=Math.min(x,t);i.push({name:h,line:_})}}),i}function bt(e,t){if(e)switch(e.type){case"Identifier":t.add(e.name);break;case"ObjectPattern":for(const r of e.properties)r.type==="RestElement"?bt(r.argument,t):bt(r.value,t);break;case"ArrayPattern":for(const r of e.elements)r&&bt(r,t);break;case"RestElement":bt(e.argument,t);break;case"AssignmentPattern":bt(e.left,t);break}}function Es(e,t){for(const r of e)bt(r,t)}function On(e,t){const r=e.split(`
200
+ `),s=[];let i=null,o=null,c=0;if(t>0&&t<=r.length){const f=r[t-1].match(/^(\s*)/);c=f?f[1].length:0}for(let u=Math.min(t-1,r.length-1);u>=0;u--){const f=r[u];if(!i){const h=f.match(/^(\s*)(export\s+default\s+)?function\s+(\w+)/);h&&(i={name:h[3],line:u+1});const m=f.match(/^(\s*)(export\s+default\s+)?const\s+(\w+)\s*=\s*(\([^)]*\)|[^=])*=>/);m&&(i={name:m[3],line:u+1})}if(!o){const h=f.match(/activePage\s*===\s*['"](\w+)['"]/);h&&(o={page:h[1],line:u+1})}if(i&&o)break}return i&&s.push(`inside function ${i.name} (line ${i.line})`),o&&s.push(`inside activePage === '${o.page}' block (line ${o.line})`),s.length===0&&s.push(`at indent level ${c} spaces`),s.join(", ")}function Zd(e){const t=e.split(`
201
+ `),r=[],s=/\{?\/\*\s*@section:\s*(.+?)\s*\*\/\}?/;for(let i=0;i<t.length;i++){const o=t[i].match(s);o&&r.push({name:o[1].trim(),startLine:i+1,endLine:t.length})}for(let i=0;i<r.length;i++)if(i+1<r.length)r[i].endLine=r[i+1].startLine-1;else{let o=t.length;for(let c=r[i].startLine;c<t.length;c++)if(t[c].includes("</main>")||t[c].match(/^\s*<\/div>\s*$/)){o=c;break}r[i].endLine=o}return r}function Mn(e,t){const r=e.split(`
202
+ `),s=Math.max(0,t-6),i=Math.min(r.length,t+5);return r.slice(s,i).map((o,c)=>{const u=s+c+1;return`${u===t?">>>":" "} ${u}: ${o}`}).join(`
203
+ `)}function Jn(e,t={}){var m;const{filename:r="App.tsx",isTypeScript:s,isJSX:i}=t,o=((m=r.split(".").pop())==null?void 0:m.toLowerCase())??"",c=[];(s??(o==="tsx"||o==="ts"))&&c.push("typescript"),(i??(o==="tsx"||o==="jsx"))&&c.push("jsx");const u=[],f=Zd(e);let h="";try{h=ud(e,{transforms:c,jsxRuntime:"automatic",production:!1,filePath:r}).code}catch(x){const _=tm(x,e);return u.push(_),{code:"",error:_,errors:u,sections:f}}try{kc(h,{ecmaVersion:"latest",sourceType:"module"})}catch(x){const _=(x.message||"").toLowerCase();if(_.includes("export")||_.includes("import")){const y=em(x,e);u.push(y)}}if((o==="tsx"||o==="jsx")&&!/export\s+default\s/.test(e)&&!/module\.exports/.test(e)&&u.push({id:`struct-${++Hr}`,category:"transpilation",severity:"error",message:'Missing "export default" — component will not render in preview',timestamp:new Date().toISOString()}),o==="tsx"||o==="jsx"){const x=Qd(e);for(const{name:_,line:y}of x)u.push({id:`scope-${++Hr}`,category:"runtime",severity:"error",message:`"${_}" is used in JSX but not imported or declared — will cause ReferenceError at runtime`,line:y,sourceContext:Mn(e,y),location:On(e,y),timestamp:new Date().toISOString()})}if(o==="tsx"||o==="jsx"||o==="ts"||o==="js"){const x=e.split(`
204
+ `).length,_=Jd(h,x);for(const{name:y,line:L}of _)u.some(O=>O.message.includes(`"${y}"`))||u.push({id:`scope-${++Hr}`,category:"runtime",severity:"error",message:`"${y}" is not defined — will cause ReferenceError at runtime. Check spelling or add import/declaration.`,line:L,sourceContext:Mn(e,L),location:On(e,L),timestamp:new Date().toISOString()})}return{code:h,error:u.length>0?u[0]:null,errors:u,sections:f}}function em(e,t,r){const s=e.message||"Module validation failed";let i,o;e.loc&&(i=e.loc.line,o=e.loc.column+1);const c=i?Mn(t,i):void 0,u=i?On(t,i):void 0,f=s.replace(/\s*\(\d+:\d+\)\s*$/,"");return{id:`module-${++Hr}`,category:"transpilation",severity:"error",message:f,line:i,column:o,sourceContext:c,location:u,timestamp:new Date().toISOString()}}function tm(e,t){var h,m;const r=e.message||"Transpilation failed";let s,i;const o=r.match(/\((\d+):(\d+)\)/);if(o&&(s=parseInt(o[1],10),i=parseInt(o[2],10)),!s&&typeof e.pos=="number"){const x=t.substring(0,e.pos).split(`
205
+ `);s=x.length,i=(((h=x[x.length-1])==null?void 0:h.length)??0)+1}const c=s?Mn(t,s):void 0,u=s?On(t,s):void 0;let f="";if(s&&(r.includes("Unexpected token")||r.includes("Unterminated"))){const x=t.split(`
206
+ `).length,_=rm(t),y=((m=t.split(`
207
+ `).reverse().find(F=>F.trim()))==null?void 0:m.trim())??"",L=/^[}\])\s;]*$/.test(y)||y.endsWith("};");if(x>20&&_>=2&&!L)f=` — FILE APPEARS TRUNCATED (${_} unclosed brackets/tags at end of file). The code was cut off mid-generation. Do NOT try to fix syntax — instead, use content_tool edit to add the missing closing code from where it was cut off.`;else{const F=nm(t);if(F){const K=F.char==="{"?"brace":F.char==="("?"parenthesis":"bracket";f=` — likely caused by unclosed '${F.char}' (${K}) on line ${F.line}. Read lines ${Math.max(1,F.line-2)}–${F.line+10} to find where the closing '${F.char==="{"?"}":F.char==="("?")":"]"}' is missing, then add it with content_tool edit.`}}}return{id:`transpile-${++Hr}`,category:"transpilation",severity:"error",message:sm(r)+f,line:s,column:i,sourceContext:c,location:u,timestamp:new Date().toISOString()}}function rm(e){const t={"(":")","[":"]","{":"}"},r=new Set([")","]","}"]),s=[];let i=!1,o="",c=!1,u=!1,f=!1;for(let h=0;h<e.length;h++){const m=e[h],x=e[h+1];if(m===`
208
+ `){u=!1;continue}if(!u){if(f){m==="*"&&x==="/"&&(f=!1,h++);continue}if(i){if(m==="\\"){h++;continue}m===o&&(i=!1);continue}if(c){if(m==="\\"){h++;continue}m==="`"&&(c=!1);continue}if(m==="/"&&x==="/"){u=!0,h++;continue}if(m==="/"&&x==="*"){f=!0,h++;continue}if(m==="'"||m==='"'){i=!0,o=m;continue}if(m==="`"){c=!0;continue}t[m]?s.push(m):r.has(m)&&s.length>0&&s.pop()}}return s.length}function nm(e,t){const r={"(":")","[":"]","{":"}"},s={")":"(","]":"[","}":"{"},i=[];let o=!1,c="",u=!1,f=!1,h=!1,m=1,x=null;for(let _=0;_<e.length;_++){const y=e[_],L=e[_+1];if(y===`
209
+ `){m++,f=!1;continue}if(!f){if(h){y==="*"&&L==="/"&&(h=!1,_++);continue}if(o){if(y==="\\"){_++;continue}y===c&&(o=!1);continue}if(u){if(y==="\\"){_++;continue}y==="`"&&(u=!1);continue}if(y==="/"&&L==="/"){f=!0,_++;continue}if(y==="/"&&L==="*"){h=!0,_++;continue}if(y==="'"||y==='"'){o=!0,c=y;continue}if(y==="`"){u=!0;continue}r[y]?i.push({char:y,line:m}):s[y]&&(i.length>0&&i[i.length-1].char===s[y]?i.pop():x||(x=i.length>0?i[i.length-1]:{char:y,line:m}))}}return x||(i.length>0?i[0]:null)}function sm(e){return e.replace(/^\/[^:]+:\s*/,"").replace(/^Error:\s*/,"")}function im(e){const t={};for(const[r,s]of Object.entries(e))t[r]=Jn(s,{filename:r});return t}const am="https://esm.sh";function Ti(e={}){var f,h;const t=e.cdnBase||am,r="18.2.0",s="?external=react,react-dom",i={react:`${t}/react@${r}`,"react/":`${t}/react@${r}/`,"react-dom":`${t}/react-dom@${r}`,"react-dom/":`${t}/react-dom@${r}/`,"react/jsx-runtime":`${t}/react@${r}/jsx-runtime`,"react/jsx-dev-runtime":`${t}/react@${r}/jsx-dev-runtime`,"class-variance-authority":`${t}/class-variance-authority@0.7.1`,clsx:`${t}/clsx@2.1.1`,"tailwind-merge":`${t}/tailwind-merge@2.6.0`,"lucide-react":`${t}/lucide-react@0.468.0${s}`,"react-icons/":`${t}/react-icons@5.4.0/`,"date-fns":`${t}/date-fns@4.1.0`,"date-fns/":`${t}/date-fns@4.1.0/`,"chart.js":`${t}/chart.js@4.4.8/auto`,"chart.js/auto":`${t}/chart.js@4.4.8/auto`,"chart.js/":`${t}/chart.js@4.4.8/`,"react-chartjs-2":`${t}/react-chartjs-2@5.3.0${s}`,recharts:`${t}/recharts@2.15.0${s}`,"recharts/":`${t}/recharts@2.15.0&external=react,react-dom/`,"framer-motion":`${t}/framer-motion@11.18.0${s}`,"framer-motion/":`${t}/framer-motion@11.18.0&external=react,react-dom/`,"react-hook-form":`${t}/react-hook-form@7.54.2${s}`,zod:`${t}/zod@3.24.1`,"@hookform/resolvers":`${t}/@hookform/resolvers@3.9.1${s}`,"@hookform/resolvers/":`${t}/@hookform/resolvers@3.9.1&external=react,react-dom/`,"@tanstack/react-table":`${t}/@tanstack/react-table@8.21.2${s}`,zustand:`${t}/zustand@5.0.3${s}`,"zustand/":`${t}/zustand@5.0.3&external=react,react-dom/`,"react-router-dom":`${t}/react-router-dom@6.28.2${s}`,"react-router-dom/":`${t}/react-router-dom@6.28.2&external=react,react-dom/`,sonner:`${t}/sonner@1.7.3${s}`,cmdk:`${t}/cmdk@1.0.4${s}`,"@dnd-kit/core":`${t}/@dnd-kit/core@6.3.1${s}`,"@dnd-kit/sortable":`${t}/@dnd-kit/sortable@10.0.0${s}`,"@dnd-kit/utilities":`${t}/@dnd-kit/utilities@3.2.2`,axios:`${t}/axios@1.7.9`,"axios/":`${t}/axios@1.7.9/`,"lodash-es":`${t}/lodash-es@4.17.21`,"lodash-es/":`${t}/lodash-es@4.17.21/`,nanoid:`${t}/nanoid@5.0.9`,uuid:`${t}/uuid@11.0.5`,"react-markdown":`${t}/react-markdown@9.0.3${s}`,"remark-gfm":`${t}/remark-gfm@4.0.0`,"react-syntax-highlighter":`${t}/react-syntax-highlighter@15.6.1${s}`,"react-syntax-highlighter/":`${t}/react-syntax-highlighter@15.6.1&external=react,react-dom/`,"react-leaflet":`${t}/react-leaflet@4.2.1${s}`,"react-leaflet/":`${t}/react-leaflet@4.2.1&external=react,react-dom/`,leaflet:`${t}/leaflet@1.9.4`,"leaflet/":`${t}/leaflet@1.9.4/`,"react-player":`${t}/react-player@2.16.0${s}`,"react-player/":`${t}/react-player@2.16.0&external=react,react-dom/`,"usehooks-ts":`${t}/usehooks-ts@3.1.0${s}`,"react-colorful":`${t}/react-colorful@5.6.1${s}`,"@radix-ui/react-slot":`${t}/@radix-ui/react-slot@1.1.1${s}`,"@radix-ui/react-accordion":`${t}/@radix-ui/react-accordion@1.2.2${s}`,"@radix-ui/react-alert-dialog":`${t}/@radix-ui/react-alert-dialog@1.1.4${s}`,"@radix-ui/react-aspect-ratio":`${t}/@radix-ui/react-aspect-ratio@1.1.1${s}`,"@radix-ui/react-avatar":`${t}/@radix-ui/react-avatar@1.1.2${s}`,"@radix-ui/react-checkbox":`${t}/@radix-ui/react-checkbox@1.1.3${s}`,"@radix-ui/react-collapsible":`${t}/@radix-ui/react-collapsible@1.1.2${s}`,"@radix-ui/react-context-menu":`${t}/@radix-ui/react-context-menu@2.2.4${s}`,"@radix-ui/react-dialog":`${t}/@radix-ui/react-dialog@1.1.4${s}`,"@radix-ui/react-dropdown-menu":`${t}/@radix-ui/react-dropdown-menu@2.1.4${s}`,"@radix-ui/react-hover-card":`${t}/@radix-ui/react-hover-card@1.1.4${s}`,"@radix-ui/react-label":`${t}/@radix-ui/react-label@2.1.1${s}`,"@radix-ui/react-menubar":`${t}/@radix-ui/react-menubar@1.1.4${s}`,"@radix-ui/react-navigation-menu":`${t}/@radix-ui/react-navigation-menu@1.2.3${s}`,"@radix-ui/react-popover":`${t}/@radix-ui/react-popover@1.1.4${s}`,"@radix-ui/react-progress":`${t}/@radix-ui/react-progress@1.1.1${s}`,"@radix-ui/react-radio-group":`${t}/@radix-ui/react-radio-group@1.2.2${s}`,"@radix-ui/react-scroll-area":`${t}/@radix-ui/react-scroll-area@1.2.2${s}`,"@radix-ui/react-select":`${t}/@radix-ui/react-select@2.1.4${s}`,"@radix-ui/react-separator":`${t}/@radix-ui/react-separator@1.1.1${s}`,"@radix-ui/react-slider":`${t}/@radix-ui/react-slider@1.2.2${s}`,"@radix-ui/react-switch":`${t}/@radix-ui/react-switch@1.1.2${s}`,"@radix-ui/react-tabs":`${t}/@radix-ui/react-tabs@1.1.2${s}`,"@radix-ui/react-toast":`${t}/@radix-ui/react-toast@1.2.4${s}`,"@radix-ui/react-toggle":`${t}/@radix-ui/react-toggle@1.1.1${s}`,"@radix-ui/react-toggle-group":`${t}/@radix-ui/react-toggle-group@1.1.1${s}`,"@radix-ui/react-tooltip":`${t}/@radix-ui/react-tooltip@1.1.6${s}`,"@radix-ui/react-portal":`${t}/@radix-ui/react-portal@1.1.3${s}`,"@radix-ui/react-visually-hidden":`${t}/@radix-ui/react-visually-hidden@1.1.1${s}`,"@radix-ui/react-collection":`${t}/@radix-ui/react-collection@1.1.1${s}`,"@radix-ui/react-context":`${t}/@radix-ui/react-context@1.1.1${s}`,"embla-carousel-react":`${t}/embla-carousel-react@8.5.1${s}`,"embla-carousel-autoplay":`${t}/embla-carousel-autoplay@8.5.1`,vaul:`${t}/vaul@1.1.2${s}`,"resize-observer-polyfill":`${t}/resize-observer-polyfill@1.5.1`,"react-resizable-panels":`${t}/react-resizable-panels@2.1.7${s}`,"react-day-picker":`${t}/react-day-picker@9.4.4${s}`,"input-otp":`${t}/input-otp@1.4.1${s}`,"react-dropzone":`${t}/react-dropzone@14.3.5${s}`,"qrcode.react":`${t}/qrcode.react@4.2.0${s}`},o=["esm.sh","cdn.jsdelivr.net","unpkg.com","cdn.skypack.dev","cdnjs.cloudflare.com"];if(e.dependencies)for(const[m,x]of Object.entries(e.dependencies))if(x.startsWith("http")){try{const _=new URL(x);if(!o.some(y=>_.hostname===y||_.hostname.endsWith("."+y))){console.warn(`[codeviz] Blocked untrusted CDN URL for "${m}": ${x}`);continue}}catch{console.warn(`[codeviz] Invalid URL for "${m}": ${x}`);continue}i[m]=x}else i[m]=`${t}/${m}@${x}${s}`;const c={...i,...((f=e.overrides)==null?void 0:f.imports)||{}},u={react:`${t}/react@${r}`,"react/":`${t}/react@${r}/`,"react-dom":`${t}/react-dom@${r}`,"react-dom/":`${t}/react-dom@${r}/`,"react/jsx-runtime":`${t}/react@${r}/jsx-runtime`,"react/jsx-dev-runtime":`${t}/react@${r}/jsx-dev-runtime`};return{imports:c,scopes:{[`${t}/`]:u,...((h=e.overrides)==null?void 0:h.scopes)||{}}}}function Ai(e){return`<script type="importmap">${JSON.stringify(e,null,2)}<\/script>`}function vc(){return`Available packages (just import, no install needed):
194
210
 
195
211
  STYLING: clsx, class-variance-authority, tailwind-merge
196
212
  ICONS: lucide-react (1400+ icons), react-icons/* (40k+ icons from fa/md/hi/etc)
@@ -219,7 +235,7 @@ UI PRIMITIVES (Radix): accordion, alert-dialog, aspect-ratio, avatar, checkbox,
219
235
  navigation-menu, popover, progress, radio-group, scroll-area, select, separator,
220
236
  slider, switch, tabs, toast, toggle, toggle-group, tooltip, portal, visually-hidden
221
237
 
222
- All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all styling.`}const od="https://cdn.tailwindcss.com/3.4.16?plugins=forms,typography";function xn(e){const{transpiledCode:t,template:r,importMap:s,tailwindCdn:i=od,externalResources:a=[]}=e;return r==="html"?id(t,{tailwindCdn:i,externalResources:a}):r==="markdown"?cd(t,{tailwindCdn:i,externalResources:a}):r==="mermaid"?ld(t):r==="svg"?ud(t):r==="csv"?pd(t):r==="json"?dd(t):fd(t,{importMap:s,tailwindCdn:i,externalResources:a})}function id(e,t){const{tailwindCdn:r,externalResources:s=[]}=t;if(e.includes("<html")||e.includes("<!DOCTYPE"))return e;const i=s.map(u=>u.endsWith(".css")?`<link rel="stylesheet" href="${u}">`:`<script src="${u}"><\/script>`).join(`
238
+ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all styling.`}const om="https://cdn.tailwindcss.com/3.4.16?plugins=forms,typography";function yn(e){const{transpiledCode:t,template:r,importMap:s,tailwindCdn:i=om,externalResources:o=[],themeCSS:c,componentsPreamble:u}=e;return r==="html"?cm(t,{tailwindCdn:i,externalResources:o}):r==="markdown"?um(t,{tailwindCdn:i,externalResources:o}):r==="mermaid"?pm(t):r==="svg"?hm(t):r==="csv"?fm(t):r==="json"?dm(t):r==="architecture"?mm(t):r==="dot"?gm(t):r==="latex"?xm(t):km(t,{importMap:s,tailwindCdn:i,externalResources:o,themeCSS:c,componentsPreamble:u})}function cm(e,t){const{tailwindCdn:r,externalResources:s=[]}=t;if(e.includes("<html")||e.includes("<!DOCTYPE"))return e;const i=s.map(c=>c.endsWith(".css")?`<link rel="stylesheet" href="${c}">`:`<script src="${c}"><\/script>`).join(`
223
239
  `);return`<!DOCTYPE html>
224
240
  <html lang="en">
225
241
  <head>
@@ -227,7 +243,7 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
227
243
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
228
244
  ${r?`<script src="${r}"><\/script>`:""}
229
245
  ${i}
230
- ${wt()}
246
+ ${Ct()}
231
247
  <style>
232
248
  body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; }
233
249
  </style>
@@ -245,7 +261,7 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
245
261
  }
246
262
  <\/script>
247
263
  </body>
248
- </html>`}function ds(){return`
264
+ </html>`}function Zn(){return`
249
265
  .mermaid-viewer {
250
266
  position: relative;
251
267
  border: 1px solid #30363d;
@@ -303,7 +319,7 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
303
319
  align-items: center;
304
320
  user-select: none;
305
321
  }
306
- `}function fs(){return`
322
+ `}function es(){return`
307
323
  function initZoomPan(viewer) {
308
324
  const viewport = viewer.querySelector('.mermaid-viewport');
309
325
  const inner = viewer.querySelector('.mermaid-inner');
@@ -374,7 +390,7 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
374
390
  // Auto-fit on first load
375
391
  requestAnimationFrame(() => fitToContainer());
376
392
  }
377
- `}function ad(e){return`<div class="mermaid-viewer">
393
+ `}function lm(e){return`<div class="mermaid-viewer">
378
394
  <div class="mermaid-controls">
379
395
  <button data-action="zoom-in" title="Zoom in">+</button>
380
396
  <button data-action="zoom-out" title="Zoom out">&minus;</button>
@@ -389,18 +405,18 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
389
405
  <div class="mermaid">${e}</div>
390
406
  </div>
391
407
  </div>
392
- </div>`}function cd(e,t){const{tailwindCdn:r,externalResources:s=[]}=t,i=s.map(d=>d.endsWith(".css")?`<link rel="stylesheet" href="${d}">`:`<script src="${d}"><\/script>`).join(`
393
- `),a=r?`<script src="${r}"><\/script>`:"",u=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
408
+ </div>`}function um(e,t){const{tailwindCdn:r,externalResources:s=[]}=t,i=s.map(u=>u.endsWith(".css")?`<link rel="stylesheet" href="${u}">`:`<script src="${u}"><\/script>`).join(`
409
+ `),o=r?`<script src="${r}"><\/script>`:"",c=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
394
410
  <html lang="en">
395
411
  <head>
396
412
  <meta charset="UTF-8">
397
413
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
398
- ${a}
414
+ ${o}
399
415
  ${i}
400
416
  <script src="https://cdn.jsdelivr.net/npm/marked@14/marked.min.js"><\/script>
401
417
  <script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"><\/script>
402
418
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown-dark.min.css">
403
- ${wt()}
419
+ ${Ct()}
404
420
  <style>
405
421
  body { margin: 0; padding: 0; background: #0d1117; }
406
422
  .markdown-body {
@@ -411,18 +427,18 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
411
427
  padding: 32px 24px;
412
428
  }
413
429
  pre code { border-radius: 6px; }
414
- ${ds()}
430
+ ${Zn()}
415
431
  </style>
416
432
  </head>
417
433
  <body>
418
434
  <article id="content" class="markdown-body"></article>
419
435
  <script>
420
- ${fs()}
436
+ ${es()}
421
437
 
422
438
  mermaid.initialize({
423
439
  startOnLoad: false,
424
440
  theme: 'dark',
425
- securityLevel: 'loose',
441
+ securityLevel: 'strict',
426
442
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
427
443
  });
428
444
 
@@ -430,14 +446,14 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
430
446
  const origCode = renderer.code.bind(renderer);
431
447
  renderer.code = function({ text, lang }) {
432
448
  if (lang === 'mermaid') {
433
- return ${JSON.stringify(ad("__MERMAID__"))}.replace('__MERMAID__', text);
449
+ return ${JSON.stringify(lm("__MERMAID__"))}.replace('__MERMAID__', text);
434
450
  }
435
451
  return origCode({ text, lang });
436
452
  };
437
453
 
438
454
  marked.setOptions({ renderer, gfm: true, breaks: true });
439
455
 
440
- const md = \`${u}\`;
456
+ const md = \`${c}\`;
441
457
  document.getElementById('content').innerHTML = marked.parse(md);
442
458
 
443
459
  mermaid.run({ nodes: document.querySelectorAll('.mermaid') }).then(() => {
@@ -449,17 +465,17 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
449
465
  });
450
466
  <\/script>
451
467
  </body>
452
- </html>`}function ld(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
468
+ </html>`}function pm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
453
469
  <html lang="en">
454
470
  <head>
455
471
  <meta charset="UTF-8">
456
472
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
457
473
  <script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"><\/script>
458
- ${wt()}
474
+ ${Ct()}
459
475
  <style>
460
476
  * { box-sizing: border-box; margin: 0; padding: 0; }
461
477
  body { background: #0d1117; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
462
- ${ds()}
478
+ ${Zn()}
463
479
  .mermaid-viewer {
464
480
  position: fixed;
465
481
  inset: 0;
@@ -492,12 +508,12 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
492
508
  </div>
493
509
 
494
510
  <script>
495
- ${fs()}
511
+ ${es()}
496
512
 
497
513
  mermaid.initialize({
498
514
  startOnLoad: false,
499
515
  theme: 'dark',
500
- securityLevel: 'loose',
516
+ securityLevel: 'strict',
501
517
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
502
518
  });
503
519
 
@@ -516,16 +532,16 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
516
532
  });
517
533
  <\/script>
518
534
  </body>
519
- </html>`}function ud(e){return`<!DOCTYPE html>
535
+ </html>`}function hm(e){return`<!DOCTYPE html>
520
536
  <html lang="en">
521
537
  <head>
522
538
  <meta charset="UTF-8">
523
539
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
524
- ${wt()}
540
+ ${Ct()}
525
541
  <style>
526
542
  * { box-sizing: border-box; margin: 0; padding: 0; }
527
543
  body { background: #0d1117; }
528
- ${ds()}
544
+ ${Zn()}
529
545
  .mermaid-viewer { position: fixed; inset: 0; border: none; border-radius: 0; margin: 0; }
530
546
  .mermaid-viewport { width: 100vw; height: 100vh; }
531
547
  /* Ensure SVG is visible even without explicit width/height */
@@ -558,7 +574,7 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
558
574
  </div>
559
575
  </div>
560
576
  <script>
561
- ${fs()}
577
+ ${es()}
562
578
 
563
579
  // If SVG has viewBox but no width/height, set explicit dimensions from viewBox
564
580
  const svg = document.querySelector('#svg-container > svg');
@@ -577,12 +593,12 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
577
593
  window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
578
594
  <\/script>
579
595
  </body>
580
- </html>`}function pd(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
596
+ </html>`}function fm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
581
597
  <html lang="en">
582
598
  <head>
583
599
  <meta charset="UTF-8">
584
600
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
585
- ${wt()}
601
+ ${Ct()}
586
602
  <style>
587
603
  * { box-sizing: border-box; margin: 0; padding: 0; }
588
604
  body { background: #0d1117; color: #e6edf3; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; padding: 16px; }
@@ -689,12 +705,12 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
689
705
  window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
690
706
  <\/script>
691
707
  </body>
692
- </html>`}function dd(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
708
+ </html>`}function dm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
693
709
  <html lang="en">
694
710
  <head>
695
711
  <meta charset="UTF-8">
696
712
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
697
- ${wt()}
713
+ ${Ct()}
698
714
  <style>
699
715
  * { box-sizing: border-box; margin: 0; padding: 0; }
700
716
  body { background: #0d1117; color: #e6edf3; font-family: 'SF Mono', Menlo, monospace; font-size: 13px; padding: 16px; line-height: 1.5; }
@@ -731,8 +747,10 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
731
747
  const raw = \`${t}\`;
732
748
  let parsed;
733
749
  try { parsed = JSON.parse(raw); } catch(e) {
734
- document.getElementById('tree').innerHTML =
735
- '<div style="color:#f85149;padding:16px;">Invalid JSON: ' + e.message + '</div>';
750
+ const errDiv = document.createElement('div');
751
+ errDiv.style.cssText = 'color:#f85149;padding:16px;';
752
+ errDiv.textContent = 'Invalid JSON: ' + e.message;
753
+ document.getElementById('tree').appendChild(errDiv);
736
754
  window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
737
755
  throw e;
738
756
  }
@@ -811,16 +829,245 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
811
829
  window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
812
830
  <\/script>
813
831
  </body>
814
- </html>`}function fd(e,t){const{importMap:r,tailwindCdn:s,externalResources:i=[]}=t,a=i.map(d=>d.endsWith(".css")?`<link rel="stylesheet" href="${d}">`:`<script src="${d}"><\/script>`).join(`
815
- `),u=s?`<script src="${s}"><\/script>`:"";return`<!DOCTYPE html>
832
+ </html>`}function mm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
816
833
  <html lang="en">
817
834
  <head>
818
835
  <meta charset="UTF-8">
819
836
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
820
- ${ps(r)}
837
+ ${Ct()}
838
+ <style>
839
+ * { box-sizing: border-box; margin: 0; padding: 0; }
840
+ html, body { width: 100%; height: 100%; overflow: hidden; }
841
+ body { background: #f5f5f5; }
842
+ .geDiagramContainer { overflow: auto !important; }
843
+ .geBackgroundPage { background: none !important; box-shadow: none !important; }
844
+ /* Dark theme overrides for the viewer toolbar */
845
+ .mxWindow { background: #161b22 !important; border-color: #30363d !important; }
846
+ </style>
847
+ </head>
848
+ <body>
849
+ <div id="diagram" class="mxgraph" style="width:100%;height:100vh;"></div>
850
+ <script>
851
+ const xml = \`${t}\`;
852
+ const container = document.getElementById('diagram');
853
+ container.setAttribute('data-mxgraph', JSON.stringify({
854
+ highlight: '#818cf8',
855
+ nav: true,
856
+ resize: true,
857
+ toolbar: 'zoom layers lightbox',
858
+ xml: xml
859
+ }));
860
+ <\/script>
861
+ <script src="https://viewer.diagrams.net/js/viewer-static.min.js"><\/script>
862
+ <script>
863
+ // Notify parent once viewer is rendered
864
+ function checkReady() {
865
+ const svgEl = document.querySelector('svg');
866
+ if (svgEl) {
867
+ window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
868
+ } else {
869
+ setTimeout(checkReady, 200);
870
+ }
871
+ }
872
+ // Viewer processes synchronously after script load, but give it a moment
873
+ setTimeout(checkReady, 500);
874
+ <\/script>
875
+ </body>
876
+ </html>`}function gm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
877
+ <html lang="en">
878
+ <head>
879
+ <meta charset="UTF-8">
880
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
881
+ <script src="https://cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js"><\/script>
882
+ ${Ct()}
883
+ <style>
884
+ * { box-sizing: border-box; margin: 0; padding: 0; }
885
+ body { background: #0d1117; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
886
+ ${Zn()}
887
+ .mermaid-viewer { position: fixed; inset: 0; border: none; border-radius: 0; margin: 0; }
888
+ .mermaid-viewport { width: 100vw; height: 100vh; }
889
+ #dot-container svg {
890
+ display: block;
891
+ width: auto;
892
+ height: auto;
893
+ min-width: 100px;
894
+ min-height: 100px;
895
+ max-width: none;
896
+ max-height: none;
897
+ }
898
+ .dot-error {
899
+ padding: 24px;
900
+ color: #f85149;
901
+ font-family: 'SF Mono', Menlo, monospace;
902
+ font-size: 13px;
903
+ white-space: pre-wrap;
904
+ }
905
+ </style>
906
+ </head>
907
+ <body>
908
+ <div class="mermaid-viewer">
909
+ <div class="mermaid-controls">
910
+ <button data-action="zoom-in" title="Zoom in">+</button>
911
+ <button data-action="zoom-out" title="Zoom out">&minus;</button>
912
+ <span class="mermaid-zoom-label">100%</span>
913
+ <button data-action="fit" title="Fit to view">
914
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="12" height="12" rx="2"/><polyline points="6 2 6 6 2 6"/><polyline points="10 14 10 10 14 10"/></svg>
915
+ </button>
916
+ <button data-action="reset" title="Reset zoom">1:1</button>
917
+ </div>
918
+ <div class="mermaid-viewport">
919
+ <div class="mermaid-inner" id="dot-container"></div>
920
+ </div>
921
+ </div>
922
+ <script>
923
+ ${es()}
924
+
925
+ const dotSrc = \`${t}\`;
926
+
927
+ Viz.instance().then(viz => {
928
+ try {
929
+ const svgStr = viz.renderSVGElement(dotSrc);
930
+ document.getElementById('dot-container').appendChild(svgStr);
931
+ initZoomPan(document.querySelector('.mermaid-viewer'));
932
+ window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
933
+ } catch (err) {
934
+ document.getElementById('dot-container').innerHTML =
935
+ '<div class="dot-error">Graphviz Error\\n' + (err.message || err) + '</div>';
936
+ window.parent.postMessage({ type: 'codeviz', action: 'error', payload: { message: err.message || String(err) } }, '*');
937
+ window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
938
+ }
939
+ }).catch(err => {
940
+ document.getElementById('dot-container').innerHTML =
941
+ '<div class="dot-error">Failed to load Graphviz engine\\n' + (err.message || err) + '</div>';
942
+ window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
943
+ });
944
+ <\/script>
945
+ </body>
946
+ </html>`}function xm(e){const t=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return`<!DOCTYPE html>
947
+ <html lang="en">
948
+ <head>
949
+ <meta charset="UTF-8">
950
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
951
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16/dist/katex.min.css">
952
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.16/dist/katex.min.js"><\/script>
953
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.16/dist/contrib/auto-render.min.js"><\/script>
954
+ ${Ct()}
955
+ <style>
956
+ * { box-sizing: border-box; margin: 0; padding: 0; }
957
+ body {
958
+ background: #0d1117;
959
+ color: #e6edf3;
960
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
961
+ padding: 32px 24px;
962
+ line-height: 1.8;
963
+ font-size: 16px;
964
+ }
965
+ #content {
966
+ max-width: 800px;
967
+ margin: 0 auto;
968
+ }
969
+ /* Display math blocks get extra spacing */
970
+ .katex-display {
971
+ margin: 24px 0;
972
+ padding: 16px;
973
+ background: #161b22;
974
+ border-radius: 8px;
975
+ border: 1px solid #30363d;
976
+ overflow-x: auto;
977
+ }
978
+ .katex-display > .katex {
979
+ text-align: center;
980
+ }
981
+ /* Scale up display math slightly */
982
+ .katex-display .katex { font-size: 1.2em; }
983
+ /* Error styling */
984
+ .katex-error { color: #f85149; }
985
+ /* Paragraph spacing for multi-line input */
986
+ .latex-block { margin-bottom: 16px; }
987
+ </style>
988
+ </head>
989
+ <body>
990
+ <div id="content"></div>
991
+ <script>
992
+ const raw = \`${t}\`;
993
+
994
+ const content = document.getElementById('content');
995
+
996
+ // Check if the input looks like pure math (no text blocks)
997
+ const trimmed = raw.trim();
998
+ const isPureMath = /^(\\\\[a-zA-Z]|[$\\\\{\\[])/.test(trimmed) &&
999
+ !trimmed.includes('\\n\\n');
1000
+
1001
+ if (isPureMath) {
1002
+ // Render the entire input as a single display math block
1003
+ const div = document.createElement('div');
1004
+ content.appendChild(div);
1005
+ try {
1006
+ katex.render(trimmed, div, {
1007
+ displayMode: true,
1008
+ throwOnError: false,
1009
+ trust: false,
1010
+ strict: false,
1011
+ });
1012
+ } catch(e) {
1013
+ const errSpan = document.createElement('div');
1014
+ errSpan.style.cssText = 'color:#f85149;font-family:monospace;font-size:13px;white-space:pre-wrap;';
1015
+ errSpan.textContent = 'LaTeX Error: ' + e.message;
1016
+ div.appendChild(errSpan);
1017
+ }
1018
+ } else {
1019
+ // Mixed content: split by blank lines, render each block
1020
+ const blocks = raw.split(/\\n\\n+/);
1021
+ blocks.forEach(block => {
1022
+ const trimBlock = block.trim();
1023
+ if (!trimBlock) return;
1024
+ const div = document.createElement('div');
1025
+ div.className = 'latex-block';
1026
+
1027
+ // If the block is wrapped in $$ or \\[...\\], treat as display math
1028
+ if (/^\\$\\$[\\s\\S]*\\$\\$$/.test(trimBlock) || /^\\\\\\\\\\[[\\s\\S]*\\\\\\\\\\]$/.test(trimBlock)) {
1029
+ const math = trimBlock.replace(/^\\$\\$|\\$\\$$/g, '').replace(/^\\\\\\\\\\[|\\\\\\\\\\]$/g, '').trim();
1030
+ try {
1031
+ katex.render(math, div, { displayMode: true, throwOnError: false, trust: false, strict: false });
1032
+ } catch(e) {
1033
+ div.textContent = trimBlock;
1034
+ }
1035
+ } else {
1036
+ // Text with possible inline math — use auto-render
1037
+ div.textContent = trimBlock;
1038
+ content.appendChild(div);
1039
+ renderMathInElement(div, {
1040
+ delimiters: [
1041
+ { left: '$$', right: '$$', display: true },
1042
+ { left: '$', right: '$', display: false },
1043
+ { left: '\\\\\\\\(', right: '\\\\\\\\)', display: false },
1044
+ { left: '\\\\\\\\[', right: '\\\\\\\\]', display: true },
1045
+ ],
1046
+ throwOnError: false,
1047
+ trust: false,
1048
+ strict: false,
1049
+ });
1050
+ return;
1051
+ }
1052
+ content.appendChild(div);
1053
+ });
1054
+ }
1055
+
1056
+ window.parent.postMessage({ type: 'codeviz', action: 'ready' }, '*');
1057
+ <\/script>
1058
+ </body>
1059
+ </html>`}function km(e,t){const{importMap:r,tailwindCdn:s,externalResources:i=[],themeCSS:o,componentsPreamble:c}=t,u=i.map(x=>x.endsWith(".css")?`<link rel="stylesheet" href="${x}">`:`<script src="${x}"><\/script>`).join(`
1060
+ `),f=s?`<script src="${s}"><\/script>`:"",h=o?`<style data-theme>${o}</style>`:"",m=c?c+`
1061
+ `+e:e;return`<!DOCTYPE html>
1062
+ <html lang="en">
1063
+ <head>
1064
+ <meta charset="UTF-8">
1065
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
1066
+ ${Ai(r)}
1067
+ ${f}
821
1068
  ${u}
822
- ${a}
823
- ${wt()}
1069
+ ${Ct()}
1070
+ ${h}
824
1071
  <style>
825
1072
  * { box-sizing: border-box; }
826
1073
  body {
@@ -834,10 +1081,10 @@ All packages use Tailwind CSS (available via CDN). Use Tailwind classes for all
834
1081
  <body>
835
1082
  <div id="root"></div>
836
1083
  <script type="module">
837
- ${hd(e)}
1084
+ ${bm(m)}
838
1085
  <\/script>
839
1086
  </body>
840
- </html>`}function hd(e){return`
1087
+ </html>`}function bm(e){return`
841
1088
  import React from 'react';
842
1089
  import { createRoot } from 'react-dom/client';
843
1090
 
@@ -877,7 +1124,16 @@ ${hd(e)}
877
1124
  throw new Error('No default export found. Your component must use "export default".');
878
1125
  }
879
1126
 
880
- const root = createRoot(document.getElementById('root'));
1127
+ // Guard against the "Should have a queue" React error.
1128
+ // This happens when: (1) createRoot is called on an already-mounted node,
1129
+ // (2) React modules loaded from import map haven't fully initialized, or
1130
+ // (3) user code imports React from a different source than the import map.
1131
+ // Fix: clear the root, use a fresh container, and wrap render in microtask
1132
+ // to ensure React's scheduler has initialized after all imports resolve.
1133
+ const rootEl = document.getElementById('root');
1134
+ rootEl.innerHTML = '';
1135
+ await new Promise(r => setTimeout(r, 0));
1136
+ const root = createRoot(rootEl);
881
1137
  root.render(React.createElement(App));
882
1138
 
883
1139
  // Notify parent we're ready
@@ -888,747 +1144,77 @@ ${hd(e)}
888
1144
  document.getElementById('root').innerHTML =
889
1145
  '<div style="padding:16px;color:#ef4444;font-family:monospace;white-space:pre-wrap;font-size:13px;">'
890
1146
  + '<strong>Error</strong>\\n' + (err.message || err) + '</div>';
1147
+ var eline, ecol;
1148
+ if (err.stack) {
1149
+ var em = err.stack.match(/:(d+):(d+)/);
1150
+ if (em) { eline = parseInt(em[1], 10); ecol = parseInt(em[2], 10); }
1151
+ }
891
1152
  window.parent.postMessage({
892
1153
  type: 'codeviz',
893
1154
  action: 'error',
894
- payload: { message: err.message || String(err), stack: err.stack }
1155
+ payload: { message: err.message || String(err), stack: err.stack, line: eline, column: ecol }
895
1156
  }, '*');
896
1157
  }
897
1158
  }
898
1159
 
899
1160
  main();
900
- `}function wt(){return`<script>
901
- // Capture unhandled errors
1161
+ `}function Ct(){return`<script>
1162
+ // Capture unhandled errors — include line/column from ErrorEvent
902
1163
  window.addEventListener('error', (e) => {
903
1164
  window.parent.postMessage({
904
1165
  type: 'codeviz',
905
1166
  action: 'error',
906
- payload: { message: e.message, stack: e.error?.stack }
1167
+ payload: {
1168
+ message: e.message,
1169
+ stack: e.error?.stack,
1170
+ line: e.lineno || undefined,
1171
+ column: e.colno || undefined,
1172
+ }
907
1173
  }, '*');
908
1174
  });
909
- // Capture unhandled promise rejections
1175
+ // Capture unhandled promise rejections — extract line from stack trace
910
1176
  window.addEventListener('unhandledrejection', (e) => {
911
1177
  const msg = e.reason?.message || String(e.reason);
1178
+ const stack = e.reason?.stack;
1179
+ let line, column;
1180
+ if (stack) {
1181
+ const m = stack.match(/:(d+):(d+)/);
1182
+ if (m) { line = parseInt(m[1], 10); column = parseInt(m[2], 10); }
1183
+ }
912
1184
  window.parent.postMessage({
913
1185
  type: 'codeviz',
914
1186
  action: 'error',
915
- payload: { message: msg, stack: e.reason?.stack }
1187
+ payload: { message: msg, stack, line, column }
916
1188
  }, '*');
917
1189
  });
918
1190
  // Override console.error to capture runtime errors
919
1191
  const _origError = console.error;
1192
+ function _stringify(a) {
1193
+ if (typeof a === 'string') return a;
1194
+ if (a instanceof Error) return a.message || a.toString();
1195
+ if (a && typeof a === 'object' && a.message) return a.message;
1196
+ try { const s = JSON.stringify(a); return s === '{}' ? String(a) : s; } catch { return String(a); }
1197
+ }
920
1198
  console.error = function(...args) {
921
1199
  _origError.apply(console, args);
922
- const msg = args.map(a => typeof a === 'string' ? a : JSON.stringify(a)).join(' ');
1200
+ const msg = args.map(_stringify).join(' ');
1201
+ if (!msg || msg === 'undefined' || msg === '{}') return;
923
1202
  window.parent.postMessage({
924
1203
  type: 'codeviz',
925
1204
  action: 'console',
926
1205
  payload: { message: msg, level: 'error' }
927
1206
  }, '*');
928
1207
  };
929
- <\/script>`}let md=0;function Hs(e,t,r){return{id:`preview-${++md}`,category:e,severity:"error",message:t,timestamp:new Date().toISOString(),...r}}const gi=I.memo(function({code:t,template:r,importMap:s,dependencies:i,cdnBase:a,tailwindCdn:u,externalResources:d,files:h,onError:f,onLoad:k,theme:w="dark",showLoader:C=!0,loader:R}){const q=I.useRef(null),[L,te]=I.useState(!0),Z=I.useRef(f),S=I.useRef(k);I.useEffect(()=>{Z.current=f,S.current=k},[f,k]);const N=I.useMemo(()=>us({cdnBase:a,dependencies:i,overrides:s}),[a,i,s]);I.useEffect(()=>{const j=ce=>{var H,pe,we,he,be,M,ee,ge;const V=ce.data;if((V==null?void 0:V.type)==="codeviz"){if(V.action==="ready")te(!1),(H=S.current)==null||H.call(S);else if(V.action==="error"){const X=((pe=V.payload)==null?void 0:pe.message)||"Unknown error";te(!1);const _e=X.includes("Failed to resolve")||X.includes("does not provide an export")?"import":"runtime";(M=Z.current)==null||M.call(Z,Hs(_e,X,{stack:(we=V.payload)==null?void 0:we.stack,line:(he=V.payload)==null?void 0:he.line,column:(be=V.payload)==null?void 0:be.column}))}else if(V.action==="console"&&((ee=V.payload)==null?void 0:ee.level)==="error"){const X=V.payload.message||"";!X.includes("Warning:")&&!X.includes("ReactDOM.render")&&((ge=Z.current)==null||ge.call(Z,Hs("console-error",X)))}}};return window.addEventListener("message",j),()=>window.removeEventListener("message",j)},[]);const v=I.useMemo(()=>{var ce;if(r==="html"||r==="markdown"||r==="mermaid"||r==="svg"||r==="csv"||r==="json")return xn({transpiledCode:t,template:r,importMap:N,tailwindCdn:u,externalResources:d});const j=Fn(t,{filename:r==="react"?"App.jsx":"App.tsx"});return j.error?((ce=Z.current)==null||ce.call(Z,j.error),xn({transpiledCode:gd(j.error),template:"html",importMap:N,tailwindCdn:!1})):xn({transpiledCode:j.code,template:r,importMap:N,tailwindCdn:u,externalResources:d})},[t,r,N,u,d]),O=I.useRef(v);I.useEffect(()=>{v!==O.current&&(te(!0),O.current=v)},[v]),I.useEffect(()=>{if(!L)return;const j=setTimeout(()=>te(!1),8e3);return()=>clearTimeout(j)},[L,v]);const U=w==="dark"?"#09090b":"#ffffff";return P.jsxs("div",{style:{..._r.container,backgroundColor:U},children:[C&&L&&P.jsx("div",{style:{..._r.overlay,backgroundColor:U},children:R||P.jsx(jr,{size:"lg",label:"Building preview..."})}),P.jsx("iframe",{ref:q,srcDoc:v,sandbox:"allow-scripts allow-modals allow-popups allow-same-origin",style:_r.iframe,title:"Preview"})]})});function gd(e){const t=[`<div style="padding:20px;color:#fca5a5;font-family:'SF Mono',Menlo,monospace;font-size:13px;line-height:1.6;background:#18181b;min-height:100vh;">`,'<div style="color:#ef4444;font-weight:600;font-size:14px;margin-bottom:8px;">Transpilation Error</div>',`<div style="color:#fca5a5;margin-bottom:12px;">${wr(e.message)}</div>`];if(e.line&&t.push(`<div style="color:#71717a;font-size:11px;margin-bottom:8px;">Line ${e.line}${e.column?`:${e.column}`:""}</div>`),e.sourceContext){t.push('<pre style="background:#0f0f0f;border-radius:8px;padding:12px;overflow-x:auto;font-size:12px;border:1px solid #27272a;">');for(const r of e.sourceContext.split(`
930
- `)){const i=parseInt(r)===e.line;t.push(i?`<span style="color:#ef4444;background:rgba(239,68,68,0.1);display:block;padding:0 4px;">${wr(r)}</span>`:`<span style="color:#52525b;">${wr(r)}</span>`)}t.push("</pre>")}return t.push("</div>"),t.join(`
931
- `)}function wr(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const _r={container:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},overlay:{position:"absolute",inset:0,zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},iframe:{width:"100%",height:"100%",border:"none",display:"block"}},Vs=768,ki=I.memo(function({view:t,onViewChange:r,onRefresh:s,errorCount:i,isLoading:a,theme:u,isFullscreen:d=!1,onFullscreenToggle:h,onDownload:f,onClose:k}){const w=u==="dark",[C,R]=I.useState(()=>typeof window<"u"?window.innerWidth>=Vs:!1);I.useEffect(()=>{const v=window.matchMedia(`(min-width: ${Vs}px)`),O=U=>R(U.matches);return O(v),v.addEventListener("change",O),()=>v.removeEventListener("change",O)},[]);const q=C||d;I.useEffect(()=>{t==="split"&&!q&&r("code")},[q,t,r]);const L=q?["code","split","preview"]:["code","preview"],te=I.useCallback(v=>{switch(v){case"code":return"⟨⟩ Code";case"split":return"⫿ Split";case"preview":return"▸ Preview"}},[]),Z={display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:5,border:"none",cursor:"pointer",backgroundColor:"transparent",color:w?"#71717a":"#a1a1aa",transition:"all 0.15s",padding:0},S=(v,O)=>{v.currentTarget.style.backgroundColor=O?w?"#27272a":"#e4e4e7":"transparent",v.currentTarget.style.color=O?w?"#d4d4d8":"#52525b":w?"#71717a":"#a1a1aa"},N=(v,O)=>{v.currentTarget.style.backgroundColor=O?"rgba(239,68,68,0.15)":"transparent",v.currentTarget.style.color=O?"#ef4444":w?"#71717a":"#a1a1aa"};return P.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",height:38,padding:"0 8px 0 12px",backgroundColor:w?"#18181b":"#fafafa",borderBottom:`1px solid ${w?"#27272a":"#e4e4e7"}`,flexShrink:0,userSelect:"none"},children:[P.jsx("div",{style:{display:"flex",alignItems:"center",gap:2,padding:2,borderRadius:6,backgroundColor:w?"#27272a":"#e4e4e7"},children:L.map(v=>P.jsx("button",{onClick:()=>r(v),style:{padding:"3px 10px",borderRadius:4,border:"none",cursor:"pointer",fontSize:11,fontWeight:500,fontFamily:"inherit",letterSpacing:.3,backgroundColor:t===v?w?"#3f3f46":"#ffffff":"transparent",color:t===v?w?"#fafafa":"#18181b":w?"#71717a":"#a1a1aa",boxShadow:t===v?"0 1px 2px rgba(0,0,0,0.1)":"none",transition:"all 0.15s"},children:te(v)},v))}),P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[a&&P.jsx("div",{style:{width:6,height:6,borderRadius:"50%",backgroundColor:"#f59e0b",animation:"codevizPulse 1s infinite"}}),i>0&&P.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:10,backgroundColor:w?"rgba(239,68,68,0.15)":"rgba(239,68,68,0.1)",color:"#ef4444",fontSize:11,fontWeight:600},children:[P.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[P.jsx("circle",{cx:"6",cy:"6",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),P.jsx("line",{x1:"6",y1:"3.5",x2:"6",y2:"6.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),P.jsx("circle",{cx:"6",cy:"8.5",r:"0.5",fill:"currentColor"})]}),i]})]}),P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[P.jsx("button",{onClick:s,title:"Refresh preview",style:Z,onMouseEnter:v=>S(v,!0),onMouseLeave:v=>S(v,!1),children:P.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[P.jsx("path",{d:"M2 8a6 6 0 0 1 10.3-4.2M14 2v4h-4"}),P.jsx("path",{d:"M14 8a6 6 0 0 1-10.3 4.2M2 14v-4h4"})]})}),f&&P.jsx("button",{onClick:f,title:"Download",style:Z,onMouseEnter:v=>S(v,!0),onMouseLeave:v=>S(v,!1),children:P.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3"}),P.jsx("path",{d:"M2 12v1.5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V12"})]})}),h&&P.jsx("button",{onClick:h,title:d?"Exit fullscreen":"Fullscreen",style:Z,onMouseEnter:v=>S(v,!0),onMouseLeave:v=>S(v,!1),children:d?P.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("polyline",{points:"4 14 4 10 0 10"}),P.jsx("polyline",{points:"12 2 12 6 16 6"}),P.jsx("line",{x1:"0",y1:"16",x2:"4",y2:"10"}),P.jsx("line",{x1:"16",y1:"0",x2:"12",y2:"6"})]}):P.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("polyline",{points:"10 2 14 2 14 6"}),P.jsx("polyline",{points:"6 14 2 14 2 10"}),P.jsx("line",{x1:"14",y1:"2",x2:"10",y2:"6"}),P.jsx("line",{x1:"2",y1:"14",x2:"6",y2:"10"})]})}),k&&P.jsxs(P.Fragment,{children:[P.jsx("div",{style:{width:1,height:16,backgroundColor:w?"#27272a":"#e4e4e7",margin:"0 2px"}}),P.jsx("button",{onClick:k,title:"Close preview",style:Z,onMouseEnter:v=>N(v,!0),onMouseLeave:v=>N(v,!1),children:P.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[P.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),P.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})})]})]})]})}),xi=I.memo(function({errors:t,isLoading:r,isStreaming:s,language:i,theme:a}){const u=a==="dark",d=t.filter(w=>w.severity==="error").length,h=t.filter(w=>w.severity==="warning").length;let f="Ready",k=u?"#71717a":"#a1a1aa";return s?(f="⟳ Streaming...",k="#818cf8"):r?(f="◌ Building...",k="#f59e0b"):d>0&&(f=`✕ ${d} error${d>1?"s":""}`,k="#ef4444"),P.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",height:24,padding:"0 10px",backgroundColor:u?"#18181b":"#f4f4f5",borderTop:`1px solid ${u?"#27272a":"#e4e4e7"}`,fontSize:11,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace',flexShrink:0,userSelect:"none"},children:[P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[P.jsx("span",{style:{color:k,fontWeight:500},children:f}),h>0&&P.jsxs("span",{style:{color:"#f59e0b"},children:["⚠ ",h]})]}),P.jsx("div",{style:{display:"flex",alignItems:"center",gap:10},children:P.jsx("span",{style:{color:u?"#52525b":"#a1a1aa"},children:i.toUpperCase()})})]})}),pt=`// ── Available Dependencies (use any, unused ones are not loaded) ──
932
- import { useState, useEffect, useRef, useMemo, useCallback, createContext, useContext } from 'react';
933
-
934
- // Icons (1400+ available: Heart, Star, Settings, ChevronDown, etc.)
935
- import { LayoutDashboard, Users, Settings, BarChart3, FileText, Bell, Search, ChevronDown, ChevronRight, ChevronLeft, LogOut, Menu, X, Plus, TrendingUp, TrendingDown, ArrowRight, ArrowUpRight, MoreHorizontal, Calendar, Check, AlertCircle, Star, Heart, Zap, Shield, Globe, Copy, Download, Upload, Trash2, Edit3, Eye, EyeOff, Filter, RefreshCw, ExternalLink, Mail, Phone, MapPin, Clock, Tag, Bookmark, Share2, MessageSquare, ThumbsUp, Flag, Archive, Inbox, Send, Paperclip, Image, Video, Mic, Camera, Wifi, Battery, Volume2, Sun, Moon, CloudRain, Thermometer, Activity, Coffee, Gift, ShoppingCart, CreditCard, DollarSign, Percent, PieChart, Target, Award, Briefcase, Home, Key, Lock, Unlock, User, UserPlus, UserCheck, UserX, AlertTriangle, Info, HelpCircle, CheckCircle, XCircle, Loader2, RotateCw, Maximize2, Minimize2, Columns, Grid, List, LayoutGrid, Layers, Box, Database, Server, Code, Terminal, GitBranch, Github } from 'lucide-react';
936
-
937
- // Charts
938
- import { LineChart, Line, BarChart, Bar, PieChart, Pie, Cell, AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip as ChartTooltip, ResponsiveContainer, Legend } from 'recharts';
939
-
940
- // Animation
941
- import { motion, AnimatePresence } from 'framer-motion';
942
-
943
- // Dates
944
- import { format, formatDistanceToNow, parseISO, differenceInDays, addDays, subDays, isAfter, isBefore, startOfWeek, endOfWeek, eachDayOfInterval } from 'date-fns';
945
-
946
- // Forms + Validation
947
- import { useForm } from 'react-hook-form';
948
- import { z } from 'zod';
949
-
950
- // Utilities
951
- import { clsx } from 'clsx';
952
- `,dt=`
953
- // ── Shared UI utilities ──────────────────────────────────────────
954
- function cn(...classes: (string | undefined | false)[]) {
955
- return classes.filter(Boolean).join(' ');
956
- }
957
- `,at={blank:{id:"blank",name:"Blank",description:"Empty React component with all dependencies available",keywords:["blank","empty","simple","hello","basic","start"],language:"tsx",type:"react-ts",code:`${pt}${dt}
958
- export default function App() {
959
- return (
960
- <div className="min-h-screen bg-white dark:bg-zinc-950 p-8">
961
- <h1 className="text-2xl font-bold text-zinc-900">Hello World</h1>
962
- <p className="text-zinc-500 mt-2">Start building — all dependencies are available.</p>
963
- </div>
964
- );
965
- }`},dashboard:{id:"dashboard",name:"Dashboard",description:"Stats cards, charts (recharts), and activity feed",keywords:["dashboard","analytics","stats","metrics","chart","graph","kpi","overview","admin"],language:"tsx",type:"react-ts",code:`${pt}${dt}
966
- const barData = [
967
- { name: 'Jan', value: 4000 }, { name: 'Feb', value: 3000 },
968
- { name: 'Mar', value: 5000 }, { name: 'Apr', value: 4500 },
969
- { name: 'May', value: 6000 }, { name: 'Jun', value: 5500 },
970
- ];
971
-
972
- const lineData = [
973
- { name: 'Mon', value: 24 }, { name: 'Tue', value: 35 },
974
- { name: 'Wed', value: 28 }, { name: 'Thu', value: 42 },
975
- { name: 'Fri', value: 38 }, { name: 'Sat', value: 50 },
976
- { name: 'Sun', value: 45 },
977
- ];
978
-
979
- function StatCard({ title, value, change, icon: Icon, positive }: any) {
980
- return (
981
- <div className="bg-white rounded-xl border border-zinc-200 p-6">
982
- <div className="flex items-center justify-between mb-4">
983
- <span className="text-sm font-medium text-zinc-500">{title}</span>
984
- <div className="p-2 bg-indigo-50 rounded-lg">
985
- <Icon size={18} className="text-indigo-600" />
986
- </div>
987
- </div>
988
- <div className="text-2xl font-bold text-zinc-900 mb-1">{value}</div>
989
- <div className={cn('flex items-center gap-1 text-sm', positive ? 'text-emerald-600' : 'text-red-500')}>
990
- {positive ? <TrendingUp size={14} /> : <TrendingDown size={14} />}
991
- <span>{change}</span>
992
- </div>
993
- </div>
994
- );
995
- }
996
-
997
- export default function App() {
998
- return (
999
- <div className="min-h-screen bg-zinc-50 p-6">
1000
- <div className="max-w-7xl mx-auto space-y-6">
1001
- <h1 className="text-2xl font-bold text-zinc-900">Dashboard</h1>
1002
-
1003
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
1004
- <StatCard title="Revenue" value="$45,231" change="+12.5%" icon={DollarSign} positive />
1005
- <StatCard title="Users" value="2,350" change="+8.2%" icon={Users} positive />
1006
- <StatCard title="Orders" value="1,247" change="-3.1%" icon={ShoppingCart} positive={false} />
1007
- <StatCard title="Conversion" value="3.24%" change="+0.4%" icon={Activity} positive />
1008
- </div>
1009
-
1010
- <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
1011
- <div className="bg-white rounded-xl border border-zinc-200 p-6">
1012
- <h2 className="text-lg font-semibold text-zinc-900 mb-4">Revenue</h2>
1013
- <ResponsiveContainer width="100%" height={250}>
1014
- <BarChart data={barData}>
1015
- <CartesianGrid strokeDasharray="3 3" stroke="#f1f5f9" />
1016
- <XAxis dataKey="name" tick={{ fill: '#64748b', fontSize: 12 }} />
1017
- <YAxis tick={{ fill: '#64748b', fontSize: 12 }} />
1018
- <ChartTooltip />
1019
- <Bar dataKey="value" fill="#6366f1" radius={[6, 6, 0, 0]} />
1020
- </BarChart>
1021
- </ResponsiveContainer>
1022
- </div>
1023
- <div className="bg-white rounded-xl border border-zinc-200 p-6">
1024
- <h2 className="text-lg font-semibold text-zinc-900 mb-4">Weekly Traffic</h2>
1025
- <ResponsiveContainer width="100%" height={250}>
1026
- <LineChart data={lineData}>
1027
- <CartesianGrid strokeDasharray="3 3" stroke="#f1f5f9" />
1028
- <XAxis dataKey="name" tick={{ fill: '#64748b', fontSize: 12 }} />
1029
- <YAxis tick={{ fill: '#64748b', fontSize: 12 }} />
1030
- <ChartTooltip />
1031
- <Line type="monotone" dataKey="value" stroke="#6366f1" strokeWidth={2} dot={{ r: 4 }} />
1032
- </LineChart>
1033
- </ResponsiveContainer>
1034
- </div>
1035
- </div>
1036
- </div>
1037
- </div>
1038
- );
1039
- }`},form:{id:"form",name:"Form",description:"Form with react-hook-form + zod validation, all input types",keywords:["form","input","validation","register","signup","login","contact","survey","questionnaire"],language:"tsx",type:"react-ts",code:`${pt}${dt}
1040
- const schema = z.object({
1041
- name: z.string().min(2, 'Name must be at least 2 characters'),
1042
- email: z.string().email('Invalid email address'),
1043
- role: z.enum(['developer', 'designer', 'manager', 'other']),
1044
- bio: z.string().max(500).optional(),
1045
- newsletter: z.boolean(),
1046
- });
1047
-
1048
- type FormData = z.infer<typeof schema>;
1049
-
1050
- function Field({ label, error, children }: { label: string; error?: string; children: React.ReactNode }) {
1051
- return (
1052
- <div>
1053
- <label className="block text-sm font-medium text-zinc-700 mb-1">{label}</label>
1054
- {children}
1055
- {error && <p className="mt-1 text-sm text-red-500 flex items-center gap-1"><AlertCircle size={14} /> {error}</p>}
1056
- </div>
1057
- );
1058
- }
1059
-
1060
- export default function App() {
1061
- const [submitted, setSubmitted] = useState<FormData | null>(null);
1062
- const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm<FormData>({
1063
- defaultValues: { role: 'developer', newsletter: false },
1064
- });
1065
-
1066
- const onSubmit = async (data: FormData) => {
1067
- await new Promise(r => setTimeout(r, 1000));
1068
- setSubmitted(data);
1069
- };
1070
-
1071
- if (submitted) {
1072
- return (
1073
- <div className="min-h-screen bg-zinc-50 flex items-center justify-center p-6">
1074
- <div className="bg-white rounded-xl border border-zinc-200 p-8 max-w-md w-full text-center">
1075
- <div className="w-12 h-12 bg-emerald-100 rounded-full flex items-center justify-center mx-auto mb-4">
1076
- <Check className="text-emerald-600" size={24} />
1077
- </div>
1078
- <h2 className="text-xl font-bold text-zinc-900 mb-2">Submitted!</h2>
1079
- <pre className="text-left text-sm bg-zinc-50 rounded-lg p-4 mt-4 overflow-auto">{JSON.stringify(submitted, null, 2)}</pre>
1080
- <button onClick={() => setSubmitted(null)} className="mt-4 px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-500 transition">Reset</button>
1081
- </div>
1082
- </div>
1083
- );
1084
- }
1085
-
1086
- return (
1087
- <div className="min-h-screen bg-zinc-50 flex items-center justify-center p-6">
1088
- <form onSubmit={handleSubmit(onSubmit)} className="bg-white rounded-xl border border-zinc-200 p-8 max-w-lg w-full space-y-5">
1089
- <h2 className="text-xl font-bold text-zinc-900">Registration</h2>
1090
- <Field label="Name" error={errors.name?.message}><input {...register('name')} className="w-full px-3 py-2 border border-zinc-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="John Doe" /></Field>
1091
- <Field label="Email" error={errors.email?.message}><input {...register('email')} type="email" className="w-full px-3 py-2 border border-zinc-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="john@example.com" /></Field>
1092
- <Field label="Role" error={errors.role?.message}>
1093
- <select {...register('role')} className="w-full px-3 py-2 border border-zinc-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500">
1094
- <option value="developer">Developer</option><option value="designer">Designer</option><option value="manager">Manager</option><option value="other">Other</option>
1095
- </select>
1096
- </Field>
1097
- <Field label="Bio (optional)" error={errors.bio?.message}><textarea {...register('bio')} className="w-full px-3 py-2 border border-zinc-200 rounded-lg text-sm min-h-[80px] focus:outline-none focus:ring-2 focus:ring-indigo-500" /></Field>
1098
- <label className="flex items-center gap-2 cursor-pointer"><input {...register('newsletter')} type="checkbox" className="w-4 h-4 rounded" /><span className="text-sm text-zinc-600">Subscribe to newsletter</span></label>
1099
- <button type="submit" disabled={isSubmitting} className="w-full py-2.5 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-500 disabled:opacity-50 transition">{isSubmitting ? 'Submitting...' : 'Submit'}</button>
1100
- </form>
1101
- </div>
1102
- );
1103
- }`},table:{id:"table",name:"Data Table",description:"Sortable, filterable data table with search",keywords:["table","data","list","grid","sort","filter","search","rows","columns","spreadsheet"],language:"tsx",type:"react-ts",code:`${pt}${dt}
1104
- type User = { id: number; name: string; email: string; role: string; status: 'active' | 'inactive'; joined: string };
1105
-
1106
- const data: User[] = [
1107
- { id: 1, name: 'Alice Johnson', email: 'alice@example.com', role: 'Admin', status: 'active', joined: '2024-01-15' },
1108
- { id: 2, name: 'Bob Smith', email: 'bob@example.com', role: 'Editor', status: 'active', joined: '2024-02-20' },
1109
- { id: 3, name: 'Carol White', email: 'carol@example.com', role: 'Viewer', status: 'inactive', joined: '2024-03-10' },
1110
- { id: 4, name: 'Dave Brown', email: 'dave@example.com', role: 'Editor', status: 'active', joined: '2024-04-05' },
1111
- { id: 5, name: 'Eve Davis', email: 'eve@example.com', role: 'Admin', status: 'active', joined: '2024-05-12' },
1112
- { id: 6, name: 'Frank Miller', email: 'frank@example.com', role: 'Viewer', status: 'inactive', joined: '2024-06-18' },
1113
- ];
1114
-
1115
- export default function App() {
1116
- const [search, setSearch] = useState('');
1117
- const [sortKey, setSortKey] = useState<keyof User>('name');
1118
- const [sortAsc, setSortAsc] = useState(true);
1119
-
1120
- const filtered = data
1121
- .filter(u => u.name.toLowerCase().includes(search.toLowerCase()) || u.email.toLowerCase().includes(search.toLowerCase()))
1122
- .sort((a, b) => {
1123
- const av = a[sortKey], bv = b[sortKey];
1124
- return sortAsc ? String(av).localeCompare(String(bv)) : String(bv).localeCompare(String(av));
1125
- });
1126
-
1127
- const toggleSort = (key: keyof User) => {
1128
- if (sortKey === key) setSortAsc(!sortAsc);
1129
- else { setSortKey(key); setSortAsc(true); }
1130
- };
1131
-
1132
- return (
1133
- <div className="min-h-screen bg-zinc-50 p-6">
1134
- <div className="max-w-5xl mx-auto">
1135
- <div className="flex items-center justify-between mb-4">
1136
- <h1 className="text-xl font-bold text-zinc-900">Users</h1>
1137
- <div className="relative">
1138
- <Search size={16} className="absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400" />
1139
- <input value={search} onChange={e => setSearch(e.target.value)} placeholder="Search..." className="pl-9 pr-4 py-2 border border-zinc-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" />
1140
- </div>
1141
- </div>
1142
- <div className="bg-white rounded-xl border border-zinc-200 overflow-hidden">
1143
- <table className="w-full text-sm">
1144
- <thead className="bg-zinc-50 border-b border-zinc-200">
1145
- <tr>
1146
- {(['name', 'email', 'role', 'status', 'joined'] as (keyof User)[]).map(k => (
1147
- <th key={k} className="px-4 py-3 text-left font-medium text-zinc-500 cursor-pointer hover:text-zinc-900" onClick={() => toggleSort(k)}>
1148
- <div className="flex items-center gap-1">{k.charAt(0).toUpperCase() + k.slice(1)} {sortKey === k && (sortAsc ? '↑' : '↓')}</div>
1149
- </th>
1150
- ))}
1151
- </tr>
1152
- </thead>
1153
- <tbody>
1154
- {filtered.map(u => (
1155
- <tr key={u.id} className="border-b border-zinc-50 hover:bg-zinc-50">
1156
- <td className="px-4 py-3 font-medium text-zinc-900">{u.name}</td>
1157
- <td className="px-4 py-3 text-zinc-600">{u.email}</td>
1158
- <td className="px-4 py-3 text-zinc-600">{u.role}</td>
1159
- <td className="px-4 py-3"><span className={cn('px-2 py-0.5 rounded-full text-xs font-medium', u.status === 'active' ? 'bg-emerald-100 text-emerald-700' : 'bg-zinc-100 text-zinc-500')}>{u.status}</span></td>
1160
- <td className="px-4 py-3 text-zinc-500">{u.joined}</td>
1161
- </tr>
1162
- ))}
1163
- </tbody>
1164
- </table>
1165
- </div>
1166
- </div>
1167
- </div>
1168
- );
1169
- }`},app:{id:"app",name:"Multi-Page App",description:"Sidebar navigation, route switching, header, multiple pages",keywords:["app","application","multipage","sidebar","navigation","layout","shell","admin","panel","portal","crm","erp"],language:"tsx",type:"react-ts",code:`${pt}${dt}
1170
- const pages: Record<string, { label: string; icon: any; component: () => JSX.Element }> = {
1171
- dashboard: { label: 'Dashboard', icon: LayoutDashboard, component: DashboardPage },
1172
- users: { label: 'Users', icon: Users, component: UsersPage },
1173
- analytics: { label: 'Analytics', icon: BarChart3, component: AnalyticsPage },
1174
- documents: { label: 'Documents', icon: FileText, component: DocumentsPage },
1175
- settings: { label: 'Settings', icon: Settings, component: SettingsPage },
1176
- };
1177
-
1178
- export default function App() {
1179
- const [activePage, setActivePage] = useState('dashboard');
1180
- const [sidebarOpen, setSidebarOpen] = useState(true);
1181
- const ActivePage = pages[activePage]?.component ?? DashboardPage;
1182
-
1183
- return (
1184
- <div className="flex h-screen bg-zinc-50 overflow-hidden">
1185
- {/* Sidebar */}
1186
- <aside className={cn('flex flex-col bg-white border-r border-zinc-200 transition-all duration-200', sidebarOpen ? 'w-60' : 'w-16')}>
1187
- <div className={cn('flex items-center h-14 px-4 border-b border-zinc-100', sidebarOpen ? 'justify-between' : 'justify-center')}>
1188
- {sidebarOpen && <span className="text-base font-bold text-zinc-900">Acme Inc</span>}
1189
- <button onClick={() => setSidebarOpen(!sidebarOpen)} className="p-1.5 rounded-lg hover:bg-zinc-100 text-zinc-500"><Menu size={16} /></button>
1190
- </div>
1191
- <nav className="flex-1 py-3 px-2 space-y-0.5 overflow-y-auto">
1192
- {Object.entries(pages).map(([key, { label, icon: Icon }]) => {
1193
- const active = activePage === key;
1194
- return (
1195
- <button key={key} onClick={() => setActivePage(key)} title={!sidebarOpen ? label : undefined}
1196
- className={cn('w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm font-medium transition',
1197
- active ? 'bg-indigo-50 text-indigo-700' : 'text-zinc-600 hover:bg-zinc-100',
1198
- !sidebarOpen && 'justify-center')}>
1199
- <Icon size={17} className={active ? 'text-indigo-600' : 'text-zinc-400'} />
1200
- {sidebarOpen && <span>{label}</span>}
1201
- </button>
1202
- );
1203
- })}
1204
- </nav>
1205
- {sidebarOpen && (
1206
- <div className="p-2 border-t border-zinc-100">
1207
- <div className="flex items-center gap-2.5 px-3 py-2 rounded-lg hover:bg-zinc-50 cursor-pointer">
1208
- <div className="w-7 h-7 rounded-full bg-indigo-100 flex items-center justify-center text-xs font-bold text-indigo-600">JD</div>
1209
- <div className="flex-1 min-w-0"><div className="text-sm font-medium text-zinc-900 truncate">John Doe</div><div className="text-xs text-zinc-400 truncate">john@acme.com</div></div>
1210
- </div>
1211
- </div>
1212
- )}
1213
- </aside>
1214
-
1215
- {/* Main */}
1216
- <div className="flex-1 flex flex-col min-w-0">
1217
- <header className="h-14 bg-white border-b border-zinc-200 flex items-center justify-between px-6 flex-shrink-0">
1218
- <h1 className="text-base font-semibold text-zinc-900">{pages[activePage]?.label}</h1>
1219
- <div className="flex items-center gap-3">
1220
- <div className="relative hidden sm:block"><Search size={15} className="absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-400" /><input placeholder="Search..." className="pl-8 pr-3 py-1.5 bg-zinc-100 rounded-lg text-sm border-none focus:outline-none focus:ring-2 focus:ring-indigo-500 w-44" /></div>
1221
- <button className="relative p-1.5 rounded-lg hover:bg-zinc-100"><Bell size={17} className="text-zinc-500" /><span className="absolute top-1 right-1 w-1.5 h-1.5 bg-red-500 rounded-full" /></button>
1222
- </div>
1223
- </header>
1224
- <main className="flex-1 overflow-y-auto p-6"><ActivePage /></main>
1225
- </div>
1226
- </div>
1227
- );
1228
- }
1229
-
1230
- function DashboardPage() {
1231
- const stats = [
1232
- { label: 'Revenue', value: '$45,231', change: '+12.5%', icon: DollarSign, positive: true },
1233
- { label: 'Users', value: '2,350', change: '+8.2%', icon: Users, positive: true },
1234
- { label: 'Orders', value: '47', change: '-3.1%', icon: ShoppingCart, positive: false },
1235
- { label: 'Conversion', value: '3.24%', change: '+0.4%', icon: Activity, positive: true },
1236
- ];
1237
- return (
1238
- <div className="space-y-6 max-w-6xl">
1239
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
1240
- {stats.map(s => (
1241
- <div key={s.label} className="bg-white rounded-xl border border-zinc-200 p-5">
1242
- <div className="flex items-center justify-between mb-3"><span className="text-sm text-zinc-500">{s.label}</span><div className="p-1.5 bg-indigo-50 rounded-lg"><s.icon size={16} className="text-indigo-600" /></div></div>
1243
- <div className="text-2xl font-bold text-zinc-900">{s.value}</div>
1244
- <div className={cn('text-sm mt-1 flex items-center gap-1', s.positive ? 'text-emerald-600' : 'text-red-500')}><TrendingUp size={13} /> {s.change}</div>
1245
- </div>
1246
- ))}
1247
- </div>
1248
- <div className="bg-white rounded-xl border border-zinc-200 p-6">
1249
- <h3 className="font-semibold text-zinc-900 mb-4">Quick Actions</h3>
1250
- <div className="grid grid-cols-2 sm:grid-cols-4 gap-3">
1251
- {['New Project', 'Add User', 'Create Report', 'View Logs'].map(a => (
1252
- <button key={a} className="flex flex-col items-center gap-2 p-4 rounded-xl border border-zinc-100 hover:border-indigo-200 hover:bg-indigo-50/50 transition text-sm text-zinc-700"><Plus size={18} className="text-indigo-500" />{a}</button>
1253
- ))}
1254
- </div>
1255
- </div>
1256
- </div>
1257
- );
1258
- }
1259
-
1260
- function UsersPage() {
1261
- const users = [
1262
- { name: 'Alice Johnson', email: 'alice@acme.com', role: 'Admin', status: 'Active', avatar: 'AJ' },
1263
- { name: 'Bob Smith', email: 'bob@acme.com', role: 'Editor', status: 'Active', avatar: 'BS' },
1264
- { name: 'Carol White', email: 'carol@acme.com', role: 'Viewer', status: 'Inactive', avatar: 'CW' },
1265
- ];
1266
- return (
1267
- <div className="max-w-4xl space-y-4">
1268
- <div className="bg-white rounded-xl border border-zinc-200 overflow-hidden">
1269
- <table className="w-full text-sm">
1270
- <thead className="bg-zinc-50 border-b border-zinc-200"><tr><th className="px-4 py-3 text-left font-medium text-zinc-500">User</th><th className="px-4 py-3 text-left font-medium text-zinc-500">Role</th><th className="px-4 py-3 text-left font-medium text-zinc-500">Status</th></tr></thead>
1271
- <tbody>{users.map(u => (
1272
- <tr key={u.email} className="border-b border-zinc-50 hover:bg-zinc-50">
1273
- <td className="px-4 py-3"><div className="flex items-center gap-3"><div className="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center text-xs font-bold text-indigo-600">{u.avatar}</div><div><div className="font-medium text-zinc-900">{u.name}</div><div className="text-zinc-500 text-xs">{u.email}</div></div></div></td>
1274
- <td className="px-4 py-3 text-zinc-600">{u.role}</td>
1275
- <td className="px-4 py-3"><span className={cn('px-2 py-0.5 rounded-full text-xs font-medium', u.status === 'Active' ? 'bg-emerald-100 text-emerald-700' : 'bg-zinc-100 text-zinc-500')}>{u.status}</span></td>
1276
- </tr>
1277
- ))}</tbody>
1278
- </table>
1279
- </div>
1280
- </div>
1281
- );
1282
- }
1283
-
1284
- function AnalyticsPage() {
1285
- return (
1286
- <div className="max-w-4xl space-y-6">
1287
- <div className="grid grid-cols-1 sm:grid-cols-3 gap-4">
1288
- {[{ label: 'Page Views', value: '124,892', change: '+14%' }, { label: 'Bounce Rate', value: '32.1%', change: '-2.3%' }, { label: 'Avg. Session', value: '4m 23s', change: '+18%' }].map(s => (
1289
- <div key={s.label} className="bg-white rounded-xl border border-zinc-200 p-5">
1290
- <div className="text-sm text-zinc-500">{s.label}</div>
1291
- <div className="text-2xl font-bold text-zinc-900 mt-1">{s.value}</div>
1292
- <div className="text-sm text-emerald-600 mt-1 flex items-center gap-1"><ArrowUpRight size={14} /> {s.change}</div>
1293
- </div>
1294
- ))}
1295
- </div>
1296
- </div>
1297
- );
1298
- }
1299
-
1300
- function DocumentsPage() {
1301
- const docs = [
1302
- { name: 'Q4 Report.pdf', size: '2.4 MB', date: 'Dec 15', type: 'PDF' },
1303
- { name: 'Design System.fig', size: '18.1 MB', date: 'Dec 12', type: 'Figma' },
1304
- { name: 'API Docs.md', size: '340 KB', date: 'Dec 10', type: 'Markdown' },
1305
- ];
1306
- return (
1307
- <div className="max-w-4xl space-y-2">
1308
- {docs.map(d => (
1309
- <div key={d.name} className="bg-white rounded-xl border border-zinc-200 p-4 flex items-center justify-between hover:border-indigo-200 transition cursor-pointer">
1310
- <div className="flex items-center gap-3"><div className="w-10 h-10 rounded-lg bg-indigo-50 flex items-center justify-center"><FileText size={18} className="text-indigo-500" /></div><div><div className="font-medium text-zinc-900 text-sm">{d.name}</div><div className="text-xs text-zinc-400">{d.size}</div></div></div>
1311
- <div className="flex items-center gap-4"><span className="text-xs text-zinc-400">{d.date}</span><span className="px-2 py-0.5 rounded text-xs bg-zinc-100 text-zinc-500">{d.type}</span></div>
1312
- </div>
1313
- ))}
1314
- </div>
1315
- );
1316
- }
1317
-
1318
- function SettingsPage() {
1319
- return (
1320
- <div className="max-w-2xl space-y-6">
1321
- <div className="bg-white rounded-xl border border-zinc-200 p-6">
1322
- <h3 className="font-semibold text-zinc-900 mb-4">Profile</h3>
1323
- <div className="space-y-4">
1324
- {[{ label: 'Name', value: 'John Doe' }, { label: 'Email', value: 'john@acme.com' }].map(f => (
1325
- <div key={f.label}><label className="block text-sm font-medium text-zinc-600 mb-1">{f.label}</label><input defaultValue={f.value} className="w-full px-3 py-2 border border-zinc-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" /></div>
1326
- ))}
1327
- </div>
1328
- </div>
1329
- <button className="px-6 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-500">Save Changes</button>
1330
- </div>
1331
- );
1332
- }`},landing:{id:"landing",name:"Landing Page",description:"Marketing page with hero, features, pricing, CTA sections",keywords:["landing","marketing","website","hero","features","pricing","saas","product","homepage"],language:"tsx",type:"react-ts",code:`${pt}${dt}
1333
- const features = [
1334
- { icon: Zap, title: 'Lightning Fast', desc: 'Sub-second load times with edge computing.' },
1335
- { icon: Shield, title: 'Enterprise Security', desc: 'SOC2 compliant with E2E encryption.' },
1336
- { icon: Globe, title: 'Global Scale', desc: 'Deploy to 30+ regions automatically.' },
1337
- ];
1338
-
1339
- const plans = [
1340
- { name: 'Starter', price: '$0', features: ['5 projects', '1GB storage', 'Community support'], popular: false },
1341
- { name: 'Pro', price: '$29', features: ['Unlimited projects', '100GB storage', 'Priority support', 'Custom domains'], popular: true },
1342
- { name: 'Enterprise', price: 'Custom', features: ['Everything in Pro', 'SSO/SAML', 'Dedicated support', 'SLA guarantee'], popular: false },
1343
- ];
1344
-
1345
- export default function App() {
1346
- return (
1347
- <div className="min-h-screen bg-white">
1348
- {/* Hero */}
1349
- <section className="bg-gradient-to-br from-indigo-600 via-purple-600 to-indigo-800 text-white">
1350
- <div className="max-w-5xl mx-auto px-6 py-24 text-center">
1351
- <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 text-sm mb-6"><Star size={14} className="text-yellow-400 fill-yellow-400" /> Now in Public Beta</div>
1352
- <h1 className="text-5xl font-extrabold tracking-tight mb-4">Build faster,<br/>ship with confidence</h1>
1353
- <p className="text-lg text-indigo-100 max-w-2xl mx-auto mb-8">The modern platform for teams who want to move fast without breaking things.</p>
1354
- <div className="flex gap-3 justify-center">
1355
- <button className="px-6 py-3 bg-white text-indigo-700 font-semibold rounded-lg hover:bg-indigo-50 transition flex items-center gap-2">Get Started <ArrowRight size={18} /></button>
1356
- <button className="px-6 py-3 border border-white/30 text-white font-medium rounded-lg hover:bg-white/10 transition">View Demo</button>
1357
- </div>
1358
- </div>
1359
- </section>
1360
-
1361
- {/* Features */}
1362
- <section className="max-w-5xl mx-auto px-6 py-20">
1363
- <h2 className="text-3xl font-bold text-center text-zinc-900 mb-12">Why teams choose us</h2>
1364
- <div className="grid md:grid-cols-3 gap-8">
1365
- {features.map(f => (
1366
- <div key={f.title} className="text-center p-6">
1367
- <div className="w-12 h-12 bg-indigo-100 rounded-xl flex items-center justify-center mx-auto mb-4"><f.icon size={24} className="text-indigo-600" /></div>
1368
- <h3 className="text-lg font-semibold text-zinc-900 mb-2">{f.title}</h3>
1369
- <p className="text-zinc-500 text-sm">{f.desc}</p>
1370
- </div>
1371
- ))}
1372
- </div>
1373
- </section>
1374
-
1375
- {/* Pricing */}
1376
- <section className="bg-zinc-50 py-20">
1377
- <div className="max-w-5xl mx-auto px-6">
1378
- <h2 className="text-3xl font-bold text-center text-zinc-900 mb-12">Simple pricing</h2>
1379
- <div className="grid md:grid-cols-3 gap-6">
1380
- {plans.map(p => (
1381
- <div key={p.name} className={cn('bg-white rounded-xl border p-6', p.popular ? 'border-indigo-600 ring-2 ring-indigo-600' : 'border-zinc-200')}>
1382
- {p.popular && <span className="text-xs font-semibold text-indigo-600 uppercase">Most Popular</span>}
1383
- <h3 className="text-lg font-semibold text-zinc-900 mt-2">{p.name}</h3>
1384
- <div className="mt-2 mb-6"><span className="text-3xl font-bold text-zinc-900">{p.price}</span>{p.price !== 'Custom' && <span className="text-zinc-500 text-sm">/mo</span>}</div>
1385
- <ul className="space-y-2 mb-6">{p.features.map(f => <li key={f} className="flex items-center gap-2 text-sm text-zinc-600"><CheckCircle size={16} className="text-emerald-500 flex-shrink-0" /> {f}</li>)}</ul>
1386
- <button className={cn('w-full py-2.5 rounded-lg font-medium transition', p.popular ? 'bg-indigo-600 text-white hover:bg-indigo-500' : 'border border-zinc-200 text-zinc-700 hover:bg-zinc-50')}>{p.popular ? 'Start Free Trial' : 'Get Started'}</button>
1387
- </div>
1388
- ))}
1389
- </div>
1390
- </div>
1391
- </section>
1392
- </div>
1393
- );
1394
- }`},kanban:{id:"kanban",name:"Kanban Board",description:"Drag-and-drop kanban board with columns and cards",keywords:["kanban","board","trello","task","project","sprint","agile","todo","drag","drop"],language:"tsx",type:"react-ts",code:`${pt}${dt}
1395
- type Card = { id: string; title: string; tag: string; tagColor: string; assignee: string };
1396
- type Column = { id: string; title: string; color: string; cards: Card[] };
1397
-
1398
- const initialColumns: Column[] = [
1399
- { id: 'todo', title: 'To Do', color: '#64748b', cards: [
1400
- { id: '1', title: 'Design new landing page', tag: 'Design', tagColor: '#8b5cf6', assignee: 'AJ' },
1401
- { id: '2', title: 'Set up CI/CD pipeline', tag: 'DevOps', tagColor: '#f59e0b', assignee: 'BS' },
1402
- ]},
1403
- { id: 'progress', title: 'In Progress', color: '#3b82f6', cards: [
1404
- { id: '3', title: 'Implement auth flow', tag: 'Backend', tagColor: '#10b981', assignee: 'CW' },
1405
- ]},
1406
- { id: 'review', title: 'Review', color: '#f59e0b', cards: [
1407
- { id: '5', title: 'API rate limiting', tag: 'Backend', tagColor: '#10b981', assignee: 'DB' },
1408
- ]},
1409
- { id: 'done', title: 'Done', color: '#10b981', cards: [
1410
- { id: '6', title: 'User onboarding flow', tag: 'Design', tagColor: '#8b5cf6', assignee: 'CW' },
1411
- ]},
1412
- ];
1413
-
1414
- export default function App() {
1415
- const [columns, setColumns] = useState(initialColumns);
1416
- const [dragging, setDragging] = useState<{ cardId: string; fromCol: string } | null>(null);
1417
-
1418
- const handleDrop = (toCol: string) => {
1419
- if (!dragging || dragging.fromCol === toCol) { setDragging(null); return; }
1420
- setColumns(cols => {
1421
- const from = cols.findIndex(c => c.id === dragging.fromCol);
1422
- const to = cols.findIndex(c => c.id === toCol);
1423
- const card = cols[from].cards.find(c => c.id === dragging.cardId);
1424
- if (!card) return cols;
1425
- const next = [...cols];
1426
- next[from] = { ...next[from], cards: next[from].cards.filter(c => c.id !== dragging.cardId) };
1427
- next[to] = { ...next[to], cards: [...next[to].cards, card] };
1428
- return next;
1429
- });
1430
- setDragging(null);
1431
- };
1432
-
1433
- return (
1434
- <div className="min-h-screen bg-zinc-100 p-6">
1435
- <h1 className="text-xl font-bold text-zinc-900 mb-6">Project Board</h1>
1436
- <div className="flex gap-4 overflow-x-auto pb-4">
1437
- {columns.map(col => (
1438
- <div key={col.id} className="bg-zinc-200/50 rounded-xl p-3 min-w-[270px] w-[270px] flex-shrink-0" onDragOver={e => e.preventDefault()} onDrop={() => handleDrop(col.id)}>
1439
- <div className="flex items-center gap-2 mb-3 px-1">
1440
- <div className="w-2.5 h-2.5 rounded-full" style={{ backgroundColor: col.color }} />
1441
- <span className="font-semibold text-sm text-zinc-700">{col.title}</span>
1442
- <span className="text-xs text-zinc-400 bg-zinc-200 px-1.5 rounded">{col.cards.length}</span>
1443
- </div>
1444
- <div className="space-y-2">
1445
- {col.cards.map(card => (
1446
- <div key={card.id} draggable onDragStart={() => setDragging({ cardId: card.id, fromCol: col.id })}
1447
- className="bg-white rounded-lg p-3 shadow-sm border border-zinc-100 cursor-grab active:cursor-grabbing hover:shadow-md transition">
1448
- <span className="text-xs px-2 py-0.5 rounded-full text-white font-medium" style={{ backgroundColor: card.tagColor }}>{card.tag}</span>
1449
- <h3 className="text-sm font-medium text-zinc-900 mt-2 mb-3">{card.title}</h3>
1450
- <div className="w-6 h-6 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center text-[10px] font-bold">{card.assignee}</div>
1451
- </div>
1452
- ))}
1453
- </div>
1454
- </div>
1455
- ))}
1456
- </div>
1457
- </div>
1458
- );
1459
- }`},html:{id:"html",name:"Static HTML",description:"Plain HTML + Tailwind CSS, no React",keywords:["html","static","plain","simple","css","tailwind","no-react"],language:"html",type:"html",code:`<div class="min-h-screen bg-zinc-50 flex items-center justify-center p-6">
1460
- <div class="bg-white rounded-2xl shadow-lg p-8 max-w-md w-full text-center">
1461
- <h1 class="text-3xl font-bold text-zinc-900 mb-2">Static HTML</h1>
1462
- <p class="text-zinc-500 mb-6">Pure HTML + Tailwind CSS — no framework needed</p>
1463
- <button onclick="this.textContent = 'Clicked!'; this.classList.add('bg-emerald-500')"
1464
- class="px-6 py-2.5 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-500 transition">
1465
- Click Me
1466
- </button>
1467
- </div>
1468
- </div>`},markdown:{id:"markdown",name:"Markdown",description:"GitHub-flavored Markdown with Mermaid diagram support",keywords:["markdown","md","document","documentation","mermaid","diagram","flowchart","sequence","gantt","readme","notes","report","writeup"],language:"md",type:"markdown",code:`# Project Overview
1469
-
1470
- ## Architecture
1471
-
1472
- \`\`\`mermaid
1473
- graph TD
1474
- A[Client] -->|HTTP| B[API Gateway]
1475
- B --> C[Auth Service]
1476
- B --> D[App Service]
1477
- D --> E[(Database)]
1478
- D --> F[Cache]
1479
- C --> E
1480
- \`\`\`
1481
-
1482
- ## Features
1483
-
1484
- - **Real-time updates** — WebSocket-based live data
1485
- - **Authentication** — JWT with refresh tokens
1486
- - **Caching** — Redis for frequently accessed data
1487
-
1488
- ## API Endpoints
1489
-
1490
- | Method | Endpoint | Description |
1491
- |--------|----------|-------------|
1492
- | GET | \`/api/users\` | List all users |
1493
- | POST | \`/api/users\` | Create a user |
1494
- | GET | \`/api/users/:id\` | Get user by ID |
1495
-
1496
- ## Sequence Diagram
1497
-
1498
- \`\`\`mermaid
1499
- sequenceDiagram
1500
- participant U as User
1501
- participant A as API
1502
- participant DB as Database
1503
- U->>A: POST /login
1504
- A->>DB: Validate credentials
1505
- DB-->>A: User record
1506
- A-->>U: JWT token
1507
- U->>A: GET /data (with JWT)
1508
- A->>DB: Query data
1509
- DB-->>A: Results
1510
- A-->>U: JSON response
1511
- \`\`\`
1512
-
1513
- ## Getting Started
1514
-
1515
- \`\`\`bash
1516
- npm install
1517
- npm run dev
1518
- \`\`\`
1519
-
1520
- > **Note:** Make sure to set up your \`.env\` file before running.
1521
- `},mermaid:{id:"mermaid",name:"Mermaid Diagram",description:"Standalone Mermaid diagram with zoom/pan (flowchart, sequence, class, gantt, etc.)",keywords:["mermaid","diagram","flowchart","sequence","class-diagram","gantt","er","state","pie","graph","architecture","flow","uml"],language:"mermaid",type:"mermaid",code:`graph TD
1522
- A[User Request] -->|HTTP| B(API Gateway)
1523
- B --> C{Auth Valid?}
1524
- C -->|Yes| D[Route to Service]
1525
- C -->|No| E[401 Unauthorized]
1526
- D --> F[User Service]
1527
- D --> G[Order Service]
1528
- D --> H[Payment Service]
1529
- F --> I[(Users DB)]
1530
- G --> J[(Orders DB)]
1531
- H --> K[Stripe API]
1532
- G -->|Events| L[Message Queue]
1533
- L --> M[Notification Service]
1534
- M --> N[Email / Push]
1535
-
1536
- style A fill:#818cf8,stroke:#6366f1,color:#fff
1537
- style B fill:#34d399,stroke:#10b981,color:#fff
1538
- style C fill:#fbbf24,stroke:#f59e0b,color:#000
1539
- style E fill:#f87171,stroke:#ef4444,color:#fff
1540
- `},svg:{id:"svg",name:"SVG Image",description:"SVG vector graphic with zoom/pan viewer",keywords:["svg","vector","image","icon","illustration","graphic","logo","drawing"],language:"svg",type:"svg",code:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300">
1541
- <defs>
1542
- <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
1543
- <stop offset="0%" style="stop-color:#818cf8"/>
1544
- <stop offset="100%" style="stop-color:#6366f1"/>
1545
- </linearGradient>
1546
- <linearGradient id="accent" x1="0%" y1="0%" x2="0%" y2="100%">
1547
- <stop offset="0%" style="stop-color:#34d399"/>
1548
- <stop offset="100%" style="stop-color:#10b981"/>
1549
- </linearGradient>
1550
- </defs>
1551
- <rect width="400" height="300" rx="16" fill="url(#bg)"/>
1552
- <circle cx="200" cy="130" r="50" fill="url(#accent)" opacity="0.9"/>
1553
- <circle cx="140" cy="180" r="30" fill="#fbbf24" opacity="0.7"/>
1554
- <circle cx="260" cy="180" r="30" fill="#f87171" opacity="0.7"/>
1555
- <text x="200" y="260" text-anchor="middle" fill="white" font-family="sans-serif" font-size="18" font-weight="bold">SVG Preview</text>
1556
- </svg>`},csv:{id:"csv",name:"CSV Table",description:"CSV data rendered as a styled, sortable table",keywords:["csv","table","data","spreadsheet","tabular","rows","columns","dataset"],language:"csv",type:"csv",code:`Name,Department,Role,Salary,Start Date,Status
1557
- Alice Johnson,Engineering,Senior Engineer,145000,2021-03-15,Active
1558
- Bob Smith,Design,Lead Designer,125000,2020-07-01,Active
1559
- Carol Williams,Engineering,Staff Engineer,165000,2019-11-20,Active
1560
- David Brown,Marketing,Marketing Manager,110000,2022-01-10,Active
1561
- Eve Davis,Engineering,Junior Engineer,95000,2023-06-01,Active
1562
- Frank Miller,Sales,Account Executive,105000,2021-09-15,On Leave
1563
- Grace Wilson,Design,UX Researcher,115000,2022-04-20,Active
1564
- Henry Taylor,Engineering,DevOps Engineer,140000,2020-02-28,Active
1565
- Iris Anderson,Product,Product Manager,135000,2021-08-05,Active
1566
- Jack Thomas,Engineering,Frontend Engineer,130000,2022-11-01,Active`},json:{id:"json",name:"JSON Viewer",description:"JSON data with collapsible tree view and syntax highlighting",keywords:["json","api","response","config","configuration","data","object","tree"],language:"json",type:"json",code:`{
1567
- "project": "Ranger",
1568
- "version": "2.0.0",
1569
- "services": [
1570
- {
1571
- "name": "api-gateway",
1572
- "port": 3080,
1573
- "status": "healthy",
1574
- "uptime": "14d 6h 32m",
1575
- "metrics": {
1576
- "requests_per_sec": 1250,
1577
- "avg_latency_ms": 45,
1578
- "error_rate": 0.002
1579
- }
1580
- },
1581
- {
1582
- "name": "rag-api",
1583
- "port": 8000,
1584
- "status": "healthy",
1585
- "uptime": "14d 6h 30m",
1586
- "metrics": {
1587
- "embeddings_per_sec": 85,
1588
- "avg_latency_ms": 120,
1589
- "error_rate": 0.001
1590
- }
1591
- },
1592
- {
1593
- "name": "code-executor",
1594
- "port": 8088,
1595
- "status": "degraded",
1596
- "uptime": "2d 1h 15m",
1597
- "metrics": {
1598
- "executions_per_min": 30,
1599
- "avg_latency_ms": 2500,
1600
- "error_rate": 0.05
1601
- }
1602
- }
1603
- ],
1604
- "database": {
1605
- "type": "MongoDB",
1606
- "connections": 42,
1607
- "collections": ["users", "conversations", "messages", "agents", "templates"]
1608
- },
1609
- "features": {
1610
- "streaming": true,
1611
- "multiModal": true,
1612
- "codeExecution": true,
1613
- "ragEnabled": true
1614
- }
1615
- }`}};function kd(e){return at[e]}function xd(){return Object.keys(at)}function bi(){return Object.values(at).map(e=>`- **${e.id}**: ${e.description} [keywords: ${e.keywords.join(", ")}]`).join(`
1616
- `)}function bd(e){const t=e.toLowerCase();let r="blank",s=0;for(const[i,a]of Object.entries(at)){let u=0;for(const d of a.keywords)t.includes(d)&&(u+=d.length);u>s&&(s=u,r=i)}return r}const yd=`export default function App() {
1617
- return (
1618
- <div className="flex items-center justify-center min-h-screen bg-gradient-to-br from-indigo-500 to-purple-600">
1619
- <div className="bg-white rounded-2xl shadow-xl p-8 max-w-md text-center">
1620
- <h1 className="text-3xl font-bold text-gray-900 mb-2">Hello World</h1>
1621
- <p className="text-gray-500">Edit the code to see live changes</p>
1622
- </div>
1623
- </div>
1624
- );
1625
- }`,vd=I.memo(I.forwardRef(function({code:t,language:r="tsx",template:s="react-ts",templateId:i,importMap:a,dependencies:u,cdnBase:d,externalResources:h,tailwindCdn:f,onChange:k,onError:w,onLoad:C,onClose:R,onFullscreenChange:q,showEditor:L=!0,showPreview:te=!0,defaultView:Z="split",editorOptions:S,className:N,height:v="100%",width:O="100%",theme:U="dark",readOnly:j=!1,showLoader:ce=!0,loader:V,showToolbar:H=!0,showStatusBar:pe=!0},we){const he=i?at[i]:null,be=(he==null?void 0:he.code)??t??yd,M=(he==null?void 0:he.language)??r,ee=(he==null?void 0:he.type)??s??_d(M),[ge,X]=I.useState(be),[_e,Ae]=I.useState([]),[J,ne]=I.useState(L?te?Z:"code":"preview"),[fe,Re]=I.useState(!0),[g,y]=I.useState(!1),[_,T]=I.useState(!1),E=I.useRef(null),$=I.useRef(null),B=I.useRef(0),[se,de]=I.useState(0),le=I.useRef(),[Ie,Se]=I.useState(be),oe=I.useRef(be),[Ee,ve]=I.useState(null),Be=I.useRef(null);I.useEffect(()=>{const Y=()=>{const Ce=document.fullscreenElement===$.current;T(Ce),q==null||q(Ce),Ce?ne(De=>(Be.current=De,te?"split":"code")):Be.current!=null&&(ne(Be.current),Be.current=null)};return document.addEventListener("fullscreenchange",Y),()=>document.removeEventListener("fullscreenchange",Y)},[q,te]);const tt=I.useCallback(()=>{const Y=$.current;Y&&(document.fullscreenElement===Y?document.exitFullscreen():Y.requestFullscreen())},[]),lt=I.useCallback(()=>{const Y=oe.current,{filename:Ce,content:De,mime:Ke}=wd(Y,ee,M),qe=new Blob([De],{type:Ke}),Tt=URL.createObjectURL(qe),Ze=document.createElement("a");Ze.href=Tt,Ze.download=Ce,document.body.appendChild(Ze),Ze.click(),document.body.removeChild(Ze),URL.revokeObjectURL(Tt)},[ee,M]),Lt=I.useCallback(Y=>{X(Y),oe.current=Y,k==null||k(Y),clearTimeout(le.current),le.current=setTimeout(()=>{Se(Y)},400)},[k]),jt=I.useCallback(Y=>{Ae(Ce=>Ce.some(De=>De.message===Y.message)?Ce:[...Ce.slice(-9),Y]),w==null||w(Y)},[w]),Ot=I.useCallback(()=>{Re(!1),Ae([]),C==null||C()},[C]);I.useImperativeHandle(we,()=>({getCode:()=>oe.current,setCode:Y=>{ve(ge),X(Y),Se(Y),oe.current=Y,Ae([]),E.current&&E.current.setValue(Y)},streamCode:Y=>{if(g||(ve(oe.current),y(!0)),oe.current=Y,X(Y),E.current){const Ce=E.current.getModel();Ce&&Ce.getValue()!==Y&&E.current.setValue(Y)}},commitCode:()=>{y(!1);const Y=oe.current;X(Y),Se(Y),Ae([])},editCode:(Y,Ce)=>{const De=oe.current,Ke=De.indexOf(Y);if(Ke===-1)return!1;Ee==null&&ve(De);const qe=De.slice(0,Ke)+Ce+De.slice(Ke+Y.length);return X(qe),Se(qe),oe.current=qe,E.current&&E.current.setValue(qe),k==null||k(qe),!0},refresh:()=>{B.current+=1,de(B.current),Ae([])},setView:Y=>ne(Y),getErrors:()=>_e,clearErrors:()=>Ae([]),isLoading:()=>fe})),I.useEffect(()=>{if(i&&at[i]){const Y=at[i];X(Y.code),Se(Y.code),oe.current=Y.code,ve(null)}},[i]);const ut=U==="dark",_t=J==="split"||J==="code",It=J==="split"||J==="preview",Mt={display:"flex",flexDirection:"column",width:_?"100vw":typeof O=="number"?`${O}px`:O,height:_?"100vh":typeof v=="number"?`${v}px`:v,overflow:"hidden",borderRadius:_?0:10,border:_?"none":`1px solid ${ut?"#27272a":"#e4e4e7"}`,backgroundColor:ut?"#09090b":"#ffffff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},Ft={display:"flex",flexDirection:"row",flex:1,minHeight:0,overflow:"hidden"},St={flex:1,minWidth:0,minHeight:0,overflow:"hidden"},$t={flexShrink:0,width:1,backgroundColor:ut?"#27272a":"#e4e4e7"},Bt=ee==="react-ts"?"react-ts":ee;return P.jsxs("div",{ref:$,className:N,style:Mt,children:[H&&P.jsx(ki,{view:J,onViewChange:ne,onRefresh:()=>{B.current+=1,de(B.current),Ae([])},errorCount:_e.filter(Y=>Y.severity==="error").length,isLoading:fe,theme:U,isFullscreen:_,onFullscreenToggle:tt,onDownload:lt,onClose:R}),P.jsxs("div",{style:Ft,children:[_t&&P.jsx("div",{style:St,children:P.jsx(eo,{code:ge,language:M,onChange:Lt,theme:U,readOnly:j||g,options:S,editorRef:E,baseCode:Ee})}),_t&&It&&P.jsx("div",{style:$t}),It&&P.jsx("div",{style:St,children:P.jsx(gi,{code:Ie,template:Bt,importMap:a,dependencies:u,cdnBase:d,tailwindCdn:f,externalResources:h,files:void 0,onError:jt,onLoad:Ot,theme:U,showLoader:ce,loader:V})},se)]}),pe&&P.jsx(xi,{errors:_e,isLoading:fe,isStreaming:g,language:M,theme:U})]})}));function wd(e,t,r){switch(t){case"html":return{filename:"preview.html",content:e,mime:"text/html"};case"markdown":return{filename:"document.md",content:e,mime:"text/markdown"};case"mermaid":return{filename:"diagram.mermaid",content:e,mime:"text/plain"};case"svg":return{filename:"image.svg",content:e,mime:"image/svg+xml"};case"csv":return{filename:"data.csv",content:e,mime:"text/csv"};case"json":return{filename:"data.json",content:e,mime:"application/json"};case"react":case"react-ts":{const s=Fn(e,{filename:t==="react"?"App.jsx":"App.tsx"});if(s.error)return{filename:`component.${r==="jsx"||r==="js"?"jsx":"tsx"}`,content:e,mime:"text/plain"};const i=us({}),a=s.code.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return{filename:"preview.html",content:`<!DOCTYPE html>
1208
+ <\/script>`}let ym=0;function pa(e,t,r){return{id:`preview-${++ym}`,category:e,severity:"error",message:t,timestamp:new Date().toISOString(),...r}}const wc=I.memo(function({code:t,template:r,importMap:s,dependencies:i,cdnBase:o,tailwindCdn:c,externalResources:u,files:f,onError:h,onLoad:m,theme:x="dark",showLoader:_=!0,loader:y}){const L=I.useRef(null),[O,F]=I.useState(!0),K=I.useRef(h),P=I.useRef(m);I.useEffect(()=>{K.current=h,P.current=m},[h,m]);const j=I.useMemo(()=>Ti({cdnBase:o,dependencies:i,overrides:s}),[o,i,s]);I.useEffect(()=>{const q=T=>{var z,ye,De,$e,Oe,H,ce,xe;if(T.origin!=="null"&&T.origin!==window.location.origin)return;const B=T.data;if((B==null?void 0:B.type)==="codeviz"){if(B.action==="ready")F(!1),(z=P.current)==null||z.call(P);else if(B.action==="error"){const ee=((ye=B.payload)==null?void 0:ye.message)||"Unknown error";F(!1);const Pe=ee.includes("Failed to resolve")||ee.includes("does not provide an export")?"import":"runtime";(H=K.current)==null||H.call(K,pa(Pe,ee,{stack:(De=B.payload)==null?void 0:De.stack,line:($e=B.payload)==null?void 0:$e.line,column:(Oe=B.payload)==null?void 0:Oe.column}))}else if(B.action==="console"&&((ce=B.payload)==null?void 0:ce.level)==="error"){const ee=(B.payload.message||"").trim();ee&&ee!=="{}"&&ee!=="[]"&&ee!=="undefined"&&ee!=="null"&&!ee.includes("Warning:")&&!ee.includes("ReactDOM.render")&&!ee.includes("Each child in a list")&&!ee.includes("validateDOMNesting")&&((xe=K.current)==null||xe.call(K,pa("console-error",ee)))}}};return window.addEventListener("message",q),()=>window.removeEventListener("message",q)},[]);const D=I.useMemo(()=>{var T;if(r==="html"||r==="markdown"||r==="mermaid"||r==="svg"||r==="csv"||r==="json"||r==="dot"||r==="latex"||r==="architecture")return yn({transpiledCode:t,template:r,importMap:j,tailwindCdn:c,externalResources:u});const q=Jn(t,{filename:r==="react"?"App.jsx":"App.tsx"});return q.error?((T=K.current)==null||T.call(K,q.error),yn({transpiledCode:vm(q.error),template:"html",importMap:j,tailwindCdn:!1})):yn({transpiledCode:q.code,template:r,importMap:j,tailwindCdn:c,externalResources:u})},[t,r,j,c,u]),W=I.useRef(D);I.useEffect(()=>{D!==W.current&&(F(!0),W.current=D)},[D]);const X=x==="dark"?"#09090b":"#ffffff";return E.jsxs("div",{style:{...Ts.container,backgroundColor:X},children:[_&&O&&E.jsx("div",{style:{...Ts.overlay,backgroundColor:X},children:y||E.jsx(Hs,{size:"lg",label:"Building preview..."})}),E.jsx("iframe",{ref:L,srcDoc:D,sandbox:"allow-scripts allow-modals allow-popups",style:Ts.iframe,title:"Preview"})]})});function vm(e){const t=[`<div style="padding:20px;color:#fca5a5;font-family:'SF Mono',Menlo,monospace;font-size:13px;line-height:1.6;background:#18181b;min-height:100vh;">`,'<div style="color:#ef4444;font-weight:600;font-size:14px;margin-bottom:8px;">Transpilation Error</div>',`<div style="color:#fca5a5;margin-bottom:12px;">${Cs(e.message)}</div>`];if(e.line&&t.push(`<div style="color:#71717a;font-size:11px;margin-bottom:8px;">Line ${e.line}${e.column?`:${e.column}`:""}</div>`),e.sourceContext){t.push('<pre style="background:#0f0f0f;border-radius:8px;padding:12px;overflow-x:auto;font-size:12px;border:1px solid #27272a;">');for(const r of e.sourceContext.split(`
1209
+ `)){const i=parseInt(r)===e.line;t.push(i?`<span style="color:#ef4444;background:rgba(239,68,68,0.1);display:block;padding:0 4px;">${Cs(r)}</span>`:`<span style="color:#52525b;">${Cs(r)}</span>`)}t.push("</pre>")}return t.push("</div>"),t.join(`
1210
+ `)}function Cs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const Ts={container:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},overlay:{position:"absolute",inset:0,zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},iframe:{width:"100%",height:"100%",border:"none",display:"block"}},_c=new Set(["react","react-ts","html","markdown","mermaid","svg","csv","json","dot","latex","architecture"]),Wr={EDITOR_DEBOUNCE_MS:400,PREVIEW_SWITCH_DELAY_MS:800,COPY_CONFIRMATION_MS:2e3},zs=768,Sc=I.memo(function({view:t,onViewChange:r,onRefresh:s,isLoading:i,theme:o,isStreaming:c=!1,isFullscreen:u=!1,onFullscreenToggle:f,onDownload:h,downloadOptions:m,onClose:x,hideSplit:_=!1}){const y=o==="dark",[L,O]=I.useState(()=>typeof window<"u"?window.innerWidth>=zs:!1);I.useEffect(()=>{const T=window.matchMedia(`(min-width: ${zs}px)`),B=z=>O(z.matches);return B(T),T.addEventListener("change",B),()=>T.removeEventListener("change",B)},[]);const F=!_&&(L||u),[K,P]=I.useState(!1);I.useEffect(()=>{t==="split"&&!F&&r("code")},[F,t,r]);const j=F?["code","split","preview"]:["code","preview"],D={display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:4,border:"none",cursor:"pointer",backgroundColor:"transparent",color:y?"#71717a":"#a1a1aa",transition:"all 0.15s",padding:0},W=(T,B)=>{T.currentTarget.style.backgroundColor=B?y?"#27272a":"#e4e4e7":"transparent",T.currentTarget.style.color=B?y?"#d4d4d8":"#52525b":y?"#71717a":"#a1a1aa"},X=(T,B)=>{T.currentTarget.style.backgroundColor=B?"rgba(239,68,68,0.15)":"transparent",T.currentTarget.style.color=B?"#ef4444":y?"#71717a":"#a1a1aa"},q=I.useCallback((T,B)=>{switch(T){case"code":return E.jsxs("span",{style:{display:"flex",alignItems:"center",gap:3},children:[E.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("polyline",{points:"5 4 1 8 5 12"}),E.jsx("polyline",{points:"11 4 15 8 11 12"})]}),"Code"]});case"split":return E.jsxs("span",{style:{display:"flex",alignItems:"center",gap:3},children:[E.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[E.jsx("rect",{x:"1",y:"2",width:"14",height:"12",rx:"1.5"}),E.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"14"})]}),"Split"]});case"preview":return E.jsxs("span",{style:{display:"flex",alignItems:"center",gap:3},children:[E.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:B?"#22c55e":"currentColor",stroke:"none",children:E.jsx("path",{d:"M4 2.5v11l9-5.5z"})}),"Preview"]})}},[]);return E.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",height:32,padding:"0 6px 0 8px",backgroundColor:y?"#18181b":"#fafafa",borderBottom:`1px solid ${y?"#27272a":"#e4e4e7"}`,flexShrink:0,userSelect:"none"},children:[E.jsx("div",{style:{display:"flex",alignItems:"center",gap:1,padding:1,borderRadius:5,backgroundColor:y?"#27272a":"#e4e4e7"},children:j.map(T=>{const z=c&&(T==="preview"||T==="split");return E.jsx("button",{onClick:()=>!z&&r(T),disabled:z,style:{display:"flex",alignItems:"center",padding:"2px 8px",borderRadius:4,border:"none",cursor:z?"not-allowed":"pointer",fontSize:11,fontWeight:500,fontFamily:"inherit",letterSpacing:.2,lineHeight:1,opacity:z?.4:1,backgroundColor:t===T?y?"#3f3f46":"#ffffff":"transparent",color:t===T?y?"#fafafa":"#18181b":y?"#71717a":"#a1a1aa",boxShadow:t===T?"0 1px 2px rgba(0,0,0,0.08)":"none",transition:"all 0.15s"},children:q(T,t===T)},T)})}),E.jsx("div",{}),E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:1},children:[E.jsx("button",{onClick:s,title:"Refresh preview",style:D,onMouseEnter:T=>W(T,!0),onMouseLeave:T=>W(T,!1),children:E.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[E.jsx("path",{d:"M2 8a6 6 0 0 1 10.3-4.2M14 2v4h-4"}),E.jsx("path",{d:"M14 8a6 6 0 0 1-10.3 4.2M2 14v-4h4"})]})}),(h||m&&m.length>0)&&E.jsxs("div",{style:{position:"relative"},children:[E.jsx("button",{onClick:()=>{m&&m.length>0?P(!K):h==null||h()},title:"Download",style:D,onMouseEnter:T=>W(T,!0),onMouseLeave:T=>W(T,!1),children:E.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3"}),E.jsx("path",{d:"M2 12v1.5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V12"})]})}),K&&m&&m.length>0&&E.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,minWidth:160,padding:"4px 0",borderRadius:8,border:`1px solid ${y?"#30363d":"#d0d7de"}`,backgroundColor:y?"#161b22":"#ffffff",boxShadow:"0 8px 24px rgba(0,0,0,0.2)",zIndex:100},children:m.map((T,B)=>E.jsx("button",{onClick:()=>{T.action(),P(!1)},style:{display:"block",width:"100%",padding:"6px 12px",border:"none",background:"none",color:y?"#e6edf3":"#24292f",fontSize:12,textAlign:"left",cursor:"pointer",fontFamily:"inherit"},onMouseEnter:z=>{z.currentTarget.style.backgroundColor=y?"#21262d":"#f3f4f6"},onMouseLeave:z=>{z.currentTarget.style.backgroundColor="transparent"},children:T.label},B))})]}),f&&E.jsx("button",{onClick:f,title:u?"Exit fullscreen":"Fullscreen",style:D,onMouseEnter:T=>W(T,!0),onMouseLeave:T=>W(T,!1),children:u?E.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("polyline",{points:"4 14 4 10 0 10"}),E.jsx("polyline",{points:"12 2 12 6 16 6"}),E.jsx("line",{x1:"0",y1:"16",x2:"4",y2:"10"}),E.jsx("line",{x1:"16",y1:"0",x2:"12",y2:"6"})]}):E.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("polyline",{points:"10 2 14 2 14 6"}),E.jsx("polyline",{points:"6 14 2 14 2 10"}),E.jsx("line",{x1:"14",y1:"2",x2:"10",y2:"6"}),E.jsx("line",{x1:"2",y1:"14",x2:"6",y2:"10"})]})}),x&&E.jsxs(E.Fragment,{children:[E.jsx("div",{style:{width:1,height:14,backgroundColor:y?"#27272a":"#e4e4e7",margin:"0 2px"}}),E.jsx("button",{onClick:x,title:"Close preview",style:D,onMouseEnter:T=>X(T,!0),onMouseLeave:T=>X(T,!1),children:E.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[E.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),E.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})})]})]})]})}),Ic=I.memo(function({errors:t,isLoading:r,isStreaming:s,language:i,theme:o,filename:c,footerSlot:u,view:f}){const h=o==="dark",m=t.filter(T=>T.severity==="error").length,x=t.filter(T=>T.severity==="warning").length,_=f==="preview"||f==="split",[y,L]=I.useState(!1),[O,F]=I.useState(!1),K=I.useRef(),P=I.useRef(null);I.useEffect(()=>()=>{clearTimeout(K.current)},[]),I.useEffect(()=>{if(!O)return;const T=B=>{P.current&&!P.current.contains(B.target)&&F(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[O]);let j="Ready",D=h?"#71717a":"#a1a1aa";s?(j="⟳ Streaming...",D="#818cf8"):m>0?(j=`✕ ${m} error${m>1?"s":""}`,D="#ef4444"):r&&_&&(j="◌ Building...",D="#f59e0b");const W=I.useCallback(()=>{const T=new CustomEvent("codeviz:copy-request");window.dispatchEvent(T),L(!0),clearTimeout(K.current),K.current=setTimeout(()=>L(!1),Wr.COPY_CONFIRMATION_MS)},[]),X=h?"#52525b":"#a1a1aa",q=h?"#a1a1aa":"#71717a";return E.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",height:24,padding:"0 8px",backgroundColor:h?"#18181b":"#f4f4f5",borderTop:`1px solid ${h?"#27272a":"#e4e4e7"}`,fontSize:11,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace',flexShrink:0,userSelect:"none",position:"relative"},children:[E.jsxs("div",{ref:P,style:{display:"flex",alignItems:"center",gap:8,minWidth:0,flex:"0 0 auto",position:"relative"},children:[E.jsx("span",{style:{color:D,fontWeight:500,cursor:m>0?"pointer":"default"},onClick:m>0?()=>F(T=>!T):void 0,title:m>0?"Click to view errors":void 0,children:j}),x>0&&E.jsxs("span",{style:{color:"#f59e0b"},children:["⚠ ",x]}),O&&t.length>0&&E.jsx("div",{style:{position:"absolute",bottom:"100%",right:0,marginBottom:2,width:320,maxHeight:180,overflowY:"auto",backgroundColor:h?"#1e1e2e":"#ffffff",border:`1px solid ${h?"#3f3f50":"#d4d4d8"}`,borderRadius:4,boxShadow:h?"0 2px 8px rgba(0,0,0,0.4)":"0 2px 8px rgba(0,0,0,0.1)",zIndex:50,padding:0},children:t.map((T,B)=>E.jsxs("div",{style:{padding:"3px 8px",borderBottom:B<t.length-1?`1px solid ${h?"#27272a":"#f4f4f5"}`:"none",fontSize:10,lineHeight:1.4,display:"flex",alignItems:"baseline",gap:4},children:[E.jsx("span",{style:{color:T.severity==="error"?"#ef4444":"#f59e0b",fontWeight:600,fontSize:9,textTransform:"uppercase",flexShrink:0},children:T.category}),T.line&&E.jsxs("span",{style:{color:h?"#71717a":"#a1a1aa",fontSize:9,flexShrink:0},children:["L",T.line]}),E.jsx("span",{style:{color:h?"#d4d4d8":"#3f3f46",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:'"SF Mono", Menlo, monospace',fontSize:9},children:T.message.length>120?T.message.slice(0,120)+"…":T.message})]},T.id))})]}),c&&E.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:h?"#71717a":"#a1a1aa",padding:"0 8px"},children:[s&&E.jsx("div",{style:{width:5,height:5,borderRadius:"50%",backgroundColor:"#f59e0b",flexShrink:0,animation:"codevizPulse 1s infinite"}}),c]}),E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:"0 0 auto"},children:[E.jsx("button",{onClick:W,title:y?"Copied!":"Copy code",style:{display:"flex",alignItems:"center",gap:3,border:"none",background:"none",cursor:"pointer",padding:"0 2px",color:y?"#22c55e":X,fontSize:11,fontFamily:"inherit",transition:"color 0.15s"},onMouseEnter:T=>{y||(T.currentTarget.style.color=q)},onMouseLeave:T=>{y||(T.currentTarget.style.color=X)},children:y?E.jsxs(E.Fragment,{children:[E.jsx("svg",{width:"11",height:"11",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:E.jsx("polyline",{points:"3 8 7 12 13 4"})}),"Copied"]}):E.jsxs(E.Fragment,{children:[E.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("rect",{x:"5",y:"5",width:"9",height:"9",rx:"1.5"}),E.jsx("path",{d:"M3 11V3a1.5 1.5 0 011.5-1.5H11"})]}),"Copy"]})}),E.jsx("span",{style:{color:X},children:i.toUpperCase()}),u]})]})}),Ec=I.memo(function({errors:t,theme:r}){const s=r==="dark",i=t.filter(c=>c.severity==="error").length,o=t.filter(c=>c.severity==="warning").length;return E.jsxs("div",{style:{width:"100%",height:"100%",overflow:"auto",backgroundColor:s?"#09090b":"#ffffff",padding:"24px 20px",fontFamily:'"SF Mono", Menlo, Consolas, monospace'},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${s?"#27272a":"#e4e4e7"}`},children:[E.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[E.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"#ef4444",strokeWidth:"1.5"}),E.jsx("line",{x1:"8",y1:"4.5",x2:"8",y2:"8.5",stroke:"#ef4444",strokeWidth:"1.5",strokeLinecap:"round"}),E.jsx("circle",{cx:"8",cy:"11",r:"0.75",fill:"#ef4444"})]}),E.jsxs("span",{style:{color:"#ef4444",fontWeight:600,fontSize:13},children:[i," error",i!==1?"s":""]}),o>0&&E.jsxs("span",{style:{color:"#f59e0b",fontSize:12},children:[o," warning",o!==1?"s":""]})]}),t.map(c=>E.jsxs("div",{style:{marginBottom:8,padding:"8px 10px",borderRadius:6,backgroundColor:s?c.severity==="error"?"rgba(239,68,68,0.08)":"rgba(245,158,11,0.08)":c.severity==="error"?"rgba(239,68,68,0.05)":"rgba(245,158,11,0.05)",border:`1px solid ${s?c.severity==="error"?"rgba(239,68,68,0.2)":"rgba(245,158,11,0.2)":c.severity==="error"?"rgba(239,68,68,0.15)":"rgba(245,158,11,0.15)"}`},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},children:[E.jsx("span",{style:{color:c.severity==="error"?"#ef4444":"#f59e0b",fontWeight:600,fontSize:10,textTransform:"uppercase",letterSpacing:.5},children:c.category}),c.line&&E.jsxs("span",{style:{color:s?"#71717a":"#a1a1aa",fontSize:10},children:["Line ",c.line,c.column?`:${c.column}`:""]})]}),E.jsx("div",{style:{color:s?"#d4d4d8":"#3f3f46",fontSize:11,lineHeight:1.5,wordBreak:"break-word"},children:c.message}),c.sourceContext&&E.jsx("pre",{style:{marginTop:6,padding:"6px 8px",borderRadius:4,backgroundColor:s?"#0f0f0f":"#f9fafb",border:`1px solid ${s?"#1e1e1e":"#e5e7eb"}`,fontSize:10,lineHeight:1.4,overflow:"auto",color:s?"#a1a1aa":"#6b7280",whiteSpace:"pre-wrap"},children:c.sourceContext})]},c.id))]})}),Ge={};function wm(e){Ge[e.id]=e}function _m(e){for(const t of e)Ge[t.id]=t}function Sm(e){delete Ge[e]}function Im(){for(const e of Object.keys(Ge))delete Ge[e]}function Em(e){return Ge[e]}function Cm(){return Object.keys(Ge)}function Tm(){return Object.values(Ge)}function Cc(){const e=Object.values(Ge);return e.length===0?"_No templates registered._":e.map(t=>`- **${t.id}**: ${t.description} [keywords: ${t.keywords.join(", ")}]`).join(`
1211
+ `)}function Am(e,t){const r=e.toLowerCase(),s=Object.keys(Ge);let o=t??s[0]??"",c=0;for(const[u,f]of Object.entries(Ge)){let h=0;for(const m of f.keywords)r.includes(m)&&(h+=m.length);h>c&&(c=h,o=u)}return o}function Tc(e){return _c.has(e)}function Ac(e){switch(e.toLowerCase().replace(/^\./,"")){case"html":case"htm":return"html";case"md":case"markdown":case"mdx":return"markdown";case"mermaid":case"mmd":return"mermaid";case"svg":return"svg";case"csv":case"tsv":return"csv";case"json":case"jsonl":return"json";case"dot":case"gv":case"graphviz":return"dot";case"latex":case"tex":case"katex":return"latex";case"architecture":case"arch":case"drawio":return"architecture";case"jsx":case"js":case"javascript":return"react";case"tsx":case"ts":case"typescript":default:return"react-ts"}}function Pc(e,t,r){switch(t){case"html":return{filename:"preview.html",content:e,mime:"text/html"};case"markdown":return{filename:"document.md",content:e,mime:"text/markdown"};case"dot":return{filename:"diagram.dot",content:e,mime:"text/vnd.graphviz"};case"latex":return{filename:"document.tex",content:e,mime:"application/x-latex"};case"architecture":return{filename:"architecture.drawio",content:e,mime:"application/xml"};case"mermaid":return{filename:"diagram.mermaid",content:e,mime:"text/plain"};case"svg":return{filename:"image.svg",content:e,mime:"image/svg+xml"};case"csv":return{filename:"data.csv",content:e,mime:"text/csv"};case"json":return{filename:"data.json",content:e,mime:"application/json"};case"react":case"react-ts":{const s=Jn(e,{filename:t==="react"?"App.jsx":"App.tsx"});if(s.error)return{filename:`component.${r==="jsx"||r==="js"?"jsx":"tsx"}`,content:e,mime:"text/plain"};const i=Ti({}),o=s.code.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${");return{filename:"preview.html",content:`<!DOCTYPE html>
1626
1212
  <html lang="en">
1627
1213
  <head>
1628
1214
  <meta charset="UTF-8">
1629
1215
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1630
1216
  <title>CodeViz Export</title>
1631
- ${ps(i)}
1217
+ ${Ai(i)}
1632
1218
  <script src="https://cdn.tailwindcss.com/3.4.16?plugins=forms,typography"><\/script>
1633
1219
  <style>
1634
1220
  * { box-sizing: border-box; }
@@ -1641,7 +1227,7 @@ Jack Thomas,Engineering,Frontend Engineer,130000,2022-11-01,Active`},json:{id:"j
1641
1227
  <script type="module">
1642
1228
  import React from 'react';
1643
1229
  import { createRoot } from 'react-dom/client';
1644
- const code = \`${a}\`;
1230
+ const code = \`${o}\`;
1645
1231
  const blob = new Blob([code], { type: 'text/javascript' });
1646
1232
  const url = URL.createObjectURL(blob);
1647
1233
  const mod = await import(url);
@@ -1650,7 +1236,33 @@ Jack Thomas,Engineering,Frontend Engineer,130000,2022-11-01,Active`},json:{id:"j
1650
1236
  createRoot(document.getElementById('root')).render(React.createElement(App));
1651
1237
  <\/script>
1652
1238
  </body>
1653
- </html>`,mime:"text/html"}}default:return{filename:"file.txt",content:e,mime:"text/plain"}}}function _d(e){switch(e.toLowerCase().replace(/^\./,"")){case"html":case"htm":return"html";case"md":case"markdown":case"mdx":return"markdown";case"mermaid":case"mmd":return"mermaid";case"svg":return"svg";case"csv":case"tsv":return"csv";case"json":case"jsonl":return"json";case"jsx":case"js":case"javascript":return"react";case"tsx":case"ts":case"typescript":default:return"react-ts"}}const yi={"application/vnd.react":{description:"React TSX component (single file, default export)",extension:".tsx",template:"react-ts",example:"export default function App() { return <h1>Hello</h1>; }"},"text/html":{description:"Static HTML (rendered directly, Tailwind CSS available)",extension:".html",template:"html",example:'<div class="p-4"><h1 class="text-2xl font-bold">Hello</h1></div>'},"text/markdown":{description:"Markdown with Mermaid diagram support (GFM, rendered with github-markdown-css)",extension:".md",template:"markdown",example:`# Hello
1239
+ </html>`,mime:"text/html"}}default:return{filename:"file.txt",content:e,mime:"text/plain"}}}const Pm=`export default function App() {
1240
+ return (
1241
+ <div className="flex items-center justify-center min-h-screen bg-gradient-to-br from-indigo-500 to-purple-600">
1242
+ <div className="bg-white rounded-2xl shadow-xl p-8 max-w-md text-center">
1243
+ <h1 className="text-3xl font-bold text-gray-900 mb-2">Hello World</h1>
1244
+ <p className="text-gray-500">Edit the code to see live changes</p>
1245
+ </div>
1246
+ </div>
1247
+ );
1248
+ }`,Nm=I.memo(I.forwardRef(function({code:t,language:r="tsx",template:s="react-ts",templateId:i,importMap:o,dependencies:c,cdnBase:u,externalResources:f,tailwindCdn:h,onChange:m,onError:x,onLoad:_,onClose:y,onFullscreenChange:L,showEditor:O=!0,showPreview:F,defaultView:K="split",editorOptions:P,className:j,height:D="100%",width:W="100%",theme:X="dark",readOnly:q=!1,showLoader:T=!0,loader:B,showToolbar:z=!0,showStatusBar:ye=!0,filename:De,hideSplit:$e=!1,footerSlot:Oe,isStreaming:H},ce){const xe=i?Ge[i]:null,ee=(xe==null?void 0:xe.code)??t??Pm,Pe=(xe==null?void 0:xe.language)??r,Be=(xe==null?void 0:xe.type)??s??Ac(Pe),te=F??Tc(Be),[ue,ke]=I.useState(ee),[Le,b]=I.useState([]),[S,C]=I.useState(O?te?K:"code":"preview"),[A,M]=I.useState(!0),[Y,Z]=I.useState(!1),[le,we]=I.useState(!1),oe=Y||(H??!1),Ne=I.useRef(H),Ee=I.useRef(!1),ve=I.useRef(),qe=I.useRef(null),Me=I.useRef(null),nt=I.useRef(0),[Dt,Ot]=I.useState(0),lr=I.useRef(),[ur,ut]=I.useState(ee),je=I.useRef(ee),Tt=I.useRef(t),Ze=I.useRef(!1);I.useEffect(()=>{t!=null&&t!==Tt.current&&t!==je.current&&(Tt.current=t,je.current=t,Ze.current=!0,ke(t),oe||ut(t),queueMicrotask(()=>{Ze.current=!1}))},[t,oe]),I.useEffect(()=>{const Q=Ne.current;if(Ne.current=H,Q&&!H&&!Y&&te){const Ie=je.current;ut(Ie),b([]),M(!0),Ee.current=!0,clearTimeout(ve.current),ve.current=setTimeout(()=>{Ee.current&&(Ee.current=!1,C("preview"))},Wr.PREVIEW_SWITCH_DELAY_MS)}},[H,Y,te]),I.useEffect(()=>{oe&&(S==="preview"||S==="split")&&C("code")},[oe,S]);const[pr,Mt]=I.useState(null),jt=I.useRef(null);I.useEffect(()=>{const Q=()=>{const Ie=je.current;Ie&&navigator.clipboard.writeText(Ie).catch(()=>{const _e=document.createElement("textarea");_e.value=Ie,_e.style.position="fixed",_e.style.opacity="0",document.body.appendChild(_e),_e.select(),document.execCommand("copy"),document.body.removeChild(_e)})};return window.addEventListener("codeviz:copy-request",Q),()=>window.removeEventListener("codeviz:copy-request",Q)},[]),I.useEffect(()=>{const Q=()=>{const Ie=document.fullscreenElement===Me.current;we(Ie),L==null||L(Ie),Ie?C(_e=>(jt.current=_e,te?"preview":"code")):jt.current!=null&&(C(jt.current),jt.current=null)};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[L,te]);const Cr=I.useCallback(()=>{const Q=Me.current;Q&&(document.fullscreenElement===Q?document.exitFullscreen():Q.requestFullscreen())},[]),Ft=I.useCallback((Q,Ie,_e)=>{const pt=Q.replace(/[^a-zA-Z0-9\-_.]/g,"_"),kt=new Blob([Ie],{type:_e}),gr=URL.createObjectURL(kt),At=document.createElement("a");At.href=gr,At.download=pt,document.body.appendChild(At),At.click(),document.body.removeChild(At),URL.revokeObjectURL(gr)},[]),Tr=I.useCallback(()=>{const Q=je.current,{filename:Ie,content:_e,mime:pt}=Pc(Q,Be,Pe);Ft(Ie,_e,pt)},[Be,Pe,Ft]),hr=I.useCallback(()=>{Ft("document.md",je.current,"text/markdown")},[Ft]),fr=I.useCallback(()=>{const Q=je.current,Ie=`<!DOCTYPE html>
1249
+ <html><head>
1250
+ <meta charset="UTF-8">
1251
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown.min.css">
1252
+ <script src="https://cdn.jsdelivr.net/npm/marked@14/marked.min.js"><\/script>
1253
+ <style>
1254
+ body { max-width: 800px; margin: 0 auto; padding: 32px 24px; }
1255
+ .markdown-body { font-size: 14px; }
1256
+ @media print { body { padding: 0; } }
1257
+ </style>
1258
+ </head><body>
1259
+ <article id="content" class="markdown-body"></article>
1260
+ <script>
1261
+ marked.setOptions({ gfm: true, breaks: true });
1262
+ document.getElementById('content').innerHTML = marked.parse(${JSON.stringify(Q)});
1263
+ setTimeout(() => { window.print(); }, 500);
1264
+ <\/script>
1265
+ </body></html>`,_e=window.open("","_blank");_e&&(_e.document.write(Ie),_e.document.close())},[]),dr=I.useMemo(()=>{if(Be==="markdown")return[{label:"Download as Markdown (.md)",action:hr},{label:"Download as PDF (Print)",action:fr}]},[Be,hr,fr]),Ar=I.useCallback(Q=>{ke(Q),je.current=Q,Ze.current||(m==null||m(Q),clearTimeout(lr.current),lr.current=setTimeout(()=>{ut(Q)},Wr.EDITOR_DEBOUNCE_MS))},[m]),Pr=I.useCallback(Q=>{Ee.current&&(Ee.current=!1,clearTimeout(ve.current),C("code")),b(Ie=>Ie.some(_e=>_e.message===Q.message)?Ie:[...Ie.slice(-9),Q]),x==null||x(Q)},[x]),Nr=I.useCallback(()=>{M(!1);const Q=Ne.current??!1;!oe&&!Q&&te&&S==="code"&&!Ee.current&&C("preview"),_==null||_()},[_,oe,te,S]);I.useImperativeHandle(ce,()=>({getCode:()=>je.current,setCode:Q=>{Ze.current=!0,Mt(ue),ke(Q),ut(Q),je.current=Q,Tt.current=Q,b([]),queueMicrotask(()=>{Ze.current=!1})},streamCode:Q=>{Ze.current=!0,Y||(Mt(je.current),Z(!0),C("code")),je.current=Q,Tt.current=Q,ke(Q),queueMicrotask(()=>{Ze.current=!1})},commitCode:()=>{Z(!1);const Q=je.current;ke(Q),ut(Q),b([]),M(!0),te&&H==null&&(Ee.current=!0,clearTimeout(ve.current),ve.current=setTimeout(()=>{Ee.current&&(Ee.current=!1,C("preview"))},Wr.PREVIEW_SWITCH_DELAY_MS))},editCode:(Q,Ie)=>{const _e=je.current,pt=_e.indexOf(Q);if(pt===-1)return!1;Ze.current=!0,pr==null&&Mt(_e);const kt=_e.slice(0,pt)+Ie+_e.slice(pt+Q.length);return ke(kt),ut(kt),je.current=kt,Tt.current=kt,queueMicrotask(()=>{Ze.current=!1}),!0},refresh:()=>{nt.current+=1,Ot(nt.current),b([])},setView:Q=>C(Q),getErrors:()=>Le,clearErrors:()=>b([]),isLoading:()=>A})),I.useEffect(()=>{if(i&&Ge[i]){const Q=Ge[i];ke(Q.code),ut(Q.code),je.current=Q.code,Mt(null)}},[i]);const Xt=X==="dark",mr=S==="split"||S==="code",xt=S==="split"||S==="preview",Rr=te&&ur!==ee&&!oe,Lr={display:"flex",flexDirection:"column",width:le?"100vw":typeof W=="number"?`${W}px`:W,height:le?"100vh":typeof D=="number"?`${D}px`:D,overflow:"hidden",borderRadius:le?0:10,border:le?"none":`1px solid ${Xt?"#27272a":"#e4e4e7"}`,backgroundColor:Xt?"#09090b":"#ffffff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},Dr={display:"flex",flexDirection:"row",flex:1,minHeight:0,overflow:"hidden"},Yt={flex:1,minWidth:0,minHeight:0,overflow:"hidden"},Or={flexShrink:0,width:1,backgroundColor:Xt?"#27272a":"#e4e4e7"},Mr=Be==="react-ts"?"react-ts":Be;return E.jsxs("div",{ref:Me,className:j,style:Lr,children:[z&&E.jsx(Sc,{view:S,onViewChange:C,onRefresh:()=>{nt.current+=1,Ot(nt.current),b([])},isLoading:A,theme:X,isStreaming:oe,isFullscreen:le,onFullscreenToggle:Cr,onDownload:dr?void 0:Tr,downloadOptions:dr,onClose:y,hideSplit:$e}),E.jsxs("div",{style:Dr,children:[mr&&E.jsx("div",{style:Yt,children:E.jsx(ya,{code:ue,language:Pe,onChange:Ar,theme:X,readOnly:q||oe,options:P,editorRef:qe,baseCode:pr})}),mr&&xt&&E.jsx("div",{style:Or}),xt&&!oe&&Le.length>0&&E.jsx("div",{style:Yt,children:E.jsx(Ec,{errors:Le,theme:X})}),(xt||Rr&&!xt)&&E.jsx("div",{style:{...Yt,...xt&&!(Le.length>0&&!oe)?{}:{position:"absolute",width:1,height:1,overflow:"hidden",opacity:0,pointerEvents:"none"}},children:E.jsx(wc,{code:ur,template:Mr,importMap:o,dependencies:c,cdnBase:u,tailwindCdn:h,externalResources:f,files:void 0,onError:Pr,onLoad:Nr,theme:X,showLoader:T&&xt&&!(Le.length>0&&!oe),loader:B})},Dt)]}),ye&&E.jsx(Ic,{errors:Le,isLoading:A,isStreaming:oe,language:Pe,theme:X,view:S,filename:De,footerSlot:Oe})]})})),Nc={"application/vnd.react":{description:"React TSX component (single file, default export)",extension:".tsx",template:"react-ts",example:"export default function App() { return <h1>Hello</h1>; }"},"text/html":{description:"Static HTML (rendered directly, Tailwind CSS available)",extension:".html",template:"html",example:'<div class="p-4"><h1 class="text-2xl font-bold">Hello</h1></div>'},"text/markdown":{description:"Markdown with Mermaid diagram support (GFM, rendered with github-markdown-css)",extension:".md",template:"markdown",example:`# Hello
1654
1266
 
1655
1267
  Some text
1656
1268
 
@@ -1662,7 +1274,10 @@ graph TD
1662
1274
  B -->|Yes| C[OK]
1663
1275
  B -->|No| D[End]`},"image/svg+xml":{description:"SVG image with zoom/pan viewer",extension:".svg",template:"svg",example:'<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#818cf8"/></svg>'},"text/csv":{description:"CSV data rendered as a styled, sortable table",extension:".csv",template:"csv",example:`Name,Age,City
1664
1276
  Alice,30,NYC
1665
- Bob,25,LA`},"application/json":{description:"JSON data with collapsible tree view and syntax highlighting",extension:".json",template:"json",example:'{"users": [{"name": "Alice", "role": "admin"}]}'}};function Id(){return yi}function Sd(){return`## Artifact Preview (CodeViz)
1277
+ Bob,25,LA`},"application/json":{description:"JSON data with collapsible tree view and syntax highlighting",extension:".json",template:"json",example:'{"users": [{"name": "Alice", "role": "admin"}]}'},"text/vnd.graphviz":{description:"Graphviz DOT diagram with zoom/pan viewer (digraph, subgraph, clusters)",extension:".dot",template:"dot",example:`digraph G {
1278
+ A -> B -> C;
1279
+ B -> D;
1280
+ }`},"application/x-latex":{description:"LaTeX math equations rendered with KaTeX (inline $...$ and display $$...$$)",extension:".tex",template:"latex",example:"The quadratic formula: $$x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$$"},"application/vnd.architecture":{description:"Architecture diagram using Draw.io XML (mxGraphModel). Supports AWS, GCP, Azure, K8s shapes and all draw.io stencils.",extension:".drawio",template:"architecture",example:'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'}};function Rm(){return Nc}function Lm(){return`## Artifact Preview (CodeViz)
1666
1281
 
1667
1282
  You can create interactive React or HTML artifacts that render in a live preview.
1668
1283
 
@@ -1674,6 +1289,9 @@ You can create interactive React or HTML artifacts that render in a live preview
1674
1289
  - **image/svg+xml** — SVG image with zoom/pan viewer.
1675
1290
  - **text/csv** — CSV data, rendered as styled sortable table.
1676
1291
  - **application/json** — JSON data with collapsible tree view.
1292
+ - **text/vnd.graphviz** — Graphviz DOT diagram with zoom/pan controls. Use DOT language syntax (digraph, subgraph, clusters).
1293
+ - **application/x-latex** — LaTeX math equations rendered with KaTeX. Use $...$ for inline and $$...$$ for display math.
1294
+ - **application/vnd.architecture** — Architecture diagram using Draw.io XML. See "Architecture Diagrams" section below.
1677
1295
 
1678
1296
  ### Rules
1679
1297
  1. **Always use a default export**: \`export default function App() { ... }\`
@@ -1683,17 +1301,442 @@ You can create interactive React or HTML artifacts that render in a live preview
1683
1301
  5. **Pick a template**: Start from the closest matching template to save tokens. Edit the template body — don't rewrite imports.
1684
1302
 
1685
1303
  ### Available Templates
1686
- ${bi()}
1304
+ ${Cc()}
1687
1305
 
1688
1306
  ### Template Selection
1689
- Pick the template whose keywords best match the user's request. If unsure, use **blank**.
1307
+ Pick the template whose keywords best match the user's request. If unsure, use **singlepage**.
1308
+
1309
+ ### Skeleton Template System
1310
+ Templates use a **skeleton-first** approach to save tokens. Each template provides:
1311
+ - A complete layout scaffold (header, sidebar, content areas)
1312
+ - Placeholder components for the agent to replace with real content
1313
+ - Dark mode support via Tailwind \`dark:\` variants
1690
1314
 
1691
- ${mi()}
1315
+ **How to extend:** Pick a template, then replace placeholder components with real content. Keep the layout structure — only modify the body.
1316
+
1317
+ ${vc()}
1692
1318
 
1693
1319
  ### Error Handling
1694
1320
  If you receive an error from the preview, fix it by:
1695
1321
  1. Check the line number in the error
1696
1322
  2. Look at the source context provided
1697
1323
  3. Fix the specific issue (missing closing tag, typo, wrong import, etc.)
1698
- 4. Do NOT regenerate the entire artifact — make a targeted edit`}exports.CodeViz=vd;exports.EditorPane=eo;exports.Loader=jr;exports.PreviewPane=gi;exports.RENDERABLE_TYPES=yi;exports.StatusBar=xi;exports.Toolbar=ki;exports.buildImportMap=us;exports.buildPreviewHtml=xn;exports.getAgentSystemPrompt=Sd;exports.getAvailablePackages=mi;exports.getRenderableTypes=Id;exports.getTemplate=kd;exports.getTemplateIds=xd;exports.getTemplateSummary=bi;exports.importMapToScript=ps;exports.pickTemplate=bd;exports.templates=at;exports.transpile=Fn;exports.transpileFiles=rd;
1324
+ 4. Do NOT regenerate the entire artifact — make a targeted edit
1325
+
1326
+ ### Architecture Diagrams (Draw.io)
1327
+
1328
+ Use \`application/vnd.architecture\` (language: \`architecture\`) for infrastructure diagrams with cloud service icons.
1329
+ Format: **Draw.io XML** (mxGraphModel). The renderer includes ALL draw.io shape stencils (AWS, GCP, Azure, K8s, UML, network, etc.).
1330
+
1331
+ **Structure:**
1332
+ \`\`\`xml
1333
+ <mxGraphModel dx="1100" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1100" pageHeight="500" background="none">
1334
+ <root>
1335
+ <mxCell id="0"/>
1336
+ <mxCell id="1" parent="0"/>
1337
+ <!-- Groups (dashed containers) -->
1338
+ <mxCell id="grp" value="&lt;b&gt;Group Name&lt;/b&gt;" style="rounded=1;fillColor=none;strokeColor=#COLOR;strokeWidth=2;dashed=1;dashPattern=8 4;fontSize=13;fontColor=#COLOR;verticalAlign=top;align=left;spacingLeft=10;spacingTop=5;arcSize=6;html=1;whiteSpace=wrap;" vertex="1" connectable="0" parent="1">
1339
+ <mxGeometry x="X" y="Y" width="W" height="H" as="geometry"/>
1340
+ </mxCell>
1341
+ <!-- AWS Resource Icons (parent="grp" for grouping, parent="1" for ungrouped) -->
1342
+ <mxCell id="node1" value="Label" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#CATEGORY_COLOR;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ICON_NAME;" vertex="1" parent="grp">
1343
+ <mxGeometry x="X" y="Y" width="48" height="48" as="geometry"/>
1344
+ </mxCell>
1345
+ <!-- Edges -->
1346
+ <mxCell value="label" style="rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#6b7280;strokeWidth=2;fontSize=10;fontColor=#6b7280;" edge="1" source="node1" target="node2" parent="1">
1347
+ <mxGeometry relative="1" as="geometry"/>
1348
+ </mxCell>
1349
+ </root>
1350
+ </mxGraphModel>
1351
+ \`\`\`
1352
+
1353
+ **AWS Category Colors:** Compute=#ED7100, Networking=#8C4FFF, Database=#C925D1, Storage=#3F8624, Security=#DD344C, App Integration=#E7157B
1354
+
1355
+ **AWS Shape Names** (use as \`resIcon=mxgraph.aws4.SHAPE\`):
1356
+ \`ec2\` \`ecs\` \`fargate\` \`lambda\` \`elastic_beanstalk\` \`s3\` \`rds\` \`aurora\` \`dynamodb\` \`elasticache\` \`redshift\` \`sqs\` \`sns\` \`kinesis\` \`eventbridge\` \`step_functions\` \`api_gateway\` \`cloudfront\` \`route_53\` \`elastic_load_balancing\` \`vpc\` \`waf\` \`cognito\` \`iam\` \`secrets_manager\` \`cloudwatch\` \`eks\` \`ecr\` \`codepipeline\`
1357
+
1358
+ **Generic shapes:** Use \`style="shape=mxgraph.NAME"\` for:
1359
+ - K8s: \`mxgraph.kubernetes.*\` (pod, node2, svc, deploy, ns)
1360
+ - Network: \`mxgraph.network.*\` (server, firewall, cloud, rack_unit)
1361
+ - Basic: \`rounded=1;whiteSpace=wrap;html=1;fillColor=#COLOR;strokeColor=#COLOR;fontColor=#fff;\` for simple boxes`}const Dm=`
1362
+ /* ── Banking Theme: CSS Custom Properties ── */
1363
+ .theme-light {
1364
+ --surface-primary: #ffffff;
1365
+ --surface-secondary: #f7f7f8;
1366
+ --surface-tertiary: #ececf1;
1367
+ --text-primary: #212121;
1368
+ --text-secondary: #666666;
1369
+ --text-tertiary: #999999;
1370
+ --border-light: #e5e5e5;
1371
+ --border-medium: #d1d1d1;
1372
+ --accent-cyan: #00C1D5;
1373
+ --accent-navy: #000033;
1374
+ --status-positive: #16a34a;
1375
+ --status-negative: #dc2626;
1376
+ --status-warning: #d97706;
1377
+ }
1378
+ .theme-dark {
1379
+ --surface-primary: #0d0d0d;
1380
+ --surface-secondary: #212121;
1381
+ --surface-tertiary: #2f2f2f;
1382
+ --text-primary: #ececec;
1383
+ --text-secondary: #a0a0a0;
1384
+ --text-tertiary: #737373;
1385
+ --border-light: #3a3a3b;
1386
+ --border-medium: #4a4a4b;
1387
+ --accent-cyan: #00C1D5;
1388
+ --accent-navy: #000033;
1389
+ --status-positive: #22c55e;
1390
+ --status-negative: #ef4444;
1391
+ --status-warning: #f59e0b;
1392
+ }
1393
+
1394
+ /* ── Utility Classes (Tailwind-style) ── */
1395
+ .bg-surface-primary { background-color: var(--surface-primary); }
1396
+ .bg-surface-secondary { background-color: var(--surface-secondary); }
1397
+ .bg-surface-tertiary { background-color: var(--surface-tertiary); }
1398
+ .text-text-primary { color: var(--text-primary); }
1399
+ .text-text-secondary { color: var(--text-secondary); }
1400
+ .text-text-tertiary { color: var(--text-tertiary); }
1401
+ .border-border-light { border-color: var(--border-light); }
1402
+ .border-border-medium { border-color: var(--border-medium); }
1403
+ .text-accent-cyan { color: var(--accent-cyan); }
1404
+ .text-accent-navy { color: var(--accent-navy); }
1405
+ .bg-accent-cyan { background-color: var(--accent-cyan); }
1406
+ .bg-accent-navy { background-color: var(--accent-navy); }
1407
+ .text-status-positive { color: var(--status-positive); }
1408
+ .text-status-negative { color: var(--status-negative); }
1409
+ .text-status-warning { color: var(--status-warning); }
1410
+ .bg-status-positive { background-color: var(--status-positive); }
1411
+ .bg-status-negative { background-color: var(--status-negative); }
1412
+ .bg-status-warning { background-color: var(--status-warning); }
1413
+ `,Om=`
1414
+ // ── Built-in UI Components (auto-injected by CodeViz) ──────────────────────
1415
+ // Agent code can use these directly: <DataTable />, <MetricCard />, etc.
1416
+ // Do NOT remove or modify — these are managed by the platform.
1417
+
1418
+ /**
1419
+ * DataTable — Searchable, sortable, paginated table.
1420
+ * Banking standard: right-aligned numerics, formatted values.
1421
+ *
1422
+ * @param columns - Array of { key, label, align?, render?, sortable? }
1423
+ * @param data - Array of row objects
1424
+ * @param searchable - Show search bar (default: true)
1425
+ * @param pageSize - Rows per page (default: 10)
1426
+ * @param onRowClick - Optional row click handler
1427
+ */
1428
+ function DataTable({ columns = [], data = [], searchable = true, pageSize = 10, onRowClick }) {
1429
+ const [search, setSearch] = useState('');
1430
+ const [sortKey, setSortKey] = useState(null);
1431
+ const [sortDir, setSortDir] = useState('asc');
1432
+ const [page, setPage] = useState(0);
1433
+
1434
+ const filtered = useMemo(() => {
1435
+ if (!search.trim()) return data;
1436
+ const q = search.toLowerCase();
1437
+ return data.filter(row =>
1438
+ columns.some(col => String(row[col.key] ?? '').toLowerCase().includes(q))
1439
+ );
1440
+ }, [data, search, columns]);
1441
+
1442
+ const sorted = useMemo(() => {
1443
+ if (!sortKey) return filtered;
1444
+ return [...filtered].sort((a, b) => {
1445
+ const av = a[sortKey] ?? '', bv = b[sortKey] ?? '';
1446
+ const cmp = typeof av === 'number' && typeof bv === 'number'
1447
+ ? av - bv
1448
+ : String(av).localeCompare(String(bv));
1449
+ return sortDir === 'asc' ? cmp : -cmp;
1450
+ });
1451
+ }, [filtered, sortKey, sortDir]);
1452
+
1453
+ const totalPages = Math.max(1, Math.ceil(sorted.length / pageSize));
1454
+ const pageData = sorted.slice(page * pageSize, (page + 1) * pageSize);
1455
+
1456
+ const handleSort = (key) => {
1457
+ if (sortKey === key) {
1458
+ setSortDir(d => d === 'asc' ? 'desc' : 'asc');
1459
+ } else {
1460
+ setSortKey(key);
1461
+ setSortDir('asc');
1462
+ }
1463
+ };
1464
+
1465
+ return (
1466
+ <div className="bg-surface-secondary border border-border-light rounded-lg overflow-hidden">
1467
+ {searchable && (
1468
+ <div className="px-4 py-3 border-b border-border-light">
1469
+ <input
1470
+ type="text"
1471
+ placeholder="Search..."
1472
+ value={search}
1473
+ onChange={e => { setSearch(e.target.value); setPage(0); }}
1474
+ className="w-full px-3 py-1.5 text-sm rounded-md bg-surface-tertiary text-text-primary border border-border-light focus:outline-none focus:border-[#00C1D5] placeholder:text-text-tertiary"
1475
+ />
1476
+ </div>
1477
+ )}
1478
+ <div className="overflow-x-auto">
1479
+ <table className="w-full">
1480
+ <thead>
1481
+ <tr className="bg-surface-tertiary">
1482
+ {columns.map(col => (
1483
+ <th
1484
+ key={col.key}
1485
+ onClick={() => col.sortable !== false && handleSort(col.key)}
1486
+ className={cn(
1487
+ 'px-4 py-2.5 text-xs font-semibold text-text-secondary whitespace-nowrap',
1488
+ col.align === 'right' ? 'text-right' : 'text-left',
1489
+ col.sortable !== false && 'cursor-pointer hover:text-text-primary select-none'
1490
+ )}
1491
+ >
1492
+ <span className="inline-flex items-center gap-1">
1493
+ {col.label}
1494
+ {sortKey === col.key && (
1495
+ <span className="text-[10px]">{sortDir === 'asc' ? '▲' : '▼'}</span>
1496
+ )}
1497
+ </span>
1498
+ </th>
1499
+ ))}
1500
+ </tr>
1501
+ </thead>
1502
+ <tbody className="divide-y divide-border-light">
1503
+ {pageData.map((row, idx) => (
1504
+ <tr
1505
+ key={idx}
1506
+ onClick={() => onRowClick && onRowClick(row, idx)}
1507
+ className={cn('transition-colors', onRowClick && 'cursor-pointer', 'hover:bg-surface-tertiary')}
1508
+ >
1509
+ {columns.map(col => (
1510
+ <td
1511
+ key={col.key}
1512
+ className={cn(
1513
+ 'px-4 py-2.5 text-sm',
1514
+ col.align === 'right' ? 'text-right tabular-nums' : 'text-left',
1515
+ 'text-text-primary'
1516
+ )}
1517
+ >
1518
+ {col.render ? col.render(row[col.key], row) : row[col.key]}
1519
+ </td>
1520
+ ))}
1521
+ </tr>
1522
+ ))}
1523
+ {pageData.length === 0 && (
1524
+ <tr>
1525
+ <td colSpan={columns.length} className="px-4 py-8 text-center text-text-tertiary text-sm">
1526
+ {search ? 'No results found' : 'No data'}
1527
+ </td>
1528
+ </tr>
1529
+ )}
1530
+ </tbody>
1531
+ </table>
1532
+ </div>
1533
+ {totalPages > 1 && (
1534
+ <div className="flex items-center justify-between px-4 py-2.5 border-t border-border-light text-xs text-text-secondary">
1535
+ <span>{sorted.length} row{sorted.length !== 1 ? 's' : ''}</span>
1536
+ <div className="flex items-center gap-2">
1537
+ <button
1538
+ onClick={() => setPage(p => Math.max(0, p - 1))}
1539
+ disabled={page === 0}
1540
+ className="px-2 py-1 rounded bg-surface-tertiary disabled:opacity-40 hover:bg-surface-primary"
1541
+ >
1542
+ Prev
1543
+ </button>
1544
+ <span>{page + 1} / {totalPages}</span>
1545
+ <button
1546
+ onClick={() => setPage(p => Math.min(totalPages - 1, p + 1))}
1547
+ disabled={page >= totalPages - 1}
1548
+ className="px-2 py-1 rounded bg-surface-tertiary disabled:opacity-40 hover:bg-surface-primary"
1549
+ >
1550
+ Next
1551
+ </button>
1552
+ </div>
1553
+ </div>
1554
+ )}
1555
+ </div>
1556
+ );
1557
+ }
1558
+
1559
+ /**
1560
+ * MetricCard — Single KPI display with trend indicator.
1561
+ * Banking standard: formatted value, comparison period, trend arrow.
1562
+ *
1563
+ * @param label - Metric name (e.g., "Total AUM")
1564
+ * @param value - Formatted value (e.g., "$1.2B")
1565
+ * @param trend - Trend percentage (e.g., "+3.2%") — positive = green, negative = red
1566
+ * @param trendLabel - Comparison period (e.g., "vs last quarter")
1567
+ * @param icon - Optional lucide-react icon component
1568
+ * @param iconColor - Optional icon color (default: #00C1D5)
1569
+ */
1570
+ function MetricCard({ label, value, trend, trendLabel, icon, iconColor = '#00C1D5' }) {
1571
+ const isPositive = trend && !trend.startsWith('-');
1572
+ const isNegative = trend && trend.startsWith('-');
1573
+ const IconComp = icon;
1574
+
1575
+ return (
1576
+ <div className="bg-surface-secondary border border-border-light rounded-xl p-5">
1577
+ <div className="flex items-center justify-between mb-3">
1578
+ <p className="text-text-secondary text-xs font-medium uppercase tracking-wide">{label}</p>
1579
+ {IconComp && <IconComp className="w-4 h-4" style={{ color: iconColor }} />}
1580
+ </div>
1581
+ <p className="text-2xl font-bold text-text-primary tabular-nums">{value}</p>
1582
+ {trend && (
1583
+ <div className="flex items-center gap-1.5 mt-2">
1584
+ <span className={cn('text-xs font-semibold', isPositive && 'text-status-positive', isNegative && 'text-status-negative')}>
1585
+ {isPositive && '▲'}{isNegative && '▼'} {trend}
1586
+ </span>
1587
+ {trendLabel && <span className="text-text-tertiary text-xs">{trendLabel}</span>}
1588
+ </div>
1589
+ )}
1590
+ </div>
1591
+ );
1592
+ }
1593
+
1594
+ /**
1595
+ * StatusBadge — Colored pill for status display.
1596
+ * Banking standard: green (active/on-track), amber (watch), red (action needed).
1597
+ *
1598
+ * @param status - "positive" | "negative" | "warning" | "neutral"
1599
+ * @param label - Display text
1600
+ */
1601
+ function StatusBadge({ status = 'neutral', label }) {
1602
+ const styles = {
1603
+ positive: 'bg-[rgba(22,163,74,0.12)] text-status-positive',
1604
+ negative: 'bg-[rgba(220,38,38,0.12)] text-status-negative',
1605
+ warning: 'bg-[rgba(217,119,6,0.12)] text-status-warning',
1606
+ neutral: 'bg-surface-tertiary text-text-secondary',
1607
+ };
1608
+
1609
+ return (
1610
+ <span className={cn('inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium', styles[status] || styles.neutral)}>
1611
+ {label}
1612
+ </span>
1613
+ );
1614
+ }
1615
+
1616
+ /**
1617
+ * DetailCard — Entity header with key fields + optional tabbed content.
1618
+ * For: client profiles, account detail, loan summary.
1619
+ *
1620
+ * @param title - Entity name/title
1621
+ * @param subtitle - Secondary info (ID, type)
1622
+ * @param status - Optional StatusBadge props { status, label }
1623
+ * @param fields - Array of { label, value } for the key metrics row
1624
+ * @param tabs - Optional array of { id, label, content: ReactNode }
1625
+ * @param children - Content below the header (if no tabs)
1626
+ */
1627
+ function DetailCard({ title, subtitle, status, fields = [], tabs, children }) {
1628
+ const [activeTab, setActiveTab] = useState(tabs?.[0]?.id || '');
1629
+
1630
+ return (
1631
+ <div className="bg-surface-secondary border border-border-light rounded-xl overflow-hidden">
1632
+ <div className="p-5 border-b border-border-light">
1633
+ <div className="flex items-start justify-between mb-3">
1634
+ <div>
1635
+ <h2 className="text-xl font-bold text-text-primary">{title}</h2>
1636
+ {subtitle && <p className="text-text-secondary text-sm mt-0.5">{subtitle}</p>}
1637
+ </div>
1638
+ {status && <StatusBadge status={status.status} label={status.label} />}
1639
+ </div>
1640
+ {fields.length > 0 && (
1641
+ <div className="flex flex-wrap gap-6 mt-4">
1642
+ {fields.map((f, i) => (
1643
+ <div key={i}>
1644
+ <p className="text-text-tertiary text-xs uppercase tracking-wide">{f.label}</p>
1645
+ <p className="text-text-primary font-semibold text-sm mt-0.5 tabular-nums">{f.value}</p>
1646
+ </div>
1647
+ ))}
1648
+ </div>
1649
+ )}
1650
+ </div>
1651
+ {tabs && tabs.length > 0 && (
1652
+ <>
1653
+ <div className="flex border-b border-border-light">
1654
+ {tabs.map(tab => (
1655
+ <button
1656
+ key={tab.id}
1657
+ onClick={() => setActiveTab(tab.id)}
1658
+ className={cn(
1659
+ 'px-4 py-2.5 text-sm font-medium transition-colors',
1660
+ activeTab === tab.id
1661
+ ? 'text-[#00C1D5] border-b-2 border-[#00C1D5]'
1662
+ : 'text-text-secondary hover:text-text-primary'
1663
+ )}
1664
+ >
1665
+ {tab.label}
1666
+ </button>
1667
+ ))}
1668
+ </div>
1669
+ <div className="p-5">
1670
+ {tabs.find(t => t.id === activeTab)?.content}
1671
+ </div>
1672
+ </>
1673
+ )}
1674
+ {!tabs && children && <div className="p-5">{children}</div>}
1675
+ </div>
1676
+ );
1677
+ }
1678
+
1679
+ /**
1680
+ * StepWizard — Multi-step form with progress indicator.
1681
+ * For: loan origination, account opening, KYC onboarding.
1682
+ *
1683
+ * @param steps - Array of { id, label, content: ReactNode, validate?: () => boolean }
1684
+ * @param onComplete - Called when final step is submitted
1685
+ */
1686
+ function StepWizard({ steps = [], onComplete }) {
1687
+ const [current, setCurrent] = useState(0);
1688
+
1689
+ const next = () => {
1690
+ const step = steps[current];
1691
+ if (step.validate && !step.validate()) return;
1692
+ if (current < steps.length - 1) setCurrent(c => c + 1);
1693
+ else if (onComplete) onComplete();
1694
+ };
1695
+
1696
+ const prev = () => setCurrent(c => Math.max(0, c - 1));
1697
+
1698
+ return (
1699
+ <div className="bg-surface-secondary border border-border-light rounded-xl overflow-hidden">
1700
+ <div className="flex items-center px-5 py-3 border-b border-border-light gap-2">
1701
+ {steps.map((step, i) => (
1702
+ <div key={step.id} className="flex items-center gap-2">
1703
+ <div className={cn(
1704
+ 'flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold',
1705
+ i < current && 'bg-[#00C1D5] text-white',
1706
+ i === current && 'bg-[#00C1D5] text-white ring-2 ring-[#00C1D5]/30',
1707
+ i > current && 'bg-surface-tertiary text-text-tertiary'
1708
+ )}>
1709
+ {i < current ? '✓' : i + 1}
1710
+ </div>
1711
+ <span className={cn('text-sm hidden sm:inline', i === current ? 'text-text-primary font-medium' : 'text-text-tertiary')}>
1712
+ {step.label}
1713
+ </span>
1714
+ {i < steps.length - 1 && <div className="w-8 h-px bg-border-light" />}
1715
+ </div>
1716
+ ))}
1717
+ </div>
1718
+ <div className="p-5 min-h-[200px]">
1719
+ {steps[current]?.content}
1720
+ </div>
1721
+ <div className="flex items-center justify-between px-5 py-3 border-t border-border-light">
1722
+ <button
1723
+ onClick={prev}
1724
+ disabled={current === 0}
1725
+ className="px-4 py-1.5 text-sm rounded-lg bg-surface-tertiary text-text-secondary disabled:opacity-40 hover:bg-surface-primary"
1726
+ >
1727
+ Back
1728
+ </button>
1729
+ <button
1730
+ onClick={next}
1731
+ className="px-4 py-1.5 text-sm rounded-lg bg-[#00C1D5] text-white hover:bg-[#00a8b9]"
1732
+ >
1733
+ {current === steps.length - 1 ? 'Submit' : 'Next'}
1734
+ </button>
1735
+ </div>
1736
+ </div>
1737
+ );
1738
+ }
1739
+
1740
+ // ── End built-in components ─────────────────────────────────────────────────
1741
+ `,Mm=["DataTable","MetricCard","StatusBadge","DetailCard","StepWizard"];exports.BANKING_THEME_CSS=Dm;exports.BUILTIN_COMPONENTS_TSX=Om;exports.BUILTIN_COMPONENT_NAMES=Mm;exports.CodeViz=Nm;exports.EditorPane=ya;exports.ErrorPanel=Ec;exports.Loader=Hs;exports.PREVIEW_TEMPLATES=_c;exports.PreviewPane=wc;exports.RENDERABLE_TYPES=Nc;exports.SPLIT_BREAKPOINT=zs;exports.StatusBar=Ic;exports.TIMINGS=Wr;exports.Toolbar=Sc;exports.buildDownload=Pc;exports.buildImportMap=Ti;exports.buildPreviewHtml=yn;exports.clearTemplates=Im;exports.getAgentSystemPrompt=Lm;exports.getAvailablePackages=vc;exports.getRenderableTypes=Rm;exports.getTemplate=Em;exports.getTemplateIds=Cm;exports.getTemplateSummary=Cc;exports.getTemplates=Tm;exports.hasPreviewSupport=Tc;exports.importMapToScript=Ai;exports.inferTemplate=Ac;exports.pickTemplate=Am;exports.registerTemplate=wm;exports.registerTemplates=_m;exports.templates=Ge;exports.transpile=Jn;exports.transpileFiles=im;exports.unregisterTemplate=Sm;
1699
1742
  //# sourceMappingURL=index.cjs.map