create-caspian-app 0.2.0-beta.10 → 0.2.0-beta.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
var Xt=Object.defineProperty,Qt=(t,e,s)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,g=(t,e,s)=>Qt(t,"symbol"!=typeof e?e+"":e,s);class Yt{constructor(t){g(this,"hooks",[]),g(this,"currentIndex",0),g(this,"onStateChange"),g(this,"pendingLayoutEffects",[]),g(this,"pendingEffects",[]),g(this,"pendingUpdate",!1),g(this,"hasScheduledRender",!1),g(this,"batchedUpdates",new Set),g(this,"portalRegistrations",[]),g(this,"disposed",!1),this.onStateChange=t}loadState(t){this.hooks=[...t]}getHooks(){return this.hooks}prepareRender(){this.disposed||(this.currentIndex=0,this.pendingLayoutEffects=[],this.pendingEffects=[],this.portalRegistrations=[])}runLayoutEffects(){this.disposed||this.pendingLayoutEffects.forEach(t=>t()),this.pendingLayoutEffects=[]}runEffects(){this.disposed||this.pendingEffects.forEach(t=>t()),this.pendingEffects=[]}dispose(){this.disposed||(this.disposed=!0,this.pendingLayoutEffects=[],this.pendingEffects=[],this.pendingUpdate=!1,this.hasScheduledRender=!1,this.batchedUpdates.clear(),this.portalRegistrations=[],this.hooks.forEach(t=>{if(!t||"object"!=typeof t)return;const e=t.cleanup;if("function"==typeof e)try{e()}finally{t.cleanup=void 0}}),this.hooks=[],this.currentIndex=0)}usePortal(t,e){const s=this.currentIndex++;void 0===this.hooks[s]&&(this.hooks[s]={sourceParent:null});const i=this.hooks[s];return this.portalRegistrations.push({ref:t,target:e??null,info:i}),i}getPortalRegistrations(){return this.portalRegistrations}useState(t){const e=this.currentIndex++;if(void 0===this.hooks[e]){const s=this.hooks,i=e,n=this.batchedUpdates,r=()=>this.scheduleUpdate(),a=t=>{let e=t;"function"==typeof t&&(e=t(s[i].__state)),s[i].__state!==e&&(s[i].__state=e,n.add(i),r())};this.hooks[e]={__state:t,__setter:a}}const s=this.hooks[e];if("object"!=typeof s||null===s||!("__state"in s)){const t=s,i=this.hooks,n=e,r=this.batchedUpdates,a=()=>this.scheduleUpdate(),o=t=>{let e=t;"function"==typeof t&&(e=t(i[n].__state)),i[n].__state!==e&&(i[n].__state=e,r.add(n),a())};this.hooks[e]={__state:t,__setter:o}}return[this.hooks[e].__state,this.hooks[e].__setter]}scheduleUpdate(){this.disposed||(this.hasScheduledRender=!0,this.pendingUpdate||(this.pendingUpdate=!0,queueMicrotask(()=>{if(this.pendingUpdate=!1,this.disposed)return this.hasScheduledRender=!1,void this.batchedUpdates.clear();this.hasScheduledRender&&(this.hasScheduledRender=!1,this.batchedUpdates.clear(),this.onStateChange())})))}useRef(t=null){const e=this.currentIndex++;return void 0===this.hooks[e]&&(this.hooks[e]={current:t}),this.hooks[e]}useMemo(t,e){const s=this.currentIndex++,i=this.hooks[s];if(!i||this.areDepsDifferent(i.deps,e)){const i=t();return this.hooks[s]={value:i,deps:e},i}return i.value}useCallback(t,e){const s=this.currentIndex++,i=this.hooks[s];return!i||this.areDepsDifferent(i.deps,e)?(this.hooks[s]={callback:t,deps:e},t):i.callback}useReducer(t,e){const s=this.currentIndex++;if(void 0===this.hooks[s]){const i={state:e,reducer:t,dispatch:null};i.dispatch=t=>{const e=i.reducer(i.state,t);i.state!==e&&(i.state=e,this.scheduleUpdate())},this.hooks[s]=i}const i=this.hooks[s];return[i.state,i.dispatch]}useEffect(t,e){const s=this.currentIndex++,i=this.hooks[s];(!i||!e||!i.deps||this.areDepsDifferent(i.deps,e))&&this.pendingEffects.push(()=>{null!=i&&i.cleanup&&i.cleanup();const n=t();this.hooks[s]={deps:e,cleanup:"function"==typeof n?n:void 0}})}useLayoutEffect(t,e){const s=this.currentIndex++,i=this.hooks[s];(!i||!e||!i.deps||this.areDepsDifferent(i.deps,e))&&this.pendingLayoutEffects.push(()=>{null!=i&&i.cleanup&&i.cleanup();const n=t();this.hooks[s]={deps:e,cleanup:"function"==typeof n?n:void 0}})}areDepsDifferent(t,e){return t.length!==e.length||e.some((e,s)=>!Object.is(e,t[s]))}}class E{static saveState(t,e){t&&this.states.set(t,e)}static getState(t){return this.states.get(t)}static removeState(t){this.states.delete(t)}static saveScope(t,e){this.scopes.set(t,e)}static getScope(t){return this.scopes.get(t)}static removeScope(t){this.scopes.delete(t)}static registerInstance(t,e){var s;const i=this.instances.get(t);i&&i!==e&&(null==(s=i.destroy)||s.call(i)),this.instances.set(t,e)}static getInstance(t){return this.instances.get(t)}static removeInstance(t){this.instances.delete(t)}static saveParent(t,e){t&&this.parents.set(t,e)}static getParent(t){return this.parents.get(t)}static removeParent(t){if(!this.parents.has(t))return;const e=this.parents.get(t)??null;this.parents.forEach((s,i)=>{s===t&&this.parents.set(i,e)}),this.parents.delete(t)}static saveContextValues(t,e){const s=this.contextValues.get(t)??new Map,i=new Set;return s.forEach((t,s)=>{e.has(s)||i.add(s)}),e.forEach((t,e)=>{s.has(e)&&Object.is(s.get(e),t)||i.add(e)}),e.size>0?this.contextValues.set(t,new Map(e)):this.contextValues.delete(t),Array.from(i)}static resolveContext(t,e){let s=t;for(;s;){const t=this.contextValues.get(s);if(null!=t&&t.has(e))return{providerId:s,value:t.get(e)};s=this.parents.get(s)??null}return{providerId:null,value:e.defaultValue}}static updateContextDependencies(t,e){const s=new Set(e),i=this.consumerContexts.get(t)??new Set;i.forEach(e=>{s.has(e)||this.removeContextConsumer(e,t)}),s.forEach(e=>{i.has(e)||this.addContextConsumer(e,t)}),s.size>0?this.consumerContexts.set(t,s):this.consumerContexts.delete(t)}static getConsumersForContextsInSubtree(t,e){const s=new Set;for(const i of e){const e=this.contextConsumers.get(i);e&&e.forEach(e=>{e!==t&&this.isAncestor(t,e)&&s.add(e)})}return s}static removeContextTracking(t){const e=this.contextValues.get(t),s=e?this.getConsumersForContextsInSubtree(t,e.keys()):new Set;this.contextValues.delete(t);const i=this.consumerContexts.get(t);return i&&(i.forEach(e=>{this.removeContextConsumer(e,t)}),this.consumerContexts.delete(t)),this.removeParent(t),s}static saveTemplate(t,e){this.templates.has(t)||this.templates.set(t,e)}static getTemplate(t){return this.templates.get(t)}static saveOwnedTemplates(t,e){this.ownedTemplateData.has(t)||this.ownedTemplateData.set(t,e)}static getOwnedTemplates(t){return this.ownedTemplateData.get(t)}static clear(){this.states.clear(),this.scopes.clear(),this.instances.clear(),this.parents.clear(),this.templates.clear(),this.ownedTemplateData.clear(),this.contextValues.clear(),this.consumerContexts.clear(),this.contextConsumers.clear()}static getStats(){return{states:this.states.size,scopes:this.scopes.size,instances:this.instances.size,parents:this.parents.size,templates:this.templates.size,ownedData:this.ownedTemplateData.size,contextValues:this.contextValues.size,contextConsumers:this.contextConsumers.size}}static addContextConsumer(t,e){const s=this.contextConsumers.get(t)??new Set;s.add(e),this.contextConsumers.set(t,s)}static removeContextConsumer(t,e){const s=this.contextConsumers.get(t);s&&(s.delete(e),0===s.size&&this.contextConsumers.delete(t))}static isAncestor(t,e){let s=this.parents.get(e)??null;for(;s;){if(s===t)return!0;s=this.parents.get(s)??null}return!1}}g(E,"states",new Map),g(E,"scopes",new Map),g(E,"instances",new Map),g(E,"parents",new Map),g(E,"templates",new Map),g(E,"ownedTemplateData",new Map),g(E,"contextValues",new Map),g(E,"consumerContexts",new Map),g(E,"contextConsumers",new Map);class Zt{constructor(t,e){g(this,"root"),g(this,"getScope"),g(this,"handlerCache",new Map),this.root=t,this.getScope=e}clearCache(){this.handlerCache.clear()}bindEvents(t){(t||this.fallbackCollectEventElements()).forEach(t=>{var e;if(t===this.root)return void this.bindElementEvents(t);let s=t.closest("[pp-component]");t===s&&(s=(null==(e=t.parentElement)?void 0:e.closest("[pp-component]"))??null),s===this.root&&this.bindElementEvents(t)})}bindElementEvents(t){const e=t.getAttribute("pp-event-owner");e&&t.removeAttribute("pp-event-owner");const s=[];Array.from(t.attributes).forEach(i=>{if(i.name.startsWith("on")&&!i.name.includes("-")){const n=i.name.slice(2).toLowerCase();let r=i.value.trim();const a=r.match(/^\{([\s\S]*)\}$/);a&&(r=a[1].trim()),s.push(i.name);const o=`__pp_bound_${n}`;if(t[o]===r)return;t[o]=r;const h=t[`__pp_handler_${n}`];h&&t.removeEventListener(n,h);const c=s=>{var i;if(e){const i=E.getScope(e);if(i)return void this.executeHandlerWithScope(r,s,i,t)}let n=t.closest("[pp-component]");n===t&&(n=(null==(i=t.parentElement)?void 0:i.closest("[pp-component]"))??null);const a=(null==n?void 0:n.getAttribute("pp-component"))||null;if(a){const e=E.getScope(a);if(e)return void this.executeHandlerWithScope(r,s,e,t)}this.executeHandler(r,s,t)};t[`__pp_handler_${n}`]=c,t.addEventListener(n,c)}}),s.forEach(e=>{t.removeAttribute(e)})}fallbackCollectEventElements(){const t=new Set,e=this.root.attributes;for(let s=0;s<e.length;s++)if(e[s].name.startsWith("on")&&!e[s].name.includes("-")){t.add(this.root);break}const s=this.root.querySelectorAll("*");for(let e=0;e<s.length;e++){const i=s[e],n=i.attributes;for(let e=0;e<n.length;e++)if(n[e].name.startsWith("on")&&!n[e].name.includes("-")){t.add(i);break}}return t}executeHandler(t,e,s){this.executeHandlerWithScope(t,e,this.getScope(),s)}executeHandlerWithScope(t,e,s,i){const n=Object.keys(s),r=Object.values(s);try{const s=this.getCompiledHandler(t,n).call(i??e.currentTarget??null,...r,e);"function"==typeof s&&s(e)}catch(e){console.error("[PP-ERROR] Handler failed:",e),console.error("Code:",t)}}getCompiledHandler(t,e){const s=t+"|"+e.join(",");if(!this.handlerCache.has(s)){if(this.handlerCache.size>500){const t=this.handlerCache.keys().next().value;t&&this.handlerCache.delete(t)}const i="\n const e = event;\n const $event = event;\n const target = event?.target;\n const currentTarget = event?.currentTarget;\n const el = event?.currentTarget;\n ";let n;try{n=new Function(...e,"event",`"use strict";${i} return (${t})`)}catch{n=new Function(...e,"event",`"use strict";${i} ${t}`)}this.handlerCache.set(s,n)}return this.handlerCache.get(s)}}var Jt=[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,80,3,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,343,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,330,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,726,6,110,6,6,9,4759,9,787719,239],pt=[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,71,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,2,60,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,328,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,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,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,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ei="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",ft="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Me={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"},Fe="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",ti={5:Fe,"5module":Fe+" export import",6:Fe+" const class extends export import super"},ii=/^in(stanceof)?$/,si=new RegExp("["+ft+"]"),ri=new RegExp("["+ft+ei+"]");function je(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function Q(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&si.test(String.fromCharCode(t)):!1!==e&&je(t,pt)))}function re(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&ri.test(String.fromCharCode(t)):!1!==e&&(je(t,pt)||je(t,Jt)))))}var A=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function j(t,e){return new A(t,{beforeExpr:!0,binop:e})}var q={beforeExpr:!0},B={startsExpr:!0},Ge={};function k(t,e){return void 0===e&&(e={}),e.keyword=t,Ge[t]=new A(t,e)}var o={num:new A("num",B),regexp:new A("regexp",B),string:new A("string",B),name:new A("name",B),privateId:new A("privateId",B),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",q),semi:new A(";",q),colon:new A(":",q),dot:new A("."),question:new A("?",q),questionDot:new A("?."),arrow:new A("=>",q),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",q),backQuote:new A("`",B),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new A("**",{beforeExpr:!0}),coalesce:j("??",1),_break:k("break"),_case:k("case",q),_catch:k("catch"),_continue:k("continue"),_debugger:k("debugger"),_default:k("default",q),_do:k("do",{isLoop:!0,beforeExpr:!0}),_else:k("else",q),_finally:k("finally"),_for:k("for",{isLoop:!0}),_function:k("function",B),_if:k("if"),_return:k("return",q),_switch:k("switch"),_throw:k("throw",q),_try:k("try"),_var:k("var"),_const:k("const"),_while:k("while",{isLoop:!0}),_with:k("with"),_new:k("new",{beforeExpr:!0,startsExpr:!0}),_this:k("this",B),_super:k("super",B),_class:k("class",B),_extends:k("extends",q),_export:k("export"),_import:k("import",B),_null:k("null",B),_true:k("true",B),_false:k("false",B),_in:k("in",{beforeExpr:!0,binop:7}),_instanceof:k("instanceof",{beforeExpr:!0,binop:7}),_typeof:k("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:k("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:k("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},H=/\r\n?|\n|\u2028|\u2029/,ni=new RegExp(H.source,"g");function me(t){return 10===t||13===t||8232===t||8233===t}function dt(t,e,s){void 0===s&&(s=t.length);for(var i=e;i<s;i++){var n=t.charCodeAt(i);if(me(n))return i<s-1&&13===n&&10===t.charCodeAt(i+1)?i+2:i+1}return-1}var mt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xt=Object.prototype,ai=xt.hasOwnProperty,oi=xt.toString,xe=Object.hasOwn||function(t,e){return ai.call(t,e)},it=Array.isArray||function(t){return"[object Array]"===oi.call(t)},st=Object.create(null);function se(t){return st[t]||(st[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function ee(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var ui=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ce=function(t,e){this.line=t,this.column=e};Ce.prototype.offset=function(t){return new Ce(this.line,this.column+t)};var Te=function(t,e,s){this.start=e,this.end=s,null!==t.sourceFile&&(this.source=t.sourceFile)};function gt(t,e){for(var s=1,i=0;;){var n=dt(t,i,e);if(n<0)return new Ce(s,e-i);++s,i=n}}var qe={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},rt=!1;function ci(t){var e={};for(var s in qe)e[s]=t&&xe(t,s)?t[s]:qe[s];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!rt&&"object"==typeof console&&console.warn&&(rt=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),(!t||null==t.allowHashBang)&&(e.allowHashBang=e.ecmaVersion>=14),it(e.onToken)){var i=e.onToken;e.onToken=function(t){return i.push(t)}}return it(e.onComment)&&(e.onComment=hi(e,e.onComment)),e}function hi(t,e){return function(s,i,n,r,a,o){var h={type:s?"Block":"Line",value:i,start:n,end:r};t.locations&&(h.loc=new Te(this,a,o)),t.ranges&&(h.range=[n,r]),e.push(h)}}var Se=1,ge=2,Xe=4,vt=8,Qe=16,bt=32,Ne=64,yt=128,ce=256,Ee=512,Re=Se|ge|ce;function Ye(t,e){return ge|(t?Xe:0)|(e?vt:0)}var ke=0,Ze=1,ie=2,Ct=3,St=4,Et=5,T=function(t,e,s){this.options=t=ci(t),this.sourceFile=t.sourceFile,this.keywords=se(ti[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var i="";!0!==t.allowReserved&&(i=Me[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(i+=" await")),this.reservedWords=se(i);var n=(i?i+" ":"")+Me.strict;this.reservedWordsStrict=se(n),this.reservedWordsStrictBind=se(n+" "+Me.strictBind),this.input=String(e),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(H).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.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="module"===t.sourceType,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),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Se),this.regexpState=null,this.privateNameStack=[]},Y={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},Y.inFunction.get=function(){return(this.currentVarScope().flags&ge)>0},Y.inGenerator.get=function(){return(this.currentVarScope().flags&vt)>0},Y.inAsync.get=function(){return(this.currentVarScope().flags&Xe)>0},Y.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(ce|Ee))return!1;if(e&ge)return(e&Xe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Y.allowSuper.get=function(){return(this.currentThisScope().flags&Ne)>0||this.options.allowSuperOutsideMethod},Y.allowDirectSuper.get=function(){return(this.currentThisScope().flags&yt)>0},Y.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Y.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(ce|Ee)||e&ge&&!(e&Qe))return!0}return!1},Y.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ce)>0},T.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var s=this,i=0;i<t.length;i++)s=t[i](s);return s},T.parse=function(t,e){return new this(e,t).parse()},T.parseExpressionAt=function(t,e,s){var i=new this(s,t,e);return i.nextToken(),i.parseExpression()},T.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(T.prototype,Y);var D=T.prototype,li=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;D.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=t,t+=O.exec(this.input)[0].length;var e=li.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){O.lastIndex=t+e[0].length;var s=O.exec(this.input),i=s.index+s[0].length,n=this.input.charAt(i);return";"===n||"}"===n||H.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}t+=e[0].length,O.lastIndex=t,t+=O.exec(this.input)[0].length,";"===this.input[t]&&t++}},D.eat=function(t){return this.type===t&&(this.next(),!0)},D.isContextual=function(t){return this.type===o.name&&this.value===t&&!this.containsEsc},D.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},D.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},D.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||H.test(this.input.slice(this.lastTokEnd,this.start))},D.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},D.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()},D.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},D.expect=function(t){this.eat(t)||this.unexpected()},D.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var Le=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};D.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var s=e?t.parenthesizedAssign:t.parenthesizedBind;s>-1&&this.raiseRecoverable(s,e?"Assigning to rvalue":"Parenthesized pattern")}},D.checkExpressionErrors=function(t,e){if(!t)return!1;var s=t.shorthandAssign,i=t.doubleProto;if(!e)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},D.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")},D.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var b=T.prototype;b.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==o.eof;){var s=this.parseStatement(null,!0,e);t.body.push(s)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var r=n[i];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var Je={kind:"loop"},pi={kind:"switch"};b.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),s=this.pos+e[0].length,i=this.input.charCodeAt(s);if(91===i||92===i)return!0;if(t)return!1;if(123===i||i>55295&&i<56320)return!0;if(Q(i,!0)){for(var n=s+1;re(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!ii.test(r))return!0}return!1},b.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var t,e=O.exec(this.input),s=this.pos+e[0].length;return!(H.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(re(t=this.input.charCodeAt(s+8))||t>55295&&t<56320))},b.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;O.lastIndex=this.pos;var s=O.exec(this.input),i=this.pos+s[0].length;if(H.test(this.input.slice(this.pos,i)))return!1;if(t){var n,r=i+5;if("using"!==this.input.slice(i,r)||r===this.input.length||re(n=this.input.charCodeAt(r))||n>55295&&n<56320)return!1;O.lastIndex=r;var a=O.exec(this.input);if(a&&H.test(this.input.slice(r,r+a[0].length)))return!1}if(e){var o,h=i+2;if(!("of"!==this.input.slice(i,h)||h!==this.input.length&&(re(o=this.input.charCodeAt(h))||o>55295&&o<56320)))return!1}var c=this.input.charCodeAt(i);return Q(c,!0)||92===c},b.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},b.isUsing=function(t){return this.isUsingKeyword(!1,t)},b.parseStatement=function(t,e,s){var i,n=this.type,r=this.startNode();switch(this.isLet(t)&&(n=o._var,i="let"),n){case o._break:case o._continue:return this.parseBreakContinueStatement(r,n.keyword);case o._debugger:return this.parseDebuggerStatement(r);case o._do:return this.parseDoStatement(r);case o._for:return this.parseForStatement(r);case o._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case o._class:return t&&this.unexpected(),this.parseClass(r,!0);case o._if:return this.parseIfStatement(r);case o._return:return this.parseReturnStatement(r);case o._switch:return this.parseSwitchStatement(r);case o._throw:return this.parseThrowStatement(r);case o._try:return this.parseTryStatement(r);case o._const:case o._var:return i=i||this.value,t&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case o._while:return this.parseWhileStatement(r);case o._with:return this.parseWithStatement(r);case o.braceL:return this.parseBlock(!0,r);case o.semi:return this.parseEmptyStatement(r);case o._export:case o._import:if(this.options.ecmaVersion>10&&n===o._import){O.lastIndex=this.pos;var a=O.exec(this.input),h=this.pos+a[0].length,c=this.input.charCodeAt(h);if(40===c||46===c)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||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'")),n===o._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var l=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(l)return e&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===l&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,l),this.semicolon(),this.finishNode(r,"VariableDeclaration");var p=this.value,u=this.parseExpression();return n===o.name&&"Identifier"===u.type&&this.eat(o.colon)?this.parseLabeledStatement(r,p,u,t):this.parseExpressionStatement(r,u)}},b.parseBreakContinueStatement=function(t,e){var s="break"===e;this.next(),this.eat(o.semi)||this.insertSemicolon()?t.label=null:this.type!==o.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((null==t.label||n.name===t.label.name)&&(null!=n.kind&&(s||"loop"===n.kind)||t.label&&s))break}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")},b.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},b.parseDoStatement=function(t){return this.next(),this.labels.push(Je),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},b.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Je),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var s=this.isLet();if(this.type===o._var||this.type===o._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(t,i,e)}var r=this.isContextual("let"),a=!1,h=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(h){var c=this.startNode();return this.next(),"await using"===h&&this.next(),this.parseVar(c,!0,h),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(t,c,e)}var l=this.containsEsc,p=new Le,u=this.start,d=e>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===o._in&&this.unexpected(e),t.await=!0):a&&this.options.ecmaVersion>=8&&(d.start!==u||l||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),r&&a&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,p),this.checkLValPattern(d),this.parseForIn(t,d)):(this.checkExpressionErrors(p,!0),e>-1&&this.unexpected(e),this.parseFor(t,d))},b.parseForAfterInit=function(t,e,s){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>=9&&(this.type===o._in?s>-1&&this.unexpected(s):t.await=s>-1),this.parseForIn(t,e)):(s>-1&&this.unexpected(s),this.parseFor(t,e))},b.parseFunctionStatement=function(t,e,s){return this.next(),this.parseFunction(t,ye|(s?0:We),!1,e)},b.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},b.parseReturnStatement=function(t){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},b.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(o.braceL),this.labels.push(pi),this.enterScope(0);for(var e,s=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var i=this.type===o._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,e.test=null),this.expect(o.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},b.parseThrowStatement=function(t){return this.next(),H.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var fi=[];b.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?bt:0),this.checkLValPattern(t,e?St:ie),this.expect(o.parenR),t},b.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===o._catch){var e=this.startNode();this.next(),this.eat(o.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(o._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},b.parseVarStatement=function(t,e,s){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")},b.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Je),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},b.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},b.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},b.parseLabeledStatement=function(t,e,s,i){for(var n=0,r=this.labels;n<r.length;n+=1){r[n].name===e&&this.raise(s.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===o._switch?"switch":null,h=this.labels.length-1;h>=0;h--){var c=this.labels[h];if(c.statementStart!==t.start)break;c.statementStart=this.start,c.kind=a}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},b.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},b.parseBlock=function(t,e,s){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(o.braceL),t&&this.enterScope(0);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return s&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},b.parseFor=function(t,e){return t.init=e,this.expect(o.semi),t.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),t.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},b.parseForIn=function(t,e){var s=this.type===o._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,s?"ForInStatement":"ForOfStatement")},b.parseVar=function(t,e,s,i){for(t.declarations=[],t.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(o.eq)?n.init=this.parseMaybeAssign(e):i||"const"!==s||this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"using"!==s&&"await using"!==s||!(this.options.ecmaVersion>=17)||this.type===o._in||this.isContextual("of")?i||"Identifier"===n.id.type||e&&(this.type===o._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(o.comma))break}return t},b.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?Ze:ie,!1)};var ye=1,We=2,wt=4;function di(t,e){var s=e.key.name,i=t[s],n="true";return"MethodDefinition"===e.type&&("get"===e.kind||"set"===e.kind)&&(n=(e.static?"s":"i")+e.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(t[s]="true",!1):!!i||(t[s]=n,!1)}function Ae(t,e){var s=t.computed,i=t.key;return!s&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}b.parseFunction=function(t,e,s,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===o.star&&e&We&&this.unexpected(),t.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&ye&&(t.id=e&wt&&this.type!==o.name?null:this.parseIdent(),t.id&&!(e&We)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?Ze:ie:Ct));var r=this.yieldPos,a=this.awaitPos,h=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ye(t.async,t.generator)),e&ye||(t.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,s,!1,n),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=h,this.finishNode(t,e&ye?"FunctionDeclaration":"FunctionExpression")},b.parseFunctionParams=function(t){this.expect(o.parenL),t.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},b.parseClass=function(t,e){this.next();var s=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(null!==t.superClass);a&&(n.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(r&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),r=!0):a.key&&"PrivateIdentifier"===a.key.type&&di(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=s,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},b.parseClassElement=function(t){if(this.eat(o.semi))return null;var e=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,a="method",h=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===o.star?h=!0:i="static"}if(s.static=h,!i&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==o.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(e>=9||!r)&&this.eat(o.star)&&(n=!0),!i&&!r&&!n){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:i=c)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),e<13||this.type===o.parenL||"method"!==a||n||r){var l=!s.static&&Ae(s,"constructor"),p=l&&t;l&&"method"!==a&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=l?"constructor":a,this.parseClassMethod(s,n,r,p)}else this.parseClassField(s);return s},b.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword},b.parseClassElementName=function(t){this.type===o.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},b.parseClassMethod=function(t,e,s,i){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):t.static&&Ae(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=t.value=this.parseMethod(e,s,i);return"get"===t.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===t.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},b.parseClassField=function(t){return Ae(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&Ae(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope(Ee|Ne),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},b.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(ce|Ne);this.type!==o.braceR;){var s=this.parseStatement(null);t.body.push(s)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},b.parseClassId=function(t,e){this.type===o.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ie,!1)):(!0===e&&this.unexpected(),t.id=null)},b.parseClassSuper=function(t){t.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null},b.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},b.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,s=t.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r<s.length;++r){var a=s[r];xe(e,a.name)||(n?n.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},b.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},b.parseExport=function(t,e){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(t,e);if(this.eat(o._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var s=0,i=t.specifiers;s<i.length;s+=1){var n=i[s];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},b.parseExportDeclaration=function(t){return this.parseStatement(null)},b.parseExportDefaultDeclaration=function(){var t;if(this.type===o._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,ye|wt,!1,t)}if(this.type===o._class){var s=this.startNode();return this.parseClass(s,"nullableID")}var i=this.parseMaybeAssign();return this.semicolon(),i},b.checkExport=function(t,e,s){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),xe(t,e)&&this.raiseRecoverable(s,"Duplicate export '"+e+"'"),t[e]=!0)},b.checkPatternExport=function(t,e){var s=e.type;if("Identifier"===s)this.checkExport(t,e,e.start);else if("ObjectPattern"===s)for(var i=0,n=e.properties;i<n.length;i+=1){var r=n[i];this.checkPatternExport(t,r)}else if("ArrayPattern"===s)for(var a=0,o=e.elements;a<o.length;a+=1){var h=o[a];h&&this.checkPatternExport(t,h)}else"Property"===s?this.checkPatternExport(t,e.value):"AssignmentPattern"===s?this.checkPatternExport(t,e.left):"RestElement"===s&&this.checkPatternExport(t,e.argument)},b.checkVariableExport=function(t,e){if(t)for(var s=0,i=e;s<i.length;s+=1){var n=i[s];this.checkPatternExport(t,n.id)}},b.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},b.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},b.parseExportSpecifiers=function(t){var e=[],s=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseExportSpecifier(t))}return e},b.parseImport=function(t){return this.next(),this.type===o.string?(t.specifiers=fi,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},b.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportSpecifier")},b.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportDefaultSpecifier")},b.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportNamespaceSpecifier")},b.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===o.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return t;if(this.type===o.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseImportSpecifier())}return t},b.parseWithClause=function(){var t=[];if(!this.eat(o._with))return t;this.expect(o.braceL);for(var e={},s=!0;!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var i=this.parseImportAttribute(),n="Identifier"===i.key.type?i.key.name:i.key.value;xe(e,n)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(i)}return t},b.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===o.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(o.colon),this.type!==o.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},b.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var t=this.parseLiteral(this.value);return ui.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},b.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},b.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var K=T.prototype;K.toAssignable=function(t,e,s){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];this.toAssignable(r,e),"RestElement"===r.type&&("ArrayPattern"===r.argument.type||"ObjectPattern"===r.argument.type)&&this.raise(r.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",s&&this.checkPatternErrors(s,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,s);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else s&&this.checkPatternErrors(s,!0);return t},K.toAssignableList=function(t,e){for(var s=t.length,i=0;i<s;i++){var n=t[i];n&&this.toAssignable(n,e)}if(s){var r=t[s-1];6===this.options.ecmaVersion&&e&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start)}return t},K.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},K.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==o.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},K.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()},K.parseBindingList=function(t,e,s,i){for(var n=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(o.comma),e&&this.type===o.comma)n.push(null);else{if(s&&this.afterTrailingComma(t))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(i))}return n},K.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},K.parseBindingListItem=function(t){return t},K.parseMaybeDefault=function(t,e,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},K.checkLValSimple=function(t,e,s){void 0===e&&(e=ke);var i=e!==ke;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(i?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(e===ie&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),s&&(xe(s,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),s[t.name]=!0),e!==Et&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,s);default:this.raise(t.start,(i?"Binding":"Assigning to")+" rvalue")}},K.checkLValPattern=function(t,e,s){switch(void 0===e&&(e=ke),t.type){case"ObjectPattern":for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];this.checkLValInnerPattern(r,e,s)}break;case"ArrayPattern":for(var a=0,o=t.elements;a<o.length;a+=1){var h=o[a];h&&this.checkLValInnerPattern(h,e,s)}break;default:this.checkLValSimple(t,e,s)}},K.checkLValInnerPattern=function(t,e,s){switch(void 0===e&&(e=ke),t.type){case"Property":this.checkLValInnerPattern(t.value,e,s);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,s);break;case"RestElement":this.checkLValPattern(t.argument,e,s);break;default:this.checkLValPattern(t,e,s)}};var z=function(t,e,s,i,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i,this.generator=!!n},P={b_stat:new z("{",!1),b_expr:new z("{",!0),b_tmpl:new z("${",!1),p_stat:new z("(",!1),p_expr:new z("(",!0),q_tmpl:new z("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new z("function",!1),f_expr:new z("function",!0),f_expr_gen:new z("function",!0,!1,null,!0),f_gen:new z("function",!1,!1,null,!0)},ve=T.prototype;ve.initialContext=function(){return[P.b_stat]},ve.curContext=function(){return this.context[this.context.length-1]},ve.braceIsBlock=function(t){var e=this.curContext();return e===P.f_expr||e===P.f_stat||(t!==o.colon||e!==P.b_stat&&e!==P.b_expr?t===o._return||t===o.name&&this.exprAllowed?H.test(this.input.slice(this.lastTokEnd,this.start)):t===o._else||t===o.semi||t===o.eof||t===o.parenR||t===o.arrow||(t===o.braceL?e===P.b_stat:t!==o._var&&t!==o._const&&t!==o.name&&!this.exprAllowed):!e.isExpr)},ve.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ve.updateContext=function(t){var e,s=this.type;s.keyword&&t===o.dot?this.exprAllowed=!1:(e=s.updateContext)?e.call(this,t):this.exprAllowed=s.beforeExpr},ve.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},o.parenR.updateContext=o.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===P.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},o.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?P.b_stat:P.b_expr),this.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.context.push(P.b_tmpl),this.exprAllowed=!0},o.parenL.updateContext=function(t){var e=t===o._if||t===o._for||t===o._with||t===o._while;this.context.push(e?P.p_stat:P.p_expr),this.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(t){!t.beforeExpr||t===o._else||t===o.semi&&this.curContext()!==P.p_stat||t===o._return&&H.test(this.input.slice(this.lastTokEnd,this.start))||(t===o.colon||t===o.braceL)&&this.curContext()===P.b_stat?this.context.push(P.f_stat):this.context.push(P.f_expr),this.exprAllowed=!1},o.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},o.backQuote.updateContext=function(){this.curContext()===P.q_tmpl?this.context.pop():this.context.push(P.q_tmpl),this.exprAllowed=!1},o.star.updateContext=function(t){if(t===o._function){var e=this.context.length-1;this.context[e]===P.f_expr?this.context[e]=P.f_expr_gen:this.context[e]=P.f_gen}this.exprAllowed=!0},o.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==o.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var y=T.prototype;function _t(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&_t(t.expression)}function Ke(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&Ke(t.expression)||"ParenthesizedExpression"===t.type&&Ke(t.expression)}y.checkPropClash=function(t,e,s){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var i,n=t.key;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var r=t.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===i&&"init"===r&&(e.proto&&(s?s.doubleProto<0&&(s.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0));var a=e[i="$"+i];if(a)("init"===r?this.strict&&a.init||a.get||a.set:a.init||a[r])&&this.raiseRecoverable(n.start,"Redefinition of property");else a=e[i]={init:!1,get:!1,set:!1};a[r]=!0}},y.parseExpression=function(t,e){var s=this.start,i=this.startLoc,n=this.parseMaybeAssign(t,e);if(this.type===o.comma){var r=this.startNodeAt(s,i);for(r.expressions=[n];this.eat(o.comma);)r.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(r,"SequenceExpression")}return n},y.parseMaybeAssign=function(t,e,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var i=!1,n=-1,r=-1,a=-1;e?(n=e.parenthesizedAssign,r=e.trailingComma,a=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Le,i=!0);var h=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var l=this.parseMaybeConditional(t,e);if(s&&(l=s.call(this,l,h,c)),this.type.isAssign){var p=this.startNodeAt(h,c);return p.operator=this.value,this.type===o.eq&&(l=this.toAssignable(l,!1,e)),i||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=l.start&&(e.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(l):this.checkLValSimple(l),p.left=l,this.next(),p.right=this.parseMaybeAssign(t),a>-1&&(e.doubleProto=a),this.finishNode(p,"AssignmentExpression")}return i&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),r>-1&&(e.trailingComma=r),l},y.parseMaybeConditional=function(t,e){var s=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.eat(o.question)){var r=this.startNodeAt(s,i);return r.test=n,r.consequent=this.parseMaybeAssign(),this.expect(o.colon),r.alternate=this.parseMaybeAssign(t),this.finishNode(r,"ConditionalExpression")}return n},y.parseExprOps=function(t,e){var s=this.start,i=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===s&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,s,i,-1,t)},y.parseExprOp=function(t,e,s,i,n){var r=this.type.binop;if(null!=r&&(!n||this.type!==o._in)&&r>i){var a=this.type===o.logicalOR||this.type===o.logicalAND,h=this.type===o.coalesce;h&&(r=o.logicalAND.binop);var c=this.value;this.next();var l=this.start,p=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),l,p,r,n),d=this.buildBinary(e,s,t,u,c,a||h);return(a&&this.type===o.coalesce||h&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,e,s,i,n)}return t},y.buildBinary=function(t,e,s,i,n,r){"PrivateIdentifier"===i.type&&this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(t,e);return a.left=s,a.operator=n,a.right=i,this.finishNode(a,r?"LogicalExpression":"BinaryExpression")},y.parseMaybeUnary=function(t,e,s,i){var n,r=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(i),e=!0;else if(this.type.prefix){var h=this.startNode(),c=this.type===o.incDec;h.operator=this.value,h.prefix=!0,this.next(),h.argument=this.parseMaybeUnary(null,!0,c,i),this.checkExpressionErrors(t,!0),c?this.checkLValSimple(h.argument):this.strict&&"delete"===h.operator&&_t(h.argument)?this.raiseRecoverable(h.start,"Deleting local variable in strict mode"):"delete"===h.operator&&Ke(h.argument)?this.raiseRecoverable(h.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(h,c?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==o.privateId){if(n=this.parseExprSubscripts(t,i),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(r,a);l.operator=this.value,l.prefix=!1,l.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(l,"UpdateExpression")}}else(i||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();return s||!this.eat(o.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(r,a,n,this.parseMaybeUnary(null,!1,!1,i),"**",!1)},y.parseExprSubscripts=function(t,e){var s=this.start,i=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var r=this.parseSubscripts(n,s,i,!1,e);return t&&"MemberExpression"===r.type&&(t.parenthesizedAssign>=r.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=r.start&&(t.parenthesizedBind=-1),t.trailingComma>=r.start&&(t.trailingComma=-1)),r},y.parseSubscripts=function(t,e,s,i,n){for(var r=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,a=!1;;){var o=this.parseSubscript(t,e,s,i,r,a,n);if(o.optional&&(a=!0),o===t||"ArrowFunctionExpression"===o.type){if(a){var h=this.startNodeAt(e,s);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}t=o}},y.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)},y.parseSubscriptAsyncArrow=function(t,e,s,i){return this.parseArrowExpression(this.startNodeAt(t,e),s,!0,i)},y.parseSubscript=function(t,e,s,i,n,r,a){var h=this.options.ecmaVersion>=11,c=h&&this.eat(o.questionDot);i&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(o.bracketL);if(l||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var p=this.startNodeAt(e,s);p.object=t,l?(p.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&"Super"!==t.type?p.property=this.parsePrivateIdent():p.property=this.parseIdent("never"!==this.options.allowReserved),p.computed=!!l,h&&(p.optional=c),t=this.finishNode(p,"MemberExpression")}else if(!i&&this.eat(o.parenL)){var u=new Le,d=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,u);if(n&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=f,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(e,s,g,a);this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var v=this.startNodeAt(e,s);v.callee=t,v.arguments=g,h&&(v.optional=c),t=this.finishNode(v,"CallExpression")}else if(this.type===o.backQuote){(c||r)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var x=this.startNodeAt(e,s);x.tag=t,x.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(x,"TaggedTemplateExpression")}return t},y.parseExprAtom=function(t,e,s){this.type===o.slash&&this.readRegexp();var i,n=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(i,"Super");case o._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case o.name:var r=this.start,a=this.startLoc,h=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!h&&"async"===c.name&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(P.f_expr),this.parseFunction(this.startNodeAt(r,a),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(r,a),[c],!1,e);if(this.options.ecmaVersion>=8&&"async"===c.name&&this.type===o.name&&!h&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,a),[c],!0,e)}return c;case o.regexp:var l=this.value;return(i=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},i;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return(i=this.startNode()).value=this.type===o._null?null:this.type===o._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case o.parenL:var p=this.start,u=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(t.parenthesizedAssign=p),t.parenthesizedBind<0&&(t.parenthesizedBind=p)),u;case o.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(o.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case o.braceL:return this.overrideContext(P.b_expr),this.parseObj(!1,t);case o._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},y.parseExprAtomDefault=function(){this.unexpected()},y.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!t)return this.parseDynamicImport(e);if(this.type===o.dot){var s=this.startNodeAt(e.start,e.loc&&e.loc.start);return s.name="import",e.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(e)}this.unexpected()},y.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?t.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var e=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},y.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"!==this.options.sourceType&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},y.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},y.parseParenExpression=function(){this.expect(o.parenL);var t=this.parseExpression();return this.expect(o.parenR),t},y.shouldParseArrow=function(t){return!this.canInsertSemicolon()},y.parseParenAndDistinguishExpression=function(t,e){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,h=this.start,c=this.startLoc,l=[],p=!0,u=!1,d=new Le,f=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;){if(p?p=!1:this.expect(o.comma),r&&this.afterTrailingComma(o.parenR,!0)){u=!0;break}if(this.type===o.ellipsis){a=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var g=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(o.parenR),t&&this.shouldParseArrow(l)&&this.eat(o.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=m,this.parseParenArrowList(i,n,l,e);(!l.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?((s=this.startNodeAt(h,c)).expressions=l,this.finishNodeAt(s,"SequenceExpression",g,v)):s=l[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var x=this.startNodeAt(i,n);return x.expression=s,this.finishNode(x,"ParenthesizedExpression")}return s},y.parseParenItem=function(t){return t},y.parseParenArrowList=function(t,e,s,i){return this.parseArrowExpression(this.startNodeAt(t,e),s,!1,i)};var mi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var s=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(o.parenL)?t.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):t.arguments=mi,this.finishNode(t,"NewExpression")},y.parseTemplateElement=function(t){var e=t.isTagged,s=this.startNode();return this.type===o.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===o.backQuote,this.finishNode(s,"TemplateElement")},y.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(s.quasis=[i];!i.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(o.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(s,"TemplateLiteral")},y.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!H.test(this.input.slice(this.lastTokEnd,this.start))},y.parseObj=function(t,e){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var r=this.parseProperty(t,e);t||this.checkPropClash(r,n,e),s.properties.push(r)}return this.finishNode(s,t?"ObjectPattern":"ObjectExpression")},y.parseProperty=function(t,e){var s,i,n,r,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return t?(a.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,e),this.type===o.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(t||e)&&(n=this.start,r=this.startLoc),t||(s=this.eat(o.star)));var h=this.containsEsc;return this.parsePropertyName(a),!t&&!h&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(a)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(a)):i=!1,this.parsePropertyValue(a,t,s,i,n,r,e,h),this.finishNode(a,"Property")},y.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var s="get"===t.kind?0:1;if(t.value.params.length!==s){var i=t.value.start;"get"===t.kind?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},y.parsePropertyValue=function(t,e,s,i,n,r,a,h){(s||i)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(s,i),t.kind="init"):e||h||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===o.comma||this.type===o.braceR||this.type===o.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(t.key),"await"===t.key.name&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,r,this.copyNode(t.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,r,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(t))},y.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(o.bracketR),t.key;t.computed=!1}return t.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},y.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},y.parseMethod=function(t,e,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ye(e,i.generator)|Ne|(s?yt:0)),this.expect(o.parenL),i.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")},y.parseArrowExpression=function(t,e,s,i){var n=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(Ye(s,!1)|Qe),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=a,this.finishNode(t,"ArrowFunctionExpression")},y.parseFunctionBody=function(t,e,s,i){var n=e&&this.type!==o.braceL,r=this.strict,a=!1;if(n)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var h=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!r||h)&&((a=this.strictDirective(this.end))&&h&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(t,!r&&!a&&!e&&!s&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,Et),t.body=this.parseBlock(!1,void 0,a&&!r),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=c}this.exitScope()},y.isSimpleParamList=function(t){for(var e=0,s=t;e<s.length;e+=1){if("Identifier"!==s[e].type)return!1}return!0},y.checkParams=function(t,e){for(var s=Object.create(null),i=0,n=t.params;i<n.length;i+=1){var r=n[i];this.checkLValInnerPattern(r,Ze,e?null:s)}},y.parseExprList=function(t,e,s,i){for(var n=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(o.comma),e&&this.afterTrailingComma(t))break;var a=void 0;s&&this.type===o.comma?a=null:this.type===o.ellipsis?(a=this.parseSpread(i),i&&this.type===o.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):a=this.parseMaybeAssign(!1,i),n.push(a)}return n},y.checkUnreserved=function(t){var e=t.start,s=t.end,i=t.name;(this.inGenerator&&"yield"===i&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Re)&&"arguments"===i&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&("arguments"===i||"await"===i)&&this.raise(e,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(e,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,s).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(!this.inAsync&&"await"===i&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+i+"' is reserved"))},y.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"===e.name&&!this.awaitIdentPos&&(this.awaitIdentPos=e.start)),e},y.parseIdentNode=function(){var t=this.startNode();return this.type===o.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,("class"===t.name||"function"===t.name)&&(this.lastTokEnd!==this.lastTokStart+1||46!==this.input.charCodeAt(this.lastTokStart))&&this.context.pop(),this.type=o.name):this.unexpected(),t},y.parsePrivateIdent=function(){var t=this.startNode();return this.type===o.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},y.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(o.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},y.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Pe=T.prototype;Pe.raise=function(t,e){var s=gt(this.input,t);e+=" ("+s.line+":"+s.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var i=new SyntaxError(e);throw i.pos=t,i.loc=s,i.raisedAt=this.pos,i},Pe.raiseRecoverable=Pe.raise,Pe.curPosition=function(){if(this.options.locations)return new Ce(this.curLine,this.pos-this.lineStart)};var ne=T.prototype,xi=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ne.enterScope=function(t){this.scopeStack.push(new xi(t))},ne.exitScope=function(){this.scopeStack.pop()},ne.treatFunctionsAsVarInScope=function(t){return t.flags&ge||!this.inModule&&t.flags&Se},ne.declareName=function(t,e,s){var i=!1;if(e===ie){var n=this.currentScope();i=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&n.flags&Se&&delete this.undefinedExports[t]}else if(e===St){this.currentScope().lexical.push(t)}else if(e===Ct){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(t)>-1:r.lexical.indexOf(t)>-1||r.var.indexOf(t)>-1,r.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(t)>-1&&!(o.flags&bt&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){i=!0;break}if(o.var.push(t),this.inModule&&o.flags&Se&&delete this.undefinedExports[t],o.flags&Re)break}i&&this.raiseRecoverable(s,"Identifier '"+t+"' has already been declared")},ne.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ne.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Re|Ee|ce))return e}},ne.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Re|Ee|ce)&&!(e.flags&Qe))return e}};var Ve=function(t,e,s){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new Te(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},we=T.prototype;function kt(t,e,s,i){return t.type=e,t.end=s,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=s),t}we.startNode=function(){return new Ve(this,this.start,this.startLoc)},we.startNodeAt=function(t,e){return new Ve(this,t,e)},we.finishNode=function(t,e){return kt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},we.finishNodeAt=function(t,e,s,i){return kt.call(this,t,e,s,i)},we.copyNode=function(t){var e=new Ve(this,t.start,this.startLoc);for(var s in t)e[s]=t[s];return e};var gi="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",At="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",Pt=At+" Extended_Pictographic",It=Pt,Tt=Pt+" EBase EComp EMod EPres ExtPict",Nt=Tt,vi=Tt,bi={9:At,10:Pt,11:Pt,12:Tt,13:Tt,14:vi},yi="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ci={9:"",10:"",11:"",12:"",13:"",14:yi},nt="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",Rt="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",Lt=Rt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Vt=Lt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ot=Vt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Mt=Ot+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Si=Mt+" "+gi,Ei={9:Rt,10:Lt,11:Vt,12:Ot,13:Mt,14:Si},Ft={};function wi(t){var e=Ft[t]={binary:se(bi[t]+" "+nt),binaryOfStrings:se(Ci[t]),nonBinary:{General_Category:se(nt),Script:se(Ei[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var De=0,at=[9,10,11,12,13,14];De<at.length;De+=1){var _i=at[De];wi(_i)}var v=T.prototype,Ie=function(t,e){this.parent=t,this.base=e||this};Ie.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var s=t;s;s=s.parent)if(e.base===s.base&&e!==s)return!0;return!1},Ie.prototype.sibling=function(){return new Ie(this.parent,this.base)};var Z=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=Ft[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};function ki(t){for(var e in t)return!0;return!1}function Ai(t){return 105===t||109===t||115===t}function Dt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Pi(t){return Q(t,!0)||36===t||95===t}function Ii(t){return re(t,!0)||36===t||95===t||8204===t||8205===t}function Bt(t){return t>=65&&t<=90||t>=97&&t<=122}function Ti(t){return t>=0&&t<=1114111}Z.prototype.reset=function(t,e,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|t,this.source=e+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Z.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Z.prototype.at=function(t,e){void 0===e&&(e=!1);var s=this.source,i=s.length;if(t>=i)return-1;var n=s.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=i)return n;var r=s.charCodeAt(t+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},Z.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var s=this.source,i=s.length;if(t>=i)return i;var n,r=s.charCodeAt(t);return!e&&!this.switchU||r<=55295||r>=57344||t+1>=i||(n=s.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Z.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Z.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Z.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Z.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Z.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var s=this.pos,i=0,n=t;i<n.length;i+=1){var r=n[i],a=this.at(s,e);if(-1===a||a!==r)return!1;s=this.nextIndex(s,e)}return this.pos=s,!0},v.validateRegExpFlags=function(t){for(var e=t.validFlags,s=t.flags,i=!1,n=!1,r=0;r<s.length;r++){var a=s.charAt(r);-1===e.indexOf(a)&&this.raise(t.start,"Invalid regular expression flag"),s.indexOf(a,r+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===a&&(i=!0),"v"===a&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(t.start,"Invalid regular expression flag")},v.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&ki(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},v.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,s=t.backReferenceNames;e<s.length;e+=1){var i=s[e];t.groupNames[i]||t.raise("Invalid named capture referenced")}},v.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Ie(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},v.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},v.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},v.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var s=!1;if(this.options.ecmaVersion>=9&&(s=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!s,!0}return t.pos=e,!1},v.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},v.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},v.regexp_eatBracedQuantifier=function(t,e){var s=t.pos;if(t.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<i&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=s}return!1},v.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},v.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},v.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var s=this.regexp_eatModifiers(t),i=t.eat(45);if(s||i){for(var n=0;n<s.length;n++){var r=s.charAt(n);s.indexOf(r,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(i){var a=this.regexp_eatModifiers(t);!s&&!a&&58===t.current()&&t.raise("Invalid regular expression modifiers");for(var o=0;o<a.length;o++){var h=a.charAt(o);(a.indexOf(h,o+1)>-1||s.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},v.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},v.regexp_eatModifiers=function(t){for(var e="",s=0;-1!==(s=t.current())&&Ai(s);)e+=ee(s),t.advance();return e},v.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},v.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},v.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Dt(e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatPatternCharacters=function(t){for(var e=t.pos,s=0;-1!==(s=t.current())&&!Dt(s);)t.advance();return t.pos!==e},v.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},v.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,s=t.groupNames[t.lastStringValue];if(s)if(e)for(var i=0,n=s;i<n.length;i+=1){n[i].separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(s||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},v.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},v.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=ee(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=ee(t.lastIntValue);return!0}return!1},v.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,s=this.options.ecmaVersion>=11,i=t.current(s);return t.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t,s)&&(i=t.lastIntValue),Pi(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},v.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,s=this.options.ecmaVersion>=11,i=t.current(s);return t.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t,s)&&(i=t.lastIntValue),Ii(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},v.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},v.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var s=t.lastIntValue;if(t.switchU)return s>t.maxBackReference&&(t.maxBackReference=s),!0;if(s<=t.numCapturingParens)return!0;t.pos=e}return!1},v.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},v.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},v.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},v.regexp_eatZero=function(t){return 48===t.current()&&!Oe(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},v.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},v.regexp_eatControlLetter=function(t){var e=t.current();return!!Bt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},v.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var s=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(i&&n>=55296&&n<=56319){var r=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(n-55296)+(a-56320)+65536,!0}t.pos=r,t.lastIntValue=n}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&Ti(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=s}return!1},v.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};var Ht=0,te=1,W=2;function Ni(t){return 100===t||68===t||115===t||83===t||119===t||87===t}function Ut(t){return Bt(t)||95===t}function Ri(t){return Ut(t)||Oe(t)}function Li(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}function Vi(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}function Oi(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}function Oe(t){return t>=48&&t<=57}function jt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function qt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Wt(t){return t>=48&&t<=55}v.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(Ni(e))return t.lastIntValue=-1,t.advance(),te;var s=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((s=80===e)||112===e)){var i;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return s&&i===W&&t.raise("Invalid property name"),i;t.raise("Invalid property name")}return Ht},v.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var s=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,s,i),te}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,n)}return Ht},v.regexp_validateUnicodePropertyNameAndValue=function(t,e,s){xe(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(s)||t.raise("Invalid property value")},v.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?te:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?W:void t.raise("Invalid property name")},v.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Ut(e=t.current());)t.lastStringValue+=ee(e),t.advance();return""!==t.lastStringValue},v.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ri(e=t.current());)t.lastStringValue+=ee(e),t.advance();return""!==t.lastStringValue},v.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},v.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),s=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&s===W&&t.raise("Negated character class may contain strings"),!0}return!1},v.regexp_classContents=function(t){return 93===t.current()?te:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),te)},v.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var s=t.lastIntValue;t.switchU&&(-1===e||-1===s)&&t.raise("Invalid character class"),-1!==e&&-1!==s&&e>s&&t.raise("Range out of order in character class")}}},v.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var s=t.current();(99===s||Wt(s))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return 93!==i&&(t.lastIntValue=i,t.advance(),!0)},v.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},v.regexp_classSetExpression=function(t){var e,s=te;if(!this.regexp_eatClassSetRange(t))if(e=this.regexp_eatClassSetOperand(t)){e===W&&(s=W);for(var i=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?e!==W&&(s=te):t.raise("Invalid character in character class");if(i!==t.pos)return s;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(i!==t.pos)return s}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return s;e===W&&(s=W)}},v.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;return-1!==s&&-1!==i&&s>i&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},v.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?te:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},v.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var s=t.eat(94),i=this.regexp_classContents(t);if(t.eat(93))return s&&i===W&&t.raise("Negated character class may contain strings"),i;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},v.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var s=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return s}else t.raise("Invalid escape");t.pos=e}return null},v.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===W&&(e=W);return e},v.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?te:W},v.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var s=t.current();return!(s<0||s===t.lookahead()&&Li(s)||Vi(s))&&(t.advance(),t.lastIntValue=s,!0)},v.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!Oi(e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Oe(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},v.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},v.regexp_eatDecimalDigits=function(t){var e=t.pos,s=0;for(t.lastIntValue=0;Oe(s=t.current());)t.lastIntValue=10*t.lastIntValue+(s-48),t.advance();return t.pos!==e},v.regexp_eatHexDigits=function(t){var e=t.pos,s=0;for(t.lastIntValue=0;jt(s=t.current());)t.lastIntValue=16*t.lastIntValue+qt(s),t.advance();return t.pos!==e},v.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var s=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*s+t.lastIntValue:t.lastIntValue=8*e+s}else t.lastIntValue=e;return!0}return!1},v.regexp_eatOctalDigit=function(t){var e=t.current();return Wt(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},v.regexp_eatFixedHexDigits=function(t,e){var s=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var n=t.current();if(!jt(n))return t.pos=s,!1;t.lastIntValue=16*t.lastIntValue+qt(n),t.advance()}return!0};var et=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Te(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},_=T.prototype;function Mi(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function Kt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}_.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new et(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},_.getToken=function(){return this.next(),new et(this)},typeof Symbol<"u"&&(_[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===o.eof,value:e}}}}),_.nextToken=function(){var t=this.curContext();return(!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(o.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},_.readToken=function(t){return Q(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},_.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888},_.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=e;(i=dt(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,s),e,this.pos,t,this.curPosition())},_.skipLineComment=function(t){for(var e=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!me(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,s,this.curPosition())},_.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++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 t}break;default:if(!(t>8&&t<14||t>=5760&&mt.test(String.fromCharCode(t))))break t;++this.pos}}},_.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=t,this.value=e,this.updateContext(s)},_.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))},_.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(o.assign,2):this.finishOp(o.slash,1)},_.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),s=1,i=42===t?o.star:o.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++s,i=o.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(o.assign,s+1):this.finishOp(i,s)},_.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(o.assign,3);return this.finishOp(124===t?o.logicalOR:o.logicalAND,2)}return 61===e?this.finishOp(o.assign,2):this.finishOp(124===t?o.bitwiseOR:o.bitwiseAND,1)},_.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)},_.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!H.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(o.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},_.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(o.assign,s+1):this.finishOp(o.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(s=2),this.finishOp(o.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},_.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(61===t?o.eq:o.prefix,1)},_.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(o.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(o.assign,3);return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)},_.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,Q(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ee(t)+"'")},_.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)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(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ee(t)+"'")},_.finishOp=function(t,e){var s=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,s)},_.readRegexp=function(){for(var t,e,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(H.test(i)&&this.raise(s,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(r);var h=this.regexpState||(this.regexpState=new Z(this));h.reset(s,n,a),this.validateRegExpFlags(h),this.validateRegExpPattern(h);var c=null;try{c=new RegExp(n,a)}catch{}return this.finishToken(o.regexp,{pattern:n,flags:a,value:c})},_.readInt=function(t,e,s){for(var i=this.options.ecmaVersion>=12&&void 0===e,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,a=0,o=0,h=0,c=e??1/0;h<c;++h,++this.pos){var l=this.input.charCodeAt(this.pos),p=void 0;if(i&&95===l)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=l;else{if((p=l>=97?l-97+10:l>=65?l-65+10:l>=48&&l<=57?l-48:1/0)>=t)break;o=l,a=a*t+p}}return i&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=e&&this.pos-r!==e?null:a},_.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var s=this.readInt(t);return null==s&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=Kt(this.input.slice(e,this.pos)),++this.pos):Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)},_.readNumber=function(t){var e=this.pos;!t&&null===this.readInt(10,void 0,!0)&&this.raise(e,"Invalid number");var s=this.pos-e>=2&&48===this.input.charCodeAt(e);s&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!t&&this.options.ecmaVersion>=11&&110===i){var n=Kt(this.input.slice(e,this.pos));return++this.pos,Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,n)}s&&/[89]/.test(this.input.slice(e,this.pos))&&(s=!1),46===i&&!s&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(69===i||101===i)&&!s&&((43===(i=this.input.charCodeAt(++this.pos))||45===i)&&++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r=Mi(this.input.slice(e,this.pos),s);return this.finishToken(o.num,r)},_.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},_.readString=function(t){for(var e="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.pos),e+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(me(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(s,this.pos++),this.finishToken(o.string,e)};var $t={};_.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==$t)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},_.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw $t;this.raise(t,e)},_.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==o.template&&this.type!==o.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(o.template,t)):36===s?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote));if(92===s)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(me(s)){switch(t+=this.input.slice(e,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},_.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(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},_.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ee(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++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"),t){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),("0"!==i||56===e||57===e)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return me(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},_.readHexChar=function(t){var e=this.pos,s=this.readInt(16,t);return null===s&&this.invalidStringToken(e,"Bad character escape sequence"),s},_.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(re(n,i))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(s,this.pos);var r=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(e?Q:re)(a,i)||this.invalidStringToken(r,"Invalid Unicode escape"),t+=ee(a),s=this.pos}e=!1}return t+this.input.slice(s,this.pos)},_.readWord=function(){var t=this.readWord1(),e=o.name;return this.keywords.test(t)&&(e=Ge[t]),this.finishToken(e,t)};var Fi="8.15.0";function Be(t,e){return T.parse(t,e)}function Di(t,e,s){return T.parseExpressionAt(t,e,s)}function He(t,e,s,i,n){var r=[];s||(s=d),function t(i,n,a){var o=a||i.type,h=i!==r[r.length-1];h&&r.push(i),s[o](i,n,t),e[o]&&e[o](i,n||r,r),h&&r.pop()}(t,i,n)}function tt(t,e,s){s(t,e)}function he(t,e,s){}T.acorn={Parser:T,version:Fi,defaultOptions:qe,Position:Ce,SourceLocation:Te,getLineInfo:gt,Node:Ve,TokenType:A,tokTypes:o,keywordTypes:Ge,TokContext:z,tokContexts:P,isIdentifierChar:re,isIdentifierStart:Q,Token:et,isNewLine:me,lineBreak:H,lineBreakG:ni,nonASCIIwhitespace:mt};var d={};d.Program=d.BlockStatement=d.StaticBlock=function(t,e,s){for(var i=0,n=t.body;i<n.length;i+=1){s(n[i],e,"Statement")}},d.Statement=tt,d.EmptyStatement=he,d.ExpressionStatement=d.ParenthesizedExpression=d.ChainExpression=function(t,e,s){return s(t.expression,e,"Expression")},d.IfStatement=function(t,e,s){s(t.test,e,"Expression"),s(t.consequent,e,"Statement"),t.alternate&&s(t.alternate,e,"Statement")},d.LabeledStatement=function(t,e,s){return s(t.body,e,"Statement")},d.BreakStatement=d.ContinueStatement=he,d.WithStatement=function(t,e,s){s(t.object,e,"Expression"),s(t.body,e,"Statement")},d.SwitchStatement=function(t,e,s){s(t.discriminant,e,"Expression");for(var i=0,n=t.cases;i<n.length;i+=1){s(n[i],e)}},d.SwitchCase=function(t,e,s){t.test&&s(t.test,e,"Expression");for(var i=0,n=t.consequent;i<n.length;i+=1){s(n[i],e,"Statement")}},d.ReturnStatement=d.YieldExpression=d.AwaitExpression=function(t,e,s){t.argument&&s(t.argument,e,"Expression")},d.ThrowStatement=d.SpreadElement=function(t,e,s){return s(t.argument,e,"Expression")},d.TryStatement=function(t,e,s){s(t.block,e,"Statement"),t.handler&&s(t.handler,e),t.finalizer&&s(t.finalizer,e,"Statement")},d.CatchClause=function(t,e,s){t.param&&s(t.param,e,"Pattern"),s(t.body,e,"Statement")},d.WhileStatement=d.DoWhileStatement=function(t,e,s){s(t.test,e,"Expression"),s(t.body,e,"Statement")},d.ForStatement=function(t,e,s){t.init&&s(t.init,e,"ForInit"),t.test&&s(t.test,e,"Expression"),t.update&&s(t.update,e,"Expression"),s(t.body,e,"Statement")},d.ForInStatement=d.ForOfStatement=function(t,e,s){s(t.left,e,"ForInit"),s(t.right,e,"Expression"),s(t.body,e,"Statement")},d.ForInit=function(t,e,s){"VariableDeclaration"===t.type?s(t,e):s(t,e,"Expression")},d.DebuggerStatement=he,d.FunctionDeclaration=function(t,e,s){return s(t,e,"Function")},d.VariableDeclaration=function(t,e,s){for(var i=0,n=t.declarations;i<n.length;i+=1){s(n[i],e)}},d.VariableDeclarator=function(t,e,s){s(t.id,e,"Pattern"),t.init&&s(t.init,e,"Expression")},d.Function=function(t,e,s){t.id&&s(t.id,e,"Pattern");for(var i=0,n=t.params;i<n.length;i+=1){s(n[i],e,"Pattern")}s(t.body,e,t.expression?"Expression":"Statement")},d.Pattern=function(t,e,s){"Identifier"===t.type?s(t,e,"VariablePattern"):"MemberExpression"===t.type?s(t,e,"MemberPattern"):s(t,e)},d.VariablePattern=he,d.MemberPattern=tt,d.RestElement=function(t,e,s){return s(t.argument,e,"Pattern")},d.ArrayPattern=function(t,e,s){for(var i=0,n=t.elements;i<n.length;i+=1){var r=n[i];r&&s(r,e,"Pattern")}},d.ObjectPattern=function(t,e,s){for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];"Property"===r.type?(r.computed&&s(r.key,e,"Expression"),s(r.value,e,"Pattern")):"RestElement"===r.type&&s(r.argument,e,"Pattern")}},d.Expression=tt,d.ThisExpression=d.Super=d.MetaProperty=he,d.ArrayExpression=function(t,e,s){for(var i=0,n=t.elements;i<n.length;i+=1){var r=n[i];r&&s(r,e,"Expression")}},d.ObjectExpression=function(t,e,s){for(var i=0,n=t.properties;i<n.length;i+=1){s(n[i],e)}},d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration,d.SequenceExpression=function(t,e,s){for(var i=0,n=t.expressions;i<n.length;i+=1){s(n[i],e,"Expression")}},d.TemplateLiteral=function(t,e,s){for(var i=0,n=t.quasis;i<n.length;i+=1){s(n[i],e)}for(var r=0,a=t.expressions;r<a.length;r+=1){s(a[r],e,"Expression")}},d.TemplateElement=he,d.UnaryExpression=d.UpdateExpression=function(t,e,s){s(t.argument,e,"Expression")},d.BinaryExpression=d.LogicalExpression=function(t,e,s){s(t.left,e,"Expression"),s(t.right,e,"Expression")},d.AssignmentExpression=d.AssignmentPattern=function(t,e,s){s(t.left,e,"Pattern"),s(t.right,e,"Expression")},d.ConditionalExpression=function(t,e,s){s(t.test,e,"Expression"),s(t.consequent,e,"Expression"),s(t.alternate,e,"Expression")},d.NewExpression=d.CallExpression=function(t,e,s){if(s(t.callee,e,"Expression"),t.arguments)for(var i=0,n=t.arguments;i<n.length;i+=1){s(n[i],e,"Expression")}},d.MemberExpression=function(t,e,s){s(t.object,e,"Expression"),t.computed&&s(t.property,e,"Expression")},d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(t,e,s){t.declaration&&s(t.declaration,e,"ExportNamedDeclaration"===t.type||t.declaration.id?"Statement":"Expression"),t.source&&s(t.source,e,"Expression")},d.ExportAllDeclaration=function(t,e,s){t.exported&&s(t.exported,e),s(t.source,e,"Expression")},d.ImportDeclaration=function(t,e,s){for(var i=0,n=t.specifiers;i<n.length;i+=1){s(n[i],e)}s(t.source,e,"Expression")},d.ImportExpression=function(t,e,s){s(t.source,e,"Expression")},d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.PrivateIdentifier=d.Literal=he,d.TaggedTemplateExpression=function(t,e,s){s(t.tag,e,"Expression"),s(t.quasi,e,"Expression")},d.ClassDeclaration=d.ClassExpression=function(t,e,s){return s(t,e,"Class")},d.Class=function(t,e,s){t.id&&s(t.id,e,"Pattern"),t.superClass&&s(t.superClass,e,"Expression"),s(t.body,e)},d.ClassBody=function(t,e,s){for(var i=0,n=t.body;i<n.length;i+=1){s(n[i],e)}},d.MethodDefinition=d.PropertyDefinition=d.Property=function(t,e,s){t.computed&&s(t.key,e,"Expression"),t.value&&s(t.value,e,"Expression")};class U{static pruneCache(t){t.size>this.MAX_CACHE_SIZE&&Array.from(t.keys()).slice(0,t.size-this.MAX_CACHE_SIZE/2).forEach(e=>t.delete(e))}static clearCaches(){this.expressionCache.clear(),this.variableCache.clear(),this.bindingsCache.clear(),this.loopVariableCache.clear()}static extractStateBindings(t){if(this.bindingsCache.has(t))return[...this.bindingsCache.get(t)];const e=new Set;try{He(Be(t,{ecmaVersion:2020}),{FunctionDeclaration(t,s){s.length<=2&&t.id&&t.id.name&&e.add(t.id.name)},VariableDeclaration(t,s){s.length>2||t.declarations.forEach(t=>{var s,i,n,r,a;"CallExpression"!==(null==(s=t.init)?void 0:s.type)||"pp"!==(null==(n=null==(i=t.init.callee)?void 0:i.object)?void 0:n.name)||"state"!==(null==(a=null==(r=t.init.callee)?void 0:r.property)?void 0:a.name)?("Identifier"===t.id.type&&e.add(t.id.name),"ObjectPattern"===t.id.type&&t.id.properties.forEach(t=>{var s,i;"Property"===t.type&&"Identifier"===(null==(s=t.value)?void 0:s.type)&&e.add(t.value.name),"RestElement"===t.type&&"Identifier"===(null==(i=t.argument)?void 0:i.type)&&e.add(t.argument.name)})):"ArrayPattern"===t.id.type&&t.id.elements.forEach(t=>{"Identifier"===(null==t?void 0:t.type)&&e.add(t.name)})})}})}catch(t){console.error("[PP-ERROR] AstParser Failed",t)}const s=Array.from(e);return this.pruneCache(this.bindingsCache),this.bindingsCache.set(t,s),s}static extractUsedVariables(t,e){const s=t+"|"+Array.from(e).sort().join(",");if(this.variableCache.has(s))return new Set(this.variableCache.get(s));const i=new Set;try{He(Be(`(${t})`,{ecmaVersion:2020}),{Identifier(t,s){if(!e.has(t.name)){if(s.length>1){const e=s[s.length-2];if("MemberExpression"===e.type&&e.property===t&&!e.computed||"Property"===e.type&&e.key===t&&!e.computed&&!e.shorthand)return}i.add(t.name)}}})}catch{}return this.pruneCache(this.variableCache),this.variableCache.set(s,i),new Set(i)}static isValidExpression(t){if(!t.trim())return!1;if(this.expressionCache.has(t))return this.expressionCache.get(t);let e=!1;try{Di(`(${t})`,0,{ecmaVersion:2020}),e=!0}catch{e=!1}return this.pruneCache(this.expressionCache),this.expressionCache.set(t,e),e}static analyzeLoopVariableUsage(t,e){const s=t+"|"+e;if(this.loopVariableCache.has(s))return[...this.loopVariableCache.get(s)];const i=[];try{He(Be(t,{ecmaVersion:2020}),{Identifier(t,s){if(t.name!==e)return;let n=!1,r=!1,a=t.start,o=t.end;if(s.length>=2){const e=s[s.length-2];if("MemberExpression"===e.type&&e.property===t&&!e.computed||"Property"===e.type&&e.key===t&&!e.computed&&!e.shorthand)return;if("Property"===e.type&&e.shorthand&&(n=!0,s.length>=3)){const t=s[s.length-3];"ObjectExpression"===t.type&&1===t.properties.length&&(r=!0,a=t.start,o=t.end)}}i.push({start:a,end:o,isShorthand:n,isUnwrap:r})}})}catch{}return this.pruneCache(this.loopVariableCache),this.loopVariableCache.set(s,i),[...i]}}g(U,"expressionCache",new Map),g(U,"variableCache",new Map),g(U,"bindingsCache",new Map),g(U,"loopVariableCache",new Map),g(U,"MAX_CACHE_SIZE",1e3);const ot=new Set(["class","for","while","if","else","return","function","var","let","const","import","export","this","debugger","delete","typeof","void","new","in","instanceof","do","try","catch","finally","switch","case","default","break","continue","yield","await","with","super","enum","extends","implements","interface","package","private","protected","public","static"]),Bi=new Set(["Array","Object","String","Number","Boolean","Math","JSON","Date","RegExp","Error","Map","Set","WeakMap","WeakSet","Promise","Symbol","BigInt","parseInt","parseFloat","isNaN","isFinite","encodeURI","decodeURI","encodeURIComponent","decodeURIComponent","console","window","document","undefined","null","NaN","Infinity","pp","true","false","setTimeout","setInterval","clearTimeout","clearInterval","requestAnimationFrame","cancelAnimationFrame","fetch","alert","confirm","prompt"]),zt=new Set(["hidden","disabled","checked","selected","readonly","required","open","autofocus","multiple","ismap","noValidate","defer","async","autoplay","controls","loop","muted","default","reversed","scoped","seamless","sortable","translate","draggable","contenteditable","spellcheck"]);function ut(t){return t.includes("-")?t.replace(/-([a-z])/g,t=>t[1].toUpperCase()):t}const pe=new Map,Hi=500;let Ue=null;function J(t){if(!t.includes("&"))return t;if(pe.has(t))return pe.get(t);Ue||(Ue=document.createElement("textarea"));const e=Ue;e.innerHTML=t;let s=e.value,i=0;for(;s.includes("&")&&i++<10;){e.innerHTML=s;const t=e.value;if(t===s)break;s=t}if(pe.size>=Hi){const t=pe.keys().next().value;void 0!==t&&pe.delete(t)}return pe.set(t,s),s}function Ui(t,e){if(t===e)return!0;if(!t||!e||"object"!=typeof t||"object"!=typeof e)return!1;const s=Object.keys(t),i=s.length;let n=0;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(n++,n>i))return!1;if(n!==i)return!1;for(let n=0;n<i;n++){const i=s[n];if(t[i]!==e[i])return!1}return!0}class de{static clearCache(){this.cache.clear()}static pruneCache(){if(this.cache.size>this.MAX_CACHE_SIZE){const t=this.cache.size-Math.floor(this.MAX_CACHE_SIZE/2);let e=0;for(const s of this.cache.keys()){if(e>=t)break;this.cache.delete(s),e++}}}static transformSpreadAttributes(t){const e=new Map;let s=0;const i=document.createElement("template");i.innerHTML=t;const n=t=>{if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(Array.from(i.childNodes).forEach(n),i.hasAttribute("pp-spread")){const t=i.getAttribute("pp-spread")||"";i.removeAttribute("pp-spread");const n=t.match(/^\s*\{\s*\.\.\.(.+?)\s*\}\s*$/);if(n){const t=J(n[1].trim()),r=`___pp_spread_${s++}___`,a=`\${ (() => {\n const __obj = ${t};\n if (!__obj || typeof __obj !== 'object') return '';\n return Object.entries(__obj)\n .map(([k, v]) => {\n if (v == null) return '';\n const __escapedValue = String(v)\n .split('&').join('&')\n .split('"').join('"')\n .split('<').join('<');\n return k + '="' + __escapedValue + '"';\n })\n .filter(Boolean)\n .join(' ');\n })() }`;e.set(r,a),i.setAttribute(r,"")}}}};return Array.from(i.content.childNodes).forEach(n),{html:i.innerHTML,spreadReplacements:e}}static expandSpreadPlaceholders(t,e){let s=t;return e.forEach((t,e)=>{s=s.split(`${e}=""`).join(t),s=s.split(e).join(t)}),s}static transformRefAttributes(t){if(!t.includes("pp-ref"))return t;const e=document.createElement("template");e.innerHTML=t;const s=document.createTreeWalker(e.content,NodeFilter.SHOW_ELEMENT);let i=s.nextNode();for(;i;){const t=i;if(t.hasAttribute("pp-ref")){const e=(t.getAttribute("pp-ref")||"").match(/^\s*\{([\s\S]+)\}\s*$/);if(e){const s=J(e[1].trim());t.removeAttribute("pp-ref"),t.setAttribute("data-pp-ref",`{ __pp_ref(${s}) }`)}}i=s.nextNode()}return e.innerHTML}static transformComponentTags(t){const e=document.createElement("template");e.innerHTML=t;const s=t=>{if(t.nodeType!==Node.ELEMENT_NODE)return;const e=t,i=e.tagName.toLowerCase();if(Array.from(e.childNodes).forEach(s),i.includes(".")){const t=document.createDocumentFragment();for(t.appendChild(document.createTextNode(`{${i}}`));e.firstChild;)t.appendChild(e.firstChild);e.replaceWith(t)}};return Array.from(e.content.childNodes).forEach(s),e.innerHTML}static compile(t,e){const s=(t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),i=t=>{let e=2166136261;for(let s=0;s<t.length;s++)e^=t.charCodeAt(s),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e.toString(16).padStart(8,"0")},n=e.join("\0"),r=`t${i(s)}|k${i(n)}|n${e.length}`;if(this.cache.has(r))return this.cache.get(r);const{maskedTemplate:a,placeholders:o}=this.maskComplexComponents(s),{maskedHtml:h,placeholders:c}=this.maskLiteralElements(a,"style","STYLE"),l=this.transformComponentTags(h),{html:p,spreadReplacements:u}=this.transformSpreadAttributes(l),d=this.transformRefAttributes(p),{html:f,loopReplacements:m}=this.processStructuralDirectives(d);let g=this.transformBooleanAttributes(f);(()=>{let t=!0;for(;t;)t=!1,m.forEach((e,s)=>{const i=g;g=g.split("${"+s+"}").join("${"+e+"}"),g=g.split(s).join("{ "+e+" }"),g!==i&&(t=!0)})})();const v=new Set;let x="return `",y=0,b="";for(;y<g.length;){const t=g[y];if("`"!==t){if("o"===t||"O"===t){const t=g.slice(y,y+20).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(t){const e=g.slice(y,y+t[0].length),s=e[e.length-1];let i=y+t[0].length;for(;i<g.length&&(g[i]!==s||"\\"===g[i-1]);)i++;b+=g.slice(y,i+1),y=i+1;continue}}if("{"===t){const t=this.findClosingBrace(g,y);if(-1!==t){const e=g.slice(y+1,t),s=J(e);if(U.isValidExpression(s)){x+=b,b="";const e=U.extractUsedVariables(s,Bi);for(const t of e)/^___PP_LOOP_\d+___$/.test(t)||v.add(t);const i=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g," ");x+=`\${ (() => {\n try {\n const __res = (${s});\n // React pattern: ignore booleans, null, and undefined\n if (typeof __res === 'boolean' || __res == null) return '';\n // React pattern: join arrays without commas\n if (Array.isArray(__res)) return __res.join('');\n return __res;\n } catch(e) {\n console.error("[PP-ERROR] Template Expression Failed: \\"${i}\\"", e);\n return '';\n }\n })() }`,y=t+1;continue}e.trim().length>0&&console.warn(`[PP-WARN] Interpolation skipped. Invalid Syntax in: "{${s}}"`)}}b+=t,y++}else b+="\\`",y++}x+=b,x+="`;",x=this.expandSpreadPlaceholders(x,u);const E=Array.from(new Set([...e,...v]));try{const t=new Function(...E,x),e=(...e)=>{let s=t(...e);return s=this.restorePlaceholders(s,c),o.forEach((t,e)=>{s=s.replace(e,t)}),s};return this.pruneCache(),this.cache.set(r,e),e}catch(t){return console.error("[PP-ERROR] Compilation Failed",t),()=>"Error in Template"}}static maskLiteralElements(t,e,s){const i=document.createElement("template");i.innerHTML=t;const n=new Map;let r=0;return i.content.querySelectorAll(e).forEach(t=>{const e=`__PP_${s}_${r++}__`;n.set(e,t.outerHTML),t.replaceWith(document.createTextNode(e))}),{maskedHtml:i.innerHTML,placeholders:n}}static restorePlaceholders(t,e){let s=t;return e.forEach((t,e)=>{s=s.replace(e,t)}),s}static transformBooleanAttributes(t){let e="",s=0;for(;s<t.length;){let i=!1;for(const n of zt){const r=`${n}="{`,a=`${n}='{`;if(t.startsWith(r,s)){i=!0;const a=s+r.length-1,o=this.findClosingBrace(t,a);if(-1!==o&&'"'===t[o+1]){e+=`{ (${J(t.slice(a+1,o))}) ? '${n}' : '' }`,s=o+2;break}}else if(t.startsWith(a,s)){i=!0;const r=s+a.length-1,o=this.findClosingBrace(t,r);if(-1!==o&&"'"===t[o+1]){e+=`{ (${J(t.slice(r+1,o))}) ? '${n}' : '' }`,s=o+2;break}}}i||(e+=t[s],s++)}return e}static captureLoopVariablesInEventHandlers(t,e,s,i,n=!1){let r="",a=0;for(;a<t.length;){const o=t.slice(a,a+40).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(o){const h=o[0].length,c=t.slice(a,a+h),l=c[c.length-1],p=a+h;let u=p;for(;u<t.length&&(t[u]!==l||"\\"===t[u-1]);)u++;const d=c.slice(0,-2).trim();let f=t.slice(p,u);f=this.rewriteLoopEventHandlerCode(f,e,s,i,n),r+=`${d}=${l}${f}${l}`,a=u+1;continue}r+=t[a],a++}return r}static rewriteLoopEventHandlerCode(t,e,s,i,n){const r=t.match(/^\{([\s\S]*)\}$/),a=`__PP_LOOP_IDX_${i}__`;let o=r?r[1]:t;return n&&(o=this.replaceLoopIdentifierUsages(o,i,a)),o=this.replaceLoopIdentifierUsages(o,e,`(${s})[${a}]`),o=o.split(a).join(`\${${i}}`),r?`{${o}}`:o}static replaceLoopIdentifierUsages(t,e,s){const i=U.analyzeLoopVariableUsage(t,e).slice().sort((t,e)=>e.start-t.start);if(0===i.length)return t;let n=t;return i.forEach(t=>{const i=t.isShorthand?this.buildShorthandReplacement(e,s,t.isUnwrap):s;n=n.slice(0,t.start)+i+n.slice(t.end)}),n}static buildShorthandReplacement(t,e,s){return s?`{ ${t}: ${e} }`:`${t}: ${e}`}static processStructuralDirectives(t){if(!t.includes("pp-for"))return{html:t,loopReplacements:new Map};const e=document.createElement("template");e.innerHTML=t;const s=new Map;let i=0;const n=t=>{const e=Array.from(t.childNodes);for(const t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;const e=t;if("TEMPLATE"===e.tagName){const t=e;if(n(t.content),t.hasAttribute("pp-for")){const e=t.getAttribute("pp-for")||"",n=e.match(/^\s*\(\s*(.+?)\s*,\s*(.+?)\s*\)\s+in\s+(.+?)\s*$/),r=e.match(/^\s*(.+?)\s+in\s+(.+?)\s*$/);let a,o,h,c=!1;if(n)a=n[1].trim(),o=n[2].trim(),h=n[3].trim(),c=!0;else{if(!r)continue;a=r[1].trim(),h=r[2].trim(),o=`__pp_idx_${i}`}let l=t.innerHTML;l=this.transformComponentTags(l),l=this.transformRefAttributes(l),l=this.captureLoopVariablesInEventHandlers(l,a,h,o,c),l=l.replace(/___PP_LOOP_\d+___/g,t=>"${"+t+"}"),l=l.replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,""),l=this.transformBooleanAttributes(l),l=this.transformInterpolations(l);const p=`(Array.isArray(${h}) ? ${h} : []).map(${`(${a}, ${o})`} => \`${l}\`).join('')`,u=`___PP_LOOP_${i++}___`;s.set(u,p),t.replaceWith(document.createTextNode(u));continue}continue}n(e)}};return n(e.content),{html:e.innerHTML,loopReplacements:s}}static transformInterpolations(t){let e="",s=0;for(;s<t.length;){if("o"===t[s]||"O"===t[s]){const i=t.slice(s,s+20).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(i){const n=t.slice(s,s+i[0].length),r=n[n.length-1];let a=s+i[0].length;for(;a<t.length&&(t[a]!==r||"\\"===t[a-1]);)a++;e+=t.slice(s,a+1),s=a+1;continue}}if("{"===t[s]){if(s>0&&"$"===t[s-1]){e+="{",s++;continue}const i=this.findClosingBrace(t,s);if(-1!==i){const n=J(t.slice(s+1,i));if(U.isValidExpression(n)){e+="${"+n+"}",s=i+1;continue}}}e+=t[s],s++}return e}static maskComplexComponents(t){if(!t.includes("pp-component="))return{maskedTemplate:t,placeholders:new Map};const e=document.createElement("template");e.innerHTML=t;const s=new Map;let i=0;const n=t=>{if(t instanceof Element&&t.hasAttribute("pp-component")&&t.querySelector('script[type="text/pp"]')){const e=`__PP_CHILD_${i++}__`;return s.set(e,t.outerHTML),void t.replaceWith(document.createTextNode(e))}Array.from(t.children).forEach(t=>n(t))};return n(e.content),{maskedTemplate:e.innerHTML,placeholders:s}}static findClosingBrace(t,e){let s=0,i=null;for(let n=e;n<t.length;n++){const e=t[n];let r=!1;if(n>0&&"\\"===t[n-1]){let e=0,s=n-1;for(;s>=0&&"\\"===t[s];)e++,s--;e%2!=0&&(r=!0)}if(i)e===i&&!r&&(i=null);else if(r||'"'!==e&&"'"!==e&&"`"!==e)if("{"!==e||r){if("}"===e&&!r&&(s--,0===s))return n}else s++;else i=e}return-1}}g(de,"cache",new Map),g(de,"MAX_CACHE_SIZE",200);const ct=new Set(["data-state","style"]),ji=["script","domDiff","bindEvents","bindRefs","bootstrapNested","portals","restoreFocus","layoutEffects","effects","total"];function ht(){return typeof performance<"u"&&"function"==typeof performance.now?performance.now():Date.now()}const F=class t{constructor(t){g(this,"el"),g(this,"id"),g(this,"rawTemplate"),g(this,"renderFunction"),g(this,"templateFn",null),g(this,"hooksSystem"),g(this,"eventManager"),g(this,"latestScope",{}),g(this,"__ppRefStore",new Map),g(this,"__ppPrevRefStore",null),g(this,"__ppRefSeq",0),g(this,"isRendering",!1),g(this,"props",{}),g(this,"ownedChildren",new Map),g(this,"lastRenderedHtml",""),g(this,"renderCount",0),g(this,"trackedPortals",new Map),g(this,"parentId",null),g(this,"initialChildrenHtml",""),g(this,"pendingEventElements",new Set),g(this,"traversalCache",null),g(this,"pendingProvidedContexts",new Map),g(this,"pendingContextTokens",new Set),g(this,"contextRefreshPending",!1),g(this,"_lastScopeKeySig",""),g(this,"_lastSortedKeys",[]),g(this,"_cachedHooksAPI",null),g(this,"_propFnCache",new Map),g(this,"_interpolationFnCache",new Map),g(this,"_scopeEvalFnCache",new Map),g(this,"_refEvalFnCache",new Map),this.el=t,this.id=this.el.getAttribute("pp-component")||"",this.id||(this.id="anon_"+Math.random().toString(36).substring(2,9),this.el.setAttribute("pp-component",this.id)),this.props=Array.from(this.el.attributes).reduce((t,e)=>{const s=e.name;if(s.startsWith("on")||"pp-component"===s)return t;const i=ut(s);return ot.has(i)||(t[i]=e.value),t},{}),E.registerInstance(this.id,this),this.syncParentId(),this.props=this.computePropsFromAttributes();let e=E.getTemplate(this.id);const s=E.getOwnedTemplates(this.id);e?s&&(this.ownedChildren=s):(this.extractOwnedTemplates(),e=this.el.innerHTML,E.saveTemplate(this.id,e),E.saveOwnedTemplates(this.id,this.ownedChildren)),this.initialChildrenHtml=e,this.props.children=this.initialChildrenHtml,this.hooksSystem=new Yt(()=>{this.isRendering||this.render()});const i=E.getState(this.id);i&&this.hooksSystem.loadState(i);const n=document.createElement("template");n.innerHTML=this.initialChildrenHtml;const r=this.findOwnScript(n.content),a=(null==r?void 0:r.textContent)||"";r&&r.remove(),this.rawTemplate=n.innerHTML,this.renderFunction=this.createRenderFunction(a),this.eventManager=new Zt(this.el,()=>this.latestScope),this.render()}syncParentId(){var t;const e=null==(t=this.el.parentElement)?void 0:t.closest("[pp-component]");this.parentId=e?e.getAttribute("pp-component"):null,E.saveParent(this.id,this.parentId)}static setPerfEnabled(t){this.perfEnabled=t}static getPerfEnabled(){return this.perfEnabled}static resetPerfStats(){this.perfStats.clear()}static getPerfStats(){return Object.fromEntries(this.perfStats.entries())}static createEmptyPerfEntry(){const t={};return ji.forEach(e=>{t[e]={count:0,totalMs:0,maxMs:0}}),{renderCount:0,phases:t}}recordPerfPhase(e,s){if(!t.perfEnabled)return;let i=t.perfStats.get(this.id);i||(i=t.createEmptyPerfEntry(),t.perfStats.set(this.id,i));const n=i.phases[e];n.count++,n.totalMs+=s,n.maxMs=Math.max(n.maxMs,s)}startPerfTimer(){return t.perfEnabled?ht():0}endPerfTimer(e,s){t.perfEnabled&&this.recordPerfPhase(e,ht()-s)}findOwnScript(t){const e=Array.from(t.children);for(const t of e){if("script"===t.tagName.toLowerCase()&&"text/pp"===t.getAttribute("type"))return t;if(t.hasAttribute("pp-component"))continue;const e=this.findOwnScript(t);if(e)return e}return null}interpolateAttrString(t,e){const s=Object.keys(e),i=s.map(t=>e[t]),n=s.join("\0");return t.replace(/\{([\s\S]*?)\}/g,(t,e)=>{const r=J(String(e).trim());try{const t=this.getCachedFunction(this._interpolationFnCache,r,s,n,300)(...i);return"boolean"==typeof t||null==t?"":Array.isArray(t)?t.join(""):String(t)}catch(t){return console.warn(`[PP-WARN] Failed attribute interpolation for {${r}}`,t),""}})}applyAttributeInterpolations(t,e){const s=Object.keys(e),i=s.map(t=>e[t]),n=s.join("\0");for(const r of Array.from(t.attributes)){const a=r.name;if("pp-component"===a||a.startsWith("on"))continue;const o=r.value;if(!o.includes("{"))continue;if(!/^\s*\{[\s\S]*\}\s*$/.test(o)){const s=this.interpolateAttrString(o,e);s!==o&&t.setAttribute(a,s);continue}const h=o.match(/^\s*\{([\s\S]*)\}\s*$/);if(!h)continue;const c=J(h[1].trim());if(!U.isValidExpression(c))continue;let l;try{l=this.getCachedFunction(this._scopeEvalFnCache,c,s,n,300)(...i)}catch(t){console.error(`[PP-ERROR] Failed to eval "${c}"`,t);continue}if(zt.has(a.toLowerCase())){l?t.setAttribute(a,""):t.removeAttribute(a);continue}const p=typeof l;null==l?t.removeAttribute(a):("string"===p||"number"===p||"boolean"===p||"bigint"===p)&&t.setAttribute(a,String(l))}}computePropsFromAttributes(){const t=this.parentId?E.getScope(this.parentId):void 0,e=t?Object.keys(t):[],s=t?e.map(e=>t[e]):[],i=this.el.__ppRawBindings,n=new Set([...Array.from(this.el.attributes).map(t=>t.name),...i?Object.keys(i):[]]),r=e.join("\0"),a=i=>{if(t)try{const t=i+"|"+r;let n=this._propFnCache.get(t);if(!n){if(n=new Function(...e,`"use strict"; return (${i});`),this._propFnCache.size>200){const t=this._propFnCache.keys().next().value;void 0!==t&&this._propFnCache.delete(t)}this._propFnCache.set(t,n)}return n(...s)}catch(t){return void console.warn(`[PP-WARN] Failed to evaluate prop expression "{${i}}" for component "${this.id}"`,t)}};return Array.from(n).reduce((e,s)=>{if(s.startsWith("on")&&!s.includes("-")||"pp-component"===s)return e;const n=ut(s);if(ot.has(n))return e;const r=this.el.attributes.getNamedItem(s),o=(null==i?void 0:i[s])??(null==r?void 0:r.value);if(void 0===o)return e;if(""===o)return e[n]=!0,e;if(t){const s=o.match(/^\s*\{([\s\S]*)\}\s*$/);if(s){const t=J(s[1].trim());if(U.isValidExpression(t))return e[n]=a(t),e}if(o.includes("{"))return e[n]=this.interpolateAttrString(o,t),e}return e[n]=o,e},{})}refreshPropsFromParent(){const t=this.computePropsFromAttributes();t.children=this.initialChildrenHtml,(!Ui(this.props,t)||0!==this.ownedChildren.size)&&(this.props=t,this.isRendering||this.render())}extractOwnedTemplates(){const t=this.el.querySelectorAll("template[pp-owner]");let e=0;t.forEach(t=>{var s;if((null==(s=t.parentElement)?void 0:s.closest("[pp-component]"))!==this.el)return;const i=t.getAttribute("pp-owner");if(i&&i!==this.id){const s=`__PP_OWNED_${this.id}_${e++}__`;this.ownedChildren.set(s,{ownerId:i,content:t.innerHTML});const n=document.createTextNode(s);t.replaceWith(n)}})}maskNestedOwnedTemplates(t){const e=new Map,s=document.createElement("template");s.innerHTML=t;let i=0;const n=s.content.querySelectorAll("[pp-component] > template[pp-owner]");for(const t of Array.from(n)){const s=`__PP_NESTED_TPL_${i++}__`;e.set(s,t.outerHTML),t.replaceWith(document.createTextNode(s))}return{content:s.innerHTML,placeholders:e}}resolveOwnedChildren(t){if(!t.includes("__PP_OWNED_"))return t;this.ownedChildren.forEach((e,s)=>{const i=E.getScope(e.ownerId);if(i){const{content:n,placeholders:r}=this.maskNestedOwnedTemplates(e.content),a=Object.keys(i),o=a.map(t=>i[t]);let h=de.compile(n,a)(...o);for(const[t,e]of r)h=h.replace(t,e);h=this.markOwnedEventHandlers(h,e.ownerId),t=t.replace(s,h)}else t=t.replace(s,e.content)});const e=/__PP_OWNED_([^_]+(?:_[^_]+)*)_(\d+)__/g;let s;for(;null!==(s=e.exec(t));){const i=s[0],n=s[1],r=E.getOwnedTemplates(n);if(r&&r.has(i)){const s=r.get(i),n=E.getScope(s.ownerId);if(n){const{content:e,placeholders:r}=this.maskNestedOwnedTemplates(s.content),a=Object.keys(n),o=a.map(t=>n[t]);let h=de.compile(e,a)(...o);for(const[t,e]of r)h=h.replace(t,e);h=this.markOwnedEventHandlers(h,s.ownerId),t=t.replace(i,h)}else t=t.replace(i,s.content);e.lastIndex=0}}return t}markOwnedEventHandlers(t,e){const s=document.createElement("template");s.innerHTML=t;const i=document.createTreeWalker(s.content,NodeFilter.SHOW_ELEMENT);let n=i.nextNode();for(;n;){const t=n;Array.from(t.attributes).some(t=>t.name.startsWith("on"))&&t.setAttribute("pp-event-owner",e),n=i.nextNode()}return s.innerHTML}getCachedFunction(t,e,s,i,n){const r=e+"|"+i;let a=t.get(r);if(!a){if(a=new Function(...s,`"use strict"; return (${e});`),t.size>n){const e=t.keys().next().value;void 0!==e&&t.delete(e)}t.set(r,a)}return a}createRenderFunction(t){const e=U.extractStateBindings(t);return new Function("pp",`\n "use strict";\n ${t}\n return { ${e.join(", ")} };\n `)}unmountPreviousRefs(){if(this.__ppPrevRefStore){for(const t of this.__ppPrevRefStore.values())try{"function"==typeof t?t(null):t&&"object"==typeof t&&"current"in t&&(t.current=null)}catch(t){console.warn("[PP-WARN] Ref cleanup failed",t)}this.__ppPrevRefStore=null}}createRefCaptureFunction(){return this.__ppRefStore=new Map,this.__ppRefSeq=0,t=>{const e=`ppref_${this.id}_${++this.__ppRefSeq}`;return this.__ppRefStore.set(e,t),e}}consumeContext(t){return this.pendingContextTokens.add(t),E.resolveContext(this.parentId,t).value}provideContext(t,e){this.pendingProvidedContexts.set(t,e)}requestContextRefresh(){this.contextRefreshPending||(this.contextRefreshPending=!0,queueMicrotask(()=>{if(this.contextRefreshPending=!1,E.getInstance(this.id)===this){if(this.isRendering)return void this.requestContextRefresh();this.forceUpdate()}}))}refreshContextConsumers(t){var e;for(const s of t){const t=E.getInstance(s);null==(e=null==t?void 0:t.requestContextRefresh)||e.call(t)}}makeHooksAPI(){return this._cachedHooksAPI?this._cachedHooksAPI.props=this.props:this._cachedHooksAPI={state:t=>this.hooksSystem.useState(t),effect:(t,e)=>this.hooksSystem.useEffect(t,e),layoutEffect:(t,e)=>this.hooksSystem.useLayoutEffect(t,e),ref:(t=null)=>this.hooksSystem.useRef(t),memo:(t,e)=>this.hooksSystem.useMemo(t,e),callback:(t,e)=>this.hooksSystem.useCallback(t,e),reducer:(t,e)=>this.hooksSystem.useReducer(t,e),context:t=>this.consumeContext(t),provideContext:(t,e)=>this.provideContext(t,e),portal:(t,e)=>this.hooksSystem.usePortal(t,e),props:this.props},this._cachedHooksAPI}restorePortaledElements(){for(const[,t]of this.trackedPortals){const{element:e,placeholder:s}=t;s.parentNode&&(s.parentNode.insertBefore(e,s),s.parentNode.removeChild(s))}}applyPortals(){const t=this.hooksSystem.getPortalRegistrations(),e=new Set;let s=!1;for(const i of t){const t=i.ref.current;if(!t)continue;const n=i.target??document.body;e.add(t);const r=this.trackedPortals.get(t);if(null!=r&&r.placeholder.parentNode){r.target!==n&&(n.appendChild(t),r.target=n,s=!0);continue}null===i.info.sourceParent&&t.parentNode instanceof Element&&(i.info.sourceParent=t.parentNode);const a=document.createComment(`pp-portal:${this.id}`);t.parentNode&&t.parentNode.insertBefore(a,t),n.appendChild(t),s=!0,this.trackedPortals.set(t,{element:t,placeholder:a,target:n})}for(const[t,i]of this.trackedPortals)e.has(t)||(i.placeholder.parentNode&&(i.placeholder.parentNode.insertBefore(t,i.placeholder),i.placeholder.remove()),this.trackedPortals.delete(t),s=!0);s&&this.invalidateTraversalCache()}render(){var e;if(this.isRendering)return;this.isRendering=!0,this.renderCount++;const s=this.startPerfTimer();if(t.perfEnabled){let e=t.perfStats.get(this.id);e||(e=t.createEmptyPerfEntry(),t.perfStats.set(this.id,e)),e.renderCount++}try{this.unmountPreviousRefs(),this.pendingProvidedContexts=new Map,this.pendingContextTokens=new Set;const t=this.saveFocusState();this.hooksSystem.prepareRender();const s=this.makeHooksAPI(),i=globalThis.pp,n=(null==(e=null==i?void 0:i.createComponentRuntime)?void 0:e.call(i,s))??s,r=this.startPerfTimer(),a=this.renderFunction(n);this.endPerfTimer("script",r),E.saveState(this.id,this.hooksSystem.getHooks()),this.latestScope={...this.props,...a},this.latestScope.__pp_ref=this.createRefCaptureFunction(),E.saveScope(this.id,this.latestScope);const o=Object.keys(this.latestScope),h=o.join("\0");let c;h===this._lastScopeKeySig?c=this._lastSortedKeys:(c=o.sort(),this._lastScopeKeySig=h,this._lastSortedKeys=c);const l=c.map(t=>this.latestScope[t]),p=c.join("\0");this.templateFn||(this.templateFn=de.compile(this.rawTemplate,c));let u=this.templateFn(...l);if(u=this.resolveOwnedChildren(u),this.lastRenderedHtml!==u){this.trackedPortals.size>0&&this.restorePortaledElements();const t=this.startPerfTimer();this.applyDomDiff(u),this.endPerfTimer("domDiff",t),this.lastRenderedHtml=u}if(this.hasEventAttributes(this.el)&&this.pendingEventElements.add(this.el),this.pendingEventElements.size>0){const t=this.pendingEventElements;this.pendingEventElements=new Set;const e=this.startPerfTimer();this.eventManager.bindEvents(t),this.endPerfTimer("bindEvents",e)}const d=this.startPerfTimer();this.bindRefs(c,l,p),this.endPerfTimer("bindRefs",d);const f=E.saveContextValues(this.id,this.pendingProvidedContexts);E.updateContextDependencies(this.id,this.pendingContextTokens);const m=f.length>0?E.getConsumersForContextsInSubtree(this.id,f):null;this.__ppPrevRefStore=new Map(this.__ppRefStore);const g=this.startPerfTimer();this.bootstrapNestedComponents(),this.endPerfTimer("bootstrapNested",g);const v=this.startPerfTimer();this.applyPortals(),this.endPerfTimer("portals",v);const x=this.startPerfTimer();this.restoreFocusState(t),this.endPerfTimer("restoreFocus",x);const y=this.startPerfTimer();this.hooksSystem.runLayoutEffects(),this.endPerfTimer("layoutEffects",y);const b=this.startPerfTimer();this.hooksSystem.runEffects(),this.endPerfTimer("effects",b),null!=m&&m.size&&this.refreshContextConsumers(m)}catch(t){console.error("[PP-ERROR] Render Cycle Failed",t)}finally{this.endPerfTimer("total",s),this.isRendering=!1}}applyDomDiff(t){if(typeof SVGElement<"u"&&this.el instanceof SVGElement){const e=(new DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"image/svg+xml").documentElement,s=document.createDocumentFragment();return Array.from(e.childNodes).forEach(t=>{s.appendChild(document.importNode(t,!0))}),this.morphChildren(this.el,s),void this.invalidateTraversalCache()}const e=document.createElement("template");e.innerHTML=t;const s=e.content;this.morphChildren(this.el,s),this.invalidateTraversalCache()}isInsideTrackedPortal(t){for(const[e]of this.trackedPortals)if(e===t||e.contains(t))return!0;return!1}morphChildren(t,e){if(this.hasKeyedDirectChildren(t)||this.hasKeyedDirectChildren(e))return void this.morphKeyedChildren(t,e);let s=t.firstChild,i=e.firstChild;for(;s||i;){const e=(null==s?void 0:s.nextSibling)??null,n=(null==i?void 0:i.nextSibling)??null;if(i){if(!s){const e=i.cloneNode(!0);t.appendChild(e),e.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(e),i=n;continue}if(s.nodeType!==i.nodeType){const r=i.cloneNode(!0);t.replaceChild(r,s),r.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(r),s=e,i=n;continue}if(s.nodeType!==Node.TEXT_NODE){if(s.nodeType===Node.ELEMENT_NODE){const r=s,a=i;if(r.tagName!==a.tagName){const r=i.cloneNode(!0);t.replaceChild(r,s),r.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(r),s=e,i=n;continue}if(r.hasAttribute("pp-component")&&r!==this.el){this.syncAttributes(r,a),this.hasEventAttributes(r)&&this.pendingEventElements.add(r),s=e,i=n;continue}const o=this.isInsideTrackedPortal(r);this.syncAttributes(r,a,o),this.hasEventAttributes(r)&&this.pendingEventElements.add(r),this.morphChildren(r,a)}s=e,i=n}else s.textContent!==i.textContent&&(s.textContent=i.textContent),s=e,i=n}else s&&t.removeChild(s),s=e}}hasKeyedDirectChildren(t){const e=t.childNodes;for(let t=0;t<e.length;t++){const s=e[t];if(null!==this.getNodeKey(s))return!0}return!1}getNodeKey(t){if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t.getAttribute("key");return e&&e.length>0?e:null}areNodesCompatible(t,e){if(t.nodeType!==e.nodeType)return!1;if(t.nodeType!==Node.ELEMENT_NODE)return!0;const s=e;if(t.tagName!==s.tagName)return!1;const i=this.getNodeKey(t),n=this.getNodeKey(e);return null===i&&null===n||null!==i&&i===n}morphKeyedChildren(t,e){const s=Array.from(t.childNodes),i=Array.from(e.childNodes),n=this.collectDuplicateKeys(i),r=new Map,a=[];n.length>0&&console.warn(`[PP-WARN] Duplicate key values detected: ${n.join(", ")}`),s.forEach(t=>{const e=this.getNodeKey(t);if(null===e)return void a.push(t);const s=r.get(e);s?s.push(t):r.set(e,[t])});let o=t.firstChild;i.forEach(e=>{const s=this.getNodeKey(e);let i;if(null!==s){const t=r.get(s);for(;t&&t.length>0;){const s=t.shift();if(this.areNodesCompatible(s,e)){i=s;break}a.push(s)}}else{const t=a.findIndex(t=>this.areNodesCompatible(t,e));-1!==t&&(i=a.splice(t,1)[0])}if(i)i!==o&&t.insertBefore(i,o);else{const s=e.cloneNode(!0);t.insertBefore(s,o),s.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(s),i=s}this.morphNode(i,e),o=i.nextSibling}),a.forEach(e=>{e.parentNode===t&&t.removeChild(e)}),r.forEach(e=>{e.forEach(e=>{e.parentNode===t&&t.removeChild(e)})})}collectDuplicateKeys(t){const e=new Set,s=new Set;return t.forEach(t=>{const i=this.getNodeKey(t);if(null!==i){if(e.has(i))return void s.add(i);e.add(i)}}),Array.from(s.values())}morphNode(t,e){if(t.nodeType!==e.nodeType){const s=t.parentNode;if(!s)return;const i=e.cloneNode(!0);return s.replaceChild(i,t),void(i.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(i))}if(t.nodeType===Node.TEXT_NODE)return void(t.textContent!==e.textContent&&(t.textContent=e.textContent));if(t.nodeType!==Node.ELEMENT_NODE)return;const s=t,i=e;if(s.tagName!==i.tagName){const t=s.parentNode;if(!t)return;const i=e.cloneNode(!0);return t.replaceChild(i,s),void(i.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(i))}if(s.hasAttribute("pp-component")&&s!==this.el)return this.syncAttributes(s,i),void(this.hasEventAttributes(s)&&this.pendingEventElements.add(s));const n=this.isInsideTrackedPortal(s);this.syncAttributes(s,i,n),this.hasEventAttributes(s)&&this.pendingEventElements.add(s),this.morphChildren(s,i)}collectEventElements(t){this.hasEventAttributes(t)&&this.pendingEventElements.add(t);for(let e=0;e<t.children.length;e++)this.collectEventElements(t.children[e])}hasEventAttributes(t){const e=t.attributes;for(let t=0;t<e.length;t++)if(e[t].name.startsWith("on")&&!e[t].name.includes("-"))return!0;return!1}walkOwnedBoundaryElements(t){const e=this.getTraversalCache();for(let s=0;s<e.childBoundaries.length;s++)t(e.childBoundaries[s],!0)}invalidateTraversalCache(){this.traversalCache=null}getTraversalCache(){if(this.traversalCache)return this.traversalCache;const t=[],e=[],s=[],i=[],n=new Set,r=[],a=(t,e)=>{if(e)r.push(t);else for(let e=t.children.length-1;e>=0;e--)r.push(t.children[e])};a(this.el,!1);for(const[t]of this.trackedPortals)a(t,!0);for(;r.length>0;){const a=r.pop();if(n.has(a))continue;n.add(a);const o=a,h=a.hasAttribute("pp-component");if(t.push(o),(a.hasAttribute("data-pp-ref")||a.hasAttribute("pp-ref")||o.__ppRefCaptureId||o.__ppRefExpr)&&i.push(o),(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement)&&s.push(o),h)e.push(o);else for(let t=a.children.length-1;t>=0;t--)r.push(a.children[t])}return this.traversalCache={ownedElements:t,childBoundaries:e,managedInputs:s,refElements:i},this.traversalCache}collectManagedInputs(){return this.getTraversalCache().managedInputs}syncAttributes(t,e,s=!1){const i=t.attributes;for(let n=i.length-1;n>=0;n--){const r=i[n].name;if(!e.hasAttribute(r)){if(s&&ct.has(r))continue;t.removeAttribute(r),"data-pp-ref"===r&&delete t.__ppRefCaptureId,"pp-ref"===r&&delete t.__ppRefExpr}}const n=e.attributes;for(let e=0;e<n.length;e++){const i=n[e];s&&ct.has(i.name)||(t.getAttribute(i.name)!==i.value&&t.setAttribute(i.name,i.value),"value"===i.name&&(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&t.value!=i.value&&(t.value=i.value))}t instanceof HTMLTextAreaElement&&e instanceof HTMLTextAreaElement&&(t.value!==e.value&&(t.value=e.value),t.defaultValue!==e.defaultValue&&(t.defaultValue=e.defaultValue))}bindRefs(t,e,s){const i=this.getTraversalCache();for(let n=0;n<i.refElements.length;n++){const r=i.refElements[n],a=r,o=r.getAttribute("data-pp-ref");let h=null;if(o?(r.removeAttribute("data-pp-ref"),a.__ppRefCaptureId=o,h=o):a.__ppRefCaptureId&&this.__ppRefStore.has(a.__ppRefCaptureId)?h=a.__ppRefCaptureId:a.__ppRefCaptureId&&delete a.__ppRefCaptureId,h){const t=this.__ppRefStore.get(h);if("function"==typeof t)try{t(r)}catch(t){console.warn(`[PP-WARN] Ref callback threw for id="${h}"`,t)}else t&&"object"==typeof t&&"current"in t?t.current=r:o&&console.warn(`[PP-WARN] Missing captured ref for id="${h}"`)}const c=r.getAttribute("pp-ref");let l=c;if(c?a.__ppRefExpr=c:a.__ppRefExpr&&(l=a.__ppRefExpr),!l)continue;c&&r.removeAttribute("pp-ref");const p=this.latestScope[l];if(p&&"object"==typeof p&&"current"in p)p.current=r;else if("function"!=typeof p)try{const i=this.getCachedFunction(this._refEvalFnCache,l,t,s,200)(...e);"function"==typeof i?i(r):i&&"object"==typeof i&&"current"in i&&(i.current=r)}catch(t){console.warn(`[PP-WARN] Could not resolve pp-ref="${l}"`,t)}else try{p(r)}catch(t){console.warn(`[PP-WARN] pp-ref function threw for "${l}"`,t)}}}bootstrapNestedComponents(){this.walkOwnedBoundaryElements((e,s)=>{if(!s)return;if(e.__ppRawBindings){const t=e.__ppRawBindings;for(const[s,i]of Object.entries(t))e.setAttribute(s,i)}else{const t={};for(const s of Array.from(e.attributes))s.value.includes("{")&&"pp-component"!==s.name&&!s.name.startsWith("on")&&(t[s.name]=s.value);e.__ppRawBindings=t}this.applyAttributeInterpolations(e,this.latestScope);const i=e.getAttribute("pp-component")||"",n=E.getInstance(i);if(null!=n&&n.refreshPropsFromParent)return n.parentId=this.id,E.saveParent(i,this.id),n.el!==e&&(!e.__ppRawBindings&&n.el.__ppRawBindings&&(e.__ppRawBindings=n.el.__ppRawBindings),n.el=e),void n.refreshPropsFromParent();E.getState(i)||new t(e)})}saveFocusState(){const t=document.activeElement;if(!t)return null;const e=this.el.contains(t),s=!e&&Array.from(this.trackedPortals.values()).some(e=>e.element.contains(t));if(!e&&!s)return null;const i=this.collectManagedInputs().indexOf(t);if(-1===i)return null;const n=this.getTextSelectionState(t);return{element:t,index:i,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd}}isTextSelectionControl(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&["text","search","url","tel","password"].includes(t.type)}getTextSelectionState(t){if(!this.isTextSelectionControl(t))return{selectionStart:null,selectionEnd:null};try{return{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}catch{return{selectionStart:null,selectionEnd:null}}}restoreFocusState(t){if(!t)return;const e=t.element,s=e&&e.isConnected&&(this.el.contains(e)||Array.from(this.trackedPortals.values()).some(t=>t.element.contains(e)))?e:this.collectManagedInputs()[t.index];if(s&&(s.focus(),null!==t.selectionStart&&null!==t.selectionEnd&&this.isTextSelectionControl(s)))try{s.setSelectionRange(t.selectionStart,t.selectionEnd)}catch(t){console.warn("Could not restore cursor position",t)}}forceUpdate(){this.lastRenderedHtml="",this.render()}destroy(){for(const[,t]of this.trackedPortals)t.element.parentNode&&t.element.remove(),t.placeholder.parentNode&&t.placeholder.remove();this.trackedPortals.clear();const t=E.removeContextTracking(this.id);this.hooksSystem.dispose(),this.eventManager.clearCache(),E.removeState(this.id),E.removeScope(this.id),E.removeInstance(this.id),t.forEach(t=>{var e;const s=E.getInstance(t);null==(e=null==s?void 0:s.requestContextRefresh)||e.call(s)})}};g(F,"perfEnabled",!1),g(F,"perfStats",new Map);let ue=F;const lt={bootstrap:()=>{document.querySelectorAll("[pp-component]").forEach(t=>{new ue(t)})}},fe=class t{constructor(){g(this,"activeAbortController",null),g(this,"navigationEnabled",!1),g(this,"boundHandleLinkClick",null),g(this,"boundHandlePopState",null),g(this,"isNavigating",!1),g(this,"RESET_SCROLL_ATTR","pp-reset-scroll"),g(this,"mounted",!1)}mount(){this.mounted||(this.mounted=!0,this.disableTransitions(),lt.bootstrap(),this.restoreBodyAccessibility(),this.enableTransitions(),this.enableSPANavigation())}createComponentRuntime(e){const s={};for(const e of t.PUBLIC_METHODS){const t=this[e];"function"==typeof t?s[e]=t.bind(this):void 0!==t&&(s[e]=t)}return Object.assign({},s,e)}createContext(t){return Object.freeze({id:Symbol("pp.context"),defaultValue:t})}enablePerf(){ue.setPerfEnabled(!0)}disablePerf(){ue.setPerfEnabled(!1)}getPerfStats(){return ue.getPerfStats()}resetPerfStats(){ue.resetPerfStats()}getCsrfToken(){const t=document.cookie.match(/(?:^|;\s*)pp_csrf=([^;]*)/);return t?decodeURIComponent(t[1]):""}disableTransitions(){const t=document.createElement("style");t.id="pp-disable-transitions",t.textContent="\n *, *::before, *::after {\n transition: none !important;\n animation: none !important;\n }\n ",document.head.insertBefore(t,document.head.firstChild)}enableTransitions(){const t=document.getElementById("pp-disable-transitions");t&&t.remove()}restoreBodyAccessibility(){document.body.style.transition="",document.body.style.opacity="1",document.body.style.pointerEvents="auto",document.body.style.userSelect="auto",document.body.removeAttribute("inert"),document.body.setAttribute("aria-busy","false")}static resetInstance(){this.instance&&(this.instance.navigationEnabled&&this.instance.disableSPANavigation(),this.instance.activeAbortController&&(this.instance.activeAbortController.abort(),this.instance.activeAbortController=null),this.instance=null)}static getInstance(){return this.instance||(this.instance=new t),this.instance}enableSPANavigation(){this.navigationEnabled||"true"!==document.body.getAttribute("pp-spa")||(this.navigationEnabled=!0,this.boundHandleLinkClick=this.handleLinkClick.bind(this),this.boundHandlePopState=this.handlePopState.bind(this),document.addEventListener("click",this.boundHandleLinkClick),window.addEventListener("popstate",this.boundHandlePopState))}disableSPANavigation(){this.navigationEnabled=!1,this.boundHandleLinkClick&&(document.removeEventListener("click",this.boundHandleLinkClick),this.boundHandleLinkClick=null),this.boundHandlePopState&&(window.removeEventListener("popstate",this.boundHandlePopState),this.boundHandlePopState=null)}handleLinkClick(t){if(!this.navigationEnabled)return;const e=t.target.closest("a");if(e&&e.href)try{const s=new URL(e.href),i=s.origin!==window.location.origin,n=s.pathname===window.location.pathname&&s.search===window.location.search,r="false"===e.getAttribute("pp-spa");if(i||"_blank"===e.target||e.hasAttribute("download")||r||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;if(t.preventDefault(),n){const e=s.hash;if(e){t.preventDefault(),history.pushState(null,"",s.pathname+s.search+e);const i=document.querySelector(e);return void(i&&i.scrollIntoView({behavior:"smooth"}))}}this.navigateTo(s.pathname+s.search+s.hash)}catch(t){console.error("Link click navigation error:",t)}}async handlePopState(){const t=window.location.pathname+window.location.search+window.location.hash;await this.navigateTo(t,!1)}async navigateTo(t,e=!0){this.isNavigating=!0;const s=this.saveScrollPositions();try{this.dispatchNavigationEvent("start",t),await this.showLoadingTransition();const i=await this.fetchPageContent(t);if("hardReload"in i)return void(window.location.href=i.hardReload);if("redirect"in i)return void await this.navigateTo(i.redirect,e);const n=i;this.updateBrowserHistory(t,e);const r=document.getElementById("loading-file-1B87E"),a="startViewTransition"in document,o=this.getResetScrollConfig(n);!r&&a?await this.updatePageContentWithViewTransition(n):await this.updatePageContent(n),this.resetGlobalCaches(),lt.bootstrap(),this.handleScrollRestoration(s,o),await this.handleNavigationCompletion(),this.dispatchNavigationEvent("complete",t)}catch(e){this.handleNavigationError(t,e)}finally{this.isNavigating=!1}}resetGlobalCaches(){E.clear(),U.clearCaches(),de.clearCache()}getResetScrollConfig(t){if("true"===t.body.getAttribute(this.RESET_SCROLL_ATTR))return{mode:"global",resetElementKeys:new Set,resetWindow:!1};const e=t.querySelectorAll(`[${this.RESET_SCROLL_ATTR}]`),s=new Set;let i=!1;if(e.length>0)for(const t of Array.from(e))if("true"===t.getAttribute(this.RESET_SCROLL_ATTR)){const e=this.getElementKeyFromElement(t);s.add(e),i=!0}return i||s.size>0?{mode:"none",resetElementKeys:s,resetWindow:i}:{mode:"none",resetElementKeys:new Set,resetWindow:!1}}getElementKeyFromElement(t){return t.id?t.id:t.className?t.className:t.tagName}handleScrollRestoration(t,e){requestAnimationFrame(()=>{if("global"===e.mode)return window.scrollTo(0,0),document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0,void document.querySelectorAll("*").forEach(t=>{(t.scrollTop||t.scrollLeft)&&(t.scrollTop=0,t.scrollLeft=0)});if(e.resetWindow)window.scrollTo(0,0),document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0;else{const e=t.window;e&&window.scrollTo(e.scrollLeft,e.scrollTop)}document.querySelectorAll("*").forEach(s=>{const i=s.tagName.toLowerCase();if(e.resetWindow&&("html"===i||"body"===i))return;const n=this.getElementKey(s);e.resetElementKeys.has(n)?(s.scrollTop=0,s.scrollLeft=0):t[n]&&(s.scrollTop=t[n].scrollTop,s.scrollLeft=t[n].scrollLeft)})})}saveScrollPositions(){const t={window:{scrollTop:window.scrollY||document.documentElement.scrollTop,scrollLeft:window.scrollX||document.documentElement.scrollLeft}};return document.querySelectorAll("*").forEach(e=>{(e.scrollTop||e.scrollLeft)&&(t[this.getElementKey(e)]={scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}),t}getElementKey(t){return t.id||t.className||t.tagName}async updatePageContentWithViewTransition(t){t.title&&(document.title=t.title);const e=t.body.innerHTML;if(this.syncBodyAttributes(t.body),this.isNavigating||!document.startViewTransition)return void(document.body.innerHTML=e);const s=document.startViewTransition(()=>{document.body.innerHTML=e});try{await s.finished}catch(t){console.warn("View transition failed, continuing anyway:",t)}}dispatchNavigationEvent(t,e,s){const i=`pp:navigation:${t}`,n=s?{url:e,error:s}:{url:e};document.dispatchEvent(new CustomEvent(i,{detail:n}))}async showLoadingTransition(){const t=document.getElementById("loading-file-1B87E");if(t){const e=this.findLoadingElement(t,window.location.pathname);if(e)return void await this.updateContentWithTransition(e)}const e=document.querySelector("[pp-loading-content='true']")||document.body;e&&!("startViewTransition"in document)&&await this.fadeOut(e,250)}async fetchPageContent(t){const e=new URL(t,window.location.origin).hash,s=await fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest","X-PP-Navigation":"true","X-PulsePoint-Wire":"true",Accept:"text/html"}});if(!s.ok)throw new Error(`Navigation failed: ${s.status} ${s.statusText}`);const i=s.headers.get("X-PP-Root-Layout"),n=document.querySelector('meta[name="pp-root-layout"]'),r=n?n.getAttribute("content"):null;if(i&&r&&i!==r)return{hardReload:t};if(s.redirected){const t=new URL(s.url);if(e&&t.searchParams.has("next")){const s=t.searchParams.get("next");s&&!s.includes("#")&&t.searchParams.set("next",s+e)}return{redirect:t.pathname+t.search+t.hash}}const a=this.getRedirectUrlFromResponse(s);if(a)return{redirect:a};const o=await s.text();return(new DOMParser).parseFromString(o,"text/html")}getRedirectUrlFromResponse(t){const e=t.headers.get("X-PP-Redirect");if(e)return e;const s=t.headers.get("Location"),i=t.status;return s&&i>=300&&i<400?s:null}updateBrowserHistory(t,e){e&&history.pushState(null,"",t)}async updatePageContent(t){t.title&&(document.title=t.title);const e=t.body;this.syncBodyAttributes(e),document.body.innerHTML=e.innerHTML}syncBodyAttributes(t){t&&(Array.from(document.body.attributes).forEach(t=>{"style"!==t.name&&document.body.removeAttribute(t.name)}),Array.from(t.attributes).forEach(t=>{"style"!==t.name&&document.body.setAttribute(t.name,t.value)}))}async handleNavigationCompletion(){const t=document.querySelector("[pp-loading-content='true']")||document.body;this.fadeIn(t,150),setTimeout(()=>{this.restoreBodyAccessibility()},50);const e=window.location.hash;e&&requestAnimationFrame(()=>{const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})})}handleNavigationError(t,e){console.error("Navigation error:",e),this.restoreBodyAccessibility(),this.dispatchNavigationEvent("error",t,e),window.location.href=t}findLoadingElement(t,e){let s=e;for(;;){const e=t.querySelector(`div[pp-loading-url='${s}']`);if(e)return e;if("/"===s)break;const i=s.lastIndexOf("/");s=i<=0?"/":s.substring(0,i)}return t.querySelector("div[pp-loading-url='/' ]")}async updateContentWithTransition(t){const e=document.querySelector("[pp-loading-content='true']")||document.body;if(!e)return;const{fadeIn:s,fadeOut:i}=this.parseTransition(t);await this.fadeOut(e,i),e.innerHTML=t.innerHTML,this.fadeIn(e,s)}parseTransition(t){let e=250,s=250;const i=t.querySelector("[pp-loading-transition]"),n=null==i?void 0:i.getAttribute("pp-loading-transition");if(n){let t=JSON.parse(n);t&&"object"==typeof t?(e=this.parseTime(t.fadeIn??e),s=this.parseTime(t.fadeOut??s)):console.warn("pp-loading-transition is not valid JSON → default values (250 ms) will be used. String:",n)}return{fadeIn:e,fadeOut:s}}fadeOut(t,e){return new Promise(s=>{t.style.transition=`opacity ${e}ms ease-out`,setTimeout(()=>{t.style.transition="",s()},e)})}fadeIn(t,e){t.style.transition=`opacity ${e}ms ease-in`,setTimeout(()=>{t.style.transition=""},e)}parseTime(t){if("number"==typeof t)return t;const e=t.match(/^(\d+)(ms|s|m)?$/);if(e){const t=parseInt(e[1],10);switch(e[2]||"ms"){case"ms":default:return t;case"s":return 1e3*t;case"m":return 60*t*1e3}}return 0}async redirect(t){if(t)try{const e=new URL(t,window.location.origin);e.origin!==window.location.origin?window.location.href=t:this.navigationEnabled?await this.navigateTo(e.pathname+e.search+e.hash):window.location.href=t}catch(t){console.error("Redirect error:",t)}}async rpc(t,e={},s=!1){let i=null;const n="boolean"==typeof s?{abortPrevious:s}:s;try{n.abortPrevious&&this.activeAbortController&&(this.activeAbortController.abort(),this.activeAbortController=null),i=new AbortController,n.abortPrevious&&(this.activeAbortController=i);const s=window.location.pathname.replace(/\/+$/,"")||"/",r={"X-CSRF-Token":this.getCsrfToken(),"X-PP-RPC":"true","X-PulsePoint-Wire":"true","X-PP-Function":t,"X-Requested-With":"XMLHttpRequest",Accept:"application/json, text/event-stream"};let a;if(Object.values(e).some(t=>t instanceof File||t instanceof FileList&&t.length>0)){const t=new FormData;for(const[s,i]of Object.entries(e))i instanceof File?t.append(s,i):i instanceof FileList?Array.from(i).forEach(e=>t.append(s,e)):null!=i&&t.append(s,"object"==typeof i?JSON.stringify(i):String(i));if(n.onUploadProgress)return await this.xhrFunction({url:s,headers:r,body:t,controller:i,options:n});a={method:"POST",headers:r,body:t,signal:i.signal}}else a={method:"POST",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify(e),signal:i.signal};const o=await fetch(s,a);if(401===o.status)throw new Error("Authentication required");if(403===o.status)throw new Error("Permission denied");if(!o.ok){const t=await o.json().catch(()=>null);throw t||415!==o.status?new Error((null==t?void 0:t.error)||`Request failed: ${o.status} ${o.statusText}`):new Error("Server rejected data format (415).")}const h=this.getRedirectUrlFromResponse(o);return h?(await this.redirect(h),{redirected:!0,to:h}):(this.activeAbortController===i&&(this.activeAbortController=null),(o.headers.get("Content-Type")||"").includes("text/event-stream")&&o.body?(n.onStream||console.warn("RPC returned a stream, but no onStream handler provided."),void await this.handleStream(o.body,n)):await o.json())}catch(t){if(this.activeAbortController===i&&(this.activeAbortController=null),t instanceof Error&&"AbortError"===t.name)return console.log("Request was cancelled"),{cancelled:!0};if(n.onStreamError)return void n.onStreamError(t);throw console.error("RPC error:",t),t}}xhrFunction(t){const{url:e,headers:s,body:i,controller:n,options:r}=t;return new Promise((t,a)=>{const o=new XMLHttpRequest;o.open("POST",e,!0);for(const[t,e]of Object.entries(s))o.setRequestHeader(t,e);const h=()=>{try{o.abort()}catch{}};n.signal.addEventListener("abort",h,{once:!0}),o.upload&&r.onUploadProgress&&(o.upload.onprogress=t=>{var e;const s=t.lengthComputable?t.total:null,i=t.lengthComputable&&t.total>0?Math.min(100,Math.max(0,t.loaded/t.total*100)):null;null==(e=r.onUploadProgress)||e.call(r,{loaded:t.loaded,total:s,percent:i})}),o.onerror=()=>{n.signal.removeEventListener("abort",h),a(new Error("Network error (XHR upload)."))},o.onload=async()=>{var e,s;if(n.signal.removeEventListener("abort",h),401===o.status)return a(new Error("Authentication required"));if(403===o.status)return a(new Error("Permission denied"));if(o.status<200||o.status>=300){let t=`Request failed: ${o.status} ${o.statusText}`;try{const e=JSON.parse(o.responseText||"{}");t=(null==e?void 0:e.error)||(null==e?void 0:e.message)||t}catch{}return a(new Error(t))}const i=o.getResponseHeader("X-PP-Redirect")||(o.status>=300&&o.status<400?o.getResponseHeader("Location"):null);if(i)try{return await this.redirect(i),null==(e=r.onUploadComplete)||e.call(r),t({redirected:!0,to:i})}catch(t){return a(t)}const c=o.responseText??"";let l=c;try{l=JSON.parse(c)}catch{}null==(s=r.onUploadComplete)||s.call(r),t(l)};try{o.send(i)}catch(t){n.signal.removeEventListener("abort",h),a(t)}})}async handleStream(t,e){const s=t.getReader(),i=new TextDecoder;let n="";try{for(;;){const{done:t,value:r}=await s.read();if(t){e.onStreamComplete&&e.onStreamComplete();break}n+=i.decode(r,{stream:!0});const a=n.split("\n");n=a.pop()||"";for(const t of a)if(""!==t.trim()&&t.startsWith("data: ")){const s=t.slice(6);let i=s;try{("true"===s||"false"===s||"null"===s||!isNaN(Number(s))||s.startsWith("{")||s.startsWith("[")||s.startsWith('"'))&&(i=JSON.parse(s))}catch{}e.onStream&&e.onStream(i)}}}catch(t){if(!e.onStreamError)throw t;e.onStreamError(t)}finally{s.releaseLock()}}};g(fe,"instance",null),g(fe,"PUBLIC_METHODS",["createContext","mount","redirect","rpc","enablePerf","disablePerf","getPerfStats","resetPerfStats"]);let $e=fe;const oe=class t{constructor(){g(this,"listeners",[])}static getInstance(){return t.instance||(t.instance=new t),t.instance}get params(){return new URLSearchParams(window.location.search)}get(t){return this.params.get(t)}set(t,e){const s=this.params;s.set(t,e),this.updateURL(s)}delete(t){const e=this.params;e.delete(t),this.updateURL(e)}replace(t){const e=new URLSearchParams;for(const s in t){const i=t[s];null!==i&&e.set(s,i)}this.updateURL(e,!0)}updateURL(t,e=!1){const s=`${window.location.pathname}?${t.toString()}`;e?history.replaceState(null,"",s):history.pushState(null,"",s),this.notifyListeners(t)}listen(t){this.listeners.push(t)}notifyListeners(t){for(const e of this.listeners)e(t)}enablePopStateListener(){window.addEventListener("popstate",()=>{this.notifyListeners(this.params)})}};g(oe,"instance",null);let ze=oe;function Gt(t,e,s=window,i=!0){let n=null;if(Object.defineProperty(s,t,{get(){if(null!==n)return n;if(e&&"object"==typeof e&&!Array.isArray(e)&&"getInstance"in e&&"function"==typeof e.getInstance)return n=e.getInstance(),n;if("function"!=typeof e)return n=e,n;try{return n=e.getInstance(),n}catch{return n=e,n}},set(e){null===e?n=null:console.warn(`Cannot override global ${t}`)},configurable:!0,enumerable:!0}),i)try{s[t]}catch(e){console.error(`Failed to initialize ${t}:`,e)}}Gt("pp",{getInstance:()=>{var t;const e=$e.getInstance();return"loading"!==document.readyState?null==(t=e.mount)||t.call(e):document.addEventListener("DOMContentLoaded",()=>{var t;return null==(t=e.mount)?void 0:t.call(e)},{once:!0}),e}}),Gt("searchParams",ze);export{lt as ComponentInit,$e as PPUtilities,ze as SearchParamsManager};
|
|
1
|
+
var Qt=Object.defineProperty,Yt=(t,e,s)=>e in t?Qt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,g=(t,e,s)=>Yt(t,"symbol"!=typeof e?e+"":e,s);class Zt{constructor(t){g(this,"hooks",[]),g(this,"currentIndex",0),g(this,"onStateChange"),g(this,"pendingLayoutEffects",[]),g(this,"pendingEffects",[]),g(this,"pendingUpdate",!1),g(this,"hasScheduledRender",!1),g(this,"batchedUpdates",new Set),g(this,"portalRegistrations",[]),g(this,"disposed",!1),this.onStateChange=t}loadState(t){this.hooks=[...t]}getHooks(){return this.hooks}prepareRender(){this.disposed||(this.currentIndex=0,this.pendingLayoutEffects=[],this.pendingEffects=[],this.portalRegistrations=[])}runLayoutEffects(){this.disposed||this.pendingLayoutEffects.forEach(t=>t()),this.pendingLayoutEffects=[]}runEffects(){this.disposed||this.pendingEffects.forEach(t=>t()),this.pendingEffects=[]}dispose(){this.disposed||(this.disposed=!0,this.pendingLayoutEffects=[],this.pendingEffects=[],this.pendingUpdate=!1,this.hasScheduledRender=!1,this.batchedUpdates.clear(),this.portalRegistrations=[],this.hooks.forEach(t=>{if(!t||"object"!=typeof t)return;const e=t.cleanup;if("function"==typeof e)try{e()}finally{t.cleanup=void 0}}),this.hooks=[],this.currentIndex=0)}usePortal(t,e){const s=this.currentIndex++;void 0===this.hooks[s]&&(this.hooks[s]={sourceParent:null});const i=this.hooks[s];return this.portalRegistrations.push({ref:t,target:e??null,info:i}),i}getPortalRegistrations(){return this.portalRegistrations}useState(t){const e=this.currentIndex++;if(void 0===this.hooks[e]){const s=this.hooks,i=e,n=this.batchedUpdates,r=()=>this.scheduleUpdate(),a=t=>{let e=t;"function"==typeof t&&(e=t(s[i].__state)),s[i].__state!==e&&(s[i].__state=e,n.add(i),r())};this.hooks[e]={__state:t,__setter:a}}const s=this.hooks[e];if("object"!=typeof s||null===s||!("__state"in s)){const t=s,i=this.hooks,n=e,r=this.batchedUpdates,a=()=>this.scheduleUpdate(),o=t=>{let e=t;"function"==typeof t&&(e=t(i[n].__state)),i[n].__state!==e&&(i[n].__state=e,r.add(n),a())};this.hooks[e]={__state:t,__setter:o}}return[this.hooks[e].__state,this.hooks[e].__setter]}scheduleUpdate(){this.disposed||(this.hasScheduledRender=!0,this.pendingUpdate||(this.pendingUpdate=!0,queueMicrotask(()=>{if(this.pendingUpdate=!1,this.disposed)return this.hasScheduledRender=!1,void this.batchedUpdates.clear();this.hasScheduledRender&&(this.hasScheduledRender=!1,this.batchedUpdates.clear(),this.onStateChange())})))}useRef(t=null){const e=this.currentIndex++;return void 0===this.hooks[e]&&(this.hooks[e]={current:t}),this.hooks[e]}useMemo(t,e){const s=this.currentIndex++,i=this.hooks[s];if(!i||this.areDepsDifferent(i.deps,e)){const i=t();return this.hooks[s]={value:i,deps:e},i}return i.value}useCallback(t,e){const s=this.currentIndex++,i=this.hooks[s];return!i||this.areDepsDifferent(i.deps,e)?(this.hooks[s]={callback:t,deps:e},t):i.callback}useReducer(t,e){const s=this.currentIndex++;if(void 0===this.hooks[s]){const i={state:e,reducer:t,dispatch:null};i.dispatch=t=>{const e=i.reducer(i.state,t);i.state!==e&&(i.state=e,this.scheduleUpdate())},this.hooks[s]=i}const i=this.hooks[s];return[i.state,i.dispatch]}useEffect(t,e){const s=this.currentIndex++,i=this.hooks[s];(!i||!e||!i.deps||this.areDepsDifferent(i.deps,e))&&this.pendingEffects.push(()=>{null!=i&&i.cleanup&&i.cleanup();const n=t();this.hooks[s]={deps:e,cleanup:"function"==typeof n?n:void 0}})}useLayoutEffect(t,e){const s=this.currentIndex++,i=this.hooks[s];(!i||!e||!i.deps||this.areDepsDifferent(i.deps,e))&&this.pendingLayoutEffects.push(()=>{null!=i&&i.cleanup&&i.cleanup();const n=t();this.hooks[s]={deps:e,cleanup:"function"==typeof n?n:void 0}})}areDepsDifferent(t,e){return t.length!==e.length||e.some((e,s)=>!Object.is(e,t[s]))}}class S{static saveState(t,e){t&&this.states.set(t,e)}static getState(t){return this.states.get(t)}static removeState(t){this.states.delete(t)}static saveScope(t,e){this.scopes.set(t,e)}static getScope(t){return this.scopes.get(t)}static removeScope(t){this.scopes.delete(t)}static registerInstance(t,e){var s;const i=this.instances.get(t);i&&i!==e&&(null==(s=i.destroy)||s.call(i)),this.instances.set(t,e)}static getInstance(t){return this.instances.get(t)}static removeInstance(t){this.instances.delete(t)}static saveParent(t,e){t&&this.parents.set(t,e)}static getParent(t){return this.parents.get(t)}static removeParent(t){if(!this.parents.has(t))return;const e=this.parents.get(t)??null;this.parents.forEach((s,i)=>{s===t&&this.parents.set(i,e)}),this.parents.delete(t)}static saveContextValues(t,e){const s=this.contextValues.get(t)??new Map,i=new Set;return s.forEach((t,s)=>{e.has(s)||i.add(s)}),e.forEach((t,e)=>{s.has(e)&&Object.is(s.get(e),t)||i.add(e)}),e.size>0?this.contextValues.set(t,new Map(e)):this.contextValues.delete(t),Array.from(i)}static resolveContext(t,e){let s=t;for(;s;){const t=this.contextValues.get(s);if(null!=t&&t.has(e))return{providerId:s,value:t.get(e)};s=this.parents.get(s)??null}return{providerId:null,value:e.defaultValue}}static updateContextDependencies(t,e){const s=new Set(e),i=this.consumerContexts.get(t)??new Set;i.forEach(e=>{s.has(e)||this.removeContextConsumer(e,t)}),s.forEach(e=>{i.has(e)||this.addContextConsumer(e,t)}),s.size>0?this.consumerContexts.set(t,s):this.consumerContexts.delete(t)}static getConsumersForContextsInSubtree(t,e){const s=new Set;for(const i of e){const e=this.contextConsumers.get(i);e&&e.forEach(e=>{e!==t&&this.isAncestor(t,e)&&s.add(e)})}return s}static removeContextTracking(t){const e=this.contextValues.get(t),s=e?this.getConsumersForContextsInSubtree(t,e.keys()):new Set;this.contextValues.delete(t);const i=this.consumerContexts.get(t);return i&&(i.forEach(e=>{this.removeContextConsumer(e,t)}),this.consumerContexts.delete(t)),this.removeParent(t),s}static saveTemplate(t,e){this.templates.has(t)||this.templates.set(t,e)}static getTemplate(t){return this.templates.get(t)}static saveOwnedTemplates(t,e){this.ownedTemplateData.has(t)||this.ownedTemplateData.set(t,e)}static getOwnedTemplates(t){return this.ownedTemplateData.get(t)}static clear(){this.states.clear(),this.scopes.clear(),this.instances.clear(),this.parents.clear(),this.templates.clear(),this.ownedTemplateData.clear(),this.contextValues.clear(),this.consumerContexts.clear(),this.contextConsumers.clear()}static getStats(){return{states:this.states.size,scopes:this.scopes.size,instances:this.instances.size,parents:this.parents.size,templates:this.templates.size,ownedData:this.ownedTemplateData.size,contextValues:this.contextValues.size,contextConsumers:this.contextConsumers.size}}static addContextConsumer(t,e){const s=this.contextConsumers.get(t)??new Set;s.add(e),this.contextConsumers.set(t,s)}static removeContextConsumer(t,e){const s=this.contextConsumers.get(t);s&&(s.delete(e),0===s.size&&this.contextConsumers.delete(t))}static isAncestor(t,e){let s=this.parents.get(e)??null;for(;s;){if(s===t)return!0;s=this.parents.get(s)??null}return!1}}g(S,"states",new Map),g(S,"scopes",new Map),g(S,"instances",new Map),g(S,"parents",new Map),g(S,"templates",new Map),g(S,"ownedTemplateData",new Map),g(S,"contextValues",new Map),g(S,"consumerContexts",new Map),g(S,"contextConsumers",new Map);class Jt{constructor(t,e){g(this,"root"),g(this,"getScope"),g(this,"handlerCache",new Map),this.root=t,this.getScope=e}clearCache(){this.handlerCache.clear()}bindEvents(t){(t||this.fallbackCollectEventElements()).forEach(t=>{var e;if(t===this.root)return void this.bindElementEvents(t);let s=t.closest("[pp-component]");t===s&&(s=(null==(e=t.parentElement)?void 0:e.closest("[pp-component]"))??null),s===this.root&&this.bindElementEvents(t)})}bindElementEvents(t){const e=t.getAttribute("pp-event-owner");e&&t.removeAttribute("pp-event-owner");const s=[];Array.from(t.attributes).forEach(i=>{if(i.name.startsWith("on")&&!i.name.includes("-")){const n=i.name.slice(2).toLowerCase();let r=i.value.trim();const a=r.match(/^\{([\s\S]*)\}$/);a&&(r=a[1].trim()),s.push(i.name);const o=`__pp_bound_${n}`;if(t[o]===r)return;t[o]=r;const h=t[`__pp_handler_${n}`];h&&t.removeEventListener(n,h);const c=s=>{var i;if(e){const i=S.getScope(e);if(i)return void this.executeHandlerWithScope(r,s,i,t)}let n=t.closest("[pp-component]");n===t&&(n=(null==(i=t.parentElement)?void 0:i.closest("[pp-component]"))??null);const a=(null==n?void 0:n.getAttribute("pp-component"))||null;if(a){const e=S.getScope(a);if(e)return void this.executeHandlerWithScope(r,s,e,t)}this.executeHandler(r,s,t)};t[`__pp_handler_${n}`]=c,t.addEventListener(n,c)}}),s.forEach(e=>{t.removeAttribute(e)})}fallbackCollectEventElements(){const t=new Set,e=this.root.attributes;for(let s=0;s<e.length;s++)if(e[s].name.startsWith("on")&&!e[s].name.includes("-")){t.add(this.root);break}const s=this.root.querySelectorAll("*");for(let e=0;e<s.length;e++){const i=s[e],n=i.attributes;for(let e=0;e<n.length;e++)if(n[e].name.startsWith("on")&&!n[e].name.includes("-")){t.add(i);break}}return t}executeHandler(t,e,s){this.executeHandlerWithScope(t,e,this.getScope(),s)}executeHandlerWithScope(t,e,s,i){const n=Object.keys(s),r=Object.values(s);try{const s=this.getCompiledHandler(t,n).call(i??e.currentTarget??null,...r,e);"function"==typeof s&&s(e)}catch(e){console.error("[PP-ERROR] Handler failed:",e),console.error("Code:",t)}}getCompiledHandler(t,e){const s=t+"|"+e.join(",");if(!this.handlerCache.has(s)){if(this.handlerCache.size>500){const t=this.handlerCache.keys().next().value;t&&this.handlerCache.delete(t)}const i="\n const e = event;\n const $event = event;\n const target = event?.target;\n const currentTarget = event?.currentTarget;\n const el = event?.currentTarget;\n ";let n;try{n=new Function(...e,"event",`"use strict";${i} return (${t})`)}catch{n=new Function(...e,"event",`"use strict";${i} ${t}`)}this.handlerCache.set(s,n)}return this.handlerCache.get(s)}}var ei=[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,80,3,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,343,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,330,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,726,6,110,6,6,9,4759,9,787719,239],ft=[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,71,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,2,60,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,328,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,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,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,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ti="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",dt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Fe={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"},De="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",ii={5:De,"5module":De+" export import",6:De+" const class extends export import super"},si=/^in(stanceof)?$/,ri=new RegExp("["+dt+"]"),ni=new RegExp("["+dt+ti+"]");function qe(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function Q(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&ri.test(String.fromCharCode(t)):!1!==e&&qe(t,ft)))}function re(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&ni.test(String.fromCharCode(t)):!1!==e&&(qe(t,ft)||qe(t,ei)))))}var A=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function W(t,e){return new A(t,{beforeExpr:!0,binop:e})}var K={beforeExpr:!0},B={startsExpr:!0},Xe={};function _(t,e){return void 0===e&&(e={}),e.keyword=t,Xe[t]=new A(t,e)}var o={num:new A("num",B),regexp:new A("regexp",B),string:new A("string",B),name:new A("name",B),privateId:new A("privateId",B),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",K),semi:new A(";",K),colon:new A(":",K),dot:new A("."),question:new A("?",K),questionDot:new A("?."),arrow:new A("=>",K),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",K),backQuote:new A("`",B),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:W("||",1),logicalAND:W("&&",2),bitwiseOR:W("|",3),bitwiseXOR:W("^",4),bitwiseAND:W("&",5),equality:W("==/!=/===/!==",6),relational:W("</>/<=/>=",7),bitShift:W("<</>>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:W("%",10),star:W("*",10),slash:W("/",10),starstar:new A("**",{beforeExpr:!0}),coalesce:W("??",1),_break:_("break"),_case:_("case",K),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",K),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",K),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",B),_if:_("if"),_return:_("return",K),_switch:_("switch"),_throw:_("throw",K),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",B),_super:_("super",B),_class:_("class",B),_extends:_("extends",K),_export:_("export"),_import:_("import",B),_null:_("null",B),_true:_("true",B),_false:_("false",B),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},H=/\r\n?|\n|\u2028|\u2029/,ai=new RegExp(H.source,"g");function de(t){return 10===t||13===t||8232===t||8233===t}function mt(t,e,s){void 0===s&&(s=t.length);for(var i=e;i<s;i++){var n=t.charCodeAt(i);if(de(n))return i<s-1&&13===n&&10===t.charCodeAt(i+1)?i+2:i+1}return-1}var xt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,gt=Object.prototype,oi=gt.hasOwnProperty,ui=gt.toString,me=Object.hasOwn||function(t,e){return oi.call(t,e)},st=Array.isArray||function(t){return"[object Array]"===ui.call(t)},rt=Object.create(null);function se(t){return rt[t]||(rt[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function ee(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var ci=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ye=function(t,e){this.line=t,this.column=e};ye.prototype.offset=function(t){return new ye(this.line,this.column+t)};var Ie=function(t,e,s){this.start=e,this.end=s,null!==t.sourceFile&&(this.source=t.sourceFile)};function vt(t,e){for(var s=1,i=0;;){var n=mt(t,i,e);if(n<0)return new ye(s,e-i);++s,i=n}}var We={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},nt=!1;function hi(t){var e={};for(var s in We)e[s]=t&&me(t,s)?t[s]:We[s];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!nt&&"object"==typeof console&&console.warn&&(nt=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),(!t||null==t.allowHashBang)&&(e.allowHashBang=e.ecmaVersion>=14),st(e.onToken)){var i=e.onToken;e.onToken=function(t){return i.push(t)}}return st(e.onComment)&&(e.onComment=li(e,e.onComment)),e}function li(t,e){return function(s,i,n,r,a,o){var h={type:s?"Block":"Line",value:i,start:n,end:r};t.locations&&(h.loc=new Ie(this,a,o)),t.ranges&&(h.range=[n,r]),e.push(h)}}var Ce=1,xe=2,Qe=4,bt=8,Ye=16,yt=32,Ne=64,Ct=128,ue=256,Se=512,Le=Ce|xe|ue;function Ze(t,e){return xe|(t?Qe:0)|(e?bt:0)}var ke=0,Je=1,ie=2,St=3,Et=4,wt=5,N=function(t,e,s){this.options=t=hi(t),this.sourceFile=t.sourceFile,this.keywords=se(ii[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var i="";!0!==t.allowReserved&&(i=Fe[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(i+=" await")),this.reservedWords=se(i);var n=(i?i+" ":"")+Fe.strict;this.reservedWordsStrict=se(n),this.reservedWordsStrictBind=se(n+" "+Fe.strictBind),this.input=String(e),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(H).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.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="module"===t.sourceType,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),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ce),this.regexpState=null,this.privateNameStack=[]},Y={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};N.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},Y.inFunction.get=function(){return(this.currentVarScope().flags&xe)>0},Y.inGenerator.get=function(){return(this.currentVarScope().flags&bt)>0},Y.inAsync.get=function(){return(this.currentVarScope().flags&Qe)>0},Y.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(ue|Se))return!1;if(e&xe)return(e&Qe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Y.allowSuper.get=function(){return(this.currentThisScope().flags&Ne)>0||this.options.allowSuperOutsideMethod},Y.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ct)>0},Y.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Y.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(ue|Se)||e&xe&&!(e&Ye))return!0}return!1},Y.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ue)>0},N.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var s=this,i=0;i<t.length;i++)s=t[i](s);return s},N.parse=function(t,e){return new this(e,t).parse()},N.parseExpressionAt=function(t,e,s){var i=new this(s,t,e);return i.nextToken(),i.parseExpression()},N.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(N.prototype,Y);var D=N.prototype,pi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;D.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=t,t+=O.exec(this.input)[0].length;var e=pi.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){O.lastIndex=t+e[0].length;var s=O.exec(this.input),i=s.index+s[0].length,n=this.input.charAt(i);return";"===n||"}"===n||H.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}t+=e[0].length,O.lastIndex=t,t+=O.exec(this.input)[0].length,";"===this.input[t]&&t++}},D.eat=function(t){return this.type===t&&(this.next(),!0)},D.isContextual=function(t){return this.type===o.name&&this.value===t&&!this.containsEsc},D.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},D.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},D.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||H.test(this.input.slice(this.lastTokEnd,this.start))},D.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},D.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()},D.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},D.expect=function(t){this.eat(t)||this.unexpected()},D.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var Re=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};D.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var s=e?t.parenthesizedAssign:t.parenthesizedBind;s>-1&&this.raiseRecoverable(s,e?"Assigning to rvalue":"Parenthesized pattern")}},D.checkExpressionErrors=function(t,e){if(!t)return!1;var s=t.shorthandAssign,i=t.doubleProto;if(!e)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},D.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")},D.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var b=N.prototype;b.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==o.eof;){var s=this.parseStatement(null,!0,e);t.body.push(s)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var r=n[i];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var et={kind:"loop"},fi={kind:"switch"};b.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),s=this.pos+e[0].length,i=this.input.charCodeAt(s);if(91===i||92===i)return!0;if(t)return!1;if(123===i||i>55295&&i<56320)return!0;if(Q(i,!0)){for(var n=s+1;re(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!si.test(r))return!0}return!1},b.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var t,e=O.exec(this.input),s=this.pos+e[0].length;return!(H.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(re(t=this.input.charCodeAt(s+8))||t>55295&&t<56320))},b.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;O.lastIndex=this.pos;var s=O.exec(this.input),i=this.pos+s[0].length;if(H.test(this.input.slice(this.pos,i)))return!1;if(t){var n,r=i+5;if("using"!==this.input.slice(i,r)||r===this.input.length||re(n=this.input.charCodeAt(r))||n>55295&&n<56320)return!1;O.lastIndex=r;var a=O.exec(this.input);if(a&&H.test(this.input.slice(r,r+a[0].length)))return!1}if(e){var o,h=i+2;if(!("of"!==this.input.slice(i,h)||h!==this.input.length&&(re(o=this.input.charCodeAt(h))||o>55295&&o<56320)))return!1}var c=this.input.charCodeAt(i);return Q(c,!0)||92===c},b.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},b.isUsing=function(t){return this.isUsingKeyword(!1,t)},b.parseStatement=function(t,e,s){var i,n=this.type,r=this.startNode();switch(this.isLet(t)&&(n=o._var,i="let"),n){case o._break:case o._continue:return this.parseBreakContinueStatement(r,n.keyword);case o._debugger:return this.parseDebuggerStatement(r);case o._do:return this.parseDoStatement(r);case o._for:return this.parseForStatement(r);case o._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case o._class:return t&&this.unexpected(),this.parseClass(r,!0);case o._if:return this.parseIfStatement(r);case o._return:return this.parseReturnStatement(r);case o._switch:return this.parseSwitchStatement(r);case o._throw:return this.parseThrowStatement(r);case o._try:return this.parseTryStatement(r);case o._const:case o._var:return i=i||this.value,t&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case o._while:return this.parseWhileStatement(r);case o._with:return this.parseWithStatement(r);case o.braceL:return this.parseBlock(!0,r);case o.semi:return this.parseEmptyStatement(r);case o._export:case o._import:if(this.options.ecmaVersion>10&&n===o._import){O.lastIndex=this.pos;var a=O.exec(this.input),h=this.pos+a[0].length,c=this.input.charCodeAt(h);if(40===c||46===c)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||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'")),n===o._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var l=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(l)return e&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===l&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,l),this.semicolon(),this.finishNode(r,"VariableDeclaration");var p=this.value,u=this.parseExpression();return n===o.name&&"Identifier"===u.type&&this.eat(o.colon)?this.parseLabeledStatement(r,p,u,t):this.parseExpressionStatement(r,u)}},b.parseBreakContinueStatement=function(t,e){var s="break"===e;this.next(),this.eat(o.semi)||this.insertSemicolon()?t.label=null:this.type!==o.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((null==t.label||n.name===t.label.name)&&(null!=n.kind&&(s||"loop"===n.kind)||t.label&&s))break}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")},b.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},b.parseDoStatement=function(t){return this.next(),this.labels.push(et),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},b.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(et),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var s=this.isLet();if(this.type===o._var||this.type===o._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(t,i,e)}var r=this.isContextual("let"),a=!1,h=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(h){var c=this.startNode();return this.next(),"await using"===h&&this.next(),this.parseVar(c,!0,h),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(t,c,e)}var l=this.containsEsc,p=new Re,u=this.start,d=e>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===o._in&&this.unexpected(e),t.await=!0):a&&this.options.ecmaVersion>=8&&(d.start!==u||l||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),r&&a&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,p),this.checkLValPattern(d),this.parseForIn(t,d)):(this.checkExpressionErrors(p,!0),e>-1&&this.unexpected(e),this.parseFor(t,d))},b.parseForAfterInit=function(t,e,s){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>=9&&(this.type===o._in?s>-1&&this.unexpected(s):t.await=s>-1),this.parseForIn(t,e)):(s>-1&&this.unexpected(s),this.parseFor(t,e))},b.parseFunctionStatement=function(t,e,s){return this.next(),this.parseFunction(t,be|(s?0:Ke),!1,e)},b.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},b.parseReturnStatement=function(t){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},b.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(o.braceL),this.labels.push(fi),this.enterScope(0);for(var e,s=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var i=this.type===o._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,e.test=null),this.expect(o.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},b.parseThrowStatement=function(t){return this.next(),H.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var di=[];b.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?yt:0),this.checkLValPattern(t,e?Et:ie),this.expect(o.parenR),t},b.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===o._catch){var e=this.startNode();this.next(),this.eat(o.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(o._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},b.parseVarStatement=function(t,e,s){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")},b.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(et),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},b.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},b.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},b.parseLabeledStatement=function(t,e,s,i){for(var n=0,r=this.labels;n<r.length;n+=1){r[n].name===e&&this.raise(s.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===o._switch?"switch":null,h=this.labels.length-1;h>=0;h--){var c=this.labels[h];if(c.statementStart!==t.start)break;c.statementStart=this.start,c.kind=a}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},b.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},b.parseBlock=function(t,e,s){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(o.braceL),t&&this.enterScope(0);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return s&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},b.parseFor=function(t,e){return t.init=e,this.expect(o.semi),t.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),t.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},b.parseForIn=function(t,e){var s=this.type===o._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,s?"ForInStatement":"ForOfStatement")},b.parseVar=function(t,e,s,i){for(t.declarations=[],t.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(o.eq)?n.init=this.parseMaybeAssign(e):i||"const"!==s||this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"using"!==s&&"await using"!==s||!(this.options.ecmaVersion>=17)||this.type===o._in||this.isContextual("of")?i||"Identifier"===n.id.type||e&&(this.type===o._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(o.comma))break}return t},b.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?Je:ie,!1)};var be=1,Ke=2,_t=4;function mi(t,e){var s=e.key.name,i=t[s],n="true";return"MethodDefinition"===e.type&&("get"===e.kind||"set"===e.kind)&&(n=(e.static?"s":"i")+e.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(t[s]="true",!1):!!i||(t[s]=n,!1)}function Ae(t,e){var s=t.computed,i=t.key;return!s&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}b.parseFunction=function(t,e,s,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===o.star&&e&Ke&&this.unexpected(),t.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&be&&(t.id=e&_t&&this.type!==o.name?null:this.parseIdent(),t.id&&!(e&Ke)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?Je:ie:St));var r=this.yieldPos,a=this.awaitPos,h=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ze(t.async,t.generator)),e&be||(t.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,s,!1,n),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=h,this.finishNode(t,e&be?"FunctionDeclaration":"FunctionExpression")},b.parseFunctionParams=function(t){this.expect(o.parenL),t.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},b.parseClass=function(t,e){this.next();var s=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(null!==t.superClass);a&&(n.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(r&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),r=!0):a.key&&"PrivateIdentifier"===a.key.type&&mi(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=s,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},b.parseClassElement=function(t){if(this.eat(o.semi))return null;var e=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,a="method",h=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===o.star?h=!0:i="static"}if(s.static=h,!i&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==o.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(e>=9||!r)&&this.eat(o.star)&&(n=!0),!i&&!r&&!n){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:i=c)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),e<13||this.type===o.parenL||"method"!==a||n||r){var l=!s.static&&Ae(s,"constructor"),p=l&&t;l&&"method"!==a&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=l?"constructor":a,this.parseClassMethod(s,n,r,p)}else this.parseClassField(s);return s},b.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword},b.parseClassElementName=function(t){this.type===o.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},b.parseClassMethod=function(t,e,s,i){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):t.static&&Ae(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=t.value=this.parseMethod(e,s,i);return"get"===t.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===t.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},b.parseClassField=function(t){return Ae(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&Ae(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope(Se|Ne),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},b.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(ue|Ne);this.type!==o.braceR;){var s=this.parseStatement(null);t.body.push(s)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},b.parseClassId=function(t,e){this.type===o.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ie,!1)):(!0===e&&this.unexpected(),t.id=null)},b.parseClassSuper=function(t){t.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null},b.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},b.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,s=t.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r<s.length;++r){var a=s[r];me(e,a.name)||(n?n.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},b.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},b.parseExport=function(t,e){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(t,e);if(this.eat(o._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var s=0,i=t.specifiers;s<i.length;s+=1){var n=i[s];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},b.parseExportDeclaration=function(t){return this.parseStatement(null)},b.parseExportDefaultDeclaration=function(){var t;if(this.type===o._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,be|_t,!1,t)}if(this.type===o._class){var s=this.startNode();return this.parseClass(s,"nullableID")}var i=this.parseMaybeAssign();return this.semicolon(),i},b.checkExport=function(t,e,s){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),me(t,e)&&this.raiseRecoverable(s,"Duplicate export '"+e+"'"),t[e]=!0)},b.checkPatternExport=function(t,e){var s=e.type;if("Identifier"===s)this.checkExport(t,e,e.start);else if("ObjectPattern"===s)for(var i=0,n=e.properties;i<n.length;i+=1){var r=n[i];this.checkPatternExport(t,r)}else if("ArrayPattern"===s)for(var a=0,o=e.elements;a<o.length;a+=1){var h=o[a];h&&this.checkPatternExport(t,h)}else"Property"===s?this.checkPatternExport(t,e.value):"AssignmentPattern"===s?this.checkPatternExport(t,e.left):"RestElement"===s&&this.checkPatternExport(t,e.argument)},b.checkVariableExport=function(t,e){if(t)for(var s=0,i=e;s<i.length;s+=1){var n=i[s];this.checkPatternExport(t,n.id)}},b.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},b.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},b.parseExportSpecifiers=function(t){var e=[],s=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseExportSpecifier(t))}return e},b.parseImport=function(t){return this.next(),this.type===o.string?(t.specifiers=di,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},b.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportSpecifier")},b.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportDefaultSpecifier")},b.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,ie),this.finishNode(t,"ImportNamespaceSpecifier")},b.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===o.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return t;if(this.type===o.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseImportSpecifier())}return t},b.parseWithClause=function(){var t=[];if(!this.eat(o._with))return t;this.expect(o.braceL);for(var e={},s=!0;!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var i=this.parseImportAttribute(),n="Identifier"===i.key.type?i.key.name:i.key.value;me(e,n)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(i)}return t},b.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===o.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(o.colon),this.type!==o.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},b.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var t=this.parseLiteral(this.value);return ci.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},b.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},b.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var z=N.prototype;z.toAssignable=function(t,e,s){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];this.toAssignable(r,e),"RestElement"===r.type&&("ArrayPattern"===r.argument.type||"ObjectPattern"===r.argument.type)&&this.raise(r.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",s&&this.checkPatternErrors(s,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,s);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else s&&this.checkPatternErrors(s,!0);return t},z.toAssignableList=function(t,e){for(var s=t.length,i=0;i<s;i++){var n=t[i];n&&this.toAssignable(n,e)}if(s){var r=t[s-1];6===this.options.ecmaVersion&&e&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start)}return t},z.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},z.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==o.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()},z.parseBindingList=function(t,e,s,i){for(var n=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(o.comma),e&&this.type===o.comma)n.push(null);else{if(s&&this.afterTrailingComma(t))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(i))}return n},z.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},z.parseBindingListItem=function(t){return t},z.parseMaybeDefault=function(t,e,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},z.checkLValSimple=function(t,e,s){void 0===e&&(e=ke);var i=e!==ke;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(i?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(e===ie&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),s&&(me(s,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),s[t.name]=!0),e!==wt&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,s);default:this.raise(t.start,(i?"Binding":"Assigning to")+" rvalue")}},z.checkLValPattern=function(t,e,s){switch(void 0===e&&(e=ke),t.type){case"ObjectPattern":for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];this.checkLValInnerPattern(r,e,s)}break;case"ArrayPattern":for(var a=0,o=t.elements;a<o.length;a+=1){var h=o[a];h&&this.checkLValInnerPattern(h,e,s)}break;default:this.checkLValSimple(t,e,s)}},z.checkLValInnerPattern=function(t,e,s){switch(void 0===e&&(e=ke),t.type){case"Property":this.checkLValInnerPattern(t.value,e,s);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,s);break;case"RestElement":this.checkLValPattern(t.argument,e,s);break;default:this.checkLValPattern(t,e,s)}};var G=function(t,e,s,i,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i,this.generator=!!n},T={b_stat:new G("{",!1),b_expr:new G("{",!0),b_tmpl:new G("${",!1),p_stat:new G("(",!1),p_expr:new G("(",!0),q_tmpl:new G("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new G("function",!1),f_expr:new G("function",!0),f_expr_gen:new G("function",!0,!1,null,!0),f_gen:new G("function",!1,!1,null,!0)},ge=N.prototype;ge.initialContext=function(){return[T.b_stat]},ge.curContext=function(){return this.context[this.context.length-1]},ge.braceIsBlock=function(t){var e=this.curContext();return e===T.f_expr||e===T.f_stat||(t!==o.colon||e!==T.b_stat&&e!==T.b_expr?t===o._return||t===o.name&&this.exprAllowed?H.test(this.input.slice(this.lastTokEnd,this.start)):t===o._else||t===o.semi||t===o.eof||t===o.parenR||t===o.arrow||(t===o.braceL?e===T.b_stat:t!==o._var&&t!==o._const&&t!==o.name&&!this.exprAllowed):!e.isExpr)},ge.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ge.updateContext=function(t){var e,s=this.type;s.keyword&&t===o.dot?this.exprAllowed=!1:(e=s.updateContext)?e.call(this,t):this.exprAllowed=s.beforeExpr},ge.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},o.parenR.updateContext=o.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===T.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},o.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?T.b_stat:T.b_expr),this.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.context.push(T.b_tmpl),this.exprAllowed=!0},o.parenL.updateContext=function(t){var e=t===o._if||t===o._for||t===o._with||t===o._while;this.context.push(e?T.p_stat:T.p_expr),this.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(t){!t.beforeExpr||t===o._else||t===o.semi&&this.curContext()!==T.p_stat||t===o._return&&H.test(this.input.slice(this.lastTokEnd,this.start))||(t===o.colon||t===o.braceL)&&this.curContext()===T.b_stat?this.context.push(T.f_stat):this.context.push(T.f_expr),this.exprAllowed=!1},o.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},o.backQuote.updateContext=function(){this.curContext()===T.q_tmpl?this.context.pop():this.context.push(T.q_tmpl),this.exprAllowed=!1},o.star.updateContext=function(t){if(t===o._function){var e=this.context.length-1;this.context[e]===T.f_expr?this.context[e]=T.f_expr_gen:this.context[e]=T.f_gen}this.exprAllowed=!0},o.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==o.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var y=N.prototype;function kt(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&kt(t.expression)}function $e(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&$e(t.expression)||"ParenthesizedExpression"===t.type&&$e(t.expression)}y.checkPropClash=function(t,e,s){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var i,n=t.key;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var r=t.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===i&&"init"===r&&(e.proto&&(s?s.doubleProto<0&&(s.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0));var a=e[i="$"+i];if(a)("init"===r?this.strict&&a.init||a.get||a.set:a.init||a[r])&&this.raiseRecoverable(n.start,"Redefinition of property");else a=e[i]={init:!1,get:!1,set:!1};a[r]=!0}},y.parseExpression=function(t,e){var s=this.start,i=this.startLoc,n=this.parseMaybeAssign(t,e);if(this.type===o.comma){var r=this.startNodeAt(s,i);for(r.expressions=[n];this.eat(o.comma);)r.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(r,"SequenceExpression")}return n},y.parseMaybeAssign=function(t,e,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var i=!1,n=-1,r=-1,a=-1;e?(n=e.parenthesizedAssign,r=e.trailingComma,a=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Re,i=!0);var h=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var l=this.parseMaybeConditional(t,e);if(s&&(l=s.call(this,l,h,c)),this.type.isAssign){var p=this.startNodeAt(h,c);return p.operator=this.value,this.type===o.eq&&(l=this.toAssignable(l,!1,e)),i||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=l.start&&(e.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(l):this.checkLValSimple(l),p.left=l,this.next(),p.right=this.parseMaybeAssign(t),a>-1&&(e.doubleProto=a),this.finishNode(p,"AssignmentExpression")}return i&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),r>-1&&(e.trailingComma=r),l},y.parseMaybeConditional=function(t,e){var s=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.eat(o.question)){var r=this.startNodeAt(s,i);return r.test=n,r.consequent=this.parseMaybeAssign(),this.expect(o.colon),r.alternate=this.parseMaybeAssign(t),this.finishNode(r,"ConditionalExpression")}return n},y.parseExprOps=function(t,e){var s=this.start,i=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===s&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,s,i,-1,t)},y.parseExprOp=function(t,e,s,i,n){var r=this.type.binop;if(null!=r&&(!n||this.type!==o._in)&&r>i){var a=this.type===o.logicalOR||this.type===o.logicalAND,h=this.type===o.coalesce;h&&(r=o.logicalAND.binop);var c=this.value;this.next();var l=this.start,p=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),l,p,r,n),d=this.buildBinary(e,s,t,u,c,a||h);return(a&&this.type===o.coalesce||h&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,e,s,i,n)}return t},y.buildBinary=function(t,e,s,i,n,r){"PrivateIdentifier"===i.type&&this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(t,e);return a.left=s,a.operator=n,a.right=i,this.finishNode(a,r?"LogicalExpression":"BinaryExpression")},y.parseMaybeUnary=function(t,e,s,i){var n,r=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(i),e=!0;else if(this.type.prefix){var h=this.startNode(),c=this.type===o.incDec;h.operator=this.value,h.prefix=!0,this.next(),h.argument=this.parseMaybeUnary(null,!0,c,i),this.checkExpressionErrors(t,!0),c?this.checkLValSimple(h.argument):this.strict&&"delete"===h.operator&&kt(h.argument)?this.raiseRecoverable(h.start,"Deleting local variable in strict mode"):"delete"===h.operator&&$e(h.argument)?this.raiseRecoverable(h.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(h,c?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==o.privateId){if(n=this.parseExprSubscripts(t,i),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(r,a);l.operator=this.value,l.prefix=!1,l.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(l,"UpdateExpression")}}else(i||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();return s||!this.eat(o.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(r,a,n,this.parseMaybeUnary(null,!1,!1,i),"**",!1)},y.parseExprSubscripts=function(t,e){var s=this.start,i=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var r=this.parseSubscripts(n,s,i,!1,e);return t&&"MemberExpression"===r.type&&(t.parenthesizedAssign>=r.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=r.start&&(t.parenthesizedBind=-1),t.trailingComma>=r.start&&(t.trailingComma=-1)),r},y.parseSubscripts=function(t,e,s,i,n){for(var r=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,a=!1;;){var o=this.parseSubscript(t,e,s,i,r,a,n);if(o.optional&&(a=!0),o===t||"ArrowFunctionExpression"===o.type){if(a){var h=this.startNodeAt(e,s);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}t=o}},y.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)},y.parseSubscriptAsyncArrow=function(t,e,s,i){return this.parseArrowExpression(this.startNodeAt(t,e),s,!0,i)},y.parseSubscript=function(t,e,s,i,n,r,a){var h=this.options.ecmaVersion>=11,c=h&&this.eat(o.questionDot);i&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(o.bracketL);if(l||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var p=this.startNodeAt(e,s);p.object=t,l?(p.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&"Super"!==t.type?p.property=this.parsePrivateIdent():p.property=this.parseIdent("never"!==this.options.allowReserved),p.computed=!!l,h&&(p.optional=c),t=this.finishNode(p,"MemberExpression")}else if(!i&&this.eat(o.parenL)){var u=new Re,d=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,u);if(n&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=f,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(e,s,g,a);this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var v=this.startNodeAt(e,s);v.callee=t,v.arguments=g,h&&(v.optional=c),t=this.finishNode(v,"CallExpression")}else if(this.type===o.backQuote){(c||r)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var x=this.startNodeAt(e,s);x.tag=t,x.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(x,"TaggedTemplateExpression")}return t},y.parseExprAtom=function(t,e,s){this.type===o.slash&&this.readRegexp();var i,n=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(i,"Super");case o._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case o.name:var r=this.start,a=this.startLoc,h=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!h&&"async"===c.name&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(T.f_expr),this.parseFunction(this.startNodeAt(r,a),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(r,a),[c],!1,e);if(this.options.ecmaVersion>=8&&"async"===c.name&&this.type===o.name&&!h&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,a),[c],!0,e)}return c;case o.regexp:var l=this.value;return(i=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},i;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return(i=this.startNode()).value=this.type===o._null?null:this.type===o._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case o.parenL:var p=this.start,u=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(t.parenthesizedAssign=p),t.parenthesizedBind<0&&(t.parenthesizedBind=p)),u;case o.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(o.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case o.braceL:return this.overrideContext(T.b_expr),this.parseObj(!1,t);case o._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},y.parseExprAtomDefault=function(){this.unexpected()},y.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!t)return this.parseDynamicImport(e);if(this.type===o.dot){var s=this.startNodeAt(e.start,e.loc&&e.loc.start);return s.name="import",e.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(e)}this.unexpected()},y.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?t.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var e=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},y.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"!==this.options.sourceType&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},y.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},y.parseParenExpression=function(){this.expect(o.parenL);var t=this.parseExpression();return this.expect(o.parenR),t},y.shouldParseArrow=function(t){return!this.canInsertSemicolon()},y.parseParenAndDistinguishExpression=function(t,e){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,h=this.start,c=this.startLoc,l=[],p=!0,u=!1,d=new Re,f=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;){if(p?p=!1:this.expect(o.comma),r&&this.afterTrailingComma(o.parenR,!0)){u=!0;break}if(this.type===o.ellipsis){a=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var g=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(o.parenR),t&&this.shouldParseArrow(l)&&this.eat(o.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=m,this.parseParenArrowList(i,n,l,e);(!l.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?((s=this.startNodeAt(h,c)).expressions=l,this.finishNodeAt(s,"SequenceExpression",g,v)):s=l[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var x=this.startNodeAt(i,n);return x.expression=s,this.finishNode(x,"ParenthesizedExpression")}return s},y.parseParenItem=function(t){return t},y.parseParenArrowList=function(t,e,s,i){return this.parseArrowExpression(this.startNodeAt(t,e),s,!1,i)};var xi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var s=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(o.parenL)?t.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):t.arguments=xi,this.finishNode(t,"NewExpression")},y.parseTemplateElement=function(t){var e=t.isTagged,s=this.startNode();return this.type===o.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===o.backQuote,this.finishNode(s,"TemplateElement")},y.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(s.quasis=[i];!i.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(o.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(s,"TemplateLiteral")},y.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!H.test(this.input.slice(this.lastTokEnd,this.start))},y.parseObj=function(t,e){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var r=this.parseProperty(t,e);t||this.checkPropClash(r,n,e),s.properties.push(r)}return this.finishNode(s,t?"ObjectPattern":"ObjectExpression")},y.parseProperty=function(t,e){var s,i,n,r,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return t?(a.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,e),this.type===o.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(t||e)&&(n=this.start,r=this.startLoc),t||(s=this.eat(o.star)));var h=this.containsEsc;return this.parsePropertyName(a),!t&&!h&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(a)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(a)):i=!1,this.parsePropertyValue(a,t,s,i,n,r,e,h),this.finishNode(a,"Property")},y.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var s="get"===t.kind?0:1;if(t.value.params.length!==s){var i=t.value.start;"get"===t.kind?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},y.parsePropertyValue=function(t,e,s,i,n,r,a,h){(s||i)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(s,i),t.kind="init"):e||h||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===o.comma||this.type===o.braceR||this.type===o.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(t.key),"await"===t.key.name&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,r,this.copyNode(t.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,r,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(t))},y.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(o.bracketR),t.key;t.computed=!1}return t.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},y.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},y.parseMethod=function(t,e,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ze(e,i.generator)|Ne|(s?Ct:0)),this.expect(o.parenL),i.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")},y.parseArrowExpression=function(t,e,s,i){var n=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(Ze(s,!1)|Ye),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=a,this.finishNode(t,"ArrowFunctionExpression")},y.parseFunctionBody=function(t,e,s,i){var n=e&&this.type!==o.braceL,r=this.strict,a=!1;if(n)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var h=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!r||h)&&((a=this.strictDirective(this.end))&&h&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(t,!r&&!a&&!e&&!s&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,wt),t.body=this.parseBlock(!1,void 0,a&&!r),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=c}this.exitScope()},y.isSimpleParamList=function(t){for(var e=0,s=t;e<s.length;e+=1){if("Identifier"!==s[e].type)return!1}return!0},y.checkParams=function(t,e){for(var s=Object.create(null),i=0,n=t.params;i<n.length;i+=1){var r=n[i];this.checkLValInnerPattern(r,Je,e?null:s)}},y.parseExprList=function(t,e,s,i){for(var n=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(o.comma),e&&this.afterTrailingComma(t))break;var a=void 0;s&&this.type===o.comma?a=null:this.type===o.ellipsis?(a=this.parseSpread(i),i&&this.type===o.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):a=this.parseMaybeAssign(!1,i),n.push(a)}return n},y.checkUnreserved=function(t){var e=t.start,s=t.end,i=t.name;(this.inGenerator&&"yield"===i&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Le)&&"arguments"===i&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&("arguments"===i||"await"===i)&&this.raise(e,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(e,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,s).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(!this.inAsync&&"await"===i&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+i+"' is reserved"))},y.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"===e.name&&!this.awaitIdentPos&&(this.awaitIdentPos=e.start)),e},y.parseIdentNode=function(){var t=this.startNode();return this.type===o.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,("class"===t.name||"function"===t.name)&&(this.lastTokEnd!==this.lastTokStart+1||46!==this.input.charCodeAt(this.lastTokStart))&&this.context.pop(),this.type=o.name):this.unexpected(),t},y.parsePrivateIdent=function(){var t=this.startNode();return this.type===o.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},y.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(o.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},y.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Pe=N.prototype;Pe.raise=function(t,e){var s=vt(this.input,t);e+=" ("+s.line+":"+s.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var i=new SyntaxError(e);throw i.pos=t,i.loc=s,i.raisedAt=this.pos,i},Pe.raiseRecoverable=Pe.raise,Pe.curPosition=function(){if(this.options.locations)return new ye(this.curLine,this.pos-this.lineStart)};var ne=N.prototype,gi=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ne.enterScope=function(t){this.scopeStack.push(new gi(t))},ne.exitScope=function(){this.scopeStack.pop()},ne.treatFunctionsAsVarInScope=function(t){return t.flags&xe||!this.inModule&&t.flags&Ce},ne.declareName=function(t,e,s){var i=!1;if(e===ie){var n=this.currentScope();i=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&n.flags&Ce&&delete this.undefinedExports[t]}else if(e===Et){this.currentScope().lexical.push(t)}else if(e===St){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(t)>-1:r.lexical.indexOf(t)>-1||r.var.indexOf(t)>-1,r.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(t)>-1&&!(o.flags&yt&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){i=!0;break}if(o.var.push(t),this.inModule&&o.flags&Ce&&delete this.undefinedExports[t],o.flags&Le)break}i&&this.raiseRecoverable(s,"Identifier '"+t+"' has already been declared")},ne.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ne.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Le|Se|ue))return e}},ne.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Le|Se|ue)&&!(e.flags&Ye))return e}};var Ve=function(t,e,s){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new Ie(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},Ee=N.prototype;function At(t,e,s,i){return t.type=e,t.end=s,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=s),t}Ee.startNode=function(){return new Ve(this,this.start,this.startLoc)},Ee.startNodeAt=function(t,e){return new Ve(this,t,e)},Ee.finishNode=function(t,e){return At.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},Ee.finishNodeAt=function(t,e,s,i){return At.call(this,t,e,s,i)},Ee.copyNode=function(t){var e=new Ve(this,t.start,this.startLoc);for(var s in t)e[s]=t[s];return e};var vi="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",Pt="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",Tt=Pt+" Extended_Pictographic",It=Tt,Nt=Tt+" EBase EComp EMod EPres ExtPict",Lt=Nt,bi=Nt,yi={9:Pt,10:Tt,11:Tt,12:Nt,13:Nt,14:bi},Ci="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Si={9:"",10:"",11:"",12:"",13:"",14:Ci},at="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",Rt="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",Vt=Rt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ot=Vt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Mt=Ot+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ft=Mt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ei=Ft+" "+vi,wi={9:Rt,10:Vt,11:Ot,12:Mt,13:Ft,14:Ei},Dt={};function _i(t){var e=Dt[t]={binary:se(yi[t]+" "+at),binaryOfStrings:se(Si[t]),nonBinary:{General_Category:se(at),Script:se(wi[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var Be=0,ot=[9,10,11,12,13,14];Be<ot.length;Be+=1){var ki=ot[Be];_i(ki)}var v=N.prototype,Te=function(t,e){this.parent=t,this.base=e||this};Te.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var s=t;s;s=s.parent)if(e.base===s.base&&e!==s)return!0;return!1},Te.prototype.sibling=function(){return new Te(this.parent,this.base)};var Z=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=Dt[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};function Ai(t){for(var e in t)return!0;return!1}function Pi(t){return 105===t||109===t||115===t}function Bt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Ti(t){return Q(t,!0)||36===t||95===t}function Ii(t){return re(t,!0)||36===t||95===t||8204===t||8205===t}function Ht(t){return t>=65&&t<=90||t>=97&&t<=122}function Ni(t){return t>=0&&t<=1114111}Z.prototype.reset=function(t,e,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|t,this.source=e+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Z.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Z.prototype.at=function(t,e){void 0===e&&(e=!1);var s=this.source,i=s.length;if(t>=i)return-1;var n=s.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=i)return n;var r=s.charCodeAt(t+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},Z.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var s=this.source,i=s.length;if(t>=i)return i;var n,r=s.charCodeAt(t);return!e&&!this.switchU||r<=55295||r>=57344||t+1>=i||(n=s.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Z.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Z.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Z.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Z.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Z.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var s=this.pos,i=0,n=t;i<n.length;i+=1){var r=n[i],a=this.at(s,e);if(-1===a||a!==r)return!1;s=this.nextIndex(s,e)}return this.pos=s,!0},v.validateRegExpFlags=function(t){for(var e=t.validFlags,s=t.flags,i=!1,n=!1,r=0;r<s.length;r++){var a=s.charAt(r);-1===e.indexOf(a)&&this.raise(t.start,"Invalid regular expression flag"),s.indexOf(a,r+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===a&&(i=!0),"v"===a&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(t.start,"Invalid regular expression flag")},v.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&Ai(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},v.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,s=t.backReferenceNames;e<s.length;e+=1){var i=s[e];t.groupNames[i]||t.raise("Invalid named capture referenced")}},v.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Te(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},v.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},v.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},v.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var s=!1;if(this.options.ecmaVersion>=9&&(s=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!s,!0}return t.pos=e,!1},v.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},v.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},v.regexp_eatBracedQuantifier=function(t,e){var s=t.pos;if(t.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<i&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=s}return!1},v.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},v.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},v.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var s=this.regexp_eatModifiers(t),i=t.eat(45);if(s||i){for(var n=0;n<s.length;n++){var r=s.charAt(n);s.indexOf(r,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(i){var a=this.regexp_eatModifiers(t);!s&&!a&&58===t.current()&&t.raise("Invalid regular expression modifiers");for(var o=0;o<a.length;o++){var h=a.charAt(o);(a.indexOf(h,o+1)>-1||s.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},v.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},v.regexp_eatModifiers=function(t){for(var e="",s=0;-1!==(s=t.current())&&Pi(s);)e+=ee(s),t.advance();return e},v.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},v.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},v.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Bt(e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatPatternCharacters=function(t){for(var e=t.pos,s=0;-1!==(s=t.current())&&!Bt(s);)t.advance();return t.pos!==e},v.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},v.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,s=t.groupNames[t.lastStringValue];if(s)if(e)for(var i=0,n=s;i<n.length;i+=1){n[i].separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(s||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},v.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},v.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=ee(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=ee(t.lastIntValue);return!0}return!1},v.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,s=this.options.ecmaVersion>=11,i=t.current(s);return t.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t,s)&&(i=t.lastIntValue),Ti(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},v.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,s=this.options.ecmaVersion>=11,i=t.current(s);return t.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t,s)&&(i=t.lastIntValue),Ii(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},v.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},v.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var s=t.lastIntValue;if(t.switchU)return s>t.maxBackReference&&(t.maxBackReference=s),!0;if(s<=t.numCapturingParens)return!0;t.pos=e}return!1},v.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},v.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},v.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},v.regexp_eatZero=function(t){return 48===t.current()&&!Oe(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},v.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},v.regexp_eatControlLetter=function(t){var e=t.current();return!!Ht(e)&&(t.lastIntValue=e%32,t.advance(),!0)},v.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var s=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(i&&n>=55296&&n<=56319){var r=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(n-55296)+(a-56320)+65536,!0}t.pos=r,t.lastIntValue=n}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&Ni(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=s}return!1},v.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};var Ut=0,te=1,$=2;function Li(t){return 100===t||68===t||115===t||83===t||119===t||87===t}function jt(t){return Ht(t)||95===t}function Ri(t){return jt(t)||Oe(t)}function Vi(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}function Oi(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}function Mi(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}function Oe(t){return t>=48&&t<=57}function qt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Wt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Kt(t){return t>=48&&t<=55}v.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(Li(e))return t.lastIntValue=-1,t.advance(),te;var s=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((s=80===e)||112===e)){var i;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return s&&i===$&&t.raise("Invalid property name"),i;t.raise("Invalid property name")}return Ut},v.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var s=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,s,i),te}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,n)}return Ut},v.regexp_validateUnicodePropertyNameAndValue=function(t,e,s){me(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(s)||t.raise("Invalid property value")},v.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?te:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?$:void t.raise("Invalid property name")},v.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";jt(e=t.current());)t.lastStringValue+=ee(e),t.advance();return""!==t.lastStringValue},v.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ri(e=t.current());)t.lastStringValue+=ee(e),t.advance();return""!==t.lastStringValue},v.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},v.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),s=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&s===$&&t.raise("Negated character class may contain strings"),!0}return!1},v.regexp_classContents=function(t){return 93===t.current()?te:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),te)},v.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var s=t.lastIntValue;t.switchU&&(-1===e||-1===s)&&t.raise("Invalid character class"),-1!==e&&-1!==s&&e>s&&t.raise("Range out of order in character class")}}},v.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var s=t.current();(99===s||Kt(s))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return 93!==i&&(t.lastIntValue=i,t.advance(),!0)},v.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},v.regexp_classSetExpression=function(t){var e,s=te;if(!this.regexp_eatClassSetRange(t))if(e=this.regexp_eatClassSetOperand(t)){e===$&&(s=$);for(var i=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?e!==$&&(s=te):t.raise("Invalid character in character class");if(i!==t.pos)return s;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(i!==t.pos)return s}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return s;e===$&&(s=$)}},v.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;return-1!==s&&-1!==i&&s>i&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},v.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?te:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},v.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var s=t.eat(94),i=this.regexp_classContents(t);if(t.eat(93))return s&&i===$&&t.raise("Negated character class may contain strings"),i;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},v.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var s=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return s}else t.raise("Invalid escape");t.pos=e}return null},v.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===$&&(e=$);return e},v.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?te:$},v.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var s=t.current();return!(s<0||s===t.lookahead()&&Vi(s)||Oi(s))&&(t.advance(),t.lastIntValue=s,!0)},v.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!Mi(e)&&(t.lastIntValue=e,t.advance(),!0)},v.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Oe(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},v.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},v.regexp_eatDecimalDigits=function(t){var e=t.pos,s=0;for(t.lastIntValue=0;Oe(s=t.current());)t.lastIntValue=10*t.lastIntValue+(s-48),t.advance();return t.pos!==e},v.regexp_eatHexDigits=function(t){var e=t.pos,s=0;for(t.lastIntValue=0;qt(s=t.current());)t.lastIntValue=16*t.lastIntValue+Wt(s),t.advance();return t.pos!==e},v.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var s=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*s+t.lastIntValue:t.lastIntValue=8*e+s}else t.lastIntValue=e;return!0}return!1},v.regexp_eatOctalDigit=function(t){var e=t.current();return Kt(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},v.regexp_eatFixedHexDigits=function(t,e){var s=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var n=t.current();if(!qt(n))return t.pos=s,!1;t.lastIntValue=16*t.lastIntValue+Wt(n),t.advance()}return!0};var tt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ie(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},w=N.prototype;function Fi(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function $t(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}w.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new tt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},w.getToken=function(){return this.next(),new tt(this)},typeof Symbol<"u"&&(w[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===o.eof,value:e}}}}),w.nextToken=function(){var t=this.curContext();return(!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(o.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},w.readToken=function(t){return Q(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},w.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888},w.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=e;(i=mt(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,s),e,this.pos,t,this.curPosition())},w.skipLineComment=function(t){for(var e=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!de(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,s,this.curPosition())},w.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++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 t}break;default:if(!(t>8&&t<14||t>=5760&&xt.test(String.fromCharCode(t))))break t;++this.pos}}},w.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=t,this.value=e,this.updateContext(s)},w.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))},w.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(o.assign,2):this.finishOp(o.slash,1)},w.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),s=1,i=42===t?o.star:o.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++s,i=o.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(o.assign,s+1):this.finishOp(i,s)},w.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(o.assign,3);return this.finishOp(124===t?o.logicalOR:o.logicalAND,2)}return 61===e?this.finishOp(o.assign,2):this.finishOp(124===t?o.bitwiseOR:o.bitwiseAND,1)},w.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)},w.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!H.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(o.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)},w.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(o.assign,s+1):this.finishOp(o.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(s=2),this.finishOp(o.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},w.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(o.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(61===t?o.eq:o.prefix,1)},w.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(o.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(o.assign,3);return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)},w.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,Q(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ee(t)+"'")},w.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)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(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ee(t)+"'")},w.finishOp=function(t,e){var s=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,s)},w.readRegexp=function(){for(var t,e,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(H.test(i)&&this.raise(s,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(r);var h=this.regexpState||(this.regexpState=new Z(this));h.reset(s,n,a),this.validateRegExpFlags(h),this.validateRegExpPattern(h);var c=null;try{c=new RegExp(n,a)}catch{}return this.finishToken(o.regexp,{pattern:n,flags:a,value:c})},w.readInt=function(t,e,s){for(var i=this.options.ecmaVersion>=12&&void 0===e,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,a=0,o=0,h=0,c=e??1/0;h<c;++h,++this.pos){var l=this.input.charCodeAt(this.pos),p=void 0;if(i&&95===l)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=l;else{if((p=l>=97?l-97+10:l>=65?l-65+10:l>=48&&l<=57?l-48:1/0)>=t)break;o=l,a=a*t+p}}return i&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=e&&this.pos-r!==e?null:a},w.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var s=this.readInt(t);return null==s&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=$t(this.input.slice(e,this.pos)),++this.pos):Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)},w.readNumber=function(t){var e=this.pos;!t&&null===this.readInt(10,void 0,!0)&&this.raise(e,"Invalid number");var s=this.pos-e>=2&&48===this.input.charCodeAt(e);s&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!t&&this.options.ecmaVersion>=11&&110===i){var n=$t(this.input.slice(e,this.pos));return++this.pos,Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,n)}s&&/[89]/.test(this.input.slice(e,this.pos))&&(s=!1),46===i&&!s&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(69===i||101===i)&&!s&&((43===(i=this.input.charCodeAt(++this.pos))||45===i)&&++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),Q(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r=Fi(this.input.slice(e,this.pos),s);return this.finishToken(o.num,r)},w.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},w.readString=function(t){for(var e="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.pos),e+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(de(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(s,this.pos++),this.finishToken(o.string,e)};var zt={};w.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==zt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},w.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw zt;this.raise(t,e)},w.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==o.template&&this.type!==o.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(o.template,t)):36===s?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote));if(92===s)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(de(s)){switch(t+=this.input.slice(e,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},w.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(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},w.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ee(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++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"),t){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),("0"!==i||56===e||57===e)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return de(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},w.readHexChar=function(t){var e=this.pos,s=this.readInt(16,t);return null===s&&this.invalidStringToken(e,"Bad character escape sequence"),s},w.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(re(n,i))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(s,this.pos);var r=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(e?Q:re)(a,i)||this.invalidStringToken(r,"Invalid Unicode escape"),t+=ee(a),s=this.pos}e=!1}return t+this.input.slice(s,this.pos)},w.readWord=function(){var t=this.readWord1(),e=o.name;return this.keywords.test(t)&&(e=Xe[t]),this.finishToken(e,t)};var Di="8.15.0";function He(t,e){return N.parse(t,e)}function Bi(t,e,s){return N.parseExpressionAt(t,e,s)}function Ue(t,e,s,i,n){var r=[];s||(s=d),function t(i,n,a){var o=a||i.type,h=i!==r[r.length-1];h&&r.push(i),s[o](i,n,t),e[o]&&e[o](i,n||r,r),h&&r.pop()}(t,i,n)}function it(t,e,s){s(t,e)}function ce(t,e,s){}N.acorn={Parser:N,version:Di,defaultOptions:We,Position:ye,SourceLocation:Ie,getLineInfo:vt,Node:Ve,TokenType:A,tokTypes:o,keywordTypes:Xe,TokContext:G,tokContexts:T,isIdentifierChar:re,isIdentifierStart:Q,Token:tt,isNewLine:de,lineBreak:H,lineBreakG:ai,nonASCIIwhitespace:xt};var d={};d.Program=d.BlockStatement=d.StaticBlock=function(t,e,s){for(var i=0,n=t.body;i<n.length;i+=1){s(n[i],e,"Statement")}},d.Statement=it,d.EmptyStatement=ce,d.ExpressionStatement=d.ParenthesizedExpression=d.ChainExpression=function(t,e,s){return s(t.expression,e,"Expression")},d.IfStatement=function(t,e,s){s(t.test,e,"Expression"),s(t.consequent,e,"Statement"),t.alternate&&s(t.alternate,e,"Statement")},d.LabeledStatement=function(t,e,s){return s(t.body,e,"Statement")},d.BreakStatement=d.ContinueStatement=ce,d.WithStatement=function(t,e,s){s(t.object,e,"Expression"),s(t.body,e,"Statement")},d.SwitchStatement=function(t,e,s){s(t.discriminant,e,"Expression");for(var i=0,n=t.cases;i<n.length;i+=1){s(n[i],e)}},d.SwitchCase=function(t,e,s){t.test&&s(t.test,e,"Expression");for(var i=0,n=t.consequent;i<n.length;i+=1){s(n[i],e,"Statement")}},d.ReturnStatement=d.YieldExpression=d.AwaitExpression=function(t,e,s){t.argument&&s(t.argument,e,"Expression")},d.ThrowStatement=d.SpreadElement=function(t,e,s){return s(t.argument,e,"Expression")},d.TryStatement=function(t,e,s){s(t.block,e,"Statement"),t.handler&&s(t.handler,e),t.finalizer&&s(t.finalizer,e,"Statement")},d.CatchClause=function(t,e,s){t.param&&s(t.param,e,"Pattern"),s(t.body,e,"Statement")},d.WhileStatement=d.DoWhileStatement=function(t,e,s){s(t.test,e,"Expression"),s(t.body,e,"Statement")},d.ForStatement=function(t,e,s){t.init&&s(t.init,e,"ForInit"),t.test&&s(t.test,e,"Expression"),t.update&&s(t.update,e,"Expression"),s(t.body,e,"Statement")},d.ForInStatement=d.ForOfStatement=function(t,e,s){s(t.left,e,"ForInit"),s(t.right,e,"Expression"),s(t.body,e,"Statement")},d.ForInit=function(t,e,s){"VariableDeclaration"===t.type?s(t,e):s(t,e,"Expression")},d.DebuggerStatement=ce,d.FunctionDeclaration=function(t,e,s){return s(t,e,"Function")},d.VariableDeclaration=function(t,e,s){for(var i=0,n=t.declarations;i<n.length;i+=1){s(n[i],e)}},d.VariableDeclarator=function(t,e,s){s(t.id,e,"Pattern"),t.init&&s(t.init,e,"Expression")},d.Function=function(t,e,s){t.id&&s(t.id,e,"Pattern");for(var i=0,n=t.params;i<n.length;i+=1){s(n[i],e,"Pattern")}s(t.body,e,t.expression?"Expression":"Statement")},d.Pattern=function(t,e,s){"Identifier"===t.type?s(t,e,"VariablePattern"):"MemberExpression"===t.type?s(t,e,"MemberPattern"):s(t,e)},d.VariablePattern=ce,d.MemberPattern=it,d.RestElement=function(t,e,s){return s(t.argument,e,"Pattern")},d.ArrayPattern=function(t,e,s){for(var i=0,n=t.elements;i<n.length;i+=1){var r=n[i];r&&s(r,e,"Pattern")}},d.ObjectPattern=function(t,e,s){for(var i=0,n=t.properties;i<n.length;i+=1){var r=n[i];"Property"===r.type?(r.computed&&s(r.key,e,"Expression"),s(r.value,e,"Pattern")):"RestElement"===r.type&&s(r.argument,e,"Pattern")}},d.Expression=it,d.ThisExpression=d.Super=d.MetaProperty=ce,d.ArrayExpression=function(t,e,s){for(var i=0,n=t.elements;i<n.length;i+=1){var r=n[i];r&&s(r,e,"Expression")}},d.ObjectExpression=function(t,e,s){for(var i=0,n=t.properties;i<n.length;i+=1){s(n[i],e)}},d.FunctionExpression=d.ArrowFunctionExpression=d.FunctionDeclaration,d.SequenceExpression=function(t,e,s){for(var i=0,n=t.expressions;i<n.length;i+=1){s(n[i],e,"Expression")}},d.TemplateLiteral=function(t,e,s){for(var i=0,n=t.quasis;i<n.length;i+=1){s(n[i],e)}for(var r=0,a=t.expressions;r<a.length;r+=1){s(a[r],e,"Expression")}},d.TemplateElement=ce,d.UnaryExpression=d.UpdateExpression=function(t,e,s){s(t.argument,e,"Expression")},d.BinaryExpression=d.LogicalExpression=function(t,e,s){s(t.left,e,"Expression"),s(t.right,e,"Expression")},d.AssignmentExpression=d.AssignmentPattern=function(t,e,s){s(t.left,e,"Pattern"),s(t.right,e,"Expression")},d.ConditionalExpression=function(t,e,s){s(t.test,e,"Expression"),s(t.consequent,e,"Expression"),s(t.alternate,e,"Expression")},d.NewExpression=d.CallExpression=function(t,e,s){if(s(t.callee,e,"Expression"),t.arguments)for(var i=0,n=t.arguments;i<n.length;i+=1){s(n[i],e,"Expression")}},d.MemberExpression=function(t,e,s){s(t.object,e,"Expression"),t.computed&&s(t.property,e,"Expression")},d.ExportNamedDeclaration=d.ExportDefaultDeclaration=function(t,e,s){t.declaration&&s(t.declaration,e,"ExportNamedDeclaration"===t.type||t.declaration.id?"Statement":"Expression"),t.source&&s(t.source,e,"Expression")},d.ExportAllDeclaration=function(t,e,s){t.exported&&s(t.exported,e),s(t.source,e,"Expression")},d.ImportDeclaration=function(t,e,s){for(var i=0,n=t.specifiers;i<n.length;i+=1){s(n[i],e)}s(t.source,e,"Expression")},d.ImportExpression=function(t,e,s){s(t.source,e,"Expression")},d.ImportSpecifier=d.ImportDefaultSpecifier=d.ImportNamespaceSpecifier=d.Identifier=d.PrivateIdentifier=d.Literal=ce,d.TaggedTemplateExpression=function(t,e,s){s(t.tag,e,"Expression"),s(t.quasi,e,"Expression")},d.ClassDeclaration=d.ClassExpression=function(t,e,s){return s(t,e,"Class")},d.Class=function(t,e,s){t.id&&s(t.id,e,"Pattern"),t.superClass&&s(t.superClass,e,"Expression"),s(t.body,e)},d.ClassBody=function(t,e,s){for(var i=0,n=t.body;i<n.length;i+=1){s(n[i],e)}},d.MethodDefinition=d.PropertyDefinition=d.Property=function(t,e,s){t.computed&&s(t.key,e,"Expression"),t.value&&s(t.value,e,"Expression")};class U{static pruneCache(t){t.size>this.MAX_CACHE_SIZE&&Array.from(t.keys()).slice(0,t.size-this.MAX_CACHE_SIZE/2).forEach(e=>t.delete(e))}static clearCaches(){this.expressionCache.clear(),this.variableCache.clear(),this.bindingsCache.clear(),this.loopVariableCache.clear()}static extractStateBindings(t){if(this.bindingsCache.has(t))return[...this.bindingsCache.get(t)];const e=new Set;try{Ue(He(t,{ecmaVersion:2020}),{FunctionDeclaration(t,s){s.length<=2&&t.id&&t.id.name&&e.add(t.id.name)},VariableDeclaration(t,s){s.length>2||t.declarations.forEach(t=>{var s,i,n,r,a;"CallExpression"!==(null==(s=t.init)?void 0:s.type)||"pp"!==(null==(n=null==(i=t.init.callee)?void 0:i.object)?void 0:n.name)||"state"!==(null==(a=null==(r=t.init.callee)?void 0:r.property)?void 0:a.name)?("Identifier"===t.id.type&&e.add(t.id.name),"ObjectPattern"===t.id.type&&t.id.properties.forEach(t=>{var s,i;"Property"===t.type&&"Identifier"===(null==(s=t.value)?void 0:s.type)&&e.add(t.value.name),"RestElement"===t.type&&"Identifier"===(null==(i=t.argument)?void 0:i.type)&&e.add(t.argument.name)})):"ArrayPattern"===t.id.type&&t.id.elements.forEach(t=>{"Identifier"===(null==t?void 0:t.type)&&e.add(t.name)})})}})}catch(t){console.error("[PP-ERROR] AstParser Failed",t)}const s=Array.from(e);return this.pruneCache(this.bindingsCache),this.bindingsCache.set(t,s),s}static extractUsedVariables(t,e){const s=t+"|"+Array.from(e).sort().join(",");if(this.variableCache.has(s))return new Set(this.variableCache.get(s));const i=new Set;try{Ue(He(`(${t})`,{ecmaVersion:2020}),{Identifier(t,s){if(!e.has(t.name)){if(s.length>1){const e=s[s.length-2];if("MemberExpression"===e.type&&e.property===t&&!e.computed||"Property"===e.type&&e.key===t&&!e.computed&&!e.shorthand)return}i.add(t.name)}}})}catch{}return this.pruneCache(this.variableCache),this.variableCache.set(s,i),new Set(i)}static isValidExpression(t){if(!t.trim())return!1;if(this.expressionCache.has(t))return this.expressionCache.get(t);let e=!1;try{Bi(`(${t})`,0,{ecmaVersion:2020}),e=!0}catch{e=!1}return this.pruneCache(this.expressionCache),this.expressionCache.set(t,e),e}static analyzeLoopVariableUsage(t,e){const s=t+"|"+e;if(this.loopVariableCache.has(s))return[...this.loopVariableCache.get(s)];const i=[];try{Ue(He(t,{ecmaVersion:2020}),{Identifier(t,s){if(t.name!==e)return;let n=!1,r=!1,a=t.start,o=t.end;if(s.length>=2){const e=s[s.length-2];if("MemberExpression"===e.type&&e.property===t&&!e.computed||"Property"===e.type&&e.key===t&&!e.computed&&!e.shorthand)return;if("Property"===e.type&&e.shorthand&&(n=!0,s.length>=3)){const t=s[s.length-3];"ObjectExpression"===t.type&&1===t.properties.length&&(r=!0,a=t.start,o=t.end)}}i.push({start:a,end:o,isShorthand:n,isUnwrap:r})}})}catch{}return this.pruneCache(this.loopVariableCache),this.loopVariableCache.set(s,i),[...i]}}g(U,"expressionCache",new Map),g(U,"variableCache",new Map),g(U,"bindingsCache",new Map),g(U,"loopVariableCache",new Map),g(U,"MAX_CACHE_SIZE",1e3);const ut=new Set(["class","for","while","if","else","return","function","var","let","const","import","export","this","debugger","delete","typeof","void","new","in","instanceof","do","try","catch","finally","switch","case","default","break","continue","yield","await","with","super","enum","extends","implements","interface","package","private","protected","public","static"]),Hi=new Set(["Array","Object","String","Number","Boolean","Math","JSON","Date","RegExp","Error","Map","Set","WeakMap","WeakSet","Promise","Symbol","BigInt","parseInt","parseFloat","isNaN","isFinite","encodeURI","decodeURI","encodeURIComponent","decodeURIComponent","console","window","document","undefined","null","NaN","Infinity","pp","true","false","setTimeout","setInterval","clearTimeout","clearInterval","requestAnimationFrame","cancelAnimationFrame","fetch","alert","confirm","prompt"]),Gt=new Set(["hidden","disabled","checked","selected","readonly","required","open","autofocus","multiple","ismap","noValidate","defer","async","autoplay","controls","loop","muted","default","reversed","scoped","seamless","sortable","translate","draggable","contenteditable","spellcheck"]);function ct(t){return t.includes("-")?t.replace(/-([a-z])/g,t=>t[1].toUpperCase()):t}const le=new Map,Ui=500;let je=null;function J(t){if(!t.includes("&"))return t;if(le.has(t))return le.get(t);je||(je=document.createElement("textarea"));const e=je;e.innerHTML=t;let s=e.value,i=0;for(;s.includes("&")&&i++<10;){e.innerHTML=s;const t=e.value;if(t===s)break;s=t}if(le.size>=Ui){const t=le.keys().next().value;void 0!==t&&le.delete(t)}return le.set(t,s),s}function ji(t,e){if(t===e)return!0;if(!t||!e||"object"!=typeof t||"object"!=typeof e)return!1;const s=Object.keys(t),i=s.length;let n=0;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(n++,n>i))return!1;if(n!==i)return!1;for(let n=0;n<i;n++){const i=s[n];if(t[i]!==e[i])return!1}return!0}class fe{static clearCache(){this.cache.clear()}static pruneCache(){if(this.cache.size>this.MAX_CACHE_SIZE){const t=this.cache.size-Math.floor(this.MAX_CACHE_SIZE/2);let e=0;for(const s of this.cache.keys()){if(e>=t)break;this.cache.delete(s),e++}}}static transformSpreadAttributes(t){const e=new Map;let s=0;const i=document.createElement("template");i.innerHTML=t;const n=t=>{if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(Array.from(i.childNodes).forEach(n),i.hasAttribute("pp-spread")){const t=i.getAttribute("pp-spread")||"";i.removeAttribute("pp-spread");const n=t.match(/^\s*\{\s*\.\.\.(.+?)\s*\}\s*$/);if(n){const t=J(n[1].trim()),r=`___pp_spread_${s++}___`,a=`\${ (() => {\n const __obj = ${t};\n if (!__obj || typeof __obj !== 'object') return '';\n return Object.entries(__obj)\n .map(([k, v]) => {\n if (v == null) return '';\n const __escapedValue = String(v)\n .split('&').join('&')\n .split('"').join('"')\n .split('<').join('<');\n return k + '="' + __escapedValue + '"';\n })\n .filter(Boolean)\n .join(' ');\n })() }`;e.set(r,a),i.setAttribute(r,"")}}}};return Array.from(i.content.childNodes).forEach(n),{html:i.innerHTML,spreadReplacements:e}}static expandSpreadPlaceholders(t,e){let s=t;return e.forEach((t,e)=>{s=s.split(`${e}=""`).join(t),s=s.split(e).join(t)}),s}static transformRefAttributes(t){if(!t.includes("pp-ref"))return t;const e=document.createElement("template");e.innerHTML=t;const s=document.createTreeWalker(e.content,NodeFilter.SHOW_ELEMENT);let i=s.nextNode();for(;i;){const t=i;if(t.hasAttribute("pp-ref")){const e=(t.getAttribute("pp-ref")||"").match(/^\s*\{([\s\S]+)\}\s*$/);if(e){const s=J(e[1].trim());t.removeAttribute("pp-ref"),t.setAttribute("data-pp-ref",`{ __pp_ref(${s}) }`)}}i=s.nextNode()}return e.innerHTML}static transformComponentTags(t){const e=document.createElement("template");e.innerHTML=t;const s=t=>{if(t.nodeType!==Node.ELEMENT_NODE)return;const e=t,i=e.tagName.toLowerCase();if(Array.from(e.childNodes).forEach(s),i.includes(".")){const t=document.createDocumentFragment();for(t.appendChild(document.createTextNode(`{${i}}`));e.firstChild;)t.appendChild(e.firstChild);e.replaceWith(t)}};return Array.from(e.content.childNodes).forEach(s),e.innerHTML}static normalizeTextareaValueAttributes(t){if(!t.includes("<textarea")||!t.includes("value="))return t;const e=document.createElement("template");return e.innerHTML=t,e.content.querySelectorAll("textarea").forEach(t=>{const e=t,s=e.getAttribute("value");null!==s&&(e.textContent=s,e.removeAttribute("value"))}),e.innerHTML}static compile(t,e){const s=(t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),i=t=>{let e=2166136261;for(let s=0;s<t.length;s++)e^=t.charCodeAt(s),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e.toString(16).padStart(8,"0")},n=e.join("\0"),r=`t${i(s)}|k${i(n)}|n${e.length}`;if(this.cache.has(r))return this.cache.get(r);const{maskedTemplate:a,placeholders:o}=this.maskComplexComponents(s),{maskedHtml:h,placeholders:c}=this.maskLiteralElements(a,"style","STYLE"),l=this.transformComponentTags(h),p=this.normalizeTextareaValueAttributes(l),{html:u,spreadReplacements:d}=this.transformSpreadAttributes(p),f=this.transformRefAttributes(u),{html:m,loopReplacements:g}=this.processStructuralDirectives(f);let v=this.transformBooleanAttributes(m);(()=>{let t=!0;for(;t;)t=!1,g.forEach((e,s)=>{const i=v;v=v.split("${"+s+"}").join("${"+e+"}"),v=v.split(s).join("{ "+e+" }"),v!==i&&(t=!0)})})();const x=new Set;let y="return `",b=0,E="";for(;b<v.length;){const t=v[b];if("`"!==t){if("o"===t||"O"===t){const t=v.slice(b,b+20).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(t){const e=v.slice(b,b+t[0].length),s=e[e.length-1];let i=b+t[0].length;for(;i<v.length&&(v[i]!==s||"\\"===v[i-1]);)i++;E+=v.slice(b,i+1),b=i+1;continue}}if("{"===t){const t=this.findClosingBrace(v,b);if(-1!==t){const e=v.slice(b+1,t),s=J(e);if(U.isValidExpression(s)){y+=E,E="";const e=U.extractUsedVariables(s,Hi);for(const t of e)/^___PP_LOOP_\d+___$/.test(t)||x.add(t);const i=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g," ");y+=`\${ (() => {\n try {\n const __res = (${s});\n // React pattern: ignore booleans, null, and undefined\n if (typeof __res === 'boolean' || __res == null) return '';\n // React pattern: join arrays without commas\n if (Array.isArray(__res)) return __res.join('');\n return __res;\n } catch(e) {\n console.error("[PP-ERROR] Template Expression Failed: \\"${i}\\"", e);\n return '';\n }\n })() }`,b=t+1;continue}e.trim().length>0&&console.warn(`[PP-WARN] Interpolation skipped. Invalid Syntax in: "{${s}}"`)}}E+=t,b++}else E+="\\`",b++}y+=E,y+="`;",y=this.expandSpreadPlaceholders(y,d);const S=Array.from(new Set([...e,...x]));try{const t=new Function(...S,y),e=(...e)=>{let s=t(...e);return s=this.restorePlaceholders(s,c),o.forEach((t,e)=>{s=s.replace(e,t)}),s};return this.pruneCache(),this.cache.set(r,e),e}catch(t){return console.error("[PP-ERROR] Compilation Failed",t),()=>"Error in Template"}}static maskLiteralElements(t,e,s){const i=document.createElement("template");i.innerHTML=t;const n=new Map;let r=0;return i.content.querySelectorAll(e).forEach(t=>{const e=`__PP_${s}_${r++}__`;n.set(e,t.outerHTML),t.replaceWith(document.createTextNode(e))}),{maskedHtml:i.innerHTML,placeholders:n}}static restorePlaceholders(t,e){let s=t;return e.forEach((t,e)=>{s=s.replace(e,t)}),s}static transformBooleanAttributes(t){let e="",s=0;for(;s<t.length;){let i=!1;for(const n of Gt){const r=`${n}="{`,a=`${n}='{`;if(t.startsWith(r,s)){i=!0;const a=s+r.length-1,o=this.findClosingBrace(t,a);if(-1!==o&&'"'===t[o+1]){e+=`{ (${J(t.slice(a+1,o))}) ? '${n}' : '' }`,s=o+2;break}}else if(t.startsWith(a,s)){i=!0;const r=s+a.length-1,o=this.findClosingBrace(t,r);if(-1!==o&&"'"===t[o+1]){e+=`{ (${J(t.slice(r+1,o))}) ? '${n}' : '' }`,s=o+2;break}}}i||(e+=t[s],s++)}return e}static captureLoopVariablesInEventHandlers(t,e,s,i,n=!1){let r="",a=0;for(;a<t.length;){const o=t.slice(a,a+40).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(o){const h=o[0].length,c=t.slice(a,a+h),l=c[c.length-1],p=a+h;let u=p;for(;u<t.length&&(t[u]!==l||"\\"===t[u-1]);)u++;const d=c.slice(0,-2).trim();let f=t.slice(p,u);f=this.rewriteLoopEventHandlerCode(f,e,s,i,n),r+=`${d}=${l}${f}${l}`,a=u+1;continue}r+=t[a],a++}return r}static rewriteLoopEventHandlerCode(t,e,s,i,n){const r=t.match(/^\{([\s\S]*)\}$/),a=`__PP_LOOP_IDX_${i}__`;let o=r?r[1]:t;return n&&(o=this.replaceLoopIdentifierUsages(o,i,a)),o=this.replaceLoopIdentifierUsages(o,e,`(${s})[${a}]`),o=o.split(a).join(`\${${i}}`),r?`{${o}}`:o}static replaceLoopIdentifierUsages(t,e,s){const i=U.analyzeLoopVariableUsage(t,e).slice().sort((t,e)=>e.start-t.start);if(0===i.length)return t;let n=t;return i.forEach(t=>{const i=t.isShorthand?this.buildShorthandReplacement(e,s,t.isUnwrap):s;n=n.slice(0,t.start)+i+n.slice(t.end)}),n}static buildShorthandReplacement(t,e,s){return s?`{ ${t}: ${e} }`:`${t}: ${e}`}static processStructuralDirectives(t){if(!t.includes("pp-for"))return{html:t,loopReplacements:new Map};const e=document.createElement("template");e.innerHTML=t;const s=new Map;let i=0;const n=t=>{const e=Array.from(t.childNodes);for(const t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;const e=t;if("TEMPLATE"===e.tagName){const t=e;if(n(t.content),t.hasAttribute("pp-for")){const e=t.getAttribute("pp-for")||"",n=e.match(/^\s*\(\s*(.+?)\s*,\s*(.+?)\s*\)\s+in\s+(.+?)\s*$/),r=e.match(/^\s*(.+?)\s+in\s+(.+?)\s*$/);let a,o,h,c=!1;if(n)a=n[1].trim(),o=n[2].trim(),h=n[3].trim(),c=!0;else{if(!r)continue;a=r[1].trim(),h=r[2].trim(),o=`__pp_idx_${i}`}let l=t.innerHTML;l=this.transformComponentTags(l),l=this.transformRefAttributes(l),l=this.captureLoopVariablesInEventHandlers(l,a,h,o,c),l=l.replace(/___PP_LOOP_\d+___/g,t=>"${"+t+"}"),l=l.replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,""),l=this.transformBooleanAttributes(l),l=this.transformInterpolations(l);const p=`(Array.isArray(${h}) ? ${h} : []).map(${`(${a}, ${o})`} => \`${l}\`).join('')`,u=`___PP_LOOP_${i++}___`;s.set(u,p),t.replaceWith(document.createTextNode(u));continue}continue}n(e)}};return n(e.content),{html:e.innerHTML,loopReplacements:s}}static transformInterpolations(t){let e="",s=0;for(;s<t.length;){if("o"===t[s]||"O"===t[s]){const i=t.slice(s,s+20).toLowerCase().match(/^on\w+\s*=\s*(["'])/);if(i){const n=t.slice(s,s+i[0].length),r=n[n.length-1];let a=s+i[0].length;for(;a<t.length&&(t[a]!==r||"\\"===t[a-1]);)a++;e+=t.slice(s,a+1),s=a+1;continue}}if("{"===t[s]){if(s>0&&"$"===t[s-1]){e+="{",s++;continue}const i=this.findClosingBrace(t,s);if(-1!==i){const n=J(t.slice(s+1,i));if(U.isValidExpression(n)){e+="${"+n+"}",s=i+1;continue}}}e+=t[s],s++}return e}static maskComplexComponents(t){if(!t.includes("pp-component="))return{maskedTemplate:t,placeholders:new Map};const e=document.createElement("template");e.innerHTML=t;const s=new Map;let i=0;const n=t=>{if(t instanceof Element&&t.hasAttribute("pp-component")&&t.querySelector('script[type="text/pp"]')){const e=`__PP_CHILD_${i++}__`;return s.set(e,t.outerHTML),void t.replaceWith(document.createTextNode(e))}Array.from(t.children).forEach(t=>n(t))};return n(e.content),{maskedTemplate:e.innerHTML,placeholders:s}}static findClosingBrace(t,e){let s=0,i=null;for(let n=e;n<t.length;n++){const e=t[n];let r=!1;if(n>0&&"\\"===t[n-1]){let e=0,s=n-1;for(;s>=0&&"\\"===t[s];)e++,s--;e%2!=0&&(r=!0)}if(i)e===i&&!r&&(i=null);else if(r||'"'!==e&&"'"!==e&&"`"!==e)if("{"!==e||r){if("}"===e&&!r&&(s--,0===s))return n}else s++;else i=e}return-1}}g(fe,"cache",new Map),g(fe,"MAX_CACHE_SIZE",200);const ht=new Set(["data-state","style"]),qi=["script","domDiff","bindEvents","bindRefs","bootstrapNested","portals","restoreFocus","layoutEffects","effects","total"];function lt(){return typeof performance<"u"&&"function"==typeof performance.now?performance.now():Date.now()}const F=class t{constructor(t){g(this,"el"),g(this,"id"),g(this,"rawTemplate"),g(this,"renderFunction"),g(this,"templateFn",null),g(this,"hooksSystem"),g(this,"eventManager"),g(this,"latestScope",{}),g(this,"__ppRefStore",new Map),g(this,"__ppPrevRefStore",null),g(this,"__ppRefSeq",0),g(this,"isRendering",!1),g(this,"props",{}),g(this,"ownedChildren",new Map),g(this,"lastRenderedHtml",""),g(this,"renderCount",0),g(this,"trackedPortals",new Map),g(this,"parentId",null),g(this,"initialChildrenHtml",""),g(this,"pendingEventElements",new Set),g(this,"traversalCache",null),g(this,"pendingProvidedContexts",new Map),g(this,"pendingContextTokens",new Set),g(this,"contextRefreshPending",!1),g(this,"_lastScopeKeySig",""),g(this,"_lastSortedKeys",[]),g(this,"_cachedHooksAPI",null),g(this,"_propFnCache",new Map),g(this,"_interpolationFnCache",new Map),g(this,"_scopeEvalFnCache",new Map),g(this,"_refEvalFnCache",new Map),this.el=t,this.id=this.el.getAttribute("pp-component")||"",this.id||(this.id="anon_"+Math.random().toString(36).substring(2,9),this.el.setAttribute("pp-component",this.id)),this.props=Array.from(this.el.attributes).reduce((t,e)=>{const s=e.name;if(s.startsWith("on")||"pp-component"===s)return t;const i=ct(s);return ut.has(i)||(t[i]=e.value),t},{}),S.registerInstance(this.id,this),this.syncParentId(),this.props=this.computePropsFromAttributes();let e=S.getTemplate(this.id);const s=S.getOwnedTemplates(this.id);e?s&&(this.ownedChildren=s):(this.extractOwnedTemplates(),e=this.el.innerHTML,S.saveTemplate(this.id,e),S.saveOwnedTemplates(this.id,this.ownedChildren)),this.initialChildrenHtml=e,this.props.children=this.initialChildrenHtml,this.hooksSystem=new Zt(()=>{this.isRendering||this.render()});const i=S.getState(this.id);i&&this.hooksSystem.loadState(i);const n=document.createElement("template");n.innerHTML=this.initialChildrenHtml;const r=this.findOwnScript(n.content),a=(null==r?void 0:r.textContent)||"";r&&r.remove(),this.rawTemplate=n.innerHTML,this.renderFunction=this.createRenderFunction(a),this.eventManager=new Jt(this.el,()=>this.latestScope),this.render()}syncParentId(){var t;const e=null==(t=this.el.parentElement)?void 0:t.closest("[pp-component]");this.parentId=e?e.getAttribute("pp-component"):null,S.saveParent(this.id,this.parentId)}static setPerfEnabled(t){this.perfEnabled=t}static getPerfEnabled(){return this.perfEnabled}static resetPerfStats(){this.perfStats.clear()}static getPerfStats(){return Object.fromEntries(this.perfStats.entries())}static createEmptyPerfEntry(){const t={};return qi.forEach(e=>{t[e]={count:0,totalMs:0,maxMs:0}}),{renderCount:0,phases:t}}recordPerfPhase(e,s){if(!t.perfEnabled)return;let i=t.perfStats.get(this.id);i||(i=t.createEmptyPerfEntry(),t.perfStats.set(this.id,i));const n=i.phases[e];n.count++,n.totalMs+=s,n.maxMs=Math.max(n.maxMs,s)}startPerfTimer(){return t.perfEnabled?lt():0}endPerfTimer(e,s){t.perfEnabled&&this.recordPerfPhase(e,lt()-s)}findOwnScript(t){const e=Array.from(t.children);for(const t of e){if("script"===t.tagName.toLowerCase()&&"text/pp"===t.getAttribute("type"))return t;if(t.hasAttribute("pp-component"))continue;const e=this.findOwnScript(t);if(e)return e}return null}interpolateAttrString(t,e){const s=Object.keys(e),i=s.map(t=>e[t]),n=s.join("\0");return t.replace(/\{([\s\S]*?)\}/g,(t,e)=>{const r=J(String(e).trim());try{const t=this.getCachedFunction(this._interpolationFnCache,r,s,n,300)(...i);return"boolean"==typeof t||null==t?"":Array.isArray(t)?t.join(""):String(t)}catch(t){return console.warn(`[PP-WARN] Failed attribute interpolation for {${r}}`,t),""}})}applyAttributeInterpolations(t,e){const s=Object.keys(e),i=s.map(t=>e[t]),n=s.join("\0");for(const r of Array.from(t.attributes)){const a=r.name;if("pp-component"===a||a.startsWith("on"))continue;const o=r.value;if(!o.includes("{"))continue;if(!/^\s*\{[\s\S]*\}\s*$/.test(o)){const s=this.interpolateAttrString(o,e);s!==o&&t.setAttribute(a,s);continue}const h=o.match(/^\s*\{([\s\S]*)\}\s*$/);if(!h)continue;const c=J(h[1].trim());if(!U.isValidExpression(c))continue;let l;try{l=this.getCachedFunction(this._scopeEvalFnCache,c,s,n,300)(...i)}catch(t){console.error(`[PP-ERROR] Failed to eval "${c}"`,t);continue}if(Gt.has(a.toLowerCase())){l?t.setAttribute(a,""):t.removeAttribute(a);continue}const p=typeof l;null==l?t.removeAttribute(a):("string"===p||"number"===p||"boolean"===p||"bigint"===p)&&t.setAttribute(a,String(l))}}computePropsFromAttributes(){const t=this.parentId?S.getScope(this.parentId):void 0,e=t?Object.keys(t):[],s=t?e.map(e=>t[e]):[],i=this.el.__ppRawBindings,n=new Set([...Array.from(this.el.attributes).map(t=>t.name),...i?Object.keys(i):[]]),r=e.join("\0"),a=i=>{if(t)try{const t=i+"|"+r;let n=this._propFnCache.get(t);if(!n){if(n=new Function(...e,`"use strict"; return (${i});`),this._propFnCache.size>200){const t=this._propFnCache.keys().next().value;void 0!==t&&this._propFnCache.delete(t)}this._propFnCache.set(t,n)}return n(...s)}catch(t){return void console.warn(`[PP-WARN] Failed to evaluate prop expression "{${i}}" for component "${this.id}"`,t)}};return Array.from(n).reduce((e,s)=>{if(s.startsWith("on")&&!s.includes("-")||"pp-component"===s)return e;const n=ct(s);if(ut.has(n))return e;const r=this.el.attributes.getNamedItem(s),o=(null==i?void 0:i[s])??(null==r?void 0:r.value);if(void 0===o)return e;if(""===o)return e[n]=!0,e;if(t){const s=o.match(/^\s*\{([\s\S]*)\}\s*$/);if(s){const t=J(s[1].trim());if(U.isValidExpression(t))return e[n]=a(t),e}if(o.includes("{"))return e[n]=this.interpolateAttrString(o,t),e}return e[n]=o,e},{})}refreshPropsFromParent(){const t=this.computePropsFromAttributes();t.children=this.initialChildrenHtml,(!ji(this.props,t)||0!==this.ownedChildren.size)&&(this.props=t,this.isRendering||this.render())}extractOwnedTemplates(){const t=this.el.querySelectorAll("template[pp-owner]");let e=0;t.forEach(t=>{var s;if((null==(s=t.parentElement)?void 0:s.closest("[pp-component]"))!==this.el)return;const i=t.getAttribute("pp-owner");if(i&&i!==this.id){const s=`__PP_OWNED_${this.id}_${e++}__`;this.ownedChildren.set(s,{ownerId:i,content:t.innerHTML});const n=document.createTextNode(s);t.replaceWith(n)}})}maskNestedOwnedTemplates(t){const e=new Map,s=document.createElement("template");s.innerHTML=t;let i=0;const n=s.content.querySelectorAll("[pp-component] > template[pp-owner]");for(const t of Array.from(n)){const s=`__PP_NESTED_TPL_${i++}__`;e.set(s,t.outerHTML),t.replaceWith(document.createTextNode(s))}return{content:s.innerHTML,placeholders:e}}resolveOwnedChildren(t){if(!t.includes("__PP_OWNED_"))return t;this.ownedChildren.forEach((e,s)=>{const i=S.getScope(e.ownerId);if(i){const{content:n,placeholders:r}=this.maskNestedOwnedTemplates(e.content),a=Object.keys(i),o=a.map(t=>i[t]);let h=fe.compile(n,a)(...o);for(const[t,e]of r)h=h.replace(t,e);h=this.markOwnedEventHandlers(h,e.ownerId),t=t.replace(s,h)}else t=t.replace(s,e.content)});const e=/__PP_OWNED_([^_]+(?:_[^_]+)*)_(\d+)__/g;let s;for(;null!==(s=e.exec(t));){const i=s[0],n=s[1],r=S.getOwnedTemplates(n);if(r&&r.has(i)){const s=r.get(i),n=S.getScope(s.ownerId);if(n){const{content:e,placeholders:r}=this.maskNestedOwnedTemplates(s.content),a=Object.keys(n),o=a.map(t=>n[t]);let h=fe.compile(e,a)(...o);for(const[t,e]of r)h=h.replace(t,e);h=this.markOwnedEventHandlers(h,s.ownerId),t=t.replace(i,h)}else t=t.replace(i,s.content);e.lastIndex=0}}return t}markOwnedEventHandlers(t,e){const s=document.createElement("template");s.innerHTML=t;const i=document.createTreeWalker(s.content,NodeFilter.SHOW_ELEMENT);let n=i.nextNode();for(;n;){const t=n;Array.from(t.attributes).some(t=>t.name.startsWith("on"))&&t.setAttribute("pp-event-owner",e),n=i.nextNode()}return s.innerHTML}getCachedFunction(t,e,s,i,n){const r=e+"|"+i;let a=t.get(r);if(!a){if(a=new Function(...s,`"use strict"; return (${e});`),t.size>n){const e=t.keys().next().value;void 0!==e&&t.delete(e)}t.set(r,a)}return a}createRenderFunction(t){const e=U.extractStateBindings(t);return new Function("pp",`\n "use strict";\n ${t}\n return { ${e.join(", ")} };\n `)}unmountPreviousRefs(){if(this.__ppPrevRefStore){for(const t of this.__ppPrevRefStore.values())try{"function"==typeof t?t(null):t&&"object"==typeof t&&"current"in t&&(t.current=null)}catch(t){console.warn("[PP-WARN] Ref cleanup failed",t)}this.__ppPrevRefStore=null}}createRefCaptureFunction(){return this.__ppRefStore=new Map,this.__ppRefSeq=0,t=>{const e=`ppref_${this.id}_${++this.__ppRefSeq}`;return this.__ppRefStore.set(e,t),e}}consumeContext(t){return this.pendingContextTokens.add(t),S.resolveContext(this.parentId,t).value}provideContext(t,e){this.pendingProvidedContexts.set(t,e)}requestContextRefresh(){this.contextRefreshPending||(this.contextRefreshPending=!0,queueMicrotask(()=>{if(this.contextRefreshPending=!1,S.getInstance(this.id)===this){if(this.isRendering)return void this.requestContextRefresh();this.forceUpdate()}}))}refreshContextConsumers(t){var e;for(const s of t){const t=S.getInstance(s);null==(e=null==t?void 0:t.requestContextRefresh)||e.call(t)}}makeHooksAPI(){return this._cachedHooksAPI?this._cachedHooksAPI.props=this.props:this._cachedHooksAPI={state:t=>this.hooksSystem.useState(t),effect:(t,e)=>this.hooksSystem.useEffect(t,e),layoutEffect:(t,e)=>this.hooksSystem.useLayoutEffect(t,e),ref:(t=null)=>this.hooksSystem.useRef(t),memo:(t,e)=>this.hooksSystem.useMemo(t,e),callback:(t,e)=>this.hooksSystem.useCallback(t,e),reducer:(t,e)=>this.hooksSystem.useReducer(t,e),context:t=>this.consumeContext(t),provideContext:(t,e)=>this.provideContext(t,e),portal:(t,e)=>this.hooksSystem.usePortal(t,e),props:this.props},this._cachedHooksAPI}restorePortaledElements(){for(const[,t]of this.trackedPortals){const{element:e,placeholder:s}=t;s.parentNode&&(s.parentNode.insertBefore(e,s),s.parentNode.removeChild(s))}}applyPortals(){const t=this.hooksSystem.getPortalRegistrations(),e=new Set;let s=!1;for(const i of t){const t=i.ref.current;if(!t)continue;const n=i.target??document.body;e.add(t);const r=this.trackedPortals.get(t);if(null!=r&&r.placeholder.parentNode){r.target!==n&&(n.appendChild(t),r.target=n,s=!0);continue}null===i.info.sourceParent&&t.parentNode instanceof Element&&(i.info.sourceParent=t.parentNode);const a=document.createComment(`pp-portal:${this.id}`);t.parentNode&&t.parentNode.insertBefore(a,t),n.appendChild(t),s=!0,this.trackedPortals.set(t,{element:t,placeholder:a,target:n})}for(const[t,i]of this.trackedPortals)e.has(t)||(i.placeholder.parentNode&&(i.placeholder.parentNode.insertBefore(t,i.placeholder),i.placeholder.remove()),this.trackedPortals.delete(t),s=!0);s&&this.invalidateTraversalCache()}render(){var e;if(this.isRendering)return;this.isRendering=!0,this.renderCount++;const s=this.startPerfTimer();if(t.perfEnabled){let e=t.perfStats.get(this.id);e||(e=t.createEmptyPerfEntry(),t.perfStats.set(this.id,e)),e.renderCount++}try{this.unmountPreviousRefs(),this.pendingProvidedContexts=new Map,this.pendingContextTokens=new Set;const t=this.saveFocusState();this.hooksSystem.prepareRender();const s=this.makeHooksAPI(),i=globalThis.pp,n=(null==(e=null==i?void 0:i.createComponentRuntime)?void 0:e.call(i,s))??s,r=this.startPerfTimer(),a=this.renderFunction(n);this.endPerfTimer("script",r),S.saveState(this.id,this.hooksSystem.getHooks()),this.latestScope={...this.props,...a},this.latestScope.__pp_ref=this.createRefCaptureFunction(),S.saveScope(this.id,this.latestScope);const o=Object.keys(this.latestScope),h=o.join("\0");let c;h===this._lastScopeKeySig?c=this._lastSortedKeys:(c=o.sort(),this._lastScopeKeySig=h,this._lastSortedKeys=c);const l=c.map(t=>this.latestScope[t]),p=c.join("\0");this.templateFn||(this.templateFn=fe.compile(this.rawTemplate,c));let u=this.templateFn(...l);if(u=this.resolveOwnedChildren(u),this.lastRenderedHtml!==u){this.trackedPortals.size>0&&this.restorePortaledElements();const t=this.startPerfTimer();this.applyDomDiff(u),this.endPerfTimer("domDiff",t),this.lastRenderedHtml=u}if(this.hasEventAttributes(this.el)&&this.pendingEventElements.add(this.el),this.pendingEventElements.size>0){const t=this.pendingEventElements;this.pendingEventElements=new Set;const e=this.startPerfTimer();this.eventManager.bindEvents(t),this.endPerfTimer("bindEvents",e)}const d=this.startPerfTimer();this.bindRefs(c,l,p),this.endPerfTimer("bindRefs",d);const f=S.saveContextValues(this.id,this.pendingProvidedContexts);S.updateContextDependencies(this.id,this.pendingContextTokens);const m=f.length>0?S.getConsumersForContextsInSubtree(this.id,f):null;this.__ppPrevRefStore=new Map(this.__ppRefStore);const g=this.startPerfTimer();this.bootstrapNestedComponents(),this.endPerfTimer("bootstrapNested",g);const v=this.startPerfTimer();this.applyPortals(),this.endPerfTimer("portals",v);const x=this.startPerfTimer();this.restoreFocusState(t),this.endPerfTimer("restoreFocus",x);const y=this.startPerfTimer();this.hooksSystem.runLayoutEffects(),this.endPerfTimer("layoutEffects",y);const b=this.startPerfTimer();this.hooksSystem.runEffects(),this.endPerfTimer("effects",b),null!=m&&m.size&&this.refreshContextConsumers(m)}catch(t){console.error("[PP-ERROR] Render Cycle Failed",t)}finally{this.endPerfTimer("total",s),this.isRendering=!1}}applyDomDiff(t){if(typeof SVGElement<"u"&&this.el instanceof SVGElement){const e=(new DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"image/svg+xml").documentElement,s=document.createDocumentFragment();return Array.from(e.childNodes).forEach(t=>{s.appendChild(document.importNode(t,!0))}),this.morphChildren(this.el,s),void this.invalidateTraversalCache()}const e=document.createElement("template");e.innerHTML=t;const s=e.content;this.morphChildren(this.el,s),this.invalidateTraversalCache()}isInsideTrackedPortal(t){for(const[e]of this.trackedPortals)if(e===t||e.contains(t))return!0;return!1}morphChildren(t,e){if(this.hasKeyedDirectChildren(t)||this.hasKeyedDirectChildren(e))return void this.morphKeyedChildren(t,e);let s=t.firstChild,i=e.firstChild;for(;s||i;){const e=(null==s?void 0:s.nextSibling)??null,n=(null==i?void 0:i.nextSibling)??null;if(i){if(!s){const e=i.cloneNode(!0);t.appendChild(e),e.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(e),i=n;continue}if(s.nodeType!==i.nodeType){const r=i.cloneNode(!0);t.replaceChild(r,s),r.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(r),s=e,i=n;continue}if(s.nodeType!==Node.TEXT_NODE){if(s.nodeType===Node.ELEMENT_NODE){const r=s,a=i;if(r.tagName!==a.tagName){const r=i.cloneNode(!0);t.replaceChild(r,s),r.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(r),s=e,i=n;continue}if(r.hasAttribute("pp-component")&&r!==this.el){this.syncAttributes(r,a),this.hasEventAttributes(r)&&this.pendingEventElements.add(r),s=e,i=n;continue}const o=this.isInsideTrackedPortal(r);this.syncAttributes(r,a,o),this.hasEventAttributes(r)&&this.pendingEventElements.add(r),this.morphChildren(r,a)}s=e,i=n}else s.textContent!==i.textContent&&(s.textContent=i.textContent),s=e,i=n}else s&&t.removeChild(s),s=e}}hasKeyedDirectChildren(t){const e=t.childNodes;for(let t=0;t<e.length;t++){const s=e[t];if(null!==this.getNodeKey(s))return!0}return!1}getNodeKey(t){if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t.getAttribute("key");return e&&e.length>0?e:null}areNodesCompatible(t,e){if(t.nodeType!==e.nodeType)return!1;if(t.nodeType!==Node.ELEMENT_NODE)return!0;const s=e;if(t.tagName!==s.tagName)return!1;const i=this.getNodeKey(t),n=this.getNodeKey(e);return null===i&&null===n||null!==i&&i===n}morphKeyedChildren(t,e){const s=Array.from(t.childNodes),i=Array.from(e.childNodes),n=this.collectDuplicateKeys(i),r=new Map,a=[];n.length>0&&console.warn(`[PP-WARN] Duplicate key values detected: ${n.join(", ")}`),s.forEach(t=>{const e=this.getNodeKey(t);if(null===e)return void a.push(t);const s=r.get(e);s?s.push(t):r.set(e,[t])});let o=t.firstChild;i.forEach(e=>{const s=this.getNodeKey(e);let i;if(null!==s){const t=r.get(s);for(;t&&t.length>0;){const s=t.shift();if(this.areNodesCompatible(s,e)){i=s;break}a.push(s)}}else{const t=a.findIndex(t=>this.areNodesCompatible(t,e));-1!==t&&(i=a.splice(t,1)[0])}if(i)i!==o&&t.insertBefore(i,o);else{const s=e.cloneNode(!0);t.insertBefore(s,o),s.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(s),i=s}this.morphNode(i,e),o=i.nextSibling}),a.forEach(e=>{e.parentNode===t&&t.removeChild(e)}),r.forEach(e=>{e.forEach(e=>{e.parentNode===t&&t.removeChild(e)})})}collectDuplicateKeys(t){const e=new Set,s=new Set;return t.forEach(t=>{const i=this.getNodeKey(t);if(null!==i){if(e.has(i))return void s.add(i);e.add(i)}}),Array.from(s.values())}morphNode(t,e){if(t.nodeType!==e.nodeType){const s=t.parentNode;if(!s)return;const i=e.cloneNode(!0);return s.replaceChild(i,t),void(i.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(i))}if(t.nodeType===Node.TEXT_NODE)return void(t.textContent!==e.textContent&&(t.textContent=e.textContent));if(t.nodeType!==Node.ELEMENT_NODE)return;const s=t,i=e;if(s.tagName!==i.tagName){const t=s.parentNode;if(!t)return;const i=e.cloneNode(!0);return t.replaceChild(i,s),void(i.nodeType===Node.ELEMENT_NODE&&this.collectEventElements(i))}if(s.hasAttribute("pp-component")&&s!==this.el)return this.syncAttributes(s,i),void(this.hasEventAttributes(s)&&this.pendingEventElements.add(s));const n=this.isInsideTrackedPortal(s);this.syncAttributes(s,i,n),this.hasEventAttributes(s)&&this.pendingEventElements.add(s),this.morphChildren(s,i)}collectEventElements(t){this.hasEventAttributes(t)&&this.pendingEventElements.add(t);for(let e=0;e<t.children.length;e++)this.collectEventElements(t.children[e])}hasEventAttributes(t){const e=t.attributes;for(let t=0;t<e.length;t++)if(e[t].name.startsWith("on")&&!e[t].name.includes("-"))return!0;return!1}walkOwnedBoundaryElements(t){const e=this.getTraversalCache();for(let s=0;s<e.childBoundaries.length;s++)t(e.childBoundaries[s],!0)}invalidateTraversalCache(){this.traversalCache=null}getTraversalCache(){if(this.traversalCache)return this.traversalCache;const t=[],e=[],s=[],i=[],n=new Set,r=[],a=(t,e)=>{if(e)r.push(t);else for(let e=t.children.length-1;e>=0;e--)r.push(t.children[e])};a(this.el,!1);for(const[t]of this.trackedPortals)a(t,!0);for(;r.length>0;){const a=r.pop();if(n.has(a))continue;n.add(a);const o=a,h=a.hasAttribute("pp-component");if(t.push(o),(a.hasAttribute("data-pp-ref")||a.hasAttribute("pp-ref")||o.__ppRefCaptureId||o.__ppRefExpr)&&i.push(o),(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement)&&s.push(o),h)e.push(o);else for(let t=a.children.length-1;t>=0;t--)r.push(a.children[t])}return this.traversalCache={ownedElements:t,childBoundaries:e,managedInputs:s,refElements:i},this.traversalCache}collectManagedInputs(){return this.getTraversalCache().managedInputs}syncAttributes(t,e,s=!1){const i=t.attributes;for(let n=i.length-1;n>=0;n--){const r=i[n].name;if(!e.hasAttribute(r)){if(s&&ht.has(r))continue;t.removeAttribute(r),"data-pp-ref"===r&&delete t.__ppRefCaptureId,"pp-ref"===r&&delete t.__ppRefExpr}}const n=e.attributes;for(let e=0;e<n.length;e++){const i=n[e];s&&ht.has(i.name)||(t.getAttribute(i.name)!==i.value&&t.setAttribute(i.name,i.value),"value"===i.name&&(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&t.value!=i.value&&(t.value=i.value))}if(t instanceof HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){const s=e.getAttribute("value"),i=s??e.value,n=s??e.defaultValue;t.value!==i&&(t.value=i),t.defaultValue!==n&&(t.defaultValue=n)}}bindRefs(t,e,s){const i=this.getTraversalCache();for(let n=0;n<i.refElements.length;n++){const r=i.refElements[n],a=r,o=r.getAttribute("data-pp-ref");let h=null;if(o?(r.removeAttribute("data-pp-ref"),a.__ppRefCaptureId=o,h=o):a.__ppRefCaptureId&&this.__ppRefStore.has(a.__ppRefCaptureId)?h=a.__ppRefCaptureId:a.__ppRefCaptureId&&delete a.__ppRefCaptureId,h){const t=this.__ppRefStore.get(h);if("function"==typeof t)try{t(r)}catch(t){console.warn(`[PP-WARN] Ref callback threw for id="${h}"`,t)}else t&&"object"==typeof t&&"current"in t?t.current=r:o&&console.warn(`[PP-WARN] Missing captured ref for id="${h}"`)}const c=r.getAttribute("pp-ref");let l=c;if(c?a.__ppRefExpr=c:a.__ppRefExpr&&(l=a.__ppRefExpr),!l)continue;c&&r.removeAttribute("pp-ref");const p=this.latestScope[l];if(p&&"object"==typeof p&&"current"in p)p.current=r;else if("function"!=typeof p)try{const i=this.getCachedFunction(this._refEvalFnCache,l,t,s,200)(...e);"function"==typeof i?i(r):i&&"object"==typeof i&&"current"in i&&(i.current=r)}catch(t){console.warn(`[PP-WARN] Could not resolve pp-ref="${l}"`,t)}else try{p(r)}catch(t){console.warn(`[PP-WARN] pp-ref function threw for "${l}"`,t)}}}bootstrapNestedComponents(){this.walkOwnedBoundaryElements((e,s)=>{if(!s)return;if(e.__ppRawBindings){const t=e.__ppRawBindings;for(const[s,i]of Object.entries(t))e.setAttribute(s,i)}else{const t={};for(const s of Array.from(e.attributes))s.value.includes("{")&&"pp-component"!==s.name&&!s.name.startsWith("on")&&(t[s.name]=s.value);e.__ppRawBindings=t}this.applyAttributeInterpolations(e,this.latestScope);const i=e.getAttribute("pp-component")||"",n=S.getInstance(i);if(null!=n&&n.refreshPropsFromParent)return n.parentId=this.id,S.saveParent(i,this.id),n.el!==e&&(!e.__ppRawBindings&&n.el.__ppRawBindings&&(e.__ppRawBindings=n.el.__ppRawBindings),n.el=e),void n.refreshPropsFromParent();S.getState(i)||new t(e)})}saveFocusState(){const t=document.activeElement;if(!t)return null;const e=this.el.contains(t),s=!e&&Array.from(this.trackedPortals.values()).some(e=>e.element.contains(t));if(!e&&!s)return null;const i=this.collectManagedInputs().indexOf(t);if(-1===i)return null;const n=this.getTextSelectionState(t);return{element:t,index:i,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd}}isTextSelectionControl(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&["text","search","url","tel","password"].includes(t.type)}getTextSelectionState(t){if(!this.isTextSelectionControl(t))return{selectionStart:null,selectionEnd:null};try{return{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}catch{return{selectionStart:null,selectionEnd:null}}}restoreFocusState(t){if(!t)return;const e=t.element,s=e&&e.isConnected&&(this.el.contains(e)||Array.from(this.trackedPortals.values()).some(t=>t.element.contains(e)))?e:this.collectManagedInputs()[t.index];if(s&&(s.focus(),null!==t.selectionStart&&null!==t.selectionEnd&&this.isTextSelectionControl(s)))try{s.setSelectionRange(t.selectionStart,t.selectionEnd)}catch(t){console.warn("Could not restore cursor position",t)}}forceUpdate(){this.lastRenderedHtml="",this.render()}destroy(){for(const[,t]of this.trackedPortals)t.element.parentNode&&t.element.remove(),t.placeholder.parentNode&&t.placeholder.remove();this.trackedPortals.clear();const t=S.removeContextTracking(this.id);this.hooksSystem.dispose(),this.eventManager.clearCache(),S.removeState(this.id),S.removeScope(this.id),S.removeInstance(this.id),t.forEach(t=>{var e;const s=S.getInstance(t);null==(e=null==s?void 0:s.requestContextRefresh)||e.call(s)})}};g(F,"perfEnabled",!1),g(F,"perfStats",new Map);let oe=F;const pt={bootstrap:()=>{document.querySelectorAll("[pp-component]").forEach(t=>{new oe(t)})}},pe=class t{constructor(){g(this,"activeAbortController",null),g(this,"navigationEnabled",!1),g(this,"boundHandleLinkClick",null),g(this,"boundHandlePopState",null),g(this,"isNavigating",!1),g(this,"RESET_SCROLL_ATTR","pp-reset-scroll"),g(this,"mounted",!1)}mount(){this.mounted||(this.mounted=!0,this.disableTransitions(),pt.bootstrap(),this.restoreBodyAccessibility(),this.enableTransitions(),this.enableSPANavigation())}createComponentRuntime(e){const s={};for(const e of t.PUBLIC_METHODS){const t=this[e];"function"==typeof t?s[e]=t.bind(this):void 0!==t&&(s[e]=t)}return Object.assign({},s,e)}createContext(t){return Object.freeze({id:Symbol("pp.context"),defaultValue:t})}enablePerf(){oe.setPerfEnabled(!0)}disablePerf(){oe.setPerfEnabled(!1)}getPerfStats(){return oe.getPerfStats()}resetPerfStats(){oe.resetPerfStats()}getCsrfToken(){const t=document.cookie.match(/(?:^|;\s*)pp_csrf=([^;]*)/);return t?decodeURIComponent(t[1]):""}disableTransitions(){const t=document.createElement("style");t.id="pp-disable-transitions",t.textContent="\n *, *::before, *::after {\n transition: none !important;\n animation: none !important;\n }\n ",document.head.insertBefore(t,document.head.firstChild)}enableTransitions(){const t=document.getElementById("pp-disable-transitions");t&&t.remove()}restoreBodyAccessibility(){document.body.style.transition="",document.body.style.opacity="1",document.body.style.pointerEvents="auto",document.body.style.userSelect="auto",document.body.removeAttribute("inert"),document.body.setAttribute("aria-busy","false")}static resetInstance(){this.instance&&(this.instance.navigationEnabled&&this.instance.disableSPANavigation(),this.instance.activeAbortController&&(this.instance.activeAbortController.abort(),this.instance.activeAbortController=null),this.instance=null)}static getInstance(){return this.instance||(this.instance=new t),this.instance}enableSPANavigation(){this.navigationEnabled||"true"!==document.body.getAttribute("pp-spa")||(this.navigationEnabled=!0,this.boundHandleLinkClick=this.handleLinkClick.bind(this),this.boundHandlePopState=this.handlePopState.bind(this),document.addEventListener("click",this.boundHandleLinkClick),window.addEventListener("popstate",this.boundHandlePopState))}disableSPANavigation(){this.navigationEnabled=!1,this.boundHandleLinkClick&&(document.removeEventListener("click",this.boundHandleLinkClick),this.boundHandleLinkClick=null),this.boundHandlePopState&&(window.removeEventListener("popstate",this.boundHandlePopState),this.boundHandlePopState=null)}handleLinkClick(t){if(!this.navigationEnabled)return;const e=t.target.closest("a");if(e&&e.href)try{const s=new URL(e.href),i=s.origin!==window.location.origin,n=s.pathname===window.location.pathname&&s.search===window.location.search,r="false"===e.getAttribute("pp-spa");if(i||"_blank"===e.target||e.hasAttribute("download")||r||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;if(t.preventDefault(),n){const e=s.hash;if(e){t.preventDefault(),history.pushState(null,"",s.pathname+s.search+e);const i=document.querySelector(e);return void(i&&i.scrollIntoView({behavior:"smooth"}))}}this.navigateTo(s.pathname+s.search+s.hash)}catch(t){console.error("Link click navigation error:",t)}}async handlePopState(){const t=window.location.pathname+window.location.search+window.location.hash;await this.navigateTo(t,!1)}async navigateTo(t,e=!0){this.isNavigating=!0;const s=this.saveScrollPositions();try{this.dispatchNavigationEvent("start",t),await this.showLoadingTransition();const i=await this.fetchPageContent(t);if("hardReload"in i)return void(window.location.href=i.hardReload);if("redirect"in i)return void await this.navigateTo(i.redirect,e);const n=i;this.updateBrowserHistory(t,e);const r=document.getElementById("loading-file-1B87E"),a="startViewTransition"in document,o=this.getResetScrollConfig(n);!r&&a?await this.updatePageContentWithViewTransition(n):await this.updatePageContent(n),this.resetGlobalCaches(),pt.bootstrap(),this.handleScrollRestoration(s,o),await this.handleNavigationCompletion(),this.dispatchNavigationEvent("complete",t)}catch(e){this.handleNavigationError(t,e)}finally{this.isNavigating=!1}}resetGlobalCaches(){S.clear(),U.clearCaches(),fe.clearCache()}getResetScrollConfig(t){if("true"===t.body.getAttribute(this.RESET_SCROLL_ATTR))return{mode:"global",resetElementKeys:new Set,resetWindow:!1};const e=t.querySelectorAll(`[${this.RESET_SCROLL_ATTR}]`),s=new Set;let i=!1;if(e.length>0)for(const t of Array.from(e))if("true"===t.getAttribute(this.RESET_SCROLL_ATTR)){const e=this.getElementKeyFromElement(t);s.add(e),i=!0}return i||s.size>0?{mode:"none",resetElementKeys:s,resetWindow:i}:{mode:"none",resetElementKeys:new Set,resetWindow:!1}}getElementKeyFromElement(t){return t.id?t.id:t.className?t.className:t.tagName}handleScrollRestoration(t,e){requestAnimationFrame(()=>{if("global"===e.mode)return window.scrollTo(0,0),document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0,void document.querySelectorAll("*").forEach(t=>{(t.scrollTop||t.scrollLeft)&&(t.scrollTop=0,t.scrollLeft=0)});if(e.resetWindow)window.scrollTo(0,0),document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0;else{const e=t.window;e&&window.scrollTo(e.scrollLeft,e.scrollTop)}document.querySelectorAll("*").forEach(s=>{const i=s.tagName.toLowerCase();if(e.resetWindow&&("html"===i||"body"===i))return;const n=this.getElementKey(s);e.resetElementKeys.has(n)?(s.scrollTop=0,s.scrollLeft=0):t[n]&&(s.scrollTop=t[n].scrollTop,s.scrollLeft=t[n].scrollLeft)})})}saveScrollPositions(){const t={window:{scrollTop:window.scrollY||document.documentElement.scrollTop,scrollLeft:window.scrollX||document.documentElement.scrollLeft}};return document.querySelectorAll("*").forEach(e=>{(e.scrollTop||e.scrollLeft)&&(t[this.getElementKey(e)]={scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}),t}getElementKey(t){return t.id||t.className||t.tagName}async updatePageContentWithViewTransition(t){t.title&&(document.title=t.title);const e=t.body.innerHTML;if(this.syncBodyAttributes(t.body),this.isNavigating||!document.startViewTransition)return void(document.body.innerHTML=e);const s=document.startViewTransition(()=>{document.body.innerHTML=e});try{await s.finished}catch(t){console.warn("View transition failed, continuing anyway:",t)}}dispatchNavigationEvent(t,e,s){const i=`pp:navigation:${t}`,n=s?{url:e,error:s}:{url:e};document.dispatchEvent(new CustomEvent(i,{detail:n}))}async showLoadingTransition(){const t=document.getElementById("loading-file-1B87E");if(t){const e=this.findLoadingElement(t,window.location.pathname);if(e)return void await this.updateContentWithTransition(e)}const e=document.querySelector("[pp-loading-content='true']")||document.body;e&&!("startViewTransition"in document)&&await this.fadeOut(e,250)}async fetchPageContent(t){const e=new URL(t,window.location.origin).hash,s=await fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest","X-PP-Navigation":"true","X-PulsePoint-Wire":"true",Accept:"text/html"}});if(!s.ok)throw new Error(`Navigation failed: ${s.status} ${s.statusText}`);const i=s.headers.get("X-PP-Root-Layout"),n=document.querySelector('meta[name="pp-root-layout"]'),r=n?n.getAttribute("content"):null;if(i&&r&&i!==r)return{hardReload:t};if(s.redirected){const t=new URL(s.url);if(e&&t.searchParams.has("next")){const s=t.searchParams.get("next");s&&!s.includes("#")&&t.searchParams.set("next",s+e)}return{redirect:t.pathname+t.search+t.hash}}const a=this.getRedirectUrlFromResponse(s);if(a)return{redirect:a};const o=await s.text();return(new DOMParser).parseFromString(o,"text/html")}getRedirectUrlFromResponse(t){const e=t.headers.get("X-PP-Redirect");if(e)return e;const s=t.headers.get("Location"),i=t.status;return s&&i>=300&&i<400?s:null}updateBrowserHistory(t,e){e&&history.pushState(null,"",t)}async updatePageContent(t){t.title&&(document.title=t.title);const e=t.body;this.syncBodyAttributes(e),document.body.innerHTML=e.innerHTML}syncBodyAttributes(t){t&&(Array.from(document.body.attributes).forEach(t=>{"style"!==t.name&&document.body.removeAttribute(t.name)}),Array.from(t.attributes).forEach(t=>{"style"!==t.name&&document.body.setAttribute(t.name,t.value)}))}async handleNavigationCompletion(){const t=document.querySelector("[pp-loading-content='true']")||document.body;this.fadeIn(t,150),setTimeout(()=>{this.restoreBodyAccessibility()},50);const e=window.location.hash;e&&requestAnimationFrame(()=>{const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})})}handleNavigationError(t,e){console.error("Navigation error:",e),this.restoreBodyAccessibility(),this.dispatchNavigationEvent("error",t,e),window.location.href=t}findLoadingElement(t,e){let s=e;for(;;){const e=t.querySelector(`div[pp-loading-url='${s}']`);if(e)return e;if("/"===s)break;const i=s.lastIndexOf("/");s=i<=0?"/":s.substring(0,i)}return t.querySelector("div[pp-loading-url='/' ]")}async updateContentWithTransition(t){const e=document.querySelector("[pp-loading-content='true']")||document.body;if(!e)return;const{fadeIn:s,fadeOut:i}=this.parseTransition(t);await this.fadeOut(e,i),e.innerHTML=t.innerHTML,this.fadeIn(e,s)}parseTransition(t){let e=250,s=250;const i=t.querySelector("[pp-loading-transition]"),n=null==i?void 0:i.getAttribute("pp-loading-transition");if(n){let t=JSON.parse(n);t&&"object"==typeof t?(e=this.parseTime(t.fadeIn??e),s=this.parseTime(t.fadeOut??s)):console.warn("pp-loading-transition is not valid JSON → default values (250 ms) will be used. String:",n)}return{fadeIn:e,fadeOut:s}}fadeOut(t,e){return new Promise(s=>{t.style.transition=`opacity ${e}ms ease-out`,setTimeout(()=>{t.style.transition="",s()},e)})}fadeIn(t,e){t.style.transition=`opacity ${e}ms ease-in`,setTimeout(()=>{t.style.transition=""},e)}parseTime(t){if("number"==typeof t)return t;const e=t.match(/^(\d+)(ms|s|m)?$/);if(e){const t=parseInt(e[1],10);switch(e[2]||"ms"){case"ms":default:return t;case"s":return 1e3*t;case"m":return 60*t*1e3}}return 0}async redirect(t){if(t)try{const e=new URL(t,window.location.origin);e.origin!==window.location.origin?window.location.href=t:this.navigationEnabled?await this.navigateTo(e.pathname+e.search+e.hash):window.location.href=t}catch(t){console.error("Redirect error:",t)}}async rpc(t,e={},s=!1){let i=null;const n="boolean"==typeof s?{abortPrevious:s}:s;try{n.abortPrevious&&this.activeAbortController&&(this.activeAbortController.abort(),this.activeAbortController=null),i=new AbortController,n.abortPrevious&&(this.activeAbortController=i);const s=window.location.pathname.replace(/\/+$/,"")||"/",r={"X-CSRF-Token":this.getCsrfToken(),"X-PP-RPC":"true","X-PulsePoint-Wire":"true","X-PP-Function":t,"X-Requested-With":"XMLHttpRequest",Accept:"application/json, text/event-stream"};let a;if(Object.values(e).some(t=>t instanceof File||t instanceof FileList&&t.length>0)){const t=new FormData;for(const[s,i]of Object.entries(e))i instanceof File?t.append(s,i):i instanceof FileList?Array.from(i).forEach(e=>t.append(s,e)):null!=i&&t.append(s,"object"==typeof i?JSON.stringify(i):String(i));if(n.onUploadProgress)return await this.xhrFunction({url:s,headers:r,body:t,controller:i,options:n});a={method:"POST",headers:r,body:t,signal:i.signal}}else a={method:"POST",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify(e),signal:i.signal};const o=await fetch(s,a);if(401===o.status)throw new Error("Authentication required");if(403===o.status)throw new Error("Permission denied");if(!o.ok){const t=await o.json().catch(()=>null);throw t||415!==o.status?new Error((null==t?void 0:t.error)||`Request failed: ${o.status} ${o.statusText}`):new Error("Server rejected data format (415).")}const h=this.getRedirectUrlFromResponse(o);return h?(await this.redirect(h),{redirected:!0,to:h}):(this.activeAbortController===i&&(this.activeAbortController=null),(o.headers.get("Content-Type")||"").includes("text/event-stream")&&o.body?(n.onStream||console.warn("RPC returned a stream, but no onStream handler provided."),void await this.handleStream(o.body,n)):await o.json())}catch(t){if(this.activeAbortController===i&&(this.activeAbortController=null),t instanceof Error&&"AbortError"===t.name)return console.log("Request was cancelled"),{cancelled:!0};if(n.onStreamError)return void n.onStreamError(t);throw console.error("RPC error:",t),t}}xhrFunction(t){const{url:e,headers:s,body:i,controller:n,options:r}=t;return new Promise((t,a)=>{const o=new XMLHttpRequest;o.open("POST",e,!0);for(const[t,e]of Object.entries(s))o.setRequestHeader(t,e);const h=()=>{try{o.abort()}catch{}};n.signal.addEventListener("abort",h,{once:!0}),o.upload&&r.onUploadProgress&&(o.upload.onprogress=t=>{var e;const s=t.lengthComputable?t.total:null,i=t.lengthComputable&&t.total>0?Math.min(100,Math.max(0,t.loaded/t.total*100)):null;null==(e=r.onUploadProgress)||e.call(r,{loaded:t.loaded,total:s,percent:i})}),o.onerror=()=>{n.signal.removeEventListener("abort",h),a(new Error("Network error (XHR upload)."))},o.onload=async()=>{var e,s;if(n.signal.removeEventListener("abort",h),401===o.status)return a(new Error("Authentication required"));if(403===o.status)return a(new Error("Permission denied"));if(o.status<200||o.status>=300){let t=`Request failed: ${o.status} ${o.statusText}`;try{const e=JSON.parse(o.responseText||"{}");t=(null==e?void 0:e.error)||(null==e?void 0:e.message)||t}catch{}return a(new Error(t))}const i=o.getResponseHeader("X-PP-Redirect")||(o.status>=300&&o.status<400?o.getResponseHeader("Location"):null);if(i)try{return await this.redirect(i),null==(e=r.onUploadComplete)||e.call(r),t({redirected:!0,to:i})}catch(t){return a(t)}const c=o.responseText??"";let l=c;try{l=JSON.parse(c)}catch{}null==(s=r.onUploadComplete)||s.call(r),t(l)};try{o.send(i)}catch(t){n.signal.removeEventListener("abort",h),a(t)}})}async handleStream(t,e){const s=t.getReader(),i=new TextDecoder;let n="";try{for(;;){const{done:t,value:r}=await s.read();if(t){e.onStreamComplete&&e.onStreamComplete();break}n+=i.decode(r,{stream:!0});const a=n.split("\n");n=a.pop()||"";for(const t of a)if(""!==t.trim()&&t.startsWith("data: ")){const s=t.slice(6);let i=s;try{("true"===s||"false"===s||"null"===s||!isNaN(Number(s))||s.startsWith("{")||s.startsWith("[")||s.startsWith('"'))&&(i=JSON.parse(s))}catch{}e.onStream&&e.onStream(i)}}}catch(t){if(!e.onStreamError)throw t;e.onStreamError(t)}finally{s.releaseLock()}}};g(pe,"instance",null),g(pe,"PUBLIC_METHODS",["createContext","mount","redirect","rpc","enablePerf","disablePerf","getPerfStats","resetPerfStats"]);let ze=pe;const ae=class t{constructor(){g(this,"listeners",[])}static getInstance(){return t.instance||(t.instance=new t),t.instance}get params(){return new URLSearchParams(window.location.search)}get(t){return this.params.get(t)}set(t,e){const s=this.params;s.set(t,e),this.updateURL(s)}delete(t){const e=this.params;e.delete(t),this.updateURL(e)}replace(t){const e=new URLSearchParams;for(const s in t){const i=t[s];null!==i&&e.set(s,i)}this.updateURL(e,!0)}updateURL(t,e=!1){const s=`${window.location.pathname}?${t.toString()}`;e?history.replaceState(null,"",s):history.pushState(null,"",s),this.notifyListeners(t)}listen(t){this.listeners.push(t)}notifyListeners(t){for(const e of this.listeners)e(t)}enablePopStateListener(){window.addEventListener("popstate",()=>{this.notifyListeners(this.params)})}};g(ae,"instance",null);let Ge=ae;function Xt(t,e,s=window,i=!0){let n=null;if(Object.defineProperty(s,t,{get(){if(null!==n)return n;if(e&&"object"==typeof e&&!Array.isArray(e)&&"getInstance"in e&&"function"==typeof e.getInstance)return n=e.getInstance(),n;if("function"!=typeof e)return n=e,n;try{return n=e.getInstance(),n}catch{return n=e,n}},set(e){null===e?n=null:console.warn(`Cannot override global ${t}`)},configurable:!0,enumerable:!0}),i)try{s[t]}catch(e){console.error(`Failed to initialize ${t}:`,e)}}Xt("pp",{getInstance:()=>{var t;const e=ze.getInstance();return"loading"!==document.readyState?null==(t=e.mount)||t.call(e):document.addEventListener("DOMContentLoaded",()=>{var t;return null==(t=e.mount)?void 0:t.call(e)},{once:!0}),e}}),Xt("searchParams",Ge);export{pt as ComponentInit,ze as PPUtilities,Ge as SearchParamsManager};
|