@next-core/brick-container 3.23.1 → 3.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.d747c648.js +3 -0
- package/dist/all.d747c648.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/{main.ca0b8565.js → main.728cdb0a.js} +2 -2
- package/dist/{main.ca0b8565.js.map → main.728cdb0a.js.map} +1 -1
- package/dist/{polyfill.af7a7330.js → polyfill.be54c6ac.js} +1 -1
- package/dist/preview/core.e5034002.js +1 -0
- package/dist/preview/core.e5034002.js.map +1 -0
- package/dist/preview/index.html +1 -1
- package/dist/preview/{main.8fb3d2f8.js → main.aa479eac.js} +1 -1
- package/dist/preview/{main.8fb3d2f8.js.map → main.aa479eac.js.map} +1 -1
- package/package.json +5 -5
- package/dist/all.6aed810d.js +0 -3
- package/dist/all.6aed810d.js.map +0 -1
- package/dist/preview/core.62be426e.js +0 -1
- package/dist/preview/core.62be426e.js.map +0 -1
- /package/dist/{all.6aed810d.js.LICENSE.txt → all.d747c648.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see all.d747c648.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_core_brick_container=globalThis.webpackChunk_next_core_brick_container||[]).push([[668],{52:(e,t,n)=>{"use strict";n.d(t,{P:()=>u,r:()=>l});var r=n(2171),s=n(311),i="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?s.i:r.O,a=new Set,o=!1;function c(){var e=[];return a.forEach((function(t){e.push(t()),a.delete(t)})),Promise.all(e)}function l(e,t){var n={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(n)}function u(e){e.isLeader=!0,e._hasLeader=!0;var t=function(e){if(o||(o=!0,i(c)),"function"!=typeof e)throw new Error("Listener is no function");return a.add(e),{remove:function(){return a.delete(e)},run:function(){return a.delete(e),e()}}}((function(){return e.die()}));e._unl.push(t);var n=function(t){"leader"===t.context&&"apply"===t.action&&l(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._dpLC||(e._dpLC=!0,e._dpL(),l(e,"tell"))};return e.broadcastChannel.addEventListener("internal",n),e._lstns.push(n),l(e,"tell")}},90:(e,t,n)=>{"use strict";n.r(t)},273:(e,t,n)=>{"use strict";var r;try{r=Object(function(){var e=new Error("Cannot find module 'buffer'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}var s=n(5417),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,s=e.length,a=i;for(n=0;n<s;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,s=e.replace(/[\r\n=]/g,""),a=s.length,o=i,c=0,l=[];for(t=0;t<a;t++)t%4==0&&t&&(l.push(c>>16&255),l.push(c>>8&255),l.push(255&c)),c=c<<6|o.indexOf(s.charAt(t));return 0==(n=a%4*6)?(l.push(c>>16&255),l.push(c>>8&255),l.push(255&c)):18===n?(l.push(c>>10&255),l.push(c>>2&255)):12===n&&l.push(c>>4&255),r?r.from?r.from(l):new r(l):l},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",s=0,a=e.length,o=i;for(t=0;t<a;t++)t%3==0&&t&&(r+=o[s>>18&63],r+=o[s>>12&63],r+=o[s>>6&63],r+=o[63&s]),s=(s<<8)+e[t];return 0==(n=a%3)?(r+=o[s>>18&63],r+=o[s>>12&63],r+=o[s>>6&63],r+=o[63&s]):2===n?(r+=o[s>>10&63],r+=o[s>>4&63],r+=o[s<<2&63],r+=o[64]):1===n&&(r+=o[s>>2&63],r+=o[s<<4&63],r+=o[64],r+=o[64]),r}})},311:(e,t,n)=>{"use strict";function r(e){process.on("exit",(function(){return e()})),process.on("beforeExit",(function(){return e().then((function(){return process.exit()}))})),process.on("SIGINT",(function(){return e().then((function(){return process.exit()}))})),process.on("uncaughtException",(function(t){return e().then((function(){console.trace(t),process.exit(101)}))}))}n.d(t,{i:()=>r})},343:(e,t,n)=>{"use strict";var r=n(5417),s=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],"[object Object]"!==s.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[t]=[i[0],r[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,s,i,a=e;for(i=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],s=Object.keys(r),i[t]=[s[0],r[s[0]]];return i}})},414:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1369);function s(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(0,r.A)(s.key),s)}}function i(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},627:function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(9420))},706:(e,t,n)=>{"use strict";if(n.r(t),n.d(t,{BroadcastChannel:()=>r.X2,OPEN_BROADCAST_CHANNELS:()=>r.Ot,beLeader:()=>i.P,clearNodeFolder:()=>r.ki,createLeaderElection:()=>s.X,enforceOptions:()=>r.lO}),792==n.j)var r=n(7542);if(792==n.j)var s=n(5840);if(792==n.j)var i=n(52)},726:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>P});var r=n(5152),s=n(414),i=[],a=i.forEach,o=i.slice,c=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var s=n[r];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null}(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&function(e,t,n,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*n*1e3)),r&&(s.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var s=encodeURIComponent(t),i="".concat(e,"=").concat(s);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!c.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!c.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}(e,encodeURIComponent(t),s)}(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},u={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),s=0;s<r.length;s++){var i=r[s].indexOf("=");i>0&&r[s].substring(0,i)===e.lookupQuerystring&&(t=r[s].substring(i+1))}}return t}},h=null,p=function(){if(null!==h)return h;try{h="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){h=!1}return h},d={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&p()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&p()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},f=null,m=function(){if(null!==f)return f;try{f="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){f=!1}return f},y={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&m()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&m()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},g={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},v={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},b={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},w={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},x=!1;try{document.cookie,x=!0}catch(e){}var S=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];x||S.splice(1,1);var P=function(){return(0,s.A)((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.A)(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}),[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return a.call(o.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:S,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(l),this.addDetector(u),this.addDetector(d),this.addDetector(y),this.addDetector(g),this.addDetector(v),this.addDetector(b),this.addDetector(w)}},{key:"addDetector",value:function(e){return this.detectors[e.name]=e,this}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),n=n.map((function(e){return t.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}])}();P.type="languageDetector"},763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{JsonStorage:()=>y,createProviderClass:()=>s,createSSEStream:()=>h,deepFreeze:()=>d,hasOwnProperty:()=>f,isObject:()=>m,unwrapProvider:()=>v});var r=n(5060);function s(e){return class extends HTMLElement{get $$typeof(){return"provider"}resolve(){return e(...arguments)}async saveAs(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];const a=await e(...s);r.saveAs(a,t)}}}var i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};const a="text/event-stream",o=1e3,c="last-event-id";function l(e,t){var{signal:n,headers:r,onopen:s,onmessage:l,onclose:h,onerror:p,openWhenHidden:d,fetch:f}=t,m=i(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,i)=>{const y=Object.assign({},r);let g;function v(){g.abort(),document.hidden||A()}y.accept||(y.accept=a),d||document.addEventListener("visibilitychange",v);let b=o,w=0;function x(){document.removeEventListener("visibilitychange",v),window.clearTimeout(w),g.abort()}null==n||n.addEventListener("abort",(()=>{x(),t()}));const S=null!=f?f:window.fetch,P=null!=s?s:u;async function A(){var n;g=new AbortController;try{const n=await S(e,Object.assign(Object.assign({},m),{headers:y,signal:g.signal}));await P(n),await async function(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}(n.body,function(e){let t,n,r,s=!1;return function(i){void 0===t?(t=i,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,i);const a=t.length;let o=0;for(;n<a;){s&&(10===t[n]&&(o=++n),s=!1);let i=-1;for(;n<a&&-1===i;++n)switch(t[n]){case 58:-1===r&&(r=n-o);break;case 13:s=!0;case 10:i=n}if(-1===i)break;e(t.subarray(o,i),r),o=n,r=-1}o===a?t=void 0:0!==o&&(t=t.subarray(o),n-=o)}}(function(e,t,n){let r={data:"",event:"",id:"",retry:void 0};const s=new TextDecoder;return function(e,t){if(0===e.length)null==n||n(r),r={data:"",event:"",id:"",retry:void 0};else if(t>0){const n=s.decode(e.subarray(0,t)),a=t+(32===e[t+1]?2:1),o=s.decode(e.subarray(a));switch(n){case"data":r.data=r.data?r.data+"\n"+o:o;break;case"event":r.event=o;break;case"id":(i=r.id=o)?y[c]=i:delete y[c];break;case"retry":const e=parseInt(o,10);isNaN(e)||(e=>{b=e})(r.retry=e)}}var i}}(0,0,l))),null==h||h(),x(),t()}catch(e){if(!g.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:b;window.clearTimeout(w),w=window.setTimeout(A,t)}catch(e){x(),i(e)}}}A()}))}function u(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(a)))throw new Error(`Expected content-type to be ${a}, Actual: ${t}`)}async function h(e,t){const n=[],r=[];let s=!1,i=!1;const{converter:a,...o}=null!=t?t:{};function c(){r.forEach((e=>{let[t]=e;return t({value:void 0,done:!0})}))}function u(){s=!0,r.length=0,n.length=0}return await new Promise(((t,s)=>{l(e,{...o,openWhenHidden:!0,async onopen(e){if(!e.ok){var n;let t,r;console.error("open error",e.statusText);try{t=await e.text()}catch{throw new Error(e.statusText)}try{r=JSON.parse(t)}catch{}if("string"==typeof(null===(n=r)||void 0===n?void 0:n.error))throw new Error(r.error);throw new Error(t)}t(null)},onmessage(e){let t,s,i=!0;try{t=(null!=a?a:p)(e.data,e.event)}catch(e){i=!1,s=e}if(r.length>0){const[e,n]=r.shift();i?e(t):n(s)}else n.push(i?{ok:!0,data:t}:{ok:!1,reason:s})},onclose(){i=!0,c()},onerror(e){throw e}}).catch((e=>{s(e),function(e){r.forEach((t=>{let[n,r]=t;return r(e)})),u()}(e)}))})),{next(){return s?this.return():new Promise(((e,t)=>{if(n.length>0){const r=n.shift();r.ok?e(r.data):t(r.reason)}else i?(u(),e({value:void 0,done:!0})):r.push([e,t])}))},return:()=>(c(),u(),Promise.resolve({value:void 0,done:!0})),throw:e=>(c(),u(),Promise.reject(e)),[Symbol.asyncIterator](){return this}}}function p(e,t){if("error"===t){var n;let t;console.error("Received error event:",e);try{t=JSON.parse(e)}catch{}throw new Error("string"==typeof(null===(n=t)||void 0===n?void 0:n.error)?t.error:e)}if("[DONE]"===e)return{value:void 0,done:!0};if(e.startsWith("[ERROR]"))throw console.error("Received error message:",e),new Error(e);try{return{value:JSON.parse(e),done:!1}}catch(t){throw console.error("Failed to parse message:",e),t}}function d(e){const t=Object.getOwnPropertyNames(e);for(const n of t){const t=e[n];t&&"object"==typeof t&&d(t)}return Object.freeze(e)}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e){const t=typeof e;return null!=e&&("object"==t||"function"==t)}class y{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){var t;return JSON.parse(null!==(t=this.storage.getItem(this.prefix+e))&&void 0!==t?t:"null")}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}const g=new Map;function v(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const s=function(e){let t=g.get(e);return t||(t=document.createElement(e),g.set(e,t),t)}(e);return s.resolve(...n)}}},829:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2559);function s(e,t){return e.get((0,r.A)(e,t))}},843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{changeLanguage:()=>me,createInstance:()=>le,default:()=>ce,dir:()=>ue,exists:()=>ve,getFixedT:()=>ye,hasLoadedNamespace:()=>we,init:()=>he,loadLanguages:()=>Se,loadNamespaces:()=>xe,loadResources:()=>pe,reloadResources:()=>de,setDefaultNamespace:()=>be,t:()=>ge,use:()=>fe});var r=n(7545),s=n(5152),i=n(414);function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}function l(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var h=n(4586);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},y=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.init(t,n)}return(0,i.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||m,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,f(f({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),g=function(){function e(){(0,s.A)(this,e),this.observers={}}return(0,i.A)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function v(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function w(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function s(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(s())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return s()?{}:{obj:e,k:r(i.shift())}}function x(e,t,n){var r=w(e,t,Object);r.obj[r.k]=n}function S(e,t){var n=w(e,t),r=n.obj,s=n.k;if(r)return r[s]}function P(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):P(e[r],t[r],n):e[r]=t[r]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var k="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,_=[" ",",","?","!",";"];function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),s=e,i=0;i<r.length;++i){if(!s)return;if("string"==typeof s[r[i]]&&i+1<r.length)return;if(void 0===s[r[i]]){for(var a=2,o=r.slice(i,i+a).join(n),c=s[o];void 0===c&&r.length>i+a;)a++,c=s[o=r.slice(i,i+a).join(n)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(o)){if("string"==typeof c)return c;if(o&&"string"==typeof c[o])return c[o]}var l=r.slice(i+a).join(n);return l?C(c,l,n):void 0}s=s[r[i]]}return s}}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=function(e){c(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=u(t);if(n){var s=u(this).constructor;e=Reflect.construct(r,arguments,s)}else e=r.apply(this,arguments);return l(this,e)});function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,s.A)(this,o),t=r.call(this),k&&g.call(a(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,i.A)(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."));var o=S(this.data,a);return o||!i||"string"!=typeof n?o:C(this.data&&this.data[e]&&this.data[e][t],n,s)}},{key:"addResource",value:function(e,t,n,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),x(this.data,a,r),s.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var s in n)"string"!=typeof n[s]&&"[object Array]"!==Object.prototype.toString.apply(n[s])||this.addResource(e,t,s,n[s],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,s){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var o=S(this.data,a)||{};r?P(o,n,s):o=O(O({},o),n),x(this.data,a,o),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?O(O({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(g),N={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,s){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,s))})),t}};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R={},B=function(e){c(h,e);var t,n,o=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=u(t);if(n){var s=u(this).constructor;e=Reflect.construct(r,arguments,s)}else e=r.apply(this,arguments);return l(this,e)});function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.A)(this,h),t=o.call(this),k&&g.call(a(t)),function(e,t,n){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){t[e]&&(n[e]=t[e])}))}(0,e,a(t)),t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=y.create("translator"),t}return(0,i.A)(h,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=_.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var s=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!s.test(e);if(!i){var a=e.indexOf(n);a>0&&!s.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:s};var c=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),e=c.join(r)}return"string"==typeof s&&(s=[s]),{key:e,namespaces:s}}},{key:"translate",value:function(e,t,n){var s=this;if("object"!==(0,r.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===(0,r.A)(t)&&(t=D({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),c=o.key,l=o.namespaces,u=l[l.length-1],p=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var f=t.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(u).concat(f).concat(c),usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:"".concat(u).concat(f).concat(c)}return i?{res:c,usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:c}var m=this.resolve(e,t),y=m&&m.res,g=m&&m.usedKey||c,v=m&&m.exactUsedKey||c,b=Object.prototype.toString.apply(y),w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,y,D(D({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(m.res=S,m):S}if(a){var P="[object Array]"===b,A=P?[]:{},E=P?v:g;for(var T in y)if(Object.prototype.hasOwnProperty.call(y,T)){var k="".concat(E).concat(a).concat(T);A[T]=this.translate(k,D(D({},t),{joinArrays:!1,ns:l})),A[T]===k&&(A[T]=y[T])}y=A}}else if(x&&"string"==typeof w&&"[object Array]"===b)(y=y.join(w))&&(y=this.extendTranslation(y,e,t,n));else{var _=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,O=h.hasDefaultValue(t),L=I?this.pluralResolver.getSuffix(p,t.count,t):"",N=t["defaultValue".concat(L)]||t.defaultValue;!this.isValidLookup(y)&&O&&(_=!0,y=N),this.isValidLookup(y)||(C=!0,y=c);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,R=O&&N!==y&&this.options.updateMissing;if(C||_||R){if(this.logger.log(R?"updateKey":"missingKey",p,u,c,R?N:y),a){var B=this.resolve(c,D(D({},t),{},{keySeparator:!1}));B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&j&&j[0])for(var U=0;U<j.length;U++)F.push(j[U]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var Y=function(e,n,r){var i=O&&r!==y?r:M;s.options.missingKeyHandler?s.options.missingKeyHandler(e,u,n,i,R,t):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(e,u,n,i,R,t),s.emit("missingKey",e,u,n,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?F.forEach((function(e){s.pluralResolver.getSuffixes(e,t).forEach((function(n){Y([e],c+n,t["defaultValue".concat(n)]||N)}))})):Y(F,c,N))}y=this.extendTranslation(y,e,t,m,n),C&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(c)),(C||_)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,_?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(m.res=y,m):y}},{key:"extendTranslation",value:function(e,t,n,r,s){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,D(D({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(D(D({},n),{interpolation:D(D({},this.options.interpolation),n.interpolation)}));var a,o="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(o){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=D(D({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),o){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return s&&s[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=N.handle(p,e,t,this.options&&this.options.postProcessPassResolved?D({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,s,i,a=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,o),l=c.key;n=l;var u=c.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var h=void 0!==o.count&&"string"!=typeof o.count,p=h&&!o.ordinal&&0===o.count&&a.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,f=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(i=e,!R["".concat(f[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(R["".concat(f[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!a.isValidLookup(t)){s=n;var i,c=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,l,n,e,o);else{var u;h&&(u=a.pluralResolver.getSuffix(n,o.count,o));var f="".concat(a.options.pluralSeparator,"zero");if(h&&(c.push(l+u),p&&c.push(l+f)),d){var m="".concat(l).concat(a.options.contextSeparator).concat(o.context);c.push(m),h&&(c.push(m+u),p&&c.push(m+f))}}for(;i=c.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,o))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:s,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),h}(g);function F(e){return e.charAt(0).toUpperCase()+e.slice(1)}var j=function(){function e(t){(0,s.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=y.create("languageUtils")}return(0,i.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=F(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=F(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=F(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:0===e.indexOf(r)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=function(e){e&&(n.isSupportedCode(e)?s.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){s.indexOf(e)<0&&i(n.formatLanguageCode(e))})),s}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Y={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},$=["v1","v2","v3"],H={zero:0,one:1,two:2,few:3,many:4,other:5},W=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.languageUtils=t,this.options=r,this.logger=y.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},U.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:Y[e.fc]}}))})),n)}return(0,i.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return H[e]-H[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),s=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var i=function(){return n.options.prepend&&s.toString()?n.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!$.includes(this.options.compatibilityJSON)}}]),e}();function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){var r=S(e,n);return void 0!==r?r:S(t,n)}(e,t,n);return!i&&s&&"string"==typeof n&&void 0===(i=C(e,n,r))&&(i=C(t,n,r)),i}var K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=y.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,i.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var s,i,a,o=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(o.formatSeparator)<0){var s=q(t,c,e,o.options.keySeparator,o.options.ignoreJSONStructure);return o.alwaysFormat?o.format(s,void 0,n,z(z(z({},r),t),{},{interpolationkey:e})):s}var i=e.split(o.formatSeparator),a=i.shift().trim(),l=i.join(o.formatSeparator).trim();return o.format(q(t,c,a,o.options.keySeparator,o.options.ignoreJSONStructure),l,n,z(z(z({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return o.escapeValue?l(o.escape(e)):l(e)}}].forEach((function(t){for(a=0;s=t.regex.exec(e);){var n=s[1].trim();if(void 0===(i=u(n)))if("function"==typeof h){var c=h(e,s,r);i="string"==typeof c?c:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(p){i=s[0];continue}o.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||o.useRawValueToEscape||(i=b(i));var l=t.safeValue(i);if(e=e.replace(s[0],l),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++a>=o.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,s,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var a=(i=this.interpolate(i,s)).match(/'/g),o=i.match(/"/g);(a&&a.length%2==0&&!o||o.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=z(z({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var c=[];(s=(s=z({},a)).replace&&"string"!=typeof s.replace?s.replace:s).applyPostProcessor=!1,delete s.defaultValue;var l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),c=u,l=!0}if((r=t(o.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=b(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return i.format(e,t,a.lng,z(z({},a),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e){var t={};return function(n,r,s){var i=r+JSON.stringify(s),a=t[i];return a||(a=e(r,s),t[i]=a),a(n)}}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=y.create("formatter"),this.options=t,this.formats={number:X((function(e,t){var n=new Intl.NumberFormat(e,J({},t));return function(e){return n.format(e)}})),currency:X((function(e,t){var n=new Intl.NumberFormat(e,J(J({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:X((function(e,t){var n=new Intl.DateTimeFormat(e,J({},t));return function(e){return n.format(e)}})),relativetime:X((function(e,t){var n=new Intl.RelativeTimeFormat(e,J({},t));return function(e){return n.format(e,t.range||"day")}})),list:X((function(e,t){var n=new Intl.ListFormat(e,J({},t));return function(e){return n.format(e)}}))},this.init(t)}return(0,i.A)(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=X(t)}},{key:"format",value:function(e,t,n){var r=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var s=r[1].substring(0,r[1].length-1);"currency"===t&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):"relativetime"===t&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],s=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=s),"false"===s&&(n[r.trim()]=!1),"true"===s&&(n[r.trim()]=!0),isNaN(s)||(n[r.trim()]=parseInt(s,10))}var i}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,o=i.formatOptions;if(r.formats[a]){var c=e;try{var l=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},u=l.locale||l.lng||s.locale||s.lng||n;c=r.formats[a](e,u,J(J(J({},o),s),l))}catch(e){r.logger.warn(e)}return c}return r.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=function(e){c(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=u(t);if(n){var s=u(this).constructor;e=Reflect.construct(r,arguments,s)}else e=r.apply(this,arguments);return l(this,e)});function o(e,t,n){var i,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,s.A)(this,o),i=r.call(this),k&&g.call(a(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=c,i.logger=y.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=c.maxParallelReads||10,i.readingCalls=0,i.maxRetries=c.maxRetries>=0?c.maxRetries:5,i.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,c.backend,c),i}return(0,i.A)(o,[{key:"queueLoad",value:function(e,t,n,r){var s=this,i={},a={},o={},c={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var o="".concat(e,"|").concat(t);!n.reload&&s.store.hasResourceBundle(e,t)?s.state[o]=2:s.state[o]<0||(1===s.state[o]?void 0===a[o]&&(a[o]=!0):(s.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===c[t]&&(c[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),s=r[0],i=r[1];t&&this.emit("failedLoading",s,i,t),n&&this.store.addResourceBundle(s,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,o,c,l,u;r=n.loaded,o=i,(l=(c=w(r,[s],Object)).obj)[u=c.k]=l[u]||[],l[u].push(o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:a});else{this.readingCalls++;var o=function(o,c){if(r.readingCalls--,r.waitingReads.length>0){var l=r.waitingReads.shift();r.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}o&&c&&s<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,s+1,2*i,a)}),i):a(o,c)},c=this.backend[n].bind(this.backend);if(2!==c.length)return c(e,t,o);try{var l=c(e,t);l&&"function"==typeof l.then?l.then((function(e){return o(null,e)})).catch(o):o(null,l)}catch(e){o(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(s," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(s),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,s){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var o=ee(ee({},i),{},{isUpdate:s}),c=this.backend.create.bind(this.backend);if(c.length<6)try{var l;(l=5===c.length?c(e,t,n,r,o):c(e,t,n,r))&&"function"==typeof l.then?l.then((function(e){return a(null,e)})).catch(a):a(null,l)}catch(e){a(e)}else c(e,t,n,r,a,o)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),o}(g);function ne(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.A)(e[2])||"object"===(0,r.A)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function re(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){(0,h.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(){}var oe=function(e){c(h,e);var t,n,o=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=u(t);if(n){var s=u(this).constructor;e=Reflect.construct(r,arguments,s)}else e=r.apply(this,arguments);return l(this,e)});function h(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if((0,s.A)(this,h),e=o.call(this),k&&g.call(a(e)),e.options=re(n),e.services={},e.logger=y,e.modules={external:[]},t=a(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,a(e));setTimeout((function(){e.init(n,r)}),0)}return e}return(0,i.A)(h,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=ne();function s(e){return e?"function"==typeof e?new e:e:null}if(this.options=ie(ie(ie({},r),this.options),re(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ie(ie({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?y.init(s(this.modules.logger),this.options):y.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=Z);var a=new j(this.options);this.store=new L(this.options.resources,this.options);var o=this.services;o.logger=y,o.resourceStore=this.store,o.languageUtils=a,o.pluralResolver=new W(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=s(i),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new K(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new te(s(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(o.languageDetector=s(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=s(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new B(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=ae),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=v(),u=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var s=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(s,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=v();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ae),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&N.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=v();this.emit("languageChanging",e);var s=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||s(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(s(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var s=this,i=function e(t,i){var a;if("object"!==(0,r.A)(i)){for(var o=arguments.length,c=new Array(o>2?o-2:0),l=2;l<o;l++)c[l-2]=arguments[l];a=s.options.overloadTranslationOptionHandler([t,i].concat(c))}else a=ie({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||n||e.keyPrefix;var u,h=s.options.keySeparator||".";return u=a.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(a.keyPrefix).concat(h).concat(e)})):a.keyPrefix?"".concat(a.keyPrefix).concat(h).concat(t):t,s.t(u,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=n.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var o=n.precheck(this,a);if(void 0!==o)return o}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||s&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=v();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=v();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],s=e.filter((function(e){return r.indexOf(e)<0}));return s.length?(this.options.preload=r.concat(s),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new j(ne());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae,r=ie(ie(ie({},this.options),t),{isClone:!0}),s=new h(r);return void 0===t.debug&&void 0===t.prefix||(s.logger=s.logger.clone(t)),["store","services","language"].forEach((function(t){s[t]=e[t]})),s.services=ie({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s.translator=new B(s.services,s.options),s.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];s.emit.apply(s,[e].concat(n))})),s.init(r,n),s.translator.options=s.options,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),h}(g);(0,h.A)(oe,"createInstance",(function(){return new oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var ce=oe.createInstance();ce.createInstance=oe.createInstance;var le=ce.createInstance,ue=ce.dir,he=ce.init,pe=ce.loadResources,de=ce.reloadResources,fe=ce.use,me=ce.changeLanguage,ye=ce.getFixedT,ge=ce.t,ve=ce.exists,be=ce.setDefaultNamespace,we=ce.hasLoadedNamespace,xe=ce.loadNamespaces,Se=ce.loadLanguages},918:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2016);function s(e,t,n){(0,r.A)(e,t),t.set(e,n)}},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,s,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var o=0;o<this.length;o++){var c=this[o][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),t.push(u))}},t}},970:(e,t,n)=>{"use strict";n.r(t),n.d(t,{analytics:()=>l,auth:()=>wt,checkInstalledApps:()=>s,checkPermissions:()=>vt,flowApi:()=>i,menu:()=>a,messageDispatcher:()=>bt});var r={};n.r(r),n.d(r,{addPathToBlackList:()=>P,authenticate:()=>b,getAuth:()=>w,isBlockedHref:()=>T,isBlockedPath:()=>A,isBlockedUrl:()=>E,isLoggedIn:()=>S,logout:()=>x});var s={};n.r(s),n.d(s,{getCheckedApp:()=>ce,preCheckInstalledApps:()=>ae,waitForCheckingApps:()=>oe});var i={};n.r(i),n.d(i,{FLOW_API_PROVIDER:()=>ue,clearCollectWidgetContract:()=>Se,clearDebugContract:()=>Ae,collectContract:()=>we,collectDebugContract:()=>Pe,collectWidgetContract:()=>xe,getArgsOfFlowApi:()=>ke,isFlowApiProvider:()=>Te,registerFlowApiProvider:()=>de});var a={};n.r(a),n.d(a,{fetchMenuById:()=>Qe,getMenuById:()=>Ze});var o={};n.r(o),n.d(o,{onRequest:()=>dt,onResponse:()=>ft,onResponseError:()=>mt});var c={};n.r(c),n.d(c,{create:()=>gt});var l={};n.r(l),n.d(l,{http:()=>o,initialize:()=>ht,pageView:()=>c});var u=n(5069);function h(e,t,n,r,s,i,a){try{var o=e[i](a),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,s)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,s){var i=e.apply(t,n);function a(e){h(i,r,s,a,o,"next",e)}function o(e){h(i,r,s,a,o,"throw",e)}a(void 0)}))}}var d=n(7551),f=function(){var e=p((function*(e,t){return(yield d.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}(),m=n(3647),y=n(1732);const g={};let v=new Set;function b(e){var t;Object.assign(g,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,accessToken:e.accessToken,userShowValue:e.userShowValue}),v=new Set(null===(t=e.license)||void 0===t?void 0:t.blackList)}function w(){return{...g}}function x(){for(const e of Object.keys(g))g[e]=void 0;k.clear(),_.length=0,C.clear()}function S(){return void 0!==g.username}function P(e){v.add(e)}function A(e){return[...v].some((t=>(0,m.matchPath)(e,{path:t})))}function E(e){const t=("string"==typeof e?(0,y.createLocation)(e):e).pathname;return"string"==typeof t&&A(t)}function T(e){const t=(0,m.getBasePath)(),n=new URL(e,`${location.origin}${t}`);return!(n.origin!==location.origin||!n.pathname.startsWith(t))&&A(n.pathname.substring(t.length-1))}const k=new Map,_=[],C=new Map;function I(e){if(S()&&!w().isAdmin)return O((0,u.scanPermissionActionsInAny)(e))}async function O(e){const t=e.filter((e=>!_.includes(e)));if(0===t.length)return;const n=[],r=[];for(const e of t){const t=k.get(e);t?n.push(t):r.push(e)}if(r.length>0){const e=(async()=>{try{const e=await f({actions:r},{noAbortOnRouteChange:!0});for(const t of e.actions)C.set(t.action,t.authorizationStatus),"undefined"===t.authorizationStatus&&console.error(`Undefined permission action: "${t.action}"`)}catch(e){console.error("Pre-check permissions failed",e)}finally{_.push(...r)}})();for(const t of r)k.set(t,e);n.push(e)}await Promise.all(n)}var L=n(4635),N=n(918),M=n(2559);function D(e,t,n){return n((0,M.A)(e,t))}var R=n(6121),B=n(829),F=n(1030),j=new WeakMap,U=new WeakMap,Y=new WeakMap,$=new WeakMap,H=new WeakMap,W=new WeakMap,V=new WeakMap,z=new WeakSet;class q{constructor(e){(0,L.A)(this,z),(0,N.A)(this,j,void 0),(0,N.A)(this,U,void 0),(0,N.A)(this,Y,[]),(0,N.A)(this,$,new Set),(0,N.A)(this,H,new Set),(0,N.A)(this,W,0),(0,N.A)(this,V,!1),(0,R.A)(j,this,e)}send(e){(0,B.A)(U,this)||(0,R.A)(U,this,(0,M.A)(z,this,K).call(this));const t=JSON.stringify(e);(0,B.A)(U,this).readyState===WebSocket.OPEN?(0,B.A)(U,this).send(t):(0,B.A)(Y,this).push(t)}onMessage(e){return(0,B.A)($,this).add(e),()=>{(0,B.A)($,this).delete(e)}}onClose(e){return(0,B.A)(H,this).add(e),()=>{(0,B.A)(H,this).delete(e)}}reset(){(0,B.A)(Y,this).length=0,(0,B.A)($,this).clear(),(0,B.A)(H,this).clear()}close(){var e;(0,R.A)(V,this,!0),(null===(e=(0,B.A)(U,this))||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&(0,B.A)(U,this).close()}}function K(){console.log("WebSocket connecting ...");const e=new WebSocket((0,B.A)(j,this));let t;return e.addEventListener("open",(n=>{console.log("WebSocket open:",n),t=setTimeout((()=>{t=void 0,(0,R.A)(W,this,0)}),1e3);for(const t of(0,B.A)(Y,this))e.send(t);(0,B.A)(Y,this).length=0})),e.addEventListener("close",(e=>{(0,B.A)(V,this)||(void 0!==t&&clearTimeout(t),console.log("WebSocket close:",e),1e3!==e.code&&(0,M.A)(z,this,G).call(this))})),e.addEventListener("error",(e=>{console.error("WebSocket error:",e)})),e.addEventListener("message",(e=>{const t=JSON.parse(e.data);for(const e of(0,B.A)($,this))e(t)})),e}function G(){if((0,B.A)(W,this)>=5){console.error("WebSocket connect retry limit exceeded");for(const e of(0,B.A)(H,this))e();return}const e=1e3*Math.pow(2,(0,B.A)(W,this));console.log("WebSocket will reconnect after %d seconds",e/1e3),setTimeout((()=>{var e;(0,R.A)(W,this,(e=(0,B.A)(W,this),++e)),(0,R.A)(U,this,(0,M.A)(z,this,K).call(this))}),e)}var J=new WeakMap,X=new WeakMap,Z=new WeakMap,Q=new WeakSet;function ee(e){if(!(0,B.A)(J,e)){const t=`${"https:"===location.protocol?"wss:":"ws:"}//${window.location.host}${(0,m.getBasePath)()}api/websocket_service/v1/ws`;(0,R.A)(J,e,new q(t))}return(0,B.A)(J,e)}function te(e,t,n,r){const s=(0,B.A)(X,this)[e].get(r);if(s)return s;const i={event:"sub"===e?"TOPIC.SUB":"TOPIC.UNSUB",payload:n},a=new Promise(((t,r)=>{const s=ne(n),a=D(Q,this,ee).onMessage((n=>{const i=n.event===("sub"===e?"TOPIC.SUB_SUCCESS":"TOPIC.UNSUB_SUCCESS"),c=n.event===("sub"===e?"TOPIC.SUB_FAILED":"TOPIC.UNSUB_FAILED");(i||c)&&s===ne(n.payload)&&((i?t:r)(n),a(),o())})),o=D(Q,this,ee).onClose((()=>{r({retryCount:5}),a(),o()}));D(Q,this,ee).send(i)}));return"sub"===e&&(0,B.A)(Z,this).set(t,r),(0,B.A)(X,this)[e].set(r,a),a}function ne(e){const{system:t,topic:n}=e;return JSON.stringify({system:t,topic:n})}const re=async(e,t)=>(await d.http.post("api/gateway/logic.micro_app_standalone_service/api/v1/micro_app_standalone/search",e,t)).data,se=new Map,ie=new Map;function ae(e,t){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){const n=function(e){var t;const n={usedArgs:new Set},{customTemplates:r,menus:s}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,u.traverseStoryboardExpressions)([e.routes,r,s],((e,t)=>{(0,u.collectInstalledAppsHasUsage)(n,e,t)}),"INSTALLED_APPS"),[...n.usedArgs]}(e),r=[];for(const e of n)se.has(e)||t(e)||r.push(e);if(0===r.length)return;const s=re({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]},{noAbortOnRouteChange:!0}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)}));for(const e of r)se.set(e,s.then((t=>{var n;const r=null==t||null===(n=t.list)||void 0===n?void 0:n.find((t=>t.appId===e)),s=r?{...r,id:e}:void 0;return ie.set(e,s),s})))}}async function oe(e){await Promise.all(e.map((e=>se.get(e))))}function ce(e){if(window.STANDALONE_MICRO_APPS)return ie.get(e)}var le=n(4113);const ue="core.provider-flow-api";function he(e,t){return null==e?void 0:e.some((e=>e.source===t))}async function pe(e){let{url:t,originalUri:n,method:r="GET",responseWrapper:s=!0,ext_fields:i,request:a,isFileType:o,stream:c}=e;const l=["get","delete","head"].includes(r.toLowerCase()),u=o?{responseType:"blob"}:{};let h;for(var p=arguments.length,f=new Array(p>1?p-1:0),m=1;m<p;m++)f[m-1]=arguments[m];if(l){var y,g,v,b;let e,s;var w,x;if(n&&"object"===(null==a?void 0:a.type)&&(null!==(y=null===(g=n.match(/:([^/]+)/g))||void 0===g?void 0:g.length)&&void 0!==y?y:0)===(null!==(v=null===(b=a.fields)||void 0===b?void 0:b.length)&&void 0!==v?v:0)?[s]=f:[e,s]=f,c)return await(0,le.createSSEStream)(d.http.getUrlWithParams(t,e),{...u,...s,method:r,headers:Object.fromEntries([...new Headers(null!==(w=null===(x=s)||void 0===x?void 0:x.headers)&&void 0!==w?w:{}).entries()])});h=await d.http.simpleRequest(r,t,{params:e,...u,...s})}else{const e=function(e){if("object"!==(null==e?void 0:e.type))return!1;const t=e=>!(0,F.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(a),n=function(e){const t=he(e,"query");for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];if(t){if(he(e,"body")){const[e,t,n]=r;return{data:e,options:{params:t,...n}}}const[t,n]=r;return{data:{},options:{params:t,...n}}}const[i,a]=r;return{data:i,options:a}}(i,...f),s=e?function(e){if(e instanceof FormData)return e;const t=new FormData;for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.append(n,e)})):!(0,F.isObject)(r)||r instanceof Blob||r instanceof Date?t.append(n,r):Object.entries(r).forEach((e=>{let[r,s]=e;t.append(`${n}[${r}]`,s)}));return t}(n.data):n.data;if(c){var S;const{body:e,headers:i}=d.http.getBodyAndHeaders(s,null===(S=n.options)||void 0===S?void 0:S.headers);return await(0,le.createSSEStream)(t,{...u,...n.options,method:r,headers:Object.fromEntries([...new Headers(null!=i?i:{}).entries()]),body:e})}h=await d.http.requestWithBody(r,t,s,{...u,...n.options})}return!o&&s?h.data:h}function de(){customElements.define(ue,(0,le.createProviderClass)(pe))}var fe=n(1060);const me=async(e,t)=>(await d.http.post("api/gateway/next_builder.contract_center.BatchSearchContract/api/v1/contract/batch_search",e,t)).data,ye=new Map,ge=new Map,ve=new Map,be=(e,t)=>{null==e||e.forEach((e=>{t.set(`${e.namespaceId}.${e.name}`,e)}))};function we(e){be(e,ye)}function xe(e){be(e,ge)}function Se(){ge.clear()}function Pe(e){be(e,ve)}function Ae(){ve.clear()}const Ee=new Map;function Te(e){return e.includes("@")}async function ke(e,t,n,r){if(!e.includes(":"))throw new Error(`You're using legacy Custom API "${e}" which is dropped in v3, please use Flow API instead`);const s=await async function(e){const[t,n]=e.split("@"),[r,s]=n.split(":"),i=function(e){return ye.get(e)||ge.get(e)||ve.get(e)}(`${t}.${r}`);if(i)return{name:i.name,namespace:i.namespaceId,serviceName:i.serviceName,version:i.version,contract:{endpoint:i.endpoint,response:i.response,request:i.request}};let a=Ee.get(e);return a||(a=async function(e,t,n){let r;const s=`${e}@${t}`;let i;try{const{list:e}=await me({contract:[{fullContractName:s,version:n}]});r=e[0]}catch(e){i=e}return r?{name:r.name,namespace:r.namespaceId,serviceName:r.serviceName,version:r.version,contract:{endpoint:r.endpoint,response:r.response,request:r.request}}:(console.error(`Failed to fetch Flow API definition for "${s}:${n}"`,null!=i?i:"Contract not found"),null)}(t,r,s),Ee.set(e,a)),a}(e);if(!s)throw new _e(`Flow API not found: "${e}"`);const i=function(e,t){var n,r;const s="string"==typeof t.contract?fe.safeLoad(t.contract,{schema:fe.JSON_SCHEMA,json:!0}):t.contract,{uri:i,method:a="GET",ext_fields:o}=null!==(n=null==s?void 0:s.endpoint)&&void 0!==n?n:{},c=!(null==s||!s.response)&&!1!==s.response.wrapper;if(!i)throw new Error(`Missing endpoint.uri in contract of provider "${e}"`);return{uri:i,method:"list"===a.toLowerCase()?"get":a,ext_fields:o,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==s||null===(r=s.response)||void 0===r?void 0:r.type),responseWrapper:c,request:null==s?void 0:s.request}}(e,s);return function(e,t,n,r){const{uri:s,method:i,ext_fields:a,responseWrapper:o,isFileType:c,request:l}=e,u="saveAs"===n;let h,p=t;u&&(Array.isArray(t)?(p=t.slice(),h=p.shift()):h=t.filename);const{url:d,args:f}=function(e,t){const{uri:n,name:r,namespace:s,serviceName:i,version:a,method:o="GET",request:c,ext_fields:l}=e,u=a?"logic.api.gateway"===i||null!=i&&i.startsWith("logic.api.gateway.")?"":i?`api/gateway/${i}`:`api/gateway/${s}.${r}@${a}`:`api/gateway/api_service.${s}.${r}`;let h,p=[];if(Array.isArray(t))p=t.slice(),h=n.replace(/:([^/]+)/g,(()=>p.shift()));else{const e={...t.params};if(h=n.replace(/:([^/]+)/g,((t,n)=>{if((0,le.hasOwnProperty)(e,n)){const t=e[n];return delete e[n],t}throw new Error(`Missing required param: "${n}"`)})),["get","delete","head"].includes(o.toLowerCase())){var d,f,m,y;"object"===(null==c?void 0:c.type)&&(null!==(d=null===(f=n.match(/:([^/]+)/g))||void 0===f?void 0:f.length)&&void 0!==d?d:0)===(null!==(m=null===(y=c.fields)||void 0===y?void 0:y.length)&&void 0!==m?m:0)||p.push(e)}else{const t=null==l?void 0:l.find((e=>"body"===e.source));if(t){let n;t.name&&(0,le.hasOwnProperty)(e,t.name)&&(n=e[t.name],delete e[t.name]),p.push(n)}const n=null==l?void 0:l.find((e=>"query"===e.source));if(n){let t;n.name&&(0,le.hasOwnProperty)(e,n.name)&&(t=e[n.name],delete e[n.name]),p.push(t)}t||n||p.push(e)}t.options&&p.push(t.options)}return{url:u?u+h:h.replace(/^\//,""),args:p}}(e,p);return[...u?[h]:[],{url:d,originalUri:s,method:i,ext_fields:a,responseWrapper:o,request:l,isFileType:c,stream:r},...f]}(i,t,n,r)}class _e extends Error{constructor(e){super(e),this.name="FlowApiNotFoundError",Error.captureStackTrace&&Error.captureStackTrace(this,_e)}}var Ce=function(){var e=p((function*(e,t,n){return(yield d.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,r){return e.apply(this,arguments)}}(),Ie=n(4586);function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){(0,Ie.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ne=function(){var e=p((function*(e,t,n){return(yield d.http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(e),Le(Le({},n),{},{params:t}))).data}));return function(t,n,r){return e.apply(this,arguments)}}(),Me=n(7512);const De=Symbol("appId"),Re=Symbol("menuI18nNamespace"),Be=Symbol("overrideApp");async function Fe(e,t,n){const r=e.find((e=>"inject"!==e.type));if(!r)return;const s=[],i=new Map,a=new WeakMap;for(const t of e)if(t.i18n){const e=`menu/${t.menuId}~${t.app[0].appId}+${t.instanceId}`;Object.entries(t.i18n).forEach((t=>{let[n,r]=t;Me.i18n.addResourceBundle(n,e,r)})),a.set(t,e)}await Promise.all(e.map((e=>async function(e,t,n,r){if(e.dynamicItems&&e.itemsResolve){const i=e.app[0].appId,a={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,I(e.itemsResolve)]};var s;i!==t.app.id&&(a.overrideApp=window.STANDALONE_MICRO_APPS?e.overrideApp:null===(s=r.getStoryboardByAppId(i))||void 0===s?void 0:s.app,a.appendI18nNamespace=n.get(e));const o=await r.resolveData({transform:"items",...e.itemsResolve},a);e.items=o.items}}(e,t,a,n))));for(const t of e){var o;if(null!==(o=t.items)&&void 0!==o&&o.length)if("inject"===t.type&&t.injectMenuGroupId){let e=i.get(t.injectMenuGroupId);e||(e=[],i.set(t.injectMenuGroupId,e)),e.push(t)}else s.push(t)}return{...r,items:s.flatMap((e=>je(e.items,e,i,a))),[Re]:a.get(r),[Be]:r.overrideApp}}function je(e,t,n,r){return null==e?void 0:e.map((e=>{var s;const i=e.groupId&&n.get(e.groupId);return i&&n.delete(e.groupId),{...e,children:(null!==(s=je(e.children,t,n,r))&&void 0!==s?s:[]).concat(i?i.flatMap((e=>je(e.items,e,n,r))):[]),[De]:t.app[0].appId,[Re]:r.get(t),[Be]:t.overrideApp}}))}function Ue(e){e.items=Ye(e.items)}function Ye(e){return function(e){return(0,F.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}(e).map((e=>({...e,children:Ye(e.children)})))}var $e=n(5285),He=n(8303);function We(e,t,n,r){if("titleDataSource"in e&&(0,le.isObject)(e.titleDataSource)&&Object.entries(e.titleDataSource).every((e=>{let[,t]=e;return null===t||""===t}))&&delete e.titleDataSource,"if"in e&&null===e.if&&delete e.if,"to"in e&&e.to&&!(0,He.isEvaluable)(e.to)){const t=$e.pipes.yaml(e.to);(0,le.isObject)(t)&&["pathname","search","hash"].some((e=>(0,le.hasOwnProperty)(t,e)))&&(e.to=t)}let s=n;if(t!==n.app.id){var i;const a=window.STANDALONE_MICRO_APPS?e[Be]:null===(i=r.getStoryboardByAppId(t))||void 0===i?void 0:i.app;s={...n,overrideApp:a,appendI18nNamespace:e[Re]}}return r.asyncComputeRealValue(e,s,{ignoreSymbols:!0})}function Ve(e,t,n){return Promise.all(e.map((async e=>{let{children:r,...s}=e;const[i,a]=await Promise.all([We(s,s[De],t,n),r&&await Ve(r,t,n)]);return{...i,children:a}})))}var ze=function(){var e=p((function*(e,t,n,r){return(yield d.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),Le(Le({},r),{},{params:n}))).data}));return function(t,n,r,s){return e.apply(this,arguments)}}();const qe=new Map;async function Ke(e){if(e.title||(0,F.isEmpty)(e.titleDataSource))return e.title;const t=JSON.stringify(e.titleDataSource),n=qe.get(t);if(void 0!==n)return n;const{objectId:r,instanceId:s,attributeId:i}=e.titleDataSource,a=null!=i?i:"name",o=await ze(r,s,{fields:a});let c;if("#showKey"===i&&Array.isArray(o[a])){const[e,...t]=o[a];c=t.length>0?`${e}(${t.join(",")})`:String(e)}else c=String(o[a]);return qe.set(t,c),c}const Ge=new Map,Je=new Map;function Xe(e){return null==e?void 0:e.filter(m.checkIfOfComputed).map((e=>{const t=Xe(e.children);return"group"===e.type?{type:"group",title:e.text,childLayout:e.childLayout,items:t,groupId:e.groupId,groupFrom:e.groupFrom}:null!=t&&t.length?{type:"subMenu",childLayout:e.childLayout,title:e.text,icon:e.icon,items:t,defaultExpanded:e.defaultExpanded}:function(e){return e.href?T(e.href):!!e.to&&E(e.to)}(e)?null:(0,F.omit)(e,["type","items","children"])})).filter(Boolean)}function Ze(e){return Je.get(e)}function Qe(e,t,n){let r=Ge.get(e);return r||(r=async function(e,t,n){const r=window.STANDALONE_MICRO_APPS?function(e,t,n){var r,s,i,a;const o=n.getStoryboardByAppId(t);return(null!==(r=null!==(s=null===(i=o.meta)||void 0===i?void 0:i.injectMenus)&&void 0!==s?s:null===(a=o.meta)||void 0===a?void 0:a.menus)&&void 0!==r?r:[]).filter((t=>t.menuId===e)).map((e=>{var n;return{...e,...null!==(n=e.app)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&n.appId?{}:{app:[{appId:t}]}}}))}(e,t.app.id,n):t.flags["three-level-menu-layout"]?(await Ne(e,{menuObjectId:"EASYOPS_STORYBOARD_MENU"})).menus:(await Ce("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,s=await Fe(r,t,n);if(!s)throw new Error(`Menu not found: ${e}`);Ue(s);const{items:i,app:a,...o}=s,c={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,I([i,o])]};delete c.tplStateStoreId,delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize;const l=a[0].appId,[u,h]=await Promise.all([We(o,l,c,n),Ve(i,c,n)]),p={title:await Ke(u),...(0,F.pick)(u,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"]),menuItems:Xe(h)};Je.set(e,p)}(e,t,n)),r}const et=[];let tt=null;const nt={maxWaitingTime:5e3,maxLoggedEvents:10};function rt(){clearTimeout(tt),et.length>nt.maxLoggedEvents?st():tt=setTimeout(st,nt.maxWaitingTime)}function st(){if(0===et.length)return;const e={model:"easyops.FRONTEND_STAT",columns:["_ver","st","et","lt","size","time","traceId","code","duration","page","uid","username","api","type","msg","status","pageId","route","apiCount","maxApiTimeCost","apiSizeCost","pageTitle"],data:et.splice(0,nt.maxLoggedEvents)};var t;!function(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});window.navigator.sendBeacon(e,n)}(nt.api,e),et.length&&(t=st,(window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17)))(t))}function it(){window.addEventListener("beforeunload",st,!1)}let at,ot=!1,ct=null,lt=!0;const ut=[];function ht(e){ot||(ot=!0,at||(at=function(e,t){return Object.assign(nt,{...t,api:e}),{sendOnExit:it,emit:rt}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),at.sendOnExit()))}const pt=Symbol("HttpAnalytics");function dt(e){const t=Math.round(performance.now()),n=Date.now();return e[pt]={st:n,time:Math.round(n/1e3),perfStartTime:t},e}function ft(e,t){return yt(!1,e,t)}function mt(e,t){return yt(!0,e,t)}function yt(e,t,n){const r=Math.round(performance.now()),s=Date.now(),{[pt]:i,url:a}=n;if(i&&!(e&&t instanceof d.HttpAbortError)){delete n[pt];const{st:c,time:l,perfStartTime:u}=i,{userInstanceId:h,username:p}=w();let f,m,y,g,v,b,x;if(e){const e=t instanceof d.HttpResponseError;(e||t instanceof d.HttpParseError)&&(({status:v,headers:b}=t.response),e&&(x=t.responseJson))}else({status:v,data:x,headers:b}=t);(0,le.isObject)(x)&&({code:f,message:m}=x),b instanceof Headers&&(y=b.get("x-b3-traceid"),g=b.get("content-length")),o={st:c,_ver:c,uid:h,username:p,time:l,et:s,page:location.href,duration:r-u,api:a,type:"api",code:null!=f?f:-1,msg:null!=m?m:"",status:v,traceId:null!=y?y:"",size:g?Number(g):-1},ct?et.push({...o,type:"apiRequest",...ct}):ut.push(o)}var o;return e?Promise.reject(t):t}function gt(){const e=Math.round(performance.now()),t=Date.now();return ut.length=0,ct=null,function(n){let{status:r,path:s,pageTitle:i}=n;if("ok"!==r)return et.push(...ut),void(ut.length=0);const a=Math.round(performance.now())-e,o=Date.now(),{username:c}=w();(function(e){const t=function(){const e=URL.createObjectURL(new Blob([]));let t=e.substring(e.lastIndexOf("/")+1);return URL.revokeObjectURL(e),lt&&(t="88-"+t,lt=!1),t}(),{lt:n,route:r}=e;ct={lt:n,route:r,pageId:t},et.push({...e,pageId:t,apiCount:ut.length,maxApiTimeCost:Math.max(0,...ut.map((e=>e.duration))),size:ut.map((e=>e.size)).filter((e=>e>0)).reduce(((e,t)=>e+t),0)});for(const e of ut)et.push({...e,...ct});ut.length=0,at.emit()})({type:"page",page:location.href,_ver:t,time:Math.round(t/1e3),st:t,et:o,lt:a,pageTitle:i,username:c,route:s}),window.dispatchEvent(new CustomEvent("route.render",{detail:{renderTime:a}}))}}const vt=Object.freeze({checkPermissions:function(){if(!S())return!1;if(w().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const e of t)switch(C.get(e)){case"unauthorized":case"undefined":return!1;case void 0:return console.error(`Un-checked permission action: "${e}", please make sure the permission to check is defined in permissionsPreCheck.`),!1}return!0},preCheckPermissions:function(e){if(S()&&!w().isAdmin)return O((0,u.scanPermissionActionsInStoryboard)(e))},preCheckPermissionsForBrickOrRoute:async function(e,t){if(S()&&!w().isAdmin&&Array.isArray(e.permissionsPreCheck))return O(await t(e.permissionsPreCheck))}}),bt=new class{constructor(){(0,L.A)(this,Q),(0,N.A)(this,J,void 0),(0,N.A)(this,X,{sub:new Map,unsub:new Map}),(0,N.A)(this,Z,new Map)}subscribe(e,t){const n=JSON.stringify(t);return(0,M.A)(Q,this,te).call(this,"sub",e,t,n)}unsubscribe(e){const t=(0,B.A)(Z,this).get(e);if(!t){const t=`The message channel to unsubscribe "${e}" is not found`;return console.error(t),Promise.reject(new Error(t))}const n=JSON.parse(t),r=(0,M.A)(Q,this,te).call(this,"unsub",e,n,t);return(0,B.A)(X,this).sub.delete(t),r.then((()=>{(0,B.A)(Z,this).delete(e)})),r}onMessage(e,t){let n=(0,B.A)(Z,this).get(e),r=!1;return D(Q,this,ee).onMessage((s=>{n||(n=(0,B.A)(Z,this).get(e)),n?"MESSAGE.PUSH"===s.event&&function(e,t){const n=JSON.parse(e);return n.system===t.system&&(n.topic===t.topic||"string"==typeof n.topic&&n.topic.includes("*")&&new RegExp(`^${n.topic.replace(/([^*]*)\*([^*]*)/g,((e,t,n)=>`${(0,F.escapeRegExp)(t)}[^/]*${(0,F.escapeRegExp)(n)}`))}$`).test(t.topic))}(n,s.payload)&&t(s.payload.message):r||(console.error(`Message channel: "${e}" not found`),r=!0)}))}onClose(e){return D(Q,this,ee).onClose(e)}reset(){var e;(0,B.A)(X,this).sub.clear(),(0,B.A)(X,this).unsub.clear(),(0,B.A)(Z,this).clear(),null===(e=(0,B.A)(J,this))||void 0===e||e.reset()}},wt=function(){const e=(0,m.getV2RuntimeFromDll)();if(e)return Object.freeze((0,F.pick)(e,["authenticate","getAuth","isLoggedIn","logout","addPathToBlackList","isBlockedPath","isBlockedUrl","isBlockedHref"]))}()||r},1256:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},1329:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(9420))},1369:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(7545);function s(e){var t=function(e){if("object"!=(0,r.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},1386:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(9420))},1387:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(9420))},1548:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},1796:e=>{"use strict";function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},2016:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},2171:(e,t,n)=>{"use strict";function r(e){if("function"==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var t=self.close.bind(self);self.close=function(){return e(),t()}}else{if("function"!=typeof window.addEventListener)return;window.addEventListener("beforeunload",(function(){e()}),!0),window.addEventListener("unload",(function(){e()}),!0)}}n.d(t,{O:()=>r})},2193:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var r=n(7551);const s=async e=>(await r.http.get("api/auth/login",e)).data},2290:(e,t,n)=>{"use strict";var r=n(3780),s=n(1796),i=n(5417);function a(e,t,n){var r=[];return e.include.forEach((function(e){n=a(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===r.indexOf(t)}))}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=r.toArray(e),t=r.toArray(t),!e.every((function(e){return e instanceof o})))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof i})))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},e.exports=o},2559:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},2621:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},2846:(e,t,n)=>{"use strict";var r=n(2290);e.exports=r.DEFAULT=new r({include:[n(9590)],explicit:[n(9280),n(6751),n(5986)]})},3005:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9420))},3032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HttpAbortError:()=>F,HttpFetchError:()=>D,HttpParseError:()=>B,HttpResponseError:()=>R,createHttpInstance:()=>Y,defaultAdapter:()=>$,fetch:()=>M,http:()=>j,isHttpAbortError:()=>U});var r={};n.r(r),n.d(r,{HttpAbortError:()=>f,HttpFetchError:()=>h,HttpParseError:()=>d,HttpResponseError:()=>p,createHttpInstance:()=>C,defaultAdapter:()=>P,fetch:()=>s,getUrlWithParams:()=>x,http:()=>_,isHttpAbortError:()=>b});const s=(e,t)=>{const n=new Request(e,Object.assign({credentials:"same-origin"},t));return self.fetch(n)};var i=n(4635),a=n(918),o=n(4586),c=n(829),l=n(2559),u=n(6121);class h extends Error{constructor(e){super(e),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}class p extends Error{constructor(e,t){super(e.statusText),(0,o.A)(this,"response",void 0),(0,o.A)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,p),this.response=e,this.responseJson=t}}class d extends Error{constructor(e){super(e.statusText),(0,o.A)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,d),this.response=e}}class f extends Error{constructor(e){super(e),this.name="HttpAbortError"}}class m{constructor(){(0,o.A)(this,"handlers",[])}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){this.handlers.forEach((t=>{null!==t&&e(t)}))}}function y(e){return null==e}const g=document.querySelector("base"),v=g?g.href:location.origin+"/",b=e=>e instanceof DOMException&&20===e.code,w=async(e,t,n)=>new Promise((async(r,i)=>{let a;n.url=e;let o,{responseType:c}=n.options||{};c||(c="json");try{a=await s(e,t)}catch(e){return void i(b(e)?new f(e.toString()):new h(e.toString()))}if(a.ok){try{o=await a[c]()}catch(e){return void i(b(e)?new f(e.toString()):new d(a))}r({status:a.status,statusText:a.statusText,headers:a.headers,data:o})}else{let e;try{e=await a.json()}catch{}i(new p(a,e))}})),x=(e,t)=>{if(t){const n=new URL(e,v);t instanceof URLSearchParams?t.forEach((function(e,t){n.searchParams.append(t,e)})):Object.entries(t).forEach((e=>{let[t,r]=e;Array.isArray(r)?r.forEach((e=>{n.searchParams.append(t,y(e)?"":e)})):n.searchParams.append(t,y(r)?"":r)}));const{href:r}=n;return r.startsWith(v)?r.substr(v.length):r}return e},S=(e,t)=>{if(void 0!==e){const n=new Headers(t||{}),r="Content-Type";let s=e;return n.has(r)||("string"==typeof e?n.set(r,"application/x-www-form-urlencoded"):e instanceof FormData||(n.set(r,"application/json"),s=JSON.stringify(e))),{body:s,headers:n}}return{headers:t}},P=e=>{const{url:t,method:n,data:r}=e;return["DELETE","GET","HEAD"].includes(e.method)?((e,t,n)=>{const{params:r,responseType:s,interceptorParams:i,observe:a,noAbortOnRouteChange:o,useCache:c,...l}=n.options||{};return w(x(t,r),{...l,method:e},n)})(n,t,e):((e,t,n,r)=>{const{params:s,headers:i,responseType:a,interceptorParams:o,observe:c,noAbortOnRouteChange:l,useCache:u,...h}=r.options||{};return w(x(t,s),{...h,method:e,...S(n,i)},r)})(n,t,r,e)};var A=new WeakMap,E=new WeakSet;class T{constructor(e){var t=this;(0,i.A)(this,E),(0,o.A)(this,"interceptors",void 0),(0,a.A)(this,A,P),(0,o.A)(this,"request",(async(e,t,n)=>{const{body:r,method:s,...i}=t||{};return(0,l.A)(E,this,k).call(this,{url:e,data:r,method:s||"GET",options:{...n||{},...i}})})),(0,o.A)(this,"simpleRequest",(function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.A)(E,t,k).call(t,{url:n,method:e,options:r})})),(0,o.A)(this,"requestWithBody",(function(e,n,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.A)(E,t,k).call(t,{url:n,method:e,data:r,options:s})})),this.interceptors={request:new m,response:new m},null!=e&&e.adapter&&(0,u.A)(A,this,e.adapter)}getUrlWithParams(e,t){return x(e,t)}getBodyAndHeaders(e,t){return S(e,t)}get(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"GET",options:t})}delete(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"DELETE",options:t})}head(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"HEAD",options:t})}post(e,t,n){return(0,l.A)(E,this,k).call(this,{url:e,method:"POST",data:t,options:n})}put(e,t,n){return(0,l.A)(E,this,k).call(this,{url:e,method:"PUT",data:t,options:n})}patch(e,t,n){return(0,l.A)(E,this,k).call(this,{url:e,method:"PATCH",data:t,options:n})}}function k(e){const t=[];let n=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>(0,c.A)(A,this).call(this,e)),void 0),this.interceptors.response.forEach((n=>{t.push((t=>{var r;return null===(r=n.fulfilled)||void 0===r?void 0:r.call(n,t,e)}),(t=>{var r;return null===(r=n.rejected)||void 0===r?void 0:r.call(n,t,e)}))})),t.push((t=>{var n;return"response"===(null===(n=e.options)||void 0===n?void 0:n.observe)?t:t.data}),void 0);t.length;)n=n.then(t.shift(),t.shift());return n}let _=new T;function C(e){_=new T(e)}var I;let O,L;const{dll:N}=window;O=N&&null!==(I=window.BRICK_NEXT_VERSIONS)&&void 0!==I&&null!==(I=I["brick-container"])&&void 0!==I&&I.startsWith("2.")&&(L=N("JxWY"))?L:r;const{fetch:M,HttpFetchError:D,HttpResponseError:R,HttpParseError:B,HttpAbortError:F,http:j,isHttpAbortError:U,createHttpInstance:Y,defaultAdapter:$}=O},3443:(e,t,n)=>{"use strict";n.d(t,{e:()=>s});var r=n(7551);const s=async e=>(await r.http.get("api/v1/runtime_standalone",e)).data},3459:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>i});var r=n(4396).mU,s=new Set,i={create:function(e){var t={time:r(),name:e,messagesCallback:null};return s.add(t),t},close:function(e){s.delete(e)},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(n){return setTimeout((function(){Array.from(s).forEach((function(n){n.name===e.name&&n!==e&&n.messagesCallback&&n.time<t.time&&n.messagesCallback(t)})),n()}),5)}))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:r}},3537:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(9420))},3780:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,s,i;if(t)for(n=0,r=(i=Object.keys(t)).length;n<r;n+=1)e[s=i[n]]=t[s];return e}},3901:(e,t,n)=>{"use strict";var r=n(5417),s=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,o,c=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(r=l[t],o=!1,"[object Object]"!==i.call(r))return!1;for(a in r)if(s.call(r,a)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(a))return!1;c.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},4046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Dialog:()=>sn,Notification:()=>dn,StoryboardFunctionRegistryFactory:()=>ge,__secret_internals:()=>r,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>Ui,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>It,checkIfOfComputed:()=>Ct,createHistory:()=>P,createRuntime:()=>Ci,customEditors:()=>Vi,customProcessors:()=>N,customTemplates:()=>Be,fetchByProvider:()=>zi,getAuth:()=>Yi,getBasePath:()=>d,getCssPropertyValue:()=>ce,getCurrentMode:()=>ae,getCurrentTheme:()=>ee,getHistory:()=>A,getPageInfo:()=>xs,getRealValue:()=>Ki,getRuntime:()=>Ii,getThemeVariant:()=>he,getV2RuntimeFromDll:()=>S,handleHttpError:()=>pn,httpErrorToString:()=>on,instantiateModalStack:()=>Ji,isLoggedIn:()=>Hi,isNetworkError:()=>Es,isUnauthenticatedError:()=>cn,logout:()=>$i,matchPath:()=>Wt,registerWidgetFunctions:()=>He,registerWidgetI18n:()=>B,resetReloadForError:()=>Cs,setUIVersion:()=>Ps,shouldReloadForError:()=>_s,unstable_createRoot:()=>qi});var r={};n.r(r),n.d(r,{addRealTimeDataInspectHook:()=>Yr,debugDataValue:()=>Rr,getAddedContracts:()=>Dr,getAllContextValues:()=>Ir,getBrickPackages:()=>Mi,getBrickPackagesById:()=>Or,getContextValue:()=>Cr,getLegalRuntimeValue:()=>Br,getRenderId:()=>Mr,legacyDoTransform:()=>dr,legacyTransformIntermediateData:()=>mr,legacyTransformProperties:()=>fr,loadBricks:()=>Lr,loadEditors:()=>Nr,mountUseBrick:()=>br,renderUseBrick:()=>vr,setRealTimeDataInspectRoot:()=>Ur,symbolForRootRuntimeContext:()=>gr,unmountUseBrick:()=>wr,updateSnippetPreviewSettings:()=>kr,updateStoryboard:()=>xr,updateStoryboardByRoute:()=>Sr,updateStoryboardBySnippet:()=>Tr,updateStoryboardByTemplate:()=>Pr,updateTemplatePreviewSettings:()=>Ar});var s=n(4586),i=n(918),a=n(6121),o=n(829),c=n(7512),l=n(8856),u=n(4113),h=n(1916),p=(n(1858),n(1732));function d(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var f=n(1030);function m(e,t){const n=(0,f.orderBy)(e,(e=>{var t,n;return null!==(t=null===(n=e.app.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&y(n,t))return e}}function y(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function g(e){var t;return!e||(null===(t=Ii().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let v,b=!1;function w(e,t){b=!confirm(e),t(!b)}function x(e){const{push:t,replace:n}=e;function r(r){return function(s,i,a){let o;const c="string"==typeof s;return o=c?(0,p.parsePath)(s).pathname:s.pathname,"string"==typeof o&&o.startsWith("/")&&g(function(e){var t,n;return m(null!==(t=null===(n=Ei)||void 0===n?void 0:n.storyboards)&&void 0!==t?t:[],e)}(o))?location["push"===r?"assign":"replace"](c?d()+s.substring(1):e.createHref(s)):("push"===r?t:n)(s,i,a)}}return{push:r("push"),replace:r("replace")}}function S(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function P(){if(!v){const e=(0,p.createBrowserHistory)({basename:d().replace(/\/$/,""),getUserConfirmation:w});Object.assign(e,function(e){const{push:t,replace:n}=e;function r(e,n,r){b=!1,t(e,n),null==r||r(b)}function s(e,t,r){b=!1,n(e,t),null==r||r(b)}function i(t){return function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;const{extraQuery:o,clear:c,keepHash:l,...u}=i,h=new URLSearchParams(c?"":e.location.search),p={};Object.assign(p,n,o);for(const[e,t]of Object.entries(p))if(Array.isArray(t)){h.delete(e);for(const n of t)h.append(e,n)}else null==t||""===t?h.delete(e):h.set(e,t);("push"===t?r:s)(`?${h.toString()}${l?e.location.hash:""}`,u,a)}}let a;return{pushQuery:i("push"),replaceQuery:i("replace"),pushAnchor:function(t,n,s){r({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,s)},reload:function(t){s({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){a=e},getBlockMessage:function(){return a},unblock:function(){a=void 0},...x({...e,push:r,replace:s})}}(e)),v=e}return v}const A=function(){const e=S();if(e)return e.getHistory}()||function(){return v};var E=n(4635),T=n(2559),k=n(7551),_=n(8303),C=n(5069),I=n(3575),O=n(8319),L=new WeakMap;const N=function(){const e=S();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,i.A)(this,L,new Map)}define(e,t){const[n,r]=e.split(".");let s=(0,o.A)(L,this).get(n);if(s||(s=new Map,(0,o.A)(L,this).set(n,s)),s.has(r))throw new Error(`Custom processor of "${e}" already registered`);s.set(r,t)}get(e){return(0,o.A)(L,this).get(e)}};function M(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=D("app",t.id),r=[];return Object.entries(n.i18n).forEach((t=>{let[n,s]=t;c.i18n.addResourceBundle(n,e,s),r.push(n)})),()=>{for(const t of r)c.i18n.removeResourceBundle(t,e)}}}function D(e,t){return`${e}/${t}`}function R(e){return c.i18n.getFixedT(null,D("widget",e))}const B=function(){const e=S();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=D("widget",e);Object.entries(t).forEach((e=>{let[t,r]=e;c.i18n.addResourceBundle(t,n,r)}))},F="brick-next-devtools-panel",j="devtools-frame-active-change",U="devtools-panel-change";let Y,$=!0;function H(e,t){const n=W();if(!n||"evaluation"===e&&(!$||Y&&"Evaluations"!==Y))return;const r=()=>{var r;null===(r=n.emit)||void 0===r||r.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):setTimeout(r,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const V=()=>{throw new Error("Can't modify read-only proxy object")},z={set:V,defineProperty:V,deleteProperty:V,setPrototypeOf:V};function q(e){return new Proxy(e,z)}function K(e){let{get:t,ownKeys:n}=e;return W()?q(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let G="light";const J=new u.JsonStorage(localStorage),X="apps-theme";function Z(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);G=e}function Q(){return G}function ee(){return document.documentElement.dataset.theme}function te(e){e?Z(e):e=Q(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){J.setItem(X,{...re(),...e})}function re(){let e;try{e=J.getItem(X)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!=e?e:{}}let se="default";function ie(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);se=e}function ae(){return document.documentElement.dataset.mode}function oe(e){e?ie(e):e=se,e!==ae()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}let le="default";function ue(e){if("default"!==e&&"elevo"!==e)return ue("default");le!==e&&(document.documentElement.dataset.variant=le=e,window.dispatchEvent(new CustomEvent("variant.change",{detail:e})))}function he(){return le}const pe=new Map;function de(e,t){const n={};for(const r of e){const e=fe(r,t);void 0!==e&&(n[r]=e)}return n}function fe(e,t){var n,r,s;let{collectCoverage:i,widgetId:a,widgetVersion:o,isolatedRoot:l,app:u,appendI18nNamespace:h,storyboardFunctions:p,isStoryboardFunction:m}=t;switch(e){case"BASE_URL":return i?"/next":d().replace(/\/$/,"");case"FN":return l?pe.get(l):p;case"IMG":return i?{get:e=>`mock/images/${e}`}:a?null==_i||null===(n=_i.images)||void 0===n?void 0:n.widgetImagesFactory(a,o):null==_i||null===(r=_i.images)||void 0===r?void 0:r.imagesFactory(u.id,u.isBuildPush,u.currentVersion);case"I18N":return i?f.identity:a?R(a):c.i18n.getFixedT(null,[h,D("app",u.id)].filter(Boolean));case"I18N_TEXT":return i?me:c.i18nText;case"LANGUAGE":return i?"zh":c.i18n.language||"zh";case"PERMISSIONS":return q({check:i?ye:null==_i||null===(s=_i.checkPermissions)||void 0===s?void 0:s.checkPermissions});case"THEME":return q({getTheme:i?()=>"light":Q,getCssPropertyValue:i?()=>"":ce});case"console":return m?q(console):void 0;case"location":return i?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function me(e){return null==e?void 0:e.en}function ye(){return!0}function ge(){let{widgetId:e,widgetVersion:t,isolatedRoot:n,collectCoverage:r,debuggerOverrides:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=new Map,a=null==s?void 0:s({precookFunction:_.precookFunction,cook:_.cook,supply:O.supply}),o=new Proxy(Object.freeze({}),{get:(e,t)=>function(e){const t=i.get(e);if(!t)return;if(t.processed)return t.cooked;let n;r&&(n=r.createCollector(e));const o=!a&&!n&&t.transformed;if(o){const e=l(o.globals);t.cooked=new Function(...o.globals,`"use strict";return (${o.source})`)(...o.globals.map((t=>(0,u.hasOwnProperty)(e,t)?e[t]:void 0)))}else{const e=(0,_.precookFunction)(t.source,{typescript:t.typescript,hooks:n&&{beforeVisit:n.beforeVisit},cacheKey:t}),r=l(e.attemptToVisitGlobals);t.cooked=(0,_.cook)(e.function,t.source,{rules:{noVar:!0},globalVariables:a?{...r,...null!=a&&a.LodashWithStaticFields&&e.attemptToVisitGlobals.has("_")?{_:{...r._,...a.LodashWithStaticFields}}:null,...null!=a&&a.ArrayConstructor&&e.attemptToVisitGlobals.has("Array")?{Array:a.ArrayConstructor}:null,...null!=a&&a.ObjectWithStaticFields&&e.attemptToVisitGlobals.has("Object")?{Object:{...r.Object,...a.ObjectWithStaticFields}}:null}:r,ArrayConstructor:null==a?void 0:a.ArrayConstructor,hooks:n&&{beforeEvaluate:n.beforeEvaluate,beforeCall:n.beforeCall,beforeBranch:n.beforeBranch},debug:!!s})}return t.processed=!0,t.cooked}(t)});let c;function l(s){return(0,O.supply)(s,de(s,{collectCoverage:r,widgetId:e,widgetVersion:t,isolatedRoot:n,app:c,storyboardFunctions:o,isStoryboardFunction:!0}),!!r)}return{storyboardFunctions:o,registerStoryboardFunctions:function(e,t){if(t&&(c=t),i.clear(),Array.isArray(e))for(const t of e){var n;let e=t.deps;null==e&&(e=(0,C.collectMemberUsageInFunction)(t,"FN",!!r),e.delete(t.name));const s=null!==(n=t.perm)&&void 0!==n?n:(0,C.collectMemberUsageInFunction)(t,"PERMISSIONS",!!r).has("check");i.set(t.name,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:e,hasPermissionsCheck:s})}},updateStoryboardFunction(e,t){const n={...t,name:e},r=(0,C.collectMemberUsageInFunction)(n,"FN",!0),s=(0,C.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");i.set(e,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:r,hasPermissionsCheck:s})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const r=i.get(e);return!!r&&(r.hasPermissionsCheck||[...r.deps].some(n))}return!1};return e.some(n)},clearGlobalExecutionContextStack(){(0,_.__dev_only_clearGlobalExecutionContextStack)()},getGlobalExecutionContextStack:()=>(0,_.__dev_only_getGlobalExecutionContextStack)()}}const{storyboardFunctions:ve,registerStoryboardFunctions:be,checkPermissionsUsage:we}=ge();var xe={};try{xe.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,r=e.defineProperty,s=i.prototype;function i(){t.set(this,n(null))}function a(e,t,n){r(e,t,{configurable:!0,writable:!0,value:n})}function o(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}a(s,"addEventListener",(function(e,n,r){for(var s=t.get(this),i=s[e]||(s[e]=[]),a=0,o=i.length;a<o;a++)if(i[a].listener===n)return;i.push({target:this,listener:n,options:r})})),a(s,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(a(e,"target",this),a(e,"currentTarget",this),n.slice(0).some(o,e),delete e.currentTarget,delete e.target),!0})),a(s,"removeEventListener",(function(e,n){for(var r=t.get(this),s=r[e]||(r[e]=[]),i=0,a=s.length;i<a;i++)if(s[i].listener===n)return void s.splice(i,1)})),xe.EventTarget=i}(Object,new WeakMap)}const Se=xe.EventTarget;let Pe=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const Ae=new Map([[Pe.xLarge,"1920px"],[Pe.large,"1600px"],[Pe.medium,"1280px"],[Pe.small,"1024px"],[Pe.xSmall,0]]),Ee=new Se,Te={},ke={};function _e(e,t){let n=!1;Te[t]=e.matches;for(const[e]of Ae)if(Te[e]&&ke.breakpoint!==e){ke.breakpoint=e,n=!0;break}n&&Ee.dispatchEvent(new CustomEvent("change",{detail:ke}))}Ae.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);_e(n,t),n.addEventListener?n.addEventListener("change",(e=>{_e(e,t)})):n.addListener((e=>{_e(e,t)}))}));const Ce=()=>ke;function Ie(e){return function(t){var n;const r="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(n=r.getItem(t))&&void 0!==n?n:"null")}}function Oe(e){var t,n;return!(null===(t=e?e.flags:null===(n=Ii())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Le(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];const i=0===r.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${i}`,...r):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${i}`,...r)}const Ne=new Set(["prefix"]);var Me=new WeakMap,De=new WeakMap;class Re{constructor(e){(0,i.A)(this,Me,new Map),(0,i.A)(this,De,void 0),(0,a.A)(De,this,e)}define(e,t){var n,r,s,i;let a=(0,o.A)(Me,this).has(e);a?console.warn(`Custom template of "${e}" already registered.`):(a=!!customElements.get(e),a&&console.warn(`Custom template of "${e}" already defined by customElements.`));const c=Oe(),l=null!==(n=null===(r=t.proxy)||void 0===r?void 0:r.properties)&&void 0!==n?n:{},u=[],h=[];for(const[t,n]of Object.entries(l))n.asVariable?(Le(c,"Template `asVariable`",e,t),c||h.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&u.push([t,n]);const p={...t,proxy:{...t.proxy,properties:Object.fromEntries(u)},state:(t.state?c?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(h.map((e=>({name:e,expose:!0}))))};(0,o.A)(Me,this).set(e,{...p,name:e});const d=(m=p.state,(0,f.uniq)(null!==(y=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[]));var m,y;const g=Object.entries(null!==(s=null===(i=p.proxy)||void 0===i?void 0:i.methods)&&void 0!==s?s:{}),v=d.concat(u.map((e=>e[0]))),b=g.map((e=>e[0])),w=v.concat(b).filter((e=>e in HTMLElement.prototype&&!Ne.has(e)));if(w.length>0&&(Le(c,"Using native HTMLElement properties as template properties or methods",e,...w),c))throw new Error(`In custom template "${e}", ${w.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!a){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return v}static get _dev_only_definedMethods(){return b}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const r=document.createElement("slot");t.appendChild(n),t.appendChild(r),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of d)u.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of u)Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(n.ref)[null!==(t=n.refProperty)&&void 0!==t?t:e]},set(t){var r;const s=null===(r=this.$$getElementByRef)||void 0===r?void 0:r.call(this,n.ref);var i;s&&(s[null!==(i=n.refProperty)&&void 0!==i?i:e]=t)},enumerable:!0});for(const[e,n]of g)Object.defineProperty(t.prototype,e,{value(){var t;return this.$$getElementByRef(n.ref)[null!==(t=n.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,o.A)(Me,this).get(e)}clearIsolatedRegistry(){(0,o.A)(De,this)&&(0,o.A)(Me,this).clear()}}const Be=function(){const e=S();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new Re,Fe=new Map;function je(e,t,n){let{tplStateStoreId:r,tplStateStoreMap:s}=e;if(!r)throw new Error(`Using "${t}" outside of a custom template${null!=n?n:""}`);const i=s.get(r);if(!i)throw new Error(`Template state store is not found when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return i}function Ue(e,t,n){const r=je(e,t,n).hostBrick.element;if(!r)throw new Error(`Template host element is gone when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return r}const Ye=new Map,$e=new Proxy(Object.freeze({}),{get:(e,t)=>Ye.get(t)}),He=function(){const e=S();if(e)return function(t,n,r){return e.getRuntime().registerWidgetFunctions(t,n,r)}}()||function(e,t,n){if(Ye.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:r,registerStoryboardFunctions:s}=ge({widgetId:e,widgetVersion:n});Ye.set(e,r),s(t)},We=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ve=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(We);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ze=e=>"*"===e||"x"===e||"X"===e,qe=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Ke=(e,t)=>{if(ze(e)||ze(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(qe(e),qe(t));return n>r?1:n<r?-1:0},Ge=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=Ke(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},Je=(e,t,n)=>{Qe(n);const r=((e,t)=>{const n=Ve(e),r=Ve(t),s=n.pop(),i=r.pop(),a=Ge(n,r);return 0!==a?a:s&&i?Ge(s.split("."),i.split(".")):s||i?s?-1:1:0})(e,t);return Xe[n].includes(r)},Xe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ze=Object.keys(Xe),Qe=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===Ze.indexOf(e))throw new Error(`Invalid operator, expected one of ${Ze.join("|")}`)};function et(e,t){let n=ji(e);if(!n&&null!=_i&&_i.checkInstalledApps&&(n=_i.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const r=t.match(/^([><]=?|=)(.*)$/);try{if(!r)throw new TypeError(`Invalid match version: ${t}`);return Je(n.currentVersion,r[2],r[1])}catch(e){console.error(e)}return!1}function tt(e,t,n){let{formStateStoreId:r,formStateStoreMap:s}=e;if(!r)throw new Error(`Using "${t}" outside of form renderer${null!=n?n:""}`);const i=s.get(r);if(!i)throw new Error(`Form state store is not found when using "${t}"${null!=n?n:""}.\nThis is a bug of Brick Next, please report it.`);return i}const nt=new Map;async function rt(e){var t;const n=null==_i||null===(t=_i.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=_i.flowApi.FLOW_API_PROVIDER);let r=nt.get(e);if(r)return r;if(e.includes("-")&&!customElements.get(e))if(n)_i.flowApi.registerFlowApiProvider();else if(await(0,l.loadBricksImperatively)([e],Mi()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return r=document.createElement(e),nt.set(e,r),r}let st=new WeakSet;function it(e){if((0,u.isObject)(e)&&!at(e))if(st.add(e),Array.isArray(e))e.forEach(it);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(it)}}function at(e){return st.has(e)}const ot=new Map;async function ct(e,t,n){var r;const{useProvider:s,method:i="resolve",args:a,params:o,options:c,filename:l,onReject:u}=e,{provider:h,field:p}=e;if(h&&!s)throw new Error(`You're using "provider: ${h}" which is dropped in v3, please use "useProvider" instead`);const d=null!=p;if(d){const e=Oe();if(Le(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const m=!Array.isArray(a)&&o&&null!=_i&&null!==(r=_i.flowApi)&&void 0!==r&&r.isFlowApiProvider(s)?{params:o,options:c,filename:l}:null,[y,g,v]=await Promise.all([rt(s),Pt(a,t),Pt(m,t)]),b=null==n?void 0:n.renderId,w=!!b&&b!==Ri(),x=lt(y,s,i,null!=v&&v.params?v:null!=g?g:[],n,a,w);let S,{transform:P}=e;try{const e=await x;S=d?(0,f.get)(e,p):e,it(S)}catch(e){if(!function(e){return!(null==e||!e.transform)}(u))throw e;P=u.transform,S=e}return P?"string"==typeof P?{[P]:S}:Pt(P,{...t,data:S}):S}async function lt(e,t,n,r,s,i,a){let o,c;try{o=JSON.stringify({useProvider:t,method:n,args:r})}catch(e){if(!i)throw e;o=JSON.stringify({useProvider:t,method:n,originalArgs:i})}return"reload"!==(null==s?void 0:s.cache)&&(c=ot.get(o)),c||(c=(async s=>{const i=null!=_i&&null!==(s=_i.flowApi)&&void 0!==s&&s.isFlowApiProvider(t)?await _i.flowApi.getArgsOfFlowApi(t,r,n):r;return e[n](...i)})(),a||ot.set(o,c)),c}const ut=Symbol.for("pre.evaluated.raw"),ht=Symbol.for("pre.evaluated.context");function pt(e){return!(null==e||!e[ut])}function dt(e){return e[ut]}function ft(e){return"string"==typeof e?(0,_.shouldAllowRecursiveEvaluations)(e):(0,_.shouldAllowRecursiveEvaluations)(e[ut])}const mt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function yt(e){return mt.has(e.constructor)?e.constructor:TypeError}function gt(e,t,n){const{run:r}=vt(e,t,n,!1);return r()}function vt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const s=[];if("string"!=typeof e){const n=(0,f.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ht],...n},e=e[ut]}const i={usedArgs:new Set},a={usedArgs:new Set};let o;try{o=(0,_.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,C.collectAppGetMenuUsage)(i,e,t),(0,C.collectInstalledAppsHasUsage)(a,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(yt(t))(n)}if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(a.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:h}=o;if(n.lazy||h.has("EVENT")&&!(0,u.hasOwnProperty)(t,"event")||h.has("DATA")&&!(0,u.hasOwnProperty)(t,"data"))return{blockingList:s,run:()=>Object.keys(t).length>0?{[ut]:e,[ht]:t}:e};let p,d,m,y;const g=Oe(t);let v,b;(h.has("STATE")||!g&&h.has("TPL"))&&(y=je(t,"STATE",`: "${e}"`)),h.has("FORM_STATE")&&(b=tt(t,"FORM_STATE",`: "${e}"`));const w=W();if(r||w){if(h.has("CTX")&&(p=(0,C.strictCollectMemberUsage)(e,"CTX"),r&&s.push(t.ctxStore.waitFor(p))),y){if(m=(0,C.strictCollectMemberUsage)(e,"STATE"),!g){const t=(0,C.strictCollectMemberUsage)(e,"TPL");for(const e of t)m.add(e)}r&&s.push(y.waitFor(m))}b&&(v=(0,C.strictCollectMemberUsage)(e,"FORM_STATE"),r&&s.push(b.waitFor(v))),h.has("PROCESSORS")&&(d=(0,C.strictCollectMemberUsage)(e,"PROCESSORS",2),r&&s.push((0,l.loadProcessorsImperatively)(d,Mi())))}if(r){let n=h.has("PERMISSIONS");if(!n&&h.has("FN")){const t=[...(0,C.strictCollectMemberUsage)(e,"FN")];n=we(t)}if(n&&s.push(...t.pendingPermissionsPreCheck),i.usedArgs.size>0&&null!=_i&&_i.menu){const e=[...i.usedArgs];s.push(Promise.all(e.map((e=>_i.menu.fetchMenuById(e,t,{getStoryboardByAppId:Fi,resolveData:ct,asyncComputeRealValue:Pt})))))}var x;a.usedArgs.size>0&&s.push(null==_i||null===(x=_i.checkInstalledApps)||void 0===x?void 0:x.waitForCheckingApps([...a.usedArgs]))}return{blockingList:s,run(){var n,r,s,i;const{ctxStore:a,data:l,event:w,unsafe_penetrate:x}=t,S=x?Bi():t,{app:P,location:A,query:E,match:T,flags:k,sys:C}=S,I=null!==(n=S.overrideApp)&&void 0!==n?n:P;for(const n of h)switch(n){case"ANCHOR":c[n]=A.hash?A.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[n]={...(0,f.cloneDeep)(I),getMenu:null==_i||null===(r=_i.menu)||void 0===r?void 0:r.getMenuById};break;case"CTX":c[n]=K({get(e,t){if("DS"===t&&!a.has(t)){var n;const e=null===(n=Bi())||void 0===n?void 0:n.ctxStore;if(null!=e&&e.has(t))return e.getValue(t)}return a.getValue(t)},ownKeys:()=>p?Array.from(p):[]});break;case"DATA":c[n]=l;break;case"EVENT":c[n]=w;break;case"FLAGS":c[n]=q(k);break;case"FORM_STATE":c[n]=K({get:(e,t)=>b.getValue(t),ownKeys:()=>Array.from(v)});break;case"HASH":c[n]=A.hash;break;case"INSTALLED_APPS":c[n]=q({has:et});break;case"ITEM":case"INDEX":case"SIZE":{const r="ITEM"===n?"forEachItem":"INDEX"===n?"forEachIndex":"forEachSize";(0,u.hasOwnProperty)(t,r)?c[n]=t[r]:console.error(`Using \`${n}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[n]=q({getItem:Ie("local")});break;case"MEDIA":c[n]=q(Ce());break;case"MISC":c[n]=Ii().getMiscSettings();break;case"PARAMS":if(null==E)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[n]=new URLSearchParams(E);break;case"PATH":c[n]=q(null!==(s=null==T?void 0:T.params)&&void 0!==s?s:{});break;case"PATH_NAME":c[n]=A.pathname;break;case"PROCESSORS":c[n]=K({get(e,t){const n=N.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return K({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of d){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==E)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[n]=Object.fromEntries(Array.from(E.keys()).map((e=>[e,E.get(e)])));break;case"QUERY_ARRAY":if(null==E)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[n]=Object.fromEntries(Array.from(E.keys()).map((e=>[e,E.getAll(e)])));break;case"SESSION_STORAGE":c[n]=q({getItem:Ie("session")});break;case"TPL":if(Le(g,'Using "TPL" in expression',`check your expression: "${e}"`),g)break;case"STATE":c[n]=K({get:(e,t)=>y.getValue(t),ownKeys:()=>Array.from(m)});break;case"SYS":c[n]=q(null!=C?C:{});break;case"__WIDGET_FN__":c[n]=$e;break;case"__WIDGET_IMG__":c[n]=null==_i||null===(i=_i.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":c[n]=R}Object.assign(c,de(o.attemptToVisitGlobals,{storyboardFunctions:ve,app:I,appendI18nNamespace:t.appendI18nNamespace,isolatedRoot:t.isolatedRoot}));try{const t=(0,_.cook)(o.expression,o.source,{globalVariables:(0,O.supply)(o.attemptToVisitGlobals,c)});return H("evaluation",{raw:e,context:c,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(yt(t))(n)}}}}let bt=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function wt(e){switch(e){case bt.USE_BRICK_PROPERTIES:case bt.USE_BRICK_TRANSFORM:case bt.USE_BRICK_EVENTS:case bt.USE_BRICK_IF:case bt.USE_BRICK_LIFECYCLE:case bt.USE_BRICK_DATA_SOURCE:return!0}return!1}function xt(e,t,n){if(wt(e))return e;if(t)switch(e){case bt.USE_BRICK:return bt.USE_BRICK_ITEM;case bt.USE_BRICK_SLOTS_ITEM_BRICKS:return bt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case bt.INITIAL:if("useBrick"===n)return bt.USE_BRICK;break;case bt.USE_BRICK:case bt.USE_BRICK_ITEM:case bt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return bt.USE_BRICK_PROPERTIES;case"transform":return bt.USE_BRICK_TRANSFORM;case"dataSource":return bt.USE_BRICK_DATA_SOURCE;case"events":return bt.USE_BRICK_EVENTS;case"slots":return bt.USE_BRICK_SLOTS;case"children":return bt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return bt.USE_BRICK_IF;case"lifeCycle":return bt.USE_BRICK_LIFECYCLE}break;case bt.USE_BRICK_SLOTS:return bt.USE_BRICK_SLOTS_ITEM;case bt.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return bt.USE_BRICK_SLOTS_ITEM_BRICKS}return bt.INITIAL}const St=["app","location","query","match","flags","sys"];async function Pt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=pt(e);if(r||"string"==typeof e){const s=n.$$lazyForUseBrick&&wt(n.$$stateOfUseBrick);let i,a=s;if(r||(0,_.isEvaluable)(e))i=await async function(e,t,n){const{blockingList:r,run:s}=vt(e,t,n,!0);return await Promise.all(r),s()}(e,t,{lazy:s}),a=ft(e);else if(s)i=e;else{const r=t.unsafe_penetrate?{...(0,f.pick)(Bi(),St),...(0,f.omit)(t,St)}:t;i=((0,u.hasOwnProperty)(r,"data")?n.noInject?I.transform:I.transformAndInject:n.noInject?Tt:I.inject)(e,r)}return a||it(i),i}if(!(0,u.isObject)(e)||at(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=Et(n,!0);return Promise.all(e.map((e=>Pt(e,t,r))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[r,s]=e;return Promise.all([Pt(r,t),Pt(s,t,Et(n,!1,r))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function At(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=pt(e);if(r||"string"==typeof e){const s=n.$$lazyForUseBrick&&wt(n.$$stateOfUseBrick);let i,a=s;if(r||(0,_.isEvaluable)(e))i=gt(e,t),a=ft(e);else if(s)i=e;else{const r=t.unsafe_penetrate?{...(0,f.pick)(Bi(),St),...(0,f.omit)(t,St)}:t;i=((0,u.hasOwnProperty)(r,"data")?n.noInject?I.transform:I.transformAndInject:n.noInject?Tt:I.inject)(e,r)}return a||it(i),i}if(!(0,u.isObject)(e)||at(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=Et(n,!0);return e.map((e=>At(e,t,r)))}return Object.fromEntries(Object.entries(e).map((e=>{let[r,s]=e;return[At(r,t),At(s,t,Et(n,!1,r))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function Et(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:xt(e.$$stateOfUseBrick,t,n)}:e}function Tt(e){return e}async function kt(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||pt(e.if)?await Pt(e.if,t):e.if)}function _t(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||pt(e.if)?At(e.if,t):e.if)}function Ct(e){return!(0,u.hasOwnProperty)(e,"if")||!!e.if}const It=function(){const e=S();if(e)return e.looseCheckIfByTransform}()||function(e,t){return _t(e,{data:t})};function Ot(e){let t=!1,n=!1,r=!1;if("string"==typeof e?(0,_.isEvaluable)(e):pt(e)){const s="string"==typeof e?e:dt(e);if((0,_.isTrackAll)(s)){const e=(0,C.trackAll)(s);e&&(t=e.context,n=e.state,r=e.formState)}else t=(0,C.track)(s,"track context","CTX"),n=(0,C.track)(s,"track state","STATE"),r=(0,C.track)(s,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:r}}async function Lt(e,t){for(const[n,r,s]of e)if(n===t){const e=await r;if(void 0!==e||!s)return e}}async function Nt(e){const t={};for(const[n,r,s]of e){const e=await r;void 0===e&&s||!("style"!==n&&"dataset"!==n||(0,u.isObject)(e))||(t[n]=e)}return t}function Mt(e,t){if(t)for(const[i,a]of Object.entries(t))switch(i){case"style":case"dataset":for(const[t,o]of Object.entries(a))"style"===i?(n=e.style,s=o,(r=t).startsWith("--")?n.setProperty(r,s):"float"===r?n.cssFloat=s:n[r]=s):e[i][t]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${i}\` is prohibited`);default:i.startsWith("data-")?e.setAttribute(i,String(a)):e[i]=a}var n,r,s}function Dt(e,t,n){const r=function(e,t){return(0,u.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;const s=At(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?bt.USE_BRICK:bt.INITIAL});if("style"!==n&&"dataset"!==n||(0,u.isObject)(s))return[n,s]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Mt(e,r)}))}function Rt(e,t,n){if(n)for(const{contextNames:r,stateNames:s,propValue:i}of t){if(r)for(const t of r)n.disposes.push(e.ctxStore.onChange(t,n.listener));if(s)for(const t of s){const r=je(e,"STATE",`: "${i}"`);n.disposes.push(r.onChange(t,n.listener))}}}function Bt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ft(e){return e&&e.sensitive?"":"i"}function jt(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,s=void 0!==r&&r,i=n.start,a=void 0===i||i,o=n.end,c=void 0===o||o,l=n.encode,u=void 0===l?function(e){return e}:l,h=n.delimiter,p=void 0===h?"/#?":h,d=n.endsWith,f="[".concat(Bt(void 0===d?"":d),"]|$"),m="[".concat(Bt(p),"]"),y=a?"^":"",g=0,v=e;g<v.length;g++){var b=v[g];if("string"==typeof b)y+=Bt(u(b));else{var w=Bt(u(b.prefix)),x=Bt(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||x)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";y+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(x).concat(w,"(?:").concat(b.pattern,"))*)").concat(x,")").concat(S)}else y+="(?:".concat(w,"(").concat(b.pattern,")").concat(x,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));y+="(".concat(b.pattern,")").concat(b.modifier)}else y+="(?:".concat(w).concat(x,")").concat(b.modifier)}}if(c)s||(y+="".concat(m,"?")),y+=n.endsWith?"(?=".concat(f,")"):"$";else{var P=e[e.length-1],A="string"==typeof P?m.indexOf(P[P.length-1])>-1:void 0===P;s||(y+="(?:".concat(m,"(?=").concat(f,"))?")),A||(y+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(y,Ft(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var s=1,i="";if("?"===e[o=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;)if("\\"!==e[o]){if(")"===e[o]){if(0==--s){o++;break}}else if("("===e[o]&&(s++,"?"!==e[o+1]))throw new TypeError("Capturing groups are not allowed at ".concat(o));i+=e[o++]}else i+=e[o++]+e[o++];if(s)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=o}else{for(var a="",o=n+1;o<e.length;){var c=e.charCodeAt(o);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[o++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=o}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,s=void 0===r?"./":r,i=t.delimiter,a=void 0===i?"/#?":i,o=[],c=0,l=0,u="",h=function(e){if(l<n.length&&n[l].type===e)return n[l++].value},p=function(e){var t=h(e);if(void 0!==t)return t;var r=n[l],s=r.type,i=r.index;throw new TypeError("Unexpected ".concat(s," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=o[o.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=a;t<n.length;t++){var r=n[t];if(e.indexOf(r)>-1)return!0}return!1}(n)?"[^".concat(Bt(a),"]+?"):"(?:(?!".concat(Bt(n),")[^").concat(Bt(a),"])+?")};l<n.length;){var m=h("CHAR"),y=h("NAME"),g=h("PATTERN");if(y||g){var v=m||"";-1===s.indexOf(v)&&(u+=v,v=""),u&&(o.push(u),u=""),o.push({name:y||c++,prefix:v,suffix:"",pattern:g||f(v),modifier:h("MODIFIER")||""})}else{var b=m||h("ESCAPED_CHAR");if(b)u+=b;else if(u&&(o.push(u),u=""),h("OPEN")){v=d();var w=h("NAME")||"",x=h("PATTERN")||"",S=d();p("CLOSE"),o.push({name:w||(x?c++:""),pattern:w&&!x?f(v):x,prefix:v,suffix:S,modifier:h("MODIFIER")||""})}else p("END")}}return o}(e,n),t,n)}function Ut(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,s=n.exec(e.source);s;)t.push({name:s[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),s=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return Ut(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Ft(n))}(e,t,n):jt(e,t,n)}const Yt=new Map,$t=1e4;let Ht=0;function Wt(e,t){const{path:n,exact:r=!1,strict:s=!1,sensitive:i=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:a,keys:o}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let r=Yt.get(n);r||Yt.set(n,r=new Map);const s=r.get(e);if(s)return s;const i=[],a={regexp:Ut(e,i,t),keys:i};return Ht<$t&&(r.set(e,a),Ht++),a}(n,{end:r,strict:s,sensitive:i}),c=a.exec(e);if(!c)return null;const[l,...u]=c,h=e===l;return r&&!h?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:h,params:o.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function Vt(e,t,n){return Wt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const zt=Symbol.for("tpl.asyncComputedPropsFromHost"),qt=Symbol.for("tpl.stateStoreId"),Kt=Symbol.for("tpl.externalForEachItem"),Gt=Symbol.for("tpl.externalForEachIndex"),Jt=Symbol.for("tpl.externalForEachSize"),Xt=new Set;let Zt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e.LICENSE_EXPIRED="LICENSE_EXPIRED",e.LICENSE_BLOCKED="LICENSE_BLOCKED",e.NO_PERMISSION="NO_PERMISSION",e.PAGE_NOT_FOUND="PAGE_NOT_FOUND",e.APP_NOT_FOUND="APP_NOT_FOUND",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.GO_BACK_TO_PREVIOUS_PAGE="GO_BACK_TO_PREVIOUS_PAGE",e.GO_BACK_HOME="GO_BACK_HOME",e.RELOAD="RELOAD",e}({});const Qt={[Zt.REQUEST_FAILED]:"Request Failed",[Zt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Zt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Zt.NETWORK_ERROR]:"Network error, please check your network.",[Zt.LICENSE_EXPIRED]:"The license authorization has expired, please contact the platform administrator",[Zt.LICENSE_BLOCKED]:"The page is not authorized, please contact the platform administrator",[Zt.NO_PERMISSION]:"Unauthorized access, unable to retrieve the required resources for this page",[Zt.PAGE_NOT_FOUND]:"Page not found, please check the URL",[Zt.APP_NOT_FOUND]:"App not found, maybe the URL is wrong or you don't have permission to access",[Zt.UNKNOWN_ERROR]:"Oops! Something went wrong",[Zt.GO_BACK_TO_PREVIOUS_PAGE]:"Go back to previous page",[Zt.GO_BACK_HOME]:"Go back to home page",[Zt.RELOAD]:"Reload"},en={[Zt.REQUEST_FAILED]:"请求失败",[Zt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Zt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Zt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。",[Zt.LICENSE_EXPIRED]:"License 授权失效,请联系平台管理员",[Zt.LICENSE_BLOCKED]:"该页面未授权,请联系平台管理员",[Zt.NO_PERMISSION]:"没有权限,无法获取页面所需要的资源",[Zt.PAGE_NOT_FOUND]:"请求的页面未找到,请确认 URL 是否正确",[Zt.APP_NOT_FOUND]:"请求的微应用无法找到, 可能是 URL 错误或者无权限访问",[Zt.UNKNOWN_ERROR]:"糟糕!页面出现了一些问题",[Zt.GO_BACK_TO_PREVIOUS_PAGE]:"回到上一页",[Zt.GO_BACK_HOME]:"回到首页",[Zt.RELOAD]:"刷新"},tn="core/runtime",nn={en:Qt,zh:en};let rn;const sn=Object.freeze({show:function(e){if(rn)return rn.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function an(e){const{search:t,pathname:n}=e,r=n?window.btoa(encodeURIComponent(n)):"",s=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${r}; path=/`,document.cookie=`SALOGINQUERY=${s}; path=/`}function on(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof k.HttpFetchError)return c.i18n.t(`${tn}:${Zt.NETWORK_ERROR}`);if(e instanceof k.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function cn(e){return e instanceof k.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let ln,un,hn=!1;function pn(e){if(e instanceof k.HttpAbortError)return;if(cn(e)&&!window.NO_AUTH_GUARD){if(hn)return;return hn=!0,void sn.show({type:"confirm",content:c.i18n.t(`${tn}:${Zt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=Ii().getFeatureFlags()["sso-enabled"],t=A();an(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),hn=!1}),(()=>{hn=!1}))}console.error(e);const t=on(e);t!==ln&&(ln=t,sn.show({type:"error",title:c.i18n.t(`${tn}:${Zt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{ln=void 0})))}const dn=Object.freeze({show:function(e){un?un.resolve(e):alert(e.message)}});class fn{static getInstance(){return fn.instance||(fn.instance=new fn),fn.instance}constructor(){(0,s.A)(this,"debugMode",!1),(0,s.A)(this,"debugType","none"),this.initDebugMode(),this.setupWindowAPI()}initDebugMode(){if("true"!==new URLSearchParams(window.location.search).get("__debugConsole__"))return"true"===localStorage.getItem("debugConsole")?(this.debugMode=!0,this.debugType="persistent",void console.log("🔧 调试模式已开启(持久模式 - 内部调试)")):"true"===sessionStorage.getItem("debugConsole")?(this.debugMode=!0,this.debugType="session",void console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)")):void 0;this.activateSessionDebug()}activateSessionDebug(){this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已通过URL参数激活(会话模式)")}setupWindowAPI(){window.debugConsole={enable:()=>(this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)"),this.debugMode),enablePersistent:()=>(this.debugMode=!0,this.debugType="persistent",localStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(持久模式 - 内部调试)"),this.debugMode),disable:()=>(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭"),this.debugMode),toggle:()=>(this.debugMode?(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭")):(this.debugMode=!0,this.debugType="session",sessionStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(会话模式 - 关闭标签页后失效)")),this.debugMode),togglePersistent:()=>(this.debugMode&&"persistent"===this.debugType?(this.debugMode=!1,this.debugType="none",sessionStorage.removeItem("debugConsole"),localStorage.removeItem("debugConsole"),console.log("🔧 调试模式已关闭")):(this.debugMode=!0,this.debugType="persistent",localStorage.setItem("debugConsole","true"),console.log("🔧 调试模式已开启(持久模式 - 内部调试)")),this.debugMode),status:()=>{const e={debugMode:this.debugMode,debugType:this.debugType,description:this.getStatusDescription()};return console.log("🔧 调试状态:",e),e},help:()=>{console.log("\n🔧 混合调试控制台使用说明:\n\n👥 生产环境使用(临时调试):\n window.debugConsole.enable() - 开启会话调试(关闭标签页后失效)\n window.debugConsole.disable() - 关闭调试模式\n window.debugConsole.toggle() - 切换会话调试模式\n\n👨💻 开发人员使用(长期调试):\n window.debugConsole.enablePersistent() - 开启持久调试(长期有效)\n window.debugConsole.togglePersistent() - 切换持久调试模式\n window.debugConsole.disable() - 关闭调试模式\n\n🔍 其他功能:\n window.debugConsole.status() - 查看当前状态\n window.debugConsole.help() - 显示此帮助信息\n\n🌐 URL参数:\n ?__debugConsole__=true - 通过URL激活会话调试模式\n\n📝 说明:\n - 会话模式:刷新页面后仍然有效,关闭标签页后失效\n - 持久模式:长期有效,除非手动关闭\n ")}},this.debugMode?console.log(`🔧 调试模式已开启(${"persistent"===this.debugType?"持久模式":"会话模式"})`):console.log("💡 提示:使用 window.debugConsole.help() 查看使用说明")}getStatusDescription(){if(!this.debugMode)return"调试模式已关闭";switch(this.debugType){case"persistent":return"持久模式 - 内部调试(长期有效)";case"session":return"会话模式 - 临时调试(关闭标签页后失效)";default:return"未知模式"}}isDebugMode(){return this.debugMode}getDebugType(){return this.debugType}shouldLog(e){return"error"===e||this.debugMode}}(0,s.A)(fn,"instance",void 0);const mn=fn.getInstance();function yn(e,t,n){t&&Object.entries(t).forEach((t=>{let[r,s]=t;const i=xn(s,n,{element:e});e.addEventListener(r,i),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([r,i]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(s))e.$$eventListeners.push([r,null,t])}))}function gn(e){return"string"==typeof e.action}function vn(e){return"string"==typeof e.useProvider}function bn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function wn(e){return!!e.then}function xn(e,t,n){return function(r){var s,i;for(const a of[].concat(e))if(_t(a,{...t,event:r}))if(wn(a))xn(a.then,t,n)(r);else if(gn(a)){const[e,o]=a.action.split(".");switch(a.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":En(r,o,a.args,a.callback,t);break;case"window.open":Tn(r,a.args,t);break;case"window.postMessage":kn(r,a.args,t);break;case"parent.postMessage":_n(r,a.args,t);break;case"location.reload":case"location.assign":Nn(r,o,a.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Mn(r,e,o,a.args,t);break;case"event.preventDefault":r.preventDefault();break;case"event.stopPropagation":r.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Dn(r,o,a.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Rn(r,o,a.args,t);break;case"handleHttpError":pn(r.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":case"context.set":In(r,o,a.args,null===(s=a.batch)||void 0===s||s,a.callback,t);break;case"state.update":case"state.refresh":case"state.load":case"state.set":On(r,o,a.args,null===(i=a.batch)||void 0===i||i,a.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=jn(a.args,t,r);Ue(t,a.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":Ln(r,a.args,a.callback,t);break;case"message.subscribe":case"message.unsubscribe":Bn(r,o,a.args,t,n,a.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===a.action?"dark":"light");break;case"theme.setTheme":{const[e]=jn(a.args,t,r);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":oe("mode.setDashboardMode"===a.action?"dashboard":"default");break;default:console.error("unknown event listener action:",a.action)}}else vn(a)?Sn(r,a,t,n):bn(a)?Pn(r,a,t,n):console.error("unknown event handler:",a);else a.else&&xn(a.else,t,n)(r)}}function Sn(e,t,n,r){const s="saveAs"!==t.method?"resolve":"saveAs";An(e,t.useProvider,t,s,n,r)}function Pn(e,t,n,r){let s=[];const i=t.target,a=t.targetRef;let o=i;if(("string"==typeof i?(0,_.isEvaluable)(i):pt(i))&&(o=At(i,{...n,event:e})),"string"==typeof o)if("_self"===o)s.push(r.element);else if(t.multiple)s=Array.from(document.querySelectorAll(o));else{const e=document.querySelector(o);null!==e&&s.push(e)}else if(o)o instanceof HTMLElement?s.push(o):console.error("unexpected target:",o);else if(a){let t=a;("string"==typeof a?(0,_.isEvaluable)(a):pt(a))&&(t=At(a,{...n,event:e}));const r=[].concat(t),i=Ue(n,"targetRef",`: ${r.join(", ")}`);s.push(...r.map((e=>{var t;return null===(t=i.$$getElementByRef)||void 0===t?void 0:t.call(i,e)})).filter(Boolean))}0!==s.length?function(e){return!!e.method}(t)?s.forEach((s=>{An(e,s,t,t.method,n,r,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Dt(s,t.properties,{...n,event:e}):console.error("target not found:",i||a)}async function An(e,t,n,r,s,i,a){const o=vn(n),c=async()=>{var i;const c=o?await rt(t):t;if("function"!=typeof c[r])throw new Error(`target <${c.tagName.toLowerCase()}> has no method: ${r}`);const l=vn(n);let u,h=l?function(e,t,n){return Array.isArray(e)?At(e,{...t,event:n}):e}(n.args,s,e):jn(n.args,s,e,a);var p;return l&&null!=_i&&null!==(i=_i.flowApi)&&void 0!==i&&i.isFlowApiProvider(n.useProvider)?(!Array.isArray(n.args)&&n.params&&(h=At((0,f.pick)(n,"params","options","filename"),{...s,event:e})),u=await _i.flowApi.getArgsOfFlowApi(n.useProvider,null!=h?h:[],r,null===(p=n.sse)||void 0===p?void 0:p.stream)):u=null!=h?h:[],c[r](...u)};if(!n.callback)return void c();const l=Fn(n.callback,s,i),u={progress:l("progress"),success:l("success"),error:l("error"),finally:l("finally")};if(o){var h,p;const t={...s,event:e};if(At(null===(h=n.sse)||void 0===h?void 0:h.stream,t))return void async function(e,t){let{progress:n,success:r,error:s,finally:i}=t;const a=Ri();try{const t=await e();for await(const e of t){if(a!==Ri())return;null==n||n(e)}if(a!==Ri())return;null==r||r()}catch(e){if(a!==Ri())return;null==s||s(e)}finally{null==i||i()}}(c,u);if(At(null===(p=n.poll)||void 0===p?void 0:p.enabled,t))return void function(e,t,n,r){let{progress:s,success:i,error:a,finally:o}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=n,{interval:u,leadingRequestDelay:h,continueOnError:p,delegateLoadingBar:d}=At((0,f.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),r),m=Ri();let y;async function g(){let t;Xt.delete(y);try{var n;if(t=null===(n=At(c,r))||void 0===n?void 0:n(),t)null==o||o();else{var h;const n=await e(),a=null===(h=At(c,r))||void 0===h?void 0:h();var f;t=a||m!==Ri(),t?a&&(null==o||o()):(null==s||s(n),null!==(f=At(l,r))&&void 0!==f&&f(n)?(d&&window.dispatchEvent(new Event("request.end")),null==i||i(n),null==o||o()):v(null!=u?u:3e3))}}catch(e){var g;const n=null===(g=At(c,r))||void 0===g?void 0:g();t=n||m!==Ri(),t?n&&(null==o||o()):(null==a||a(e),p?v(null!=u?u:3e3):null==o||o())}finally{d&&t&&window.dispatchEvent(new Event("request.end"))}}function v(e){y=setTimeout(g,e),Xt.add(y)}v(null!=h?h:0),d&&window.dispatchEvent(new Event("request.start"))}(c,u,n.poll,t)}try{const e=await c();u.success(e)}catch(e){u.error(e)}finally{u.finally()}}function En(e,t,n,r,s){let i=0,a=!1,o=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":i=2,a=!0;break;case"reload":a=!0;break;case"block":i=1,o="setBlockMessage"}let c=[];if(i>0&&(c=jn(n,s,e,{useEventDetailAsDefault:!0}),c.length=i),a&&r){const e=Fn(r,s,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}A()[o](...c)}function Tn(e,t,n){const[r,s,i]=jn(t,n,e);window.open(r,s||"_self",i)}function kn(e,t,n){const r=jn(t,n,e);1===r.length&&r.push(location.origin),window.postMessage(...r)}function _n(e,t,n){if(parent===window)throw new Error("parent is the window itself");const r=jn(t,n,e);parent.postMessage(...r)}function Cn(e,t,n,r,s,i){t?r.updateValues(e,n,(e=>jn(e,s,i)[0])):e.forEach((e=>{const{name:t,value:a}=jn([e],s,i)[0];r.updateValue(t,a,n)}))}function In(e,t,n,r,s,i){if(!Array.isArray(n)||!n.every(u.isObject)||"assign"!==t&&"replace"!==t){const[r,a]=jn(n,i,e);i.ctxStore.updateValue(r,a,t,s,i)}else Cn(n,r,t,i.ctxStore,i,e)}function On(e,t,n,r,s,i){if(Array.isArray(n)&&n.every(u.isObject)&&"update"===t)Cn(n,r,"replace",je(i,`state.${t}`,`: ${JSON.stringify(n)}`),i,e);else{const[r,a]=jn(n,i,e);je(i,`state.${t}`,`: ${r}`).updateValue(r,a,"update"===t?"replace":t,s,i)}}function Ln(e,t,n,r){const[s,i]=jn(t,r,e);tt(r,"formstate.update",`: ${s}`).updateValue(s,i,"replace",n,r)}function Nn(e,t,n,r){if("assign"===t){const[t]=jn(n,r,e);location.assign(t)}else location[t]()}function Mn(e,t,n,r,s){const i="localStorage"===t?localStorage:sessionStorage,[a,o]=jn(r,s,e);"setItem"===n?void 0!==o&&i.setItem(a,JSON.stringify(o)):i.removeItem(a)}function Dn(e,t,n,r){mn.shouldLog(t)&&console[t](...jn(n,r,e,{useEventAsDefault:!0}))}function Rn(e,t,n,r){const s=jn(n,r,e,{useEventAsDefault:!0});dn.show({type:t,message:s[0]})}async function Bn(e,t,n,r,s,i){const a=()=>{var s;const i=jn(n,r,e);return null==_i||null===(s=_i.messageDispatcher)||void 0===s?void 0:s[t](...i)};if(!i)return void a();const o=Fn(i,r,s);try{const e=await a();o("success")(e)}catch(e){o("error")(e)}finally{o("finally")()}}function Fn(e,t,n){return function(r){return function(s){const i=null==e?void 0:e[r];if(i)try{const e=new CustomEvent(`callback.${r}`,{detail:s});xn(i,t,n)(e)}catch(e){console.error(e)}else"error"===r&&console.error("Unhandled callback error:",s)}}}function jn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?At(e,{...t,event:n}):r.useEventAsDefault?[n]:r.useEventDetailAsDefault?[n.detail]:[]}function Un(e){var t;const{ref:n,runtimeContext:r,element:s}=e;if(!n||!r.tplStateStoreId)return;const{hostBrick:i}=je(r,"bindTemplateProxy"),a=i.tplHostMetadata;a.internalBricksByRef.set(n,e);const o=null===(t=a.proxy)||void 0===t?void 0:t.events;if(o)for(const[e,t]of Object.entries(o))if(t.ref===n){var c,l,u;const n=t=>{t.bubbles&&t.stopPropagation(),i.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},r=null!==(c=t.refEvent)&&void 0!==c?c:e;s.addEventListener(r,n),null!==(u=(l=s).$$proxyListeners)&&void 0!==u||(l.$$proxyListeners=[]),s.$$proxyListeners.push([r,n])}}function Yn(e){const{ref:t,runtimeContext:n,element:r}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:s}=je(n,"unbindTemplateProxy");s.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of null!==(i=r.$$proxyListeners)&&void 0!==i?i:[]){var i;r.removeEventListener(e,t)}delete r.$$proxyListeners}let $n=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.ABSTRACT=3]="ABSTRACT",e}({});function Hn(e){e.replaceChildren()}function Wn(e,t){e.mounted=!0,window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const r=[];for(;n;){if(n.mounted=!0,n.tag===$n.BRICK){var s;const i=n.type;i.includes("-")&&!customElements.get(i)&&console.error(`Undefined custom element: ${i}`),"basic-bricks.script-brick"===i&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const a=t&&n===e.child?t:document.createElement(i);if(n.element=a,n.slotId&&a.setAttribute("slot",n.slotId),n.iid&&(a.dataset.iid=n.iid),null!==(s=n.tplHostMetadata)&&void 0!==s&&s.tplStateStoreId&&(a.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Mt(a,n.properties),yn(a,n.events,n.runtimeContext),n.tplHostMetadata&&(a.$$tplStateStore=je({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Un(n),n.portal)r.push(a);else if(n.return){let e=n.return;for(;e;){if(e.tag!==$n.ABSTRACT){e.childElements||(e.childElements=[]),e.childElements.push(a);break}e=e.return}}}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var i;let e=n.return;for(;e;){var a;if(e.tag!==$n.ABSTRACT&&e.childElements)e.tag===$n.ROOT?null===(a=e.container)||void 0===a||a.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===$n.ROOT&&r.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...r),e.sibling)break;e=e.return}n=null===(i=e)||void 0===i?void 0:i.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const Vn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],zn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var qn=new WeakMap,Kn=new WeakMap,Gn=new WeakMap,Jn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Qn=new WeakMap,er=new WeakMap,tr=new WeakSet;class nr{constructor(e,t){var n;(0,E.A)(this,tr),(0,s.A)(this,"scope",void 0),(0,s.A)(this,"unknownBricks",void 0),(0,s.A)(this,"renderId",void 0),(0,i.A)(this,qn,void 0),(0,i.A)(this,Kn,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,Gn,new Map),(0,i.A)(this,Jn,void 0),(0,i.A)(this,Xn,new Map),(0,i.A)(this,Zn,void 0),(0,i.A)(this,Qn,new WeakMap),(0,i.A)(this,er,new Map),this.scope=e,this.unknownBricks=null!==(n=null==t?void 0:t.unknownBricks)&&void 0!==n?n:"throw",(0,a.A)(qn,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,a.A)(Zn,this,e)}memoizeMenuRequestNode(e,t){(0,o.A)(Qn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,o.A)(Zn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,o.A)(Qn,this).get(t);(0,o.A)(Qn,this).set(t,n);let s,i=e.child;for(;i&&i!==r;)s=i,i=i.sibling;s?(s.sibling=n,n.sibling=null==r?void 0:r.sibling):e.child=n,await(0,o.A)(qn,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,o.A)(qn,this).bailout(e)}reCatch(e,t){return(0,o.A)(qn,this).catch(e,t,!1,!0)}async didPerformIncrementalRender(e,t){let n=!1;const r=[];for(const{parentRoutes:s,callback:i}of[...(0,o.A)(er,this).values()].reverse()){const a=s[s.length-1];if(r.includes(a))continue;const o=await i(e,t);o&&r.push(...s.slice(0,-1)),!1!==o&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,o.A)(er,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[...Vn,..."page"===this.scope?zn:[]];for(const r of n){const n=t[r];n&&(0,o.A)(Kn,this)[r].push({brick:e,handlers:n})}(0,f.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,o.A)(Xn,this).get(e);n?n.add(t):(0,o.A)(Xn,this).set(e,new Set([t]))}reRender(e,t,n){var r,s,i,a,o;if(e.tag!==$n.ROOT&&e.disposed)return;const[c,l]=function(e){let t,n,r=e,s=0;for(;r;){if(r.tag===$n.BRICK)r.portal?n=r:t=r;else if(r.child&&r.tag===$n.ABSTRACT){r=r.child,s++;continue}if(s<=0)break;if(r.sibling)r=r.sibling;else{var i;let e=r.return;for(s--;e&&!e.sibling;)e=e.return,s--;if(s<=0)break;r=null===(i=e)||void 0===i?void 0:i.sibling}}return[t,n]}(n),u=null!==(r=c?null===(s=c.element)||void 0===s?void 0:s.nextSibling:null===(i=lr(n,!1))||void 0===i?void 0:i.element)&&void 0!==r?r:null,h=[];let p,d=l?null==l||null===(a=l.element)||void 0===a?void 0:a.nextSibling:null===(o=lr(n,!0))||void 0===o?void 0:o.element;for(;d&&(h.push(d),d instanceof HTMLElement&&"DIV"===d.tagName);)d=d.nextSibling;let f=e.child;for(;f&&f!==n;){if(f.sibling===n){p=f;break}f=f.sibling}const m=document.createDocumentFragment(),y=document.createDocumentFragment(),g={tag:$n.ROOT,container:m,createPortal:y,child:t};for(f=t;f;)f.return=g,f=f.sibling;const[v,b]=ur(n);for((0,T.A)(tr,this,rr).call(this,v),(0,T.A)(tr,this,sr).call(this,b),Wn(g),p?p.sibling=t:e.child=t,t.sibling=n.sibling,(0,T.A)(tr,this,ir).call(this,b),(0,T.A)(tr,this,ir).call(this,v),f=t;f;)f.return=e,f=f.sibling;if(m.hasChildNodes()){const t=function(e){let t=e;for(;t.tag===$n.ABSTRACT;)if(t=t.return,!t)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");return t}(e);var w,x;t.tag===$n.ROOT?null===(w=t.container)||void 0===w||w.insertBefore(m,u):null===(x=t.element)||void 0===x||x.insertBefore(m,u)}if(y.hasChildNodes()){var S;let e=t;for(;e&&e.return;)e=e.return;if((null===(S=e)||void 0===S?void 0:S.tag)!==$n.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const n="function"==typeof e.createPortal?e.createPortal():e.createPortal;let r=null;for(const e of h)if(n.contains(e)){r=e;break}n.insertBefore(y,r)}const[P]=ur(t);(0,T.A)(tr,this,ar).call(this,P)}dispose(){for(const e of Object.values((0,o.A)(Kn,this)))e.length=0;for(const e of(0,o.A)(Gn,this).values()){for(const t of e)t.disconnect();e.length=0}(0,o.A)(Gn,this).clear(),(0,o.A)(Jn,this)&&(Ee.removeEventListener("change",(0,o.A)(Jn,this)),(0,a.A)(Jn,this,void 0)),(0,o.A)(Xn,this).clear(),(0,o.A)(er,this).clear(),(0,a.A)(Qn,this,void 0)}dispatchBeforePageLoad(){(0,T.A)(tr,this,or).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,T.A)(tr,this,or).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,T.A)(tr,this,or).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,T.A)(tr,this,or).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=A().location;e&&"#"!==e?(0,T.A)(tr,this,or).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,T.A)(tr,this,or).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,o.A)(Kn,this).onScrollIntoView)(0,T.A)(tr,this,cr).call(this,e,t)}initializeMediaChange(){(0,a.A)(Jn,this,(e=>{(0,T.A)(tr,this,or).call(this,"onMediaChange",new CustomEvent("media.change",{detail:q(e.detail)}))})),Ee.addEventListener("change",(0,o.A)(Jn,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,o.A)(Kn,this).onMessage)for(const r of[].concat(n)){var t;null==_i||null===(t=_i.messageDispatcher)||void 0===t||t.onMessage(r.channel,(t=>{xn(r.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==_i||null===(e=_i.messageDispatcher)||void 0===e||e.onClose((()=>{(0,T.A)(tr,this,or).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,T.A)(tr,this,or).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,T.A)(tr,this,or).call(this,"onUnmount",new CustomEvent("unmount"))}}function rr(e){const t=[...Vn,..."page"===this.scope?zn:[]],n=[];for(const r of t){const t=(0,f.remove)((0,o.A)(Kn,this)[r],(t=>e.has(t.brick)));"onUnmount"===r&&n.push(...t)}for(const t of e){var r,s,i;const e=(0,o.A)(Gn,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,o.A)(Gn,this).delete(t)}Yn(t),null===(r=t.element)||void 0===r||delete r.$$tplStateStore,null===(s=t.element)||void 0===s||s.remove(),null===(i=t.disposes)||void 0===i||i.forEach((e=>e())),delete t.disposes}const a=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)xn(t,e.runtimeContext,e)(a)}function sr(e){for(const n of e){var t;null===(t=n.disposes)||void 0===t||t.forEach((e=>e())),delete n.disposes}}function ir(e){for(const t of e)delete t.child,delete t.sibling,delete t.return,t.disposed=!0,t.tag===$n.BRICK&&(delete t.element,delete t.runtimeContext),Object.freeze(t)}function ar(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:r}of(0,o.A)(Kn,this).onMount)e.has(n)&&xn(r,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,o.A)(Kn,this).onScrollIntoView)e.has(t)&&(0,T.A)(tr,this,cr).call(this,t,n)}function or(e,t){for(const{brick:n,handlers:r}of(0,o.A)(Kn,this)[e])xn(r,n.runtimeContext,n)(t);const n=(0,o.A)(Xn,this).get(e);if(n)for(const e of n)e()}function cr(e,t){var n;const r=null!==(n=t.threshold)&&void 0!==n?n:.1,s=new IntersectionObserver(((n,s)=>{n.forEach((n=>{n.isIntersecting&&n.intersectionRatio>=r&&(xn(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),s.disconnect())}))}),{threshold:r});s.observe(e.element);let i=(0,o.A)(Gn,this).get(e);i||(i=[],(0,o.A)(Gn,this).set(e,i)),i.push(s)}function lr(e,t){let n=e;for(;n;){if(n!==e&&n.tag===$n.BRICK&&(t?n.portal:!n.portal))return n;if(n!==e&&n.child&&n.tag===$n.ABSTRACT)n=n.child;else if(n.sibling)n=n.sibling;else{var r;let e=n.return;for(;e;){if(e.tag!==$n.ABSTRACT)return;if(e.sibling)break;e=e.return}n=null===(r=e)||void 0===r?void 0:r.sibling}}}function ur(e){const t=new Set,n=new Set;let r=e;for(;r;)if(r.tag===$n.BRICK?t.add(r):r.tag===$n.ABSTRACT&&n.add(r),r.child)r=r.child;else{if(r===e)break;if(r.sibling)r=r.sibling;else{var s;let i=r.return;for(;i;){if(i===e)return[t,n];if(i.sibling)break;i=i.return}r=null===(s=i)||void 0===s?void 0:s.sibling}}return[t,n]}const hr=new Map;function pr(e){return hr.get(e)}function dr(e,t,n){const r=S();if(r)return r.doTransform(e,t,n);if(n)throw new Error("Legacy doTransform does not support options in v3");return At(t,{...Bi(),data:e},{noInject:!0})}function fr(e,t,n,r,s,i){const a=S();if(a)return a.transformProperties(e,t,n,r,s,i);if(i)throw new Error("Legacy transformProperties does not support options in v3");const o=function(e,t,n,r){const s={},i=n?(0,f.get)(e,n):e;if(Array.isArray(t))for(const e of t)yr(s,i,e.to,e.from,e.mapArray);else yr(s,i,t,void 0,r);return s}(t,n,r,s);for(const[t,n]of Object.entries(o))(0,f.set)(e,t,n);return e}function mr(e,t,n,r){const s=n?(0,f.get)(e,n):e;return t?fr({},s,t,void 0,r):s}function yr(e,t,n,r,s){if(!n)return;let i=r?(0,f.get)(t,r):t,a=Array.isArray(i);if(a||!0!==s?a&&!1===s&&(a=!1):(a=!0,i=[i]),"string"!=typeof n)for(const[t,r]of Object.entries(n))e[t]=a?i.map((e=>dr(e,r))):dr(i,r);else e[n]=i}const gr=Symbol.for("root.runtimeContext");async function vr(e,t,n){var r,s,i,a;const[o,c,l]=ds({...null!==(r=e[gr])&&void 0!==r?r:Bi(),data:t,pendingPermissionsPreCheck:[]});o.inUseBrick=!0,null!==(s=o.tplStateStoreMap)&&void 0!==s||(o.tplStateStoreMap=new Map),null!==(i=o.formStateStoreMap)&&void 0!==i||(o.formStateStoreMap=new Map);const u=new nr("fragment"),h={tag:$n.ROOT,createPortal:null},p=Oe(),d=await us(h,p&&!n?e:{errorBoundary:n,...e},o,u,[],{}),f=[...c,...l];let m;await ps(d,o,f);let y=d.node;for(;y;){if(y.tag===$n.BRICK){m=y;break}y=y.child}if(null!==(a=m)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return h.child=d.node,{tagName:m?m.type:null,renderRoot:h,rendererContext:u,scopedStores:f}}function br(e,t){let n,{renderRoot:r,rendererContext:s,scopedStores:i}=e;r.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},Wn(r,t),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher();for(const e of i)e.mountAsyncData();return{portal:n}}function wr(e,t){let{rendererContext:n}=e;t.portal&&(Hn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function xr(e,t){const n=Fi(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),M(n)}function Sr(e,t){const n=Fi(e);let r=!1;function s(e){e.forEach(((n,a)=>{"routes"===n.type?s(n.routes):function(e){return e.path===t.path&&!e.exact==!t.exact}(n)?(r=!0,e[a]=t):Array.isArray(n.bricks)&&i(n.bricks)}))}function i(e){e.forEach((e=>{if(e.slots)for(const t of Object.values(e.slots))"routes"===t.type?s(t.routes):i(t.bricks)}))}s(n.routes),r||n.routes.unshift(t)}function Pr(e,t,n){const r=`${e}.${t.name}`;Be.define(r,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Ar(e,t.name,n)}function Ar(e,t,n){_r(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,f.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function Er(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function Tr(e,t){var n;_r(e,Er(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const kr=Tr;function _r(e,t,n,r){const{routes:s}=Fi(e),i=s.findIndex((e=>e.path===t)),a={path:t,bricks:n,context:r,menu:!1,exact:!0};-1===i?s.unshift(a):s.splice(i,1,a)}function Cr(e,t){let{tplStateStoreId:n}=t;const r=Bi();return n?je({...r,tplStateStoreId:n},"STATE").getValue(e):r.ctxStore.getValue(e)}function Ir(e){let{tplStateStoreId:t}=e;const n=Bi();return t?je({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function Or(e){return Mi().find((t=>t.id?t.id===e:t.filePath.startsWith(`${e}/`)))}function Lr(e){return(0,l.loadBricksImperatively)(e,Mi())}function Nr(e,t){return(0,l.loadEditorsImperatively)(e,null!=t?t:Mi())}function Mr(){return Ri()}async function Dr(e,t){let{appId:n,updateStoryboardType:r,collectUsedContracts:s}=t;const i=Fi(n);let a;if("route"===r)a={routes:[e]};else if("template"===r)a={meta:{customTemplates:[e]}};else if("snippet"===r){var o;const t=Er(e.snippetId);a={routes:[null==i||null===(o=i.routes)||void 0===o?void 0:o.find((e=>e.path===t))]}}const c=[];return a&&s&&(await s(a)).forEach((e=>{var t;const[n,r,s]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===r&&e.name===s))||c.push(e)})),c}async function Rr(e,t){let{tplStateStoreId:n,routeId:r}=t;const s={...Bi(),tplStateStoreId:n,match:pr(r)};return e.resolve?ct(e.resolve,s,{cache:"reload"}):Pt(e.value,s)}function Br(e){var t;const n=Bi();return{app:null!==(t=null==n?void 0:n.overrideApp)&&void 0!==t?t:null==n?void 0:n.app,location:(0,f.pick)(location,["href","origin","hostname","host"]),...(0,f.pick)(n,["query","sys"]),match:pr(null==e?void 0:e.routeId)}}let Fr;const jr=[];function Ur(e){Fr=e;const t=Ir({tplStateStoreId:e.tplStateStoreId});$r({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Yr(e){jr.push(e)}function $r(e){setTimeout((()=>{for(const t of jr)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Hr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Wr{constructor(e,t,n,r){(0,s.A)(this,"type",void 0),(0,s.A)(this,"data",new Map),(0,s.A)(this,"changeEventType",void 0),(0,s.A)(this,"pendingStack",[]),(0,s.A)(this,"hostBrick",void 0),(0,s.A)(this,"stateStoreId",void 0),(0,s.A)(this,"batchUpdate",!1),(0,s.A)(this,"batchUpdateContextsNames",[]),(0,s.A)(this,"rendererContext",void 0),(0,s.A)(this,"routeMap",new WeakMap),(0,s.A)(this,"routeStackMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=r}has(e){return this.data.has(e)}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Fr){const{tplStateStoreId:n}=Fr;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&$r({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const r={},s={},i=[];e.forEach((e=>{const{name:s,value:a}=n([e]),o=this.data.get(s);i.push(...this.getAffectListByContext(s)),o&&(r[s]=o),this.updateValue(s,a,t)})),i.filter((e=>!r[e])).forEach((e=>{const t=this.data.get(e);t&&(s[e]=t)}));const a=e=>{for(const n in e){var t;const r=e[n];null===(t=r.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:r.value}))}};a(r),a(s),this.batchUpdate=!1}updateValue(e,t,n,r,s){const i=this.data.get(e);if(!i)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n){if("replace"===n)i.value=t;else if("assign"===n)(0,u.isObject)(i.value)?Object.assign(i.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),i.value=t);else{let e=t;if("function"==typeof t&&(e=t(i.value)),Object.is(i.value,e))return;i.value=e}this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}else{if(!i.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let a;"load"===n&&(i.loaded?a=Promise.resolve(i.value):i.loading&&(a=i.loading));const o=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==Ri()};if(a||(a=i.loading=i.load({cache:"load"===n?"default":"reload",...t}),a.then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||o(e)||null!=r&&r.error||pn(e)}))),r){const e=Fn(r,s);a.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!o(t)&&r.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,r){if(Array.isArray(e)&&e.length>0){const s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const r=new Map;for(const s of e){const e=[s.if,s.value,s.resolve],i=(0,C.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,C.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)i.usedProperties.add(e);t.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}r.set(s,i)}return r}(e,n,arguments.length>3?arguments[3]:void 0),s=new Map;for(const e of Array.from(r.keys()).map((e=>e.name))){var i;s.set(e,(null!==(i=s.get(e))&&void 0!==i?i:0)+1)}const a=Array.from(r.values()).some((e=>e.hasNonStaticUsage)),o=new WeakSet,c=new Map,l=new Map([...new Set(e.map((e=>e.name)))].map((e=>{const t=new Promise(((t,n)=>{c.set(e,{resolve:t,reject:n})}));return t.catch((()=>{})),[e,t]}))),u=async e=>{var n;o.add(e);const i=await t(e);r.delete(e);const a=null!==(n=s.get(e.name))&&void 0!==n?n:0;if(i){if(c.get(e.name).resolve(),s.delete(e.name),0===a)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===a?(c.get(e.name).resolve(),s.delete(e.name)):s.set(e.name,a-1);await p()};let h=a;async function p(){const e=Array.from(r.entries()).filter(function(e,t){return(n,r)=>t?0===r:![...n[1].usedProperties].some((t=>e.has(t)))}(s,h)).map((e=>e[0])).filter((e=>!o.has(e)));await Promise.all(e.map(u))}const d=p().then((async()=>{r.size>0&&(function(e,t){const n=new Map(e),r=new Set(Array.from(n.keys()).map((e=>e.name))),s=()=>{let e=!1;for(const[t,s]of n.entries())[...s.usedProperties].some((e=>r.has(e)))||(n.delete(t),r.delete(t.name),e=!0);e&&s()};if(s(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(r,n),h=!0,await p());for(const e of c.values())e.resolve()})).catch((e=>{for(const t of c.values())t.reject(e);throw e}));return d.catch((()=>{})),{pendingResult:d,pendingContexts:l}}(e,(e=>this.resolve(e,t,n,r)),this.type,Oe(t));if(Array.isArray(r))for(const e of r){const t=this.routeStackMap.get(e);t?t.add(s):this.routeStackMap.set(e,new Set([s]))}this.pendingStack.push(s)}}onChange(e,t){var n;const r=null===(n=this.data.get(e))||void 0===n?void 0:n.eventTarget;return null==r||r.addEventListener(this.changeEventType,t),()=>{null==r||r.removeEventListener(this.changeEventType,t)}}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,r){if(!await kt(e,t))return!1;let s,i,a,o,c,l;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(s=await Lt(n,e.name)),void 0===s){if(e.resolve){const n=(0,u.hasOwnProperty)(e,"value");c=e.track&&n&&(0,u.hasOwnProperty)(e.resolve,"if")&&(0,C.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const r={transform:"value",...e.resolve};if(o=await kt(e.resolve,t),(o||c)&&(i=async e=>{var n;return(await ct(r,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),o)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?s=await i():"async"===l&&(a=i());else if(!n)return!1}o&&"eager"===l||void 0===e.value||(s=await Pt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const h={name:e.name,value:s,eventTarget:new Se,useResolve:o,load:i,loaded:"eager"===l,loading:a,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var p;t&&Hr.includes(t)&&(null===(p=this.rendererContext)||void 0===p||p.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&h.eventTarget.addEventListener(this.changeEventType,xn(e.onChange,t)),e.track){const n=(0,C.strictCollectMemberUsage)(c?[e.resolve,e.value]:i?e.resolve:e.value,this.type);!i&&(h.deps=[...n]);for(const r of n)this.onChange(r,this.batchAddListener((()=>{h.useResolve=c?_t(e.resolve,t):!!i,h.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,At(e.value,t),"replace")}),e))}if(h.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,h),Array.isArray(r))for(const t of r){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e){for(const t of e)this.data.delete(t);this.routeMap.delete(t)}const n=this.routeStackMap.get(t);void 0!==n&&((0,f.pull)(this.pendingStack,...n),this.routeStackMap.delete(t))}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function Vr(e,t,n,r){const{reversedProxies:s,asyncHostPropertyEntries:i,externalSlots:a,tplStateStoreId:o,hostBrick:c}=e;let l;if(t&&s){const e=s.properties.get(t);e&&(y=i,l=e.map((e=>{let{from:t,to:n}=e;const r=y.filter((e=>e[0]===t));if(r.length>0&&n.refProperty)return[n.refProperty,Lt(r,t),!0]})).filter(Boolean));const o=s.slots.get(t);if(o&&r)throw new Error(`Can not have proxied slot ref when the ref target has a slot element child, check your template "${c.type}" and ref "${t}"`);if(o&&a){const e=new Map;for(const{from:t,to:r}of o){var h,p,d,m;const s=null!==(h=null===(p=a[t])||void 0===p?void 0:p.bricks)&&void 0!==h?h:[];if(!s.length)continue;const i=null!==(d=r.refSlot)&&void 0!==d?d:t;let o=e.get(i);if(!o){o=[];const t=(0,u.hasOwnProperty)(n,i)?n[i].bricks.length+1:1;for(let e=0;e<t;e+=1)o.push([]);e.set(i,o)}const l=null!==(m=r.refPosition)&&void 0!==m?m:-1,y=(0,u.hasOwnProperty)(c.runtimeContext,"forEachItem");o[(0,f.clamp)(l<0?o.length+l:l,0,o.length-1)].push(...y?zr(s,c.runtimeContext.forEachItem,c.runtimeContext.forEachIndex,c.runtimeContext.forEachSize):s)}for(const[t,r]of e.entries()){(0,u.hasOwnProperty)(n,t)||(n[t]={type:"bricks",bricks:[]});const e=n[t];e.bricks=r.flatMap(((t,n)=>n<e.bricks.length?t.concat(e.bricks[n]):t)),0===e.bricks.length&&delete n[t]}}}var y;return{[zt]:l,[qt]:o}}function zr(e,t,n,r){return e.map((e=>{var s;let{children:i,slots:a,...o}=e;return{...o,[Kt]:t,[Gt]:n,[Jt]:r,slots:":forEach"===o.brick?ys(i,a):Object.fromEntries(Object.entries(null!==(s=ys(i,a))&&void 0!==s?s:{}).map((e=>{let[s,i]=e;return[s,"routes"===i.type?{type:"routes",routes:qr(i.routes,t,n,r)}:{type:"bricks",bricks:zr(i.bricks,t,n,r)}]})))}}))}function qr(e,t,n,r){return e.map((e=>"routes"===e.type?{...e,routes:qr(e.routes,t,n,r)}:"redirect"===e.type?e:{...e,bricks:zr(e.bricks,t,n,r)}))}function Kr(e,t,n){var r,s,i,a;if(null!=e.if&&!e.if||"string"==typeof e.if)throw new Error(`Can not use "if" in a slot currently, check your template "${t.hostBrick.type}"`);const o=String(null!==(r=null===(s=e.properties)||void 0===s?void 0:s.name)&&void 0!==r?r:"");if((0,_.isEvaluable)(o))throw new Error(`Can not use an expression as slot name "${o}" currently, check your template "${t.hostBrick.type}"`);if(t.usedSlots.has(o))throw new Error(`Can not have multiple slots with the same name "${o}", check your template "${t.hostBrick.type}"`);if(t.usedSlots.add(o),t.externalSlots&&(0,u.hasOwnProperty)(t.externalSlots,o)){var c;const e=null!==(c=t.externalSlots[o].bricks)&&void 0!==c?c:[];if(e.length>0){const n=t.hostBrick.runtimeContext;return(0,u.hasOwnProperty)(n,"forEachItem")?zr(e,n.forEachItem,n.forEachIndex,n.forEachSize):e}}const l=ys(e.children,e.slots);return(null!==(i=null==l||null===(a=l[""])||void 0===a?void 0:a.bricks)&&void 0!==i?i:[]).flatMap((e=>n(e,t)))}function Gr(e,t){function n(e){return(0,u.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,s]=e;return(0,u.isObject)(s)&&"useBrick"===t?Array.isArray(s)?[t,s.flatMap((e=>r(e)))]:[t,r(s)]:[t,n(s)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function r(e,s){if("slot"===e.brick)return null==s||s(),Kr(e,t,(e=>r(e)));const{properties:i,slots:a,children:o,...c}=e,l=ys(o,a);let u=!1;const h=()=>{u=!0},p=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t;let[n,s]=e;return[n,{type:"bricks",bricks:(null!==(t=s.bricks)&&void 0!==t?t:[]).flatMap((e=>r(e,h)))}]})));return{...c,properties:n(i),slots:p,...Vr(t,c.ref,p,u)}}return n(e)}function Jr(e,t,n){if(null===e.if&&delete e.if,"slot"===e.brick)return null==n||n(),Kr(e,t,Jr);const{properties:r,slots:s,children:i,...a}=e,o=ys(i,s);let c=!1;const l=()=>{c=!0},u=Object.fromEntries(Object.entries(null!=o?o:{}).map((e=>{var n;let[r,s]=e;return[r,{type:"bricks",bricks:(null!==(n=s.bricks)&&void 0!==n?n:[]).flatMap((e=>Jr(e,t,l)))}]})));return{...a,properties:Gr(r,t),slots:u,...Vr(t,a.ref,u,c)}}const Xr="form-renderer.form-renderer",Zr=Symbol.for("form.stateStoreId"),Qr=["forms.general-form","form.general-form","eo-form"];function es(e,t,n){const{id:r,bricks:s,events:i,context:a,mountPoint:o,instanceId:c}=e;let{brick:l,properties:h}=e;const p=t.find((e=>e.fieldId===r));if(p){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},r=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...r()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...r(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...r(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...n,...r(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...r()}};break;default:t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description}}}return t}(p);l||(l=e.brick),h={...e.properties,...h}}const d={brick:l,properties:h,iid:c,slot:o,events:i,context:a,children:ts(s,t,n),[Zr]:n};return(0,u.hasOwnProperty)(e,"if")&&(d.if=e.if),d}function ts(e,t,n){if(Array.isArray(e))return e.map((e=>es(e,t,n)))}var ns=new WeakSet;class rs extends HTMLElement{constructor(){super(...arguments),(0,E.A)(this,ns),(0,s.A)(this,"renderRoot",void 0)}get $$typeof(){return"formRenderer"}validate(){(0,T.A)(ns,this,ss).call(this,"validate")}setInitValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,T.A)(ns,this,ss).call(this,"setInitValue",t)}resetFields(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,T.A)(ns,this,ss).call(this,"resetFields",t)}getFieldsValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,T.A)(ns,this,ss).call(this,"getFieldsValue",t)}}function ss(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const s=!1!==this.renderRoot?null===(t=this.firstElementChild)||void 0===t?void 0:t.firstElementChild:this.firstElementChild,i=null==s||null===(n=s.tagName)||void 0===n?void 0:n.toLowerCase();if(Qr.includes(i))return s[e](...r);console.error(`no ${e} method in the container element`,{container:i})}class is extends Error{constructor(e){super(e),this.name="PageError",Error.captureStackTrace&&Error.captureStackTrace(this,l.BrickLoadError)}}async function as(e,t,n){const{title:r,variant:s,showLink:i,showDescription:a}=function(e){var t,n;return e instanceof is?"page blocked"===e.message?{showLink:"home",title:c.i18n.t(`${tn}:${Zt.LICENSE_BLOCKED}`),variant:"no-permission"}:"app not found"===e.message?{showLink:"home",title:c.i18n.t(`${tn}:${Zt.APP_NOT_FOUND}`),variant:"no-permission"}:{showLink:"home",variant:"not-found",title:c.i18n.t(`${tn}:${Zt.PAGE_NOT_FOUND}`)}:e instanceof l.BrickLoadError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement?{showDescription:!0,title:c.i18n.t(`${tn}:${Zt.NETWORK_ERROR}`),variant:"internet-disconnected",showLink:"reload"}:e instanceof k.HttpResponseError&&403===(null===(t=e.response)||void 0===t?void 0:t.status)?{showLink:"previous",showDescription:!0,title:c.i18n.t(`${tn}:${Zt.NO_PERMISSION}`),variant:"no-permission"}:e instanceof k.HttpResponseError&&"200000"===(null===(n=e.responseJson)||void 0===n?void 0:n.code)?{showDescription:!0,title:c.i18n.t(`${tn}:${Zt.LICENSE_EXPIRED}`),variant:"license-expired"}:{showLink:"previous",showDescription:!0,title:c.i18n.t(`${tn}:${Zt.UNKNOWN_ERROR}`),variant:"unknown-error"}}(e);if(n){var o;const n=null!==(o=Di().error)&&void 0!==o?o:"illustrations.error-message";if(!1!==n){const o="eo-link",c=(i?[n,o]:[n]).filter((e=>!customElements.get(e)));try{await Promise.race([(0,l.loadBricksImperatively)(c,Mi()),new Promise(((e,t)=>setTimeout((()=>{t(new Error("timeout"))}),3e3)))]);const u={tag:$n.BRICK,type:n,properties:{errorTitle:r,description:a?on(e):void 0,variant:s,dataset:{errorBoundary:""}},runtimeContext:null,return:t};return i&&(u.child=os(i,o,u,"")),u}catch(e){console.error("Failed to load brick:",c.join(", "),e)}}}const u=n&&!!customElements.get("easyops-default-error"),h={tag:$n.BRICK,type:u?"easyops-default-error":"div",properties:{errorTitle:r,dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:t},p={tag:$n.BRICK,type:"div",properties:{textContent:u?a?on(e):"":a?`${r}: ${on(e)}`:r},runtimeContext:null,return:h};return h.child=p,n&&i&&(p.sibling=os(i,"a",h,u?"link":"")),h}function os(e,t,n,r){return{tag:$n.BRICK,type:t,slotId:r,properties:{textContent:"home"===e?c.i18n.t(`${tn}:${Zt.GO_BACK_HOME}`):"reload"===e?c.i18n.t(`${tn}:${Zt.RELOAD}`):c.i18n.t(`${tn}:${Zt.GO_BACK_TO_PREVIOUS_PAGE}`),href:"home"===e?d():"reload"===e?location.href:void 0},events:"previous"===e?{click:{action:"history.goBack"}}:void 0,runtimeContext:null,return:n}}async function cs(e,t,n,r,s,i,a,o,c){const u=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=Vt(n,t.app.homepage,t.location.pathname);if(e&&await kt(n,t))return t.app.noAuthGuard||n.public||null==_i||!_i.auth||_i.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),h={blockingList:[]},p=h.menuRequestNode={return:i};switch(u){case"missed":break;case"unauthenticated":h.unauthenticated=!0;break;default:{var d;const i=h.route=u.route;h.path=u.match.path;const y={...n,match:u.match};i.iid&&(f=i.iid,m=u.match,hr.set(f,m)),o&&y.ctxStore.disposeDataInRoutes(t);const g=s.concat(i);y.ctxStore.define(i.context,y,void 0,g),y.pendingPermissionsPreCheck.push(null==_i||null===(d=_i.checkPermissions)||void 0===d?void 0:d.preCheckPermissionsForBrickOrRoute(i,(e=>Pt(e,y))));const{preLoadBricks:v}=i;if(Array.isArray(v)&&h.blockingList.push((0,l.loadBricksImperatively)(v,Mi())),"redirect"===i.type){let e;if(e="string"==typeof i.redirect?await Pt(i.redirect,y):(await ct({transform:"redirect",...i.redirect},y)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);h.redirect={path:e}}else{const n=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return Pt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(i.menu,y);n&&(p.request=n),o||r.memoizeMenuRequestNode(t,p);const s=(0,C.strictCollectMemberUsage)(i.context,"PROCESSORS",2);let u;s.size>0&&h.blockingList.push(gs((0,l.loadProcessorsImperatively)(s,Mi()),"processors",[...s].join(", "),r.unknownBricks)),u="routes"===i.type?await cs(e,i.routes,y,r,g,p,a,void 0,c):await ls(e,i.bricks,y,r,g,p,a,void 0,c),fs(h,u),ms(p,u.menuRequestNode)}}}var f,m;return h}async function ls(e,t,n,r,s,i,a,o,c){!function(e,t){function n(e){if((0,u.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(n);else for(const[t,s]of Object.entries(e))(0,u.isObject)(s)&&"useBrick"===t?Array.isArray(s)?s.forEach((e=>r(e,!0))):r(s,!0,!0):n(s)}function r(e,s,i){if(s&&(e[gr]=t),n(e.properties),!i)return;const a=ys(e.children,e.slots);for(const e of Object.values(null!=a?a:{}))for(const t of null!==(o=e.bricks)&&void 0!==o?o:[]){var o;r(t,s)}}for(const t of e)r(t)}(t,n);const l={blockingList:[]};return(await Promise.all(t.map((t=>us(e,t,n,r,s,i,a,o&&new Map(o),c))))).forEach((e=>{fs(l,e)})),l}async function us(e,t,n,r,s,i,a){let o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Map,c=arguments.length>8?arguments[8]:void 0;try{return await async function(e,t,n,r,s,i,a,o,c){var h;const p={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),p;const{if:d,permissionsPreCheck:m,...g}=t;if(function(e){return"string"==typeof e?(0,_.isTrackAll)(e):pt(e)&&(0,_.isTrackAll)(dt(e))}(d))return us(e,{brick:":if",iid:t.iid,dataSource:d,permissionsPreCheck:m,slots:{"":{type:"bricks",bricks:[g]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,r,s,i,a,o,c);const v=t[qt],b=t[Zr],w={...n,tplStateStoreId:v,formStateStoreId:b};(0,u.hasOwnProperty)(t,Kt)&&(w.forEachItem=t[Kt],w.forEachIndex=t[Gt],w.forEachSize=t[Jt]);const x=Oe(w),{context:S}=t;if(Array.isArray(S)&&S.length>0&&(Le(x,"Defining context on bricks","check your brick:",t),x||w.ctxStore.define(S,w)),w.pendingPermissionsPreCheck.push(null==_i||null===(h=_i.checkPermissions)||void 0===h?void 0:h.preCheckPermissionsForBrickOrRoute(t,(e=>Pt(e,w)))),!await async function(e,t){return(0,u.isObject)(e.if)&&!pt(e.if)?Ct(await ct(e.if,t)):kt(e,t)}(t,w))return p;const P=t.brick;if(P.startsWith(":")){var A;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(P);const{dataSource:n}=t,{contextNames:c,stateNames:l}=Ot(n),h=!(!c&&!l),p=async(h,p,d)=>{var f;const m=await Pt(n,h);d&&Rt(h,[{contextNames:c,stateNames:l,propValue:n}],p);const y=":forEach"===P?"":":switch"===P?String(m):m?"":"else",g=ys(t.children,t.slots),v=g&&(0,u.hasOwnProperty)(g,y)&&(null===(f=g[y])||void 0===f?void 0:f.bricks),b={blockingList:[]},w={tag:$n.ABSTRACT,return:e,iid:t.iid};if(b.node=w,!Array.isArray(v))return b;let x;switch(P){case":forEach":if(!Array.isArray(m))break;x=await async function(e,t,n,r,s,i,a,o,c,l){const u={blockingList:[]},h=t.length,p=await Promise.all(t.map(((t,u)=>Promise.all(n.map((n=>us(e,n,{...r,forEachItem:t,forEachIndex:u,forEachSize:h},s,i,a,o,c&&new Map(c),l)))))));return p.flat().forEach((e=>{fs(u,e)})),u}(w,m,v,h,r,s,i,a,o,p);break;case":if":case":switch":x=await ls(w,v,h,r,s,i,a,o,p)}return x&&(w.child=x.node,fs(b,{...x,node:void 0})),b},d=async e=>{let{type:n,runtimeContext:r,tplStateStoreScope:s,formStateStoreScope:i}=e,a=!1;const o={disposes:[],listener:()=>{a=!0}};let c,l=0,u=!0;for(;u||a;){if(a=!1,c=await p(r,o,u&&"initial"===n),!a&&"rerender"===n){const e=[...s,...i];await ps(c,r,[r.ctxStore,...e])}if(o.disposes.forEach((e=>e())),o.disposes.length=0,u=!1,++l>10)throw new Error(`Maximum rerender stack overflowed (iid: ${t.iid})`)}return c};let m=await d({type:"initial",runtimeContext:w});const{onMount:y,onUnmount:g}=null!==(A=t.lifeCycle)&&void 0!==A?A:{};if(h){var E;let t=0;const s=async()=>{if(!e.mounted||e.disposed)return;const n=++t,[s,i,a]=ds(w),o=await d({type:"rerender",runtimeContext:s,tplStateStoreScope:i,formStateStoreScope:a});if(t===n&&e.mounted&&!e.disposed){g&&xn(g,w)(new CustomEvent("unmount",{detail:{rerender:!0}})),r.reRender(e,o.node,m.node),m=o,y&&xn(y,s)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of[...i,...a])e.mountAsyncData()}},i=(0,f.debounce)(s,0,{leading:!0,trailing:!0}),a=e.tag===$n.ROOT?null:e,o=a?null!==(E=a.disposes)&&void 0!==E?E:a.disposes=[]:[];if(c)for(const e of c)o.push(w.ctxStore.onChange(e,i));if(l)for(const e of l){const t=je(w,"STATE",`: "${n}"`);o.push(t.onChange(e,i))}}return y&&r.registerArbitraryLifeCycle("onMount",(()=>{xn(y,w)(new CustomEvent("mount",{detail:{rerender:!1}}))})),g&&r.registerArbitraryLifeCycle("onUnmount",(()=>{xn(g,w)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),m}/\.tpl-/.test(P)&&!Be.get(P)&&await gs((0,l.loadBricksImperatively)([P],Mi()),"brick",P,r.unknownBricks);const T=function(e,t){if(t.isolatedRoot){const n=Fe.get(t.isolatedRoot);return!(null==n||!n.get(e))&&e}if(!e.includes(".")&&e.startsWith("tpl-")&&t.app){const n=`${t.app.id}.${e}`;if(Be.get(n))return n}return!!Be.get(e)&&e}(P,w);if(T){var k;const e=null!==(k=o.get(T))&&void 0!==k?k:0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${T}"`);o.set(T,e+1)}else P.includes("-")&&!customElements.get(P)&&(P===Xr?customElements.get(Xr)||customElements.define(Xr,rs):p.blockingList.push(gs((0,l.enqueueStableLoadBricks)([P],Mi()),"brick",P,r.unknownBricks)));let I,O;if(P===Xr){var L,N;({formData:I,...O}=null!==(L=t.properties)&&void 0!==L?L:{}),null!==(N=t.properties)&&void 0!==N&&N.compute&&(I=await Pt(I,w))}else{if(w.inUseBrick){const e=t.transform;e&&(Le(x,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',t),x||(O={...t.properties,...e}))}null!=O||(O=t.properties)}const M=[],D=function(e,t,n){return(0,u.isObject)(e)?Object.entries(e).map((e=>{let[r,s]=e;const{contextNames:i,stateNames:a,formStateNames:o}=Ot(s);return(i||a||o)&&n.push({contextNames:i,stateNames:a,formStateNames:o,propName:r,propValue:s}),[r,Pt(s,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?bt.USE_BRICK:bt.INITIAL})]})):[]}(O,w,M),R=t[zt];R&&D.push(...R);const B="script"===P;if(B||"link"===P){const e=await Nt(D);if(B?e.src:"stylesheet"===e.rel&&e.href){var F;const t=null!==(F=window.PUBLIC_ROOT)&&void 0!==F?F:"";if(B){const{src:n,...r}=e;await gs((0,l.loadScript)(n,t,r),"script",n,"silent")}else{const{href:n,...r}=e;await gs((0,l.loadStyle)(n,t,r),"stylesheet",n,"silent")}return p}}const j={tag:$n.BRICK,type:T||P,return:e,slotId:a,events:t.events,runtimeContext:w,portal:t.portal,iid:t.iid,ref:t.ref};p.node=j;const U=(0,C.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);U.size>0&&p.blockingList.push(gs((0,l.loadProcessorsImperatively)(U,Mi()),"processors",[...U].join(", "),r.unknownBricks));const Y=[];Rt(w,M,c);Y.push((async()=>{j.properties=await Nt(D),function(e,t){for(const r of t){var n;const t=()=>{e.element&&Dt(e.element,{[r.propName]:r.propValue},e.runtimeContext)};if(null!==(n=e.disposes)&&void 0!==n||(e.disposes=[]),r.contextNames)for(const n of r.contextNames)e.disposes.push(e.runtimeContext.ctxStore.onChange(n,t));if(r.stateNames){const n=je(e.runtimeContext,"STATE",`: "${r.propValue}"`);for(const s of r.stateNames)e.disposes.push(n.onChange(s,t))}if(r.formStateNames){const n=tt(e.runtimeContext,"FORM_STATE",`: "${r.propValue}"`);for(const s of r.formStateNames)e.disposes.push(n.onChange(s,t))}}}(j,M)})()),r.registerBrickLifeCycle(j,t.lifeCycle);let $,H=t;T?H=function(e,t,n,r,s){var i;const a=(0,f.uniqueId)("tpl-state-"),o={...n.runtimeContext,tplStateStoreId:a};delete o.forEachItem,delete o.forEachIndex,delete o.forEachSize,delete o.formStateStoreId;const c=new Wr("STATE",n,s,a);o.tplStateStoreMap.set(a,c),o.tplStateStoreScope&&o.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:h,contracts:p}=n.runtimeContext.isolatedRoot?Fe.get(n.runtimeContext.isolatedRoot).get(e):Be.get(e);null==_i||null===(i=_i.flowApi)||void 0===i||i.collectWidgetContract(p),c.define(h,o,r);const{slots:d,children:m,...y}=t,g={...y,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:a,proxy:u};const v={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=v.properties.get(t.ref);n||(n=[],v.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=v.slots.get(t.ref);n||(n=[],v.slots.set(t.ref,n)),n.push({from:e,to:t})}const b={reversedProxies:v,asyncHostPropertyEntries:r,externalSlots:ys(m,d),tplStateStoreId:a,hostBrick:n,usedSlots:new Set};return g.slots={"":{type:"bricks",bricks:l.flatMap((e=>Jr(e,b)))}},g}(T,t,j,D,r):P===Xr&&(H=function(e,t,n,r,s){var i,a;const o="string"==typeof e?JSON.parse(e):e,c=(0,f.uniqueId)("form-state-"),l={...n.runtimeContext,formStateStoreId:c};delete l.forEachItem,delete l.forEachIndex,delete l.forEachSize,delete l.tplStateStoreId;const h=new Wr("FORM_STATE",void 0,s,c);l.formStateStoreMap.set(c,h),l.formStateStoreScope&&l.formStateStoreScope.push(h);const p=null!==(i=o.context)&&void 0!==i?i:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),h.define(p,l,r);const d=es(o.formSchema,o.fields,c);return Qr.includes(d.brick)&&t.events&&(d.events=function(e,t){const n=null!=e?e:{};for(const[e,r]of Object.entries(t))n[e]=(0,u.hasOwnProperty)(n,e)?[n[e],r].flat():r;return n}(d.events,t.events)),"boolean"!=typeof(null===(a=t.properties)||void 0===a?void 0:a.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(I,t,j,D,r)),H.portal&&(j.slotId=void 0),T?($={...w},delete $.forEachItem,delete $.forEachIndex,delete $.forEachSize):$=w;return Y.push((async()=>{const e=ys(H.children,H.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map((async(e,n)=>{let[a,l]=e;if("routes"!==l.type)return ls(j,l.bricks,$,r,s,i,a,o,c);let u={blockingList:[]};const h={tag:$n.ABSTRACT,return:j};u.node=h;const d=s[s.length-1];null!=d&&d.incrementalSubRoutes&&(t.set(n,a),r.performIncrementalRender(l,s,(async(e,t)=>{const{homepage:n}=$.app,{pathname:o}=e;if(!y(n,o)||!s.every((e=>{let r,s;return(r=Vt(e,n,t.pathname))&&(s=Vt(e,n,o))&&(e!==d||function(e,t){if((0,f.isEqual)(e,t))return!0;const n=(e,t)=>String(Number(t))===t,r=(0,f.omitBy)(e,n),s=(0,f.omitBy)(t,n);return(0,f.isEqual)(r,s)}(r.params,s.params))})))return!1;const[c,h,p]=ds({...$,location:e,query:new URLSearchParams(e.search)});let m,g=!1,v=[];const b={blockingList:[]},w={tag:$n.ABSTRACT,return:j};b.node=w;try{if(m=await cs(w,l.routes,c,r,s,i,a,!0),m.route){if(r.reBailout(m))return!0;v=[...h,...p],await ps(m,c,[c.ctxStore,...v])}}catch(e){console.error("Incremental sub-router failed:",e);const t=await r.reCatch(e,w);if(!t)return!0;({failed:g,output:m}=t)}if(j.disposed)return!0;if(w.child=m.node,fs(b,{...m,node:void 0}),await r.reMergeMenuRequestNodes(i,l.routes,m.menuRequestNode),r.reRender(j,w,u.node),u=b,!g){c.ctxStore.mountAsyncData(m.route);for(const e of v)e.mountAsyncData()}return!0})));const m=await cs(h,l.routes,$,r,s,i,a,void 0,c);return h.child=m.node,fs(p,{...m,node:void 0}),ms(i,p.menuRequestNode=m.menuRequestNode),u}))),a={...p,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach((e=>{fs(a,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(a,e)})),a.node&&(j.child=a.node),fs(p,{...a,node:void 0}),ms(i,p.menuRequestNode=a.menuRequestNode)})()),await Promise.all(Y),p}(e,t,n,r,s,i,a,o,c)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:await as(n,e),blockingList:[]};throw n}}function hs(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function ps(e,t,n){return(0,l.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function ds(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function fs(e,t){const{blockingList:n,node:r,menuRequestNode:s,...i}=t;if(e.blockingList.push(...n),r)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.node=r;Object.assign(e,i)}function ms(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function ys(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const{slot:t,...r}of e){const e=null!=t?t:"";(0,u.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(r)}}return n}function gs(e,t,n,r){return"silent"===r?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let vs,bs,ws;function xs(){if(!vs){if(vs={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){vs.isInIframe=!0;try{if(window.origin===window.parent.origin){vs.isInIframeOfSameSite=!0;const e="/next/"===d(),t=window.parent.location.pathname,n=t.startsWith("/next/");vs.isInIframeOfNext=!(Number(e)^Number(n));const r=n?"/next":"";vs.isInIframeOfVisualBuilder=t.startsWith(`${r}/visual-builder/`)||t.startsWith(`${r}/visual-builder-`),vs.isInIframeOfLegacyConsole=e&&!n}}catch{}}Object.freeze(vs)}return vs}function Ss(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;Be.define(n,t)}}function Ps(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const As="basic.show-watermark";function Es(e){return!!e&&(e instanceof l.BrickLoadError||e instanceof k.HttpFetchError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement)}const Ts="reload-for-error-count",ks=2;function _s(e){if(/upchat/i.test(navigator.userAgent)&&Es(e)){var t;const e=+(null!==(t=sessionStorage.getItem(Ts))&&void 0!==t?t:0);if(e<ks)return sessionStorage.setItem(Ts,String(e+1)),!0;Cs()}return!1}function Cs(){sessionStorage.removeItem(Ts)}var Is=new WeakMap,Os=new WeakMap,Ls=new WeakMap,Ns=new WeakMap,Ms=new WeakMap,Ds=new WeakMap,Rs=new WeakMap,Bs=new WeakMap,Fs=new WeakMap,js=new WeakMap,Us=new WeakMap,Ys=new WeakMap,$s=new WeakSet;class Hs{constructor(e){(0,E.A)(this,$s),(0,i.A)(this,Is,void 0),(0,i.A)(this,Os,!1),(0,i.A)(this,Ls,void 0),(0,i.A)(this,Ns,void 0),(0,i.A)(this,Ms,void 0),(0,i.A)(this,Ds,new Set),(0,i.A)(this,Rs,0),(0,i.A)(this,Bs,void 0),(0,i.A)(this,Fs,void 0),(0,i.A)(this,js,void 0),(0,i.A)(this,Us,void 0),(0,i.A)(this,Ys,!1),(0,a.A)(Is,this,e);const t=A();window.addEventListener("beforeunload",(e=>{(0,T.A)($s,this,Ws).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,T.A)($s,this,Ws).call(this,{location:e,action:t})))}getRenderId(){return(0,o.A)(Bs,this)}getRuntimeContext(){return(0,o.A)(Ns,this)}getRecentApps(){return{currentApp:(0,o.A)(Fs,this),previousApp:(0,o.A)(js,this)}}getNavConfig(){return(0,o.A)(Us,this)}bootstrap(){window.AbortController&&(bs=new AbortController,k.http.interceptors.request.use((e=>{var t;return{...e,options:{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:bs.signal,...e.options}}})));const e=A();let t=e.location;return e.listen(((e,n)=>{const r=t;t=e,(0,o.A)(Os,this)?(0,a.A)(Ls,this,{location:e,prevLocation:r,action:n}):(0,T.A)($s,this,zs).call(this,{location:e,prevLocation:r,action:n}).catch(pn)})),(0,T.A)($s,this,zs).call(this,{location:e.location})}}function Ws(e){var t;const n=A(),r=n.getBlockMessage();null===(t=(0,o.A)(Ms,this))||void 0===t||t.dispatchBeforePageLeave(e);const s=n.getBlockMessage();return!r&&s&&n.unblock(),s}function Vs(e,t,n){var r,s;if((0,a.A)(Rs,this,(r=(0,o.A)(Rs,this),s=r++,r)),s>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}A().replace(e,t)}async function zs(e){(0,a.A)(Os,this,!0);try{await(0,T.A)($s,this,qs).call(this,e)}finally{if((0,a.A)(Os,this,!1),(0,o.A)(Ls,this)){const e=(0,o.A)(Ls,this);(0,a.A)(Ls,this,void 0),await(0,T.A)($s,this,zs).call(this,e)}}}async function qs(e){let{location:t,prevLocation:n,action:r}=e;if(n){var s,i,a,c;let e;const u={hash:void 0,state:void 0};var l;if(void 0!==t.key&&("POP"!==r||void 0!==n.key&&!1!==(null===(s=n.state)||void 0===s?void 0:s.notify))||(u.key=void 0),((0,p.locationsAreEqual)({...n,...u},{...t,...u})||"POP"!==r&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(e=!0),e||null!==(a=t.state)&&void 0!==a&&a.noIncremental||(0,o.A)(Ys,this)||(e=await(null===(l=(0,o.A)(Ms,this))||void 0===l?void 0:l.didPerformIncrementalRender(t,n))),e)return;if(bs&&(bs.abort(),bs=new AbortController),null===(c=(0,o.A)(Ms,this))||void 0===c||c.dispatchPageLeave(),"POP"===r&&g(m((0,o.A)(Is,this),t.pathname)))return void window.location.reload();H("locationChange")}return(0,T.A)($s,this,Ks).call(this,t,!n)}async function Ks(e,t){var n,r,s,i,c,u;const h=(0,a.A)(Bs,this,(0,f.uniqueId)("render-id-"));let p=null==_i||null===(n=_i.auth)||void 0===n||null===(r=n.isBlockedPath)||void 0===r?void 0:r.call(n,e.pathname);st=new WeakSet,ot.clear(),null==_i||null===(s=_i.flowApi)||void 0===s||s.clearCollectWidgetContract(),A().unblock();const d=null==_i||null===(i=_i.pageView)||void 0===i?void 0:i.create(),y=p?void 0:m((0,o.A)(Is,this),e.pathname),g=null===(c=(0,o.A)(Ns,this))||void 0===c?void 0:c.app,v=null==y||null===(u=y.app)||void 0===u?void 0:u.id;window.BOOTSTRAP_UNION_FILE&&v&&v!==(null==g?void 0:g.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:v,version:y.app.currentVersion}),null!=y&&y.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==_i||null===(t=_i.fulfilStoryboard)||void 0===t?void 0:t.call(_i,e)),M(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(y);const b=(0,a.A)(Fs,this,null==y?void 0:y.app);var w,x,S,P;b&&(null==y||null===(w=y.meta)||void 0===w||null===(w=w.blackList)||void 0===w||null===(x=w.forEach)||void 0===x||x.call(w,(e=>{var t,n;let r=e&&(e.to||e.url);if(r&&"string"==typeof r){if(r=r.split("?")[0].replace(/\${\s*(?:(?:PATH|CTX)\.)?(\w+)\s*}/g,":$1"),e.to)try{r=At(r,{app:b})}catch(e){console.error(e)}else r=r.replace(/^\/next\//,"/");r&&r.startsWith("/")&&(null==_i||null===(t=_i.auth)||void 0===t||null===(n=t.addPathToBlackList)||void 0===n||n.call(t,r))}})),p=null==_i||null===(S=_i.auth)||void 0===S||null===(P=S.isBlockedPath)||void 0===P?void 0:P.call(S,e.pathname)),function(){var e,t,n,r,s,i,a,o;const c=Ii().getFeatureFlags(),u=Ii().getMiscSettings();if(!c["show-watermark"])return;const h="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),p=null!==(n=null==_i||null===(r=_i.auth)||void 0===r||null===(r=r.getAuth())||void 0===r?void 0:r.username)&&void 0!==n?n:"",d=null!==(s=u.watermarkConfig)&&void 0!==s?s:{flags:{}},m=[..."string"==typeof d.content?[d.content]:null!==(i=d.content)&&void 0!==i?i:[],null!==(a=d.flags)&&void 0!==a&&a["show-development"]&&h?"Development":"",null!==(o=d.flags)&&void 0!==o&&o["show-user"]?p:""].filter(Boolean);if(0===m.length)return;const y={content:m,zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,f.omit)(d,["content","flags"])};ws?ws.resolve(y):(0,l.loadBricksImperatively)([As],Mi()).then((()=>{ws=document.createElement(As),ws.resolve(y)}),(e=>{console.error("Load watermark service failed:",e)}))}();const E=g&&b?g.id!==b.id:g!==b;(0,_.clearExpressionASTCache)(),E&&(0,_.clearFunctionASTCache)();const C=Ii().getFeatureFlags(),I=(0,o.A)(Ms,this),O=(t,n)=>{null==d||d({status:"redirected"}),(0,o.A)(Ds,this).add(I),(0,T.A)($s,this,Vs).call(this,t,n,e)},L=()=>{const t=C["sso-enabled"]?"/sso-auth/login":"/auth/login";an(e),O(t,{from:e})},N=document.querySelector("#main-mount-point"),D=document.querySelector("#portal-mount-point"),R={tag:$n.ROOT,container:N,createPortal:D},B=()=>{var e;Hn(N),Hn(D),(0,o.A)(Ds,this).add(I);for(const e of(0,o.A)(Ds,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,o.A)(Ds,this).clear(),null==_i||null===(e=_i.messageDispatcher)||void 0===e||e.reset(),E&&((0,a.A)(js,this,g),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:g,currentApp:b}})))};if(Z(b&&(re()[b.id]||b.theme)||"light"),ie("default"),ue(Ii().getMiscSettings().globalThemeVariant),b&&!p){var F,j,U,Y,$,W;null==_i||null===(F=_i.checkInstalledApps)||void 0===F||F.preCheckInstalledApps(y,(e=>!!ji(e)));const n={bailout:e=>e.unauthenticated?(L(),!0):e.redirect?(O(e.redirect.path,e.redirect.state),!0):void(0,a.A)(Rs,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,a.A)(Us,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,o.A)(Us,this)}))},catch:async(t,n,r,s)=>{if(!cn(t)||window.NO_AUTH_GUARD){if(!(t instanceof k.HttpAbortError)){const i=Ii().getMiscSettings().noAuthGuardLoginPath;if(cn(t)&&i)return void O(i,{from:e});if(r)throw t;return!s&&_s(t)?void window.location.reload():{failed:!0,output:{node:await as(t,n,!s),blockingList:[]}}}(0,o.A)(Ds,this).add(I)}else L()}},r=(0,a.A)(Ms,this,new nr("page",{routeHelper:n,renderId:h})),s=(0,a.A)(Ns,this,{app:b,location:e,query:new URLSearchParams(e.search),flags:C,sys:{...null==_i||null===(j=_i.auth)||void 0===j?void 0:j.getAuth(),...xs(),settings:{brand:Ii().getBrandSettings()}},ctxStore:new Wr("CTX",void 0,r),pendingPermissionsPreCheck:[null==_i||null===(U=_i.checkPermissions)||void 0===U?void 0:U.preCheckPermissions(y)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,a.A)(Us,this,void 0),Ss(y),be(null===(Y=y.meta)||void 0===Y?void 0:Y.functions,b),null==_i||null===($=_i.flowApi)||void 0===$||$.collectContract(null===(W=y.meta)||void 0===W?void 0:W.contracts);let i,c=!1,l=[];try{hr.clear();const e={};if(i=await cs(R,function(e){if(window.parent===window)return e;let t=e;const n=(0,f.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const r=(0,f.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)],t}(y.routes),s,r,[],e),n.bailout(i))return;l=hs(s),await ps(i,s,l),e.child=i.menuRequestNode,r.setInitialMenuRequestNode(e),await n.mergeMenus(r.getMenuRequests())}catch(e){console.error("Router failed:",e),t&&(0,a.A)(Ys,this,!0);const r=await n.catch(e,R,t);if(!r)return;({failed:c,output:i}=r)}if(Cs(),R.child=i.node,(0,a.A)(Ys,this,!1),B(),i.route&&"routes"!==i.route.type||c){if(c||r.dispatchBeforePageLoad(),te(),oe(),Ps(null==b?void 0:b.uiVersion),Wn(R),window.scrollTo(0,0),c)null==d||d({status:"failed"});else{r.dispatchPageLoad(),r.dispatchAnchorLoad(),r.dispatchOnMount(),r.initializeScrollIntoView(),r.initializeMediaChange(),r.initializeMessageDispatcher();for(const e of l)e.mountAsyncData();null==d||d({status:"ok",path:i.path,pageTitle:document.title})}return void H("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=_i&&_i.auth&&!_i.auth.isLoggedIn())return void L();B()}te(),oe();const V=await as(new is(p?"page blocked":b?"page not found":"app not found"),R,!0);R.child=V,Wn(R),window.scrollTo(0,0),null==d||d({status:p?"blocked":"not-found"}),H("rendered")}const Gs="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function Js(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function Xs(e){return e<=1?"".concat(100*Number(e),"%"):e}function Zs(e){return 1===e.length?"0"+e:String(e)}function Qs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ei(e){return ti(e)/255}function ti(e){return parseInt(e,16)}var ni={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ri(e){var t,n,r,s={r:0,g:0,b:0},i=1,a=null,o=null,c=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(ni[e])e=ni[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=oi.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=oi.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=oi.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=oi.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=oi.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=oi.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=oi.hex8.exec(e))?{r:ti(n[1]),g:ti(n[2]),b:ti(n[3]),a:ei(n[4]),format:t?"name":"hex8"}:(n=oi.hex6.exec(e))?{r:ti(n[1]),g:ti(n[2]),b:ti(n[3]),format:t?"name":"hex"}:(n=oi.hex4.exec(e))?{r:ti(n[1]+n[1]),g:ti(n[2]+n[2]),b:ti(n[3]+n[3]),a:ei(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=oi.hex3.exec(e))&&{r:ti(n[1]+n[1]),g:ti(n[2]+n[2]),b:ti(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=e.r,n=e.g,r=e.b,s={r:255*Js(t,255),g:255*Js(n,255),b:255*Js(r,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(a=Xs(e.s),o=Xs(e.v),s=function(e,t,n){e=6*Js(e,360),t=Js(t,100),n=Js(n,100);var r=Math.floor(e),s=e-r,i=n*(1-t),a=n*(1-s*t),o=n*(1-(1-s)*t),c=r%6;return{r:255*[n,a,i,i,o,n][c],g:255*[o,n,n,a,i,i][c],b:255*[i,i,o,n,n,a][c]}}(e.h,a,o),l=!0,u="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(a=Xs(e.s),c=Xs(e.l),s=function(e,t,n){var r,s,i;if(e=Js(e,360),t=Js(t,100),n=Js(n,100),0===t)s=n,i=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,o=2*n-a;r=Qs(o,a,e+1/3),s=Qs(o,a,e),i=Qs(o,a,e-1/3)}return{r:255*r,g:255*s,b:255*i}}(e.h,a,c),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(i),{ok:l,format:e.format||u,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:i}}var si="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),ii="[\\s|\\(]+(".concat(si,")[,|\\s]+(").concat(si,")[,|\\s]+(").concat(si,")\\s*\\)?"),ai="[\\s|\\(]+(".concat(si,")[,|\\s]+(").concat(si,")[,|\\s]+(").concat(si,")[,|\\s]+(").concat(si,")\\s*\\)?"),oi={CSS_UNIT:new RegExp(si),rgb:new RegExp("rgb"+ii),rgba:new RegExp("rgba"+ai),hsl:new RegExp("hsl"+ii),hsla:new RegExp("hsla"+ai),hsv:new RegExp("hsv"+ii),hsva:new RegExp("hsva"+ai),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ci(e){return Boolean(oi.CSS_UNIT.exec(String(e)))}var li=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ui(e){var t=function(e,t,n){e=Js(e,255),t=Js(t,255),n=Js(n,255);var r=Math.max(e,t,n),s=Math.min(e,t,n),i=0,a=r,o=r-s,c=0===r?0:o/r;if(r===s)i=0;else{switch(r){case e:i=(t-n)/o+(t<n?6:0);break;case t:i=(n-e)/o+2;break;case n:i=(e-t)/o+4}i/=6}return{h:i,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function hi(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n){var r=[Zs(Math.round(e).toString(16)),Zs(Math.round(t).toString(16)),Zs(Math.round(n).toString(16))];return r.join("")}(t,n,r))}function pi(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function di(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function fi(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function mi(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=ri(e),s=5;s>0;s-=1){var i=ui(r),a=hi(ri({h:pi(i,s,!0),s:di(i,s,!0),v:fi(i,s,!0)}));n.push(a)}n.push(hi(r));for(var o=1;o<=4;o+=1){var c=ui(r),l=hi(ri({h:pi(c,o),s:di(c,o),v:fi(c,o)}));n.push(l)}return"dark"===t.theme?li.map((function(e){var r,s,i,a=e.index,o=e.opacity;return hi((r=ri(t.backgroundColor||"#141414"),i=100*o/100,{r:((s=ri(n[a])).r-r.r)*i+r.r,g:(s.g-r.g)*i+r.g,b:(s.b-r.b)*i+r.b}))})):n}var yi={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},gi={},vi={};function bi(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function wi(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function xi(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Si(e,t,n){return"dark"===t?mi(e,{theme:t,backgroundColor:n})[5]:e}function Pi(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?wi:bi)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?wi:bi)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,r]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),r.map(((e,r)=>[" --palette-".concat(n,"-").concat(r+1,"-channel: ").concat(xi(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(r+1,": rgb(var(--palette-").concat(n,"-").concat(r+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[r,s]=e;return[r,mi(s,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((r=>{var[s,i]=r;return[" --theme-".concat(s,"-color-rgb-channel: ").concat(xi(Si(t[i],e,n)),";"),..."dark"===e?[]:[" --theme-".concat(s,"-color: var(--palette-").concat(i,"-6);")," --theme-".concat(s,"-border-color: var(--palette-").concat(i,"-3);")]," --theme-".concat(s,"-background: var(--palette-").concat(i,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?wi:bi)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let Ai,Ei,Ti,ki,_i;function Ci(e){if(Ai)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==F)return;const n=t.payload;switch(null==n?void 0:n.type){case j:$=n.active;break;case U:Y=n.panel}})),_i=null==e?void 0:e.hooks,(0,c.initializeI18n)(tn,nn),h.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{h.locale(c.i18n.language)})),P(),Ai=new Ni,Ai}Object.keys(yi).forEach((function(e){gi[e]=mi(yi[e]),gi[e].primary=gi[e][5],vi[e]=mi(yi[e],{theme:"dark",backgroundColor:"#141414"}),vi[e].primary=vi[e][5]})),gi.red,gi.volcano,gi.gold,gi.orange,gi.yellow,gi.lime,gi.green,gi.cyan,gi.blue,gi.geekblue,gi.purple,gi.magenta,gi.grey;const Ii=function(){const e=S();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return Ai};var Oi=new WeakMap,Li=new WeakMap;class Ni{constructor(){(0,i.A)(this,Oi,!1),(0,i.A)(this,Li,!1),(0,s.A)(this,"version",3)}initialize(e){var t;if((0,o.A)(Oi,this))throw new Error("The runtime cannot be initialized more than once");(0,a.A)(Oi,this,!0),function(e){(0,u.isObject)(e.settings)&&(0,u.deepFreeze)(e.settings),e.brickPackages&&(0,u.deepFreeze)(e.brickPackages)}(e),Ei=e;const{notification:n,dialog:r}=Di();var s;!1!==n&&(s=null!=n?n:"basic.show-notification",(0,this.loadBricks)([s]).then((()=>{un=document.createElement(s)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==r&&function(e,t){t([e]).then((()=>{rn=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=r?r:"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?Pi({type:"brandColor",...e.brandColor}):e.baseColors?Pi({type:"baseColors",...e.baseColors}):e.variables&&Pi({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,o.A)(Li,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,a.A)(Li,this,!0),Ti=new Hs(Ei.storyboards),await Ti.bootstrap()}getRecentApps(){var e,t;return null!==(e=null===(t=Ti)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Ti)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return et(e,t)}getFeatureFlags(){var e,t;return{...null===(e=Ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=Ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=Ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=Ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=Ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=Ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e,t;return null!==(e=null===(t=Ei)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=Ei)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t;const n=this.getBrandSettings().base_title;document.title=(null===(t=Ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t?void 0:t.localeTitle)||(e?`${e} - ${n}`:n)}getNavConfig(){var e;return null===(e=Ti)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,l.loadBricksImperatively)(e,Mi())}}function Mi(){var e,t,n,r;return null!=ki?ki:ki=function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];n.has(t)||n.set(t,e)})),Array.from(n.values())}(null!==(e=null!==(t=null!==(n=null===(r=Ei)||void 0===r?void 0:r.brickPackages)&&void 0!==n?n:Gs)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[],window.PUBLIC_DEPS)}function Di(){var e,t;return null!==(e=null===(t=Ei)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.presetBricks)&&void 0!==e?e:{}}function Ri(){var e;return null===(e=Ti)||void 0===e?void 0:e.getRenderId()}function Bi(){var e;return null===(e=Ti)||void 0===e?void 0:e.getRuntimeContext()}function Fi(e){var t;return null===(t=Ei)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function ji(e){var t;return null===(t=Fi(e))||void 0===t?void 0:t.app}function Ui(){for(var e,t,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];null==_i||null===(e=_i.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...r)}function Yi(){var e;return null==_i||null===(e=_i.auth)||void 0===e?void 0:e.getAuth()}function $i(){var e,t;return null==_i||null===(e=_i.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function Hi(){var e;return null==_i||null===(e=_i.auth)||void 0===e?void 0:e.isLoggedIn()}var Wi=new WeakMap;const Vi=new class{constructor(){(0,i.A)(this,Wi,new Map)}define(e,t){(0,o.A)(Wi,this).has(e)?console.error(`Custom editor of "${e}" already registered`):(0,o.A)(Wi,this).set(e,t)}get(e){return(0,o.A)(Wi,this).get(e)}};async function zi(e,t,n){return lt(await rt(e),e,"resolve",t,n)}function qi(e){let t,{portal:n,scope:r="fragment",unknownBricks:s,supportsUseChildren:i,unsafe_penetrate:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n;t=n||(()=>(o=document.createElement("div"),o.style.position="absolute",o.style.width=o.style.height="0",document.body.append(o),o));let l,u,h=!1;const p="page"===r?void 0:Symbol("IsolatedRoot");return{async render(n){let{theme:d,uiVersion:m,language:y,context:g,functions:v,templates:b,i18n:w,url:x,app:S}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h)throw new Error("The root is unmounted and cannot be rendered any more");const P=[].concat(n);if(i){(0,C.replaceUseChildren)(P);for(const e of null!=b?b:[])Array.isArray(e.bricks)&&(0,C.replaceUseChildren)(e.bricks)}const A=l,E=(0,f.uniqueId)("render-id-");l=new nr(r,{unknownBricks:s,renderId:E});const T={ctxStore:new Wr("CTX",void 0,l),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map,isolatedRoot:p,unsafe_penetrate:a};if(x){const e=new URL(x);T.query=e.searchParams,T.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const k={tag:$n.ROOT,container:e,createPortal:t};if("page"===r){var _;Z(null!=d?d:"light"),ie("default"),Ps(m),y&&await c.i18n.changeLanguage(y),null!=S||(S={id:"demo",homepage:"/demo"}),T.app=S;const e={app:S,meta:{i18n:w,customTemplates:b}};null===(_=u)||void 0===_||_(),u=M(e),Ss(e),be(v,S)}else!function(e,t){let n=Fe.get(e);if(n||(n=new Re(!0),Fe.set(e,n)),n.clearIsolatedRegistry(),Array.isArray(t))for(const e of t)n.define(e.name,e)}(p,b),function(e,t){const{storyboardFunctions:n,registerStoryboardFunctions:r}=ge({isolatedRoot:e});pe.set(e,n),r(t)}(p,v);T.ctxStore.define(g,T);let I,O=!1,L=[];try{I=await ls(k,P,T,l,[],{}),L=hs(T),await ps(I,T,L)}catch(e){O=!0,I={node:await as(e,k,"page"===r),blockingList:[]}}if(k.child=I.node,null==A||A.dispatchOnUnmount(),null==A||A.dispose(),Hn(e),o&&Hn(o),"page"===r&&(O||l.dispatchBeforePageLoad(),te(),oe()),Wn(k),"page"===r&&window.scrollTo(0,0),!O){for(const e of L)e.mountAsyncData();"page"===r&&l.dispatchPageLoad(),l.dispatchOnMount(),l.initializeScrollIntoView(),l.initializeMediaChange(),l.initializeMessageDispatcher()}},unmount(){h||(h=!0,p&&(pe.delete(p),Fe.delete(p)),Hn(e),o&&(Hn(o),n||o.remove()))}}}function Ki(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...Bi()};t&&(n.query=new URLSearchParams(A().location.search));const r=t=>{if("string"==typeof t){if((0,_.isEvaluable)(t)){const e=gt(t,n);return it(e),e}return(0,I.inject)(t,n)}return!(0,u.isObject)(t)||at(e)?t:Array.isArray(t)?t.map((e=>r(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[r(t),r(n)]})))};return r(e)}const Gi=[];function Ji(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,t=-1;const n=()=>{if(t>-1){const e=Gi.indexOf(t);e>-1&&Gi.splice(e,1)}};return{push:()=>{var r;return n(),t=(null!==(r=Gi[Gi.length-1])&&void 0!==r?r:-1)+1,Gi.push(t),t+e},pull:n}}},4073:function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(9420))},4306:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pipes:()=>s,utils:()=>r});var r={};n.r(r),n.d(r,{convertUnitValueByPrecision:()=>Ce,formatUnitValue:()=>Ie});var s={};function i(e,t){return e+t}function a(e){return"0"!==e&&Boolean(e)}n.r(s),n.d(s,{add:()=>i,atobUnicode:()=>Re,bool:()=>o,boolean:()=>a,btoaUnicode:()=>Be,cmdbInstanceShowName:()=>c,countBy:()=>u,datetime:()=>d,deltaTime:()=>y,divide:()=>g,equal:()=>v,find:()=>b,findIndex:()=>w,findLast:()=>x,findLastIndex:()=>S,get:()=>P,graphTree:()=>A,groupBy:()=>E,groupByToIndex:()=>I,includes:()=>O,join:()=>L,json:()=>N,jsonStringify:()=>M,keyBy:()=>D,map:()=>R,mapToArray:()=>B,mergeArrayByKey:()=>F,multiply:()=>U,not:()=>Y,nullish:()=>$,number:()=>H,parseTimeRange:()=>W,randomString:()=>V,reverse:()=>z,round:()=>De,slice:()=>q,sort:()=>K,split:()=>G,string:()=>J,substr:()=>X,substring:()=>Z,subtract:()=>Q,ternary:()=>ee,uniq:()=>te,unitFormat:()=>Oe,yaml:()=>Ne,yamlStringify:()=>Me});var o=a;function c(e){if(Array.isArray(e)){var t=e[0]||"",n=e.slice(1,e.length).join(",");return n?t+(t?"("+n+")":""+n):t||"-"}return e}var l=n(1030);function u(e,t){return(0,l.countBy)(e,t)}var h=n(1916),p=n.n(h);function d(e,t){return p()(e).format(t)}function f(e){return"object"==typeof e&&null!==e}function m(e,t){return"number"==typeof e?p()(e):p()(e,t)}function y(e,t,n){if(void 0===t&&(t=!0),void 0===n&&(n="YYYY-MM-DD HH:mm:ss"),!e)return"";if(f(e)&&e.startTime&&e.endTime){var r=m(e.startTime,n),s=m(e.endTime,n);return p().duration(s.diff(r)).humanize(t)}var i=m(f(e)?e.startTime||e.endTime:e,n);return p().duration(i.diff(p()())).humanize(t)}function g(e,t){return e/t}function v(e,t){return(0,l.isEqual)(e,t)}function b(e,t,n){return(0,l.find)(e,t,n)}function w(e,t,n){return(0,l.findIndex)(e,t,n)}function x(e,t,n){return(0,l.findLast)(e,t,n)}function S(e,t,n){return(0,l.findLastIndex)(e,t,n)}function P(e,t,n){return(0,l.get)(e,t,n)}function A(e,t){var n,r;if(!e)return[];var s=null==t?void 0:t.sort,i=(0,l.groupBy)(e.edges,"out"),a=function(t){var n=i[t.instanceId];if((0,l.forEach)(n,(function(n){var r=n.out_name,s=(0,l.find)(e.vertices,["instanceId",n.in]);if(s){var i=a(s);t[r]?t[r].push(i):t[r]=[i]}})),s){var r=(0,l.uniq)((0,l.map)(n,"out_name"));(0,l.forEach)(r,(function(e){(0,l.isEmpty)(t[e])||(t[e]=(0,l.orderBy)(t[e],(function(e){var t;return null!==(t=(0,l.get)(e,s.key))&&void 0!==t?t:-1/0}),-1===s.order?"desc":"asc"))}))}return t};return null!==(r=null===(n=e.topic_vertices)||void 0===n?void 0:n.map((function(e){return a(e)})))&&void 0!==r?r:[]}function E(e,t){return(0,l.groupBy)(e,t)}var T,k,_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_.apply(this,arguments)};function C(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,o=i.length;a<o;a++,s++)r[s]=i[a];return r}function I(e,t,n){var r=e;if(!(0,l.isNil)(t)&&!(0,l.isNil)(n)){var s=(0,l.groupBy)(e,t),i=(0,l.keys)(s).sort();r=r.map((function(e){var r=_({},e);return(0,l.set)(r,n,(0,l.indexOf)(i,(0,l.get)(e,t))),r}))}return r}function O(e,t){return e.includes(t)}function L(e,t){return void 0===t&&(t=","),Array.isArray(e)?e.join(t):""}function N(e){if((0,l.isNil)(e))return e;try{return JSON.parse(e)}catch(e){return void console.error(e)}}function M(e,t){void 0===t&&(t=2);try{return JSON.stringify(e,null,t)}catch(e){return void console.error(e)}}function D(e,t){return(0,l.keyBy)(e,t)}function R(e,t){return Array.isArray(e)?e.map((function(e){return(0,l.get)(e,t)})):[]}function B(e,t,n){return"object"==typeof e&&e?Object.entries(e).map((function(e){var r,s=e[0],i=e[1];return(r={})[t]=s,r[n]=i,r})):[]}function F(e,t){return e.reduce((function(e,n){return Object.values((0,l.mergeWith)((0,l.keyBy)(e,t),(0,l.keyBy)(n,t),j))}),[])}function j(e,t){if((0,l.isArray)(e))return e.concat(t)}function U(e,t){return e*t}function Y(e){return!e}function $(e,t){return null!=e?e:t}function H(e){return Number(e)}function W(e){if("now/d"===e)return+p()().startOf("day");if("now/y"===e)return+p()().startOf("year");var t=/^now-(\d+)(\w+)/.exec(e);if(null!==t){var n=t[1],r=t[2];return+p()().subtract(n,r)}return e?+e:+p()()}function V(e,t){e=e>0?e:8,t="string"==typeof t?t:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var n="",r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function z(e){return Array.isArray(e)?e.slice().reverse():[]}function q(e,t,n){return e.slice(t,n)}function K(e,t){return Array.isArray(e)?(0,l.sortBy)(e,t):[]}function G(e,t){return"string"==typeof e?e.split(t):[]}function J(e){return null==e?"":String(e)}function X(e,t,n){return"string"==typeof e?e.substr(t,n):""}function Z(e,t,n){return"string"==typeof e?e.substring(t,n):""}function Q(e,t){return e-t}function ee(e,t,n){return e?t:n}function te(e){return(0,l.uniq)(e)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e.Time="time",e.Byte="byte",e.Bibyte="bibyte",e.BitRate="bitRate",e.ByteRate="byteRate"}(T||(T={})),function(e){e.Percent1="percent(1)",e.Percent100="percent(100)"}(k||(k={}));var ne,re=[k.Percent1,k.Percent100];!function(e){e.Bytes="bytes",e.Kilobytes="kilobytes",e.Megabytes="megabytes",e.Gigabytes="gigabytes",e.Terabytes="terabytes",e.Petabytes="petabytes",e.Bibytes="bibytes",e.Kibibytes="kibibytes",e.Mebibytes="mebibytes",e.Gibibytes="gibibytes",e.Tebibytes="tebibytes",e.Pebibytes="pebibytes",e.b="b",e.B="B",e.KB="KB",e.MB="MB",e.GB="GB"}(ne||(ne={}));var se,ie=[{id:ne.Bytes,alias:["B","bytes(B)"],divisor:1,display:"B"},{id:ne.Kilobytes,alias:["KB","kilobytes(KB)"],divisor:1e3,display:"KB"},{id:ne.Megabytes,alias:["MB","megabytes(MB)"],divisor:Math.pow(1e3,2),display:"MB"},{id:ne.Gigabytes,alias:["GB","gigabytes(GB)"],divisor:Math.pow(1e3,3),display:"GB"},{id:ne.Terabytes,alias:["TB","terabytes(TB)"],divisor:Math.pow(1e3,4),display:"TB"},{id:ne.Petabytes,alias:["PB","petabytes(PB)"],divisor:Math.pow(1e3,5),display:"PB"}],ae=[{id:ne.Bibytes,alias:["B","bibytes(B)"],divisor:1,display:"B"},{id:ne.Kibibytes,alias:["KiB","kibibytes(KiB)"],divisor:1024,display:"KiB"},{id:ne.Mebibytes,alias:["MiB","mebibytes(MiB)"],divisor:Math.pow(1024,2),display:"MiB"},{id:ne.Gibibytes,alias:["GiB","gibibytes(GiB)"],divisor:Math.pow(1024,3),display:"GiB"},{id:ne.Tebibytes,alias:["TiB","tebibytes(TiB)"],divisor:Math.pow(1024,4),display:"TiB"},{id:ne.Pebibytes,alias:["PiB","pebibytes(PiB)"],divisor:Math.pow(1024,5),display:"PiB"}],oe=[{id:ne.b,divisor:1,display:"b"},{id:ne.B,divisor:8,display:"B"},{id:ne.KB,divisor:8192,display:"KB"},{id:ne.MB,divisor:8388608,display:"MB"},{id:ne.GB,divisor:8589934592,display:"GB"}];!function(e){e.BitsPerSecond="bits/sec",e.KilobitsPerSecond="kilobits/sec",e.MegabitsPerSecond="megabits/sec",e.GigabitsPerSecond="gigabits/sec",e.BytesPerSecond="bytes/sec",e.KilobytesPerSecond="kilobytes/sec",e.MegabytesPerSecond="megabytes/sec",e.GigabytesPerSecond="gigabytes/sec",e.bps="bps",e.Bps="Bps",e.KBps="KBps",e.MBps="MBps",e.GBps="GBps"}(se||(se={}));var ce,le=[{id:se.BitsPerSecond,alias:["bps","bits/sec(bps)"],divisor:1,display:"bps"},{id:se.KilobitsPerSecond,alias:["Kbps","kilobits/sec(Kbps)"],divisor:1e3,display:"Kbps"},{id:se.MegabitsPerSecond,alias:["Mbps","megabits/sec(Mbps)"],divisor:1e6,display:"Mbps"},{id:se.GigabitsPerSecond,alias:["Gbps","gigabits/sec(Gbps)"],divisor:1e9,display:"Gbps"}],ue=[{id:se.BytesPerSecond,alias:["Bps","bytes/sec(Bps)"],divisor:8,display:"Bps"},{id:se.KilobytesPerSecond,alias:["KBps","kilobytes/sec(KBps)"],divisor:8e3,display:"KBps"},{id:se.MegabytesPerSecond,alias:["MBps","megabytes/sec(MBps)"],divisor:8e6,display:"MBps"},{id:se.GigabytesPerSecond,alias:["GBps","gigabytes/sec(GBps)"],divisor:8e9,display:"GBps"}],he=[{id:se.bps,divisor:1,display:"bps"},{id:se.Bps,divisor:8,display:"Bps"},{id:se.KBps,divisor:8e3,display:"KBps"},{id:se.MBps,divisor:8e6,display:"MBps"},{id:se.GBps,divisor:8e9,display:"GBps"}];!function(e){e.Nanosecond="nanoseconds",e.Microsecond="microseconds",e.Milliseconds="milliseconds",e.Seconds="seconds",e.Minutes="minutes",e.Hours="hours",e.Days="days",e.Weeks="weeks",e.Months="months",e.Years="years",e.ms="ms",e.s="s",e.min="min",e.hour="hour",e.day="day",e.week="week"}(ce||(ce={}));var pe,de,fe=[{id:ce.Nanosecond,alias:["ns","nanoseconds(ns)"],divisor:1,display:"ns"},{id:ce.Microsecond,alias:["μs","microseconds(μs)"],divisor:1e3,display:"μs"},{id:ce.Milliseconds,alias:["ms","milliseconds(ms)"],divisor:1e6,display:"ms"},{id:ce.Seconds,alias:["s","seconds(s)"],divisor:1e9,display:"s"},{id:ce.Minutes,alias:["min","minutes(min)"],divisor:6e10,display:"min"},{id:ce.Hours,alias:["hour","hours(hour)"],divisor:36e11,display:"hour"},{id:ce.Days,alias:["day","days(day)"],divisor:864e11,display:"day"},{id:ce.Weeks,alias:["week","weeks(week)"],divisor:6048e11,display:"week"},{id:ce.Months,alias:["month","months(month)"],divisor:2592e12,display:"month"},{id:ce.Years,alias:["year","years(year)"],divisor:31536e12,display:"year"}];ce.ms,ce.s,ce.min,ce.hour,ce.day,ce.week,(pe={})[T.Time]=fe,pe[T.Byte]=ie,pe[T.Bibyte]=ae,pe[T.BitRate]=le,pe[T.ByteRate]=ue,function(e){e.None="none",e.K="K",e.M="M",e.B="B",e.T="T"}(de||(de={}));var me,ye,ge=[{id:de.None,divisor:1,display:""},{id:de.K,divisor:1e3,display:"K"},{id:de.M,divisor:1e6,display:"M"},{id:de.B,divisor:1e9,display:"B"},{id:de.T,divisor:1e12,display:"T"}],ve=function(e,t){return e.id.toLocaleLowerCase()===(null==t?void 0:t.toLocaleLowerCase())||e.alias&&e.alias.map((function(e){return e.toLocaleLowerCase()})).includes(t)},be=function(e,t){return e.id.toLocaleLowerCase()===(null==t?void 0:t.toLocaleLowerCase())||e.alias&&e.alias.includes(t)},we=[fe],xe=[].concat.apply([],we.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Se=[ie,ae,oe],Pe=[].concat.apply([],Se.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Ae=[le,ue,he],Ee=[].concat.apply([],Ae.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Te=function(e,t,n,r){var s=0,i=Math.sign(e),a=Math.abs(e);if(t){var o=ge.findIndex((function(e){return e.id.toLocaleLowerCase()===t.toLocaleLowerCase()}));-1!==o&&(s=o)}for(var c=ge[s],l=s+1;l<ge.length&&a/(ge[l].divisor/ge[s].divisor)>=1;++l)c=ge[l];return c.id===de.None?ke((i*a).toFixed(null!=n?n:2),r):ke((a/(c.divisor/ge[s].divisor)*i).toFixed(null!=n?n:2),r)+c.display};function ke(e,t){return!1===t?(+e).toString():e}!function(e){e.None="none",e.Short="short",e.Percent="percent",e.Time="time",e.Data="data",e.DataRate="data_rate"}(ye||(ye={}));var _e=((me={})[ye.None]=[],me[ye.Short]=[],me[ye.Percent]=re,me[ye.Time]=xe,me[ye.Data]=Pe,me[ye.DataRate]=Ee,me),Ce=function(e,t,n){if(void 0===t)return e.toString();var r=e.toFixed(t);return!1===n?(+r).toString():r},Ie=function(e,t){if(!t)return[Te(e),null];var n=t.type;n||(t.unit?(n=ye.Short,Object.entries(_e).map((function(e){var r=e[0];e[1].map((function(e){return e.toLocaleLowerCase()})).includes(t.unit.toLocaleLowerCase())&&(n=r)}))):n=ye.None);var r=void 0===(null==t?void 0:t.precision)?2:t.precision,s=!(0,l.isBoolean)(null==t?void 0:t.fixedPrecision)||(null==t?void 0:t.fixedPrecision);switch(n){case ye.Percent:var i=function(e,t){return t&&t.toLocaleLowerCase()===k.Percent100.toLocaleLowerCase()?e:100*e}(e,t.unit);return[Ce(i,r,s)+"%",null];case ye.Time:var a=function(e,t,n){var r=0,s=2,i=-1;if(t)for(var a=function(e){var a=-1,o=-1;if(we[e].forEach((function(e,r){ve(e,t)&&(a=r),ve(e,n)&&(o=r)})),-1!==a)return r=e,s=a,i=o,"break"},o=0;o<we.length&&"break"!==a(o);++o);else n&&(i=we[r].findIndex((function(e){return ve(e,n)})));var c=we[r],l=c[s],u=l;if(-1===i)for(o=s+1;o<c.length&&e/(c[o].divisor/l.divisor)>=1;++o)u=c[o];else u=c[i];return n&&-1===i&&console.warn('Cannot convert unit "'+(t||l.display)+'" to "'+n+'"'),[e/(u.divisor/l.divisor),u.display]}(e,t.unit,t.targetUnit),o=a[0],c=a[1];return[""+Ce(o,void 0===(null==t?void 0:t.precision)?1:t.precision,s),c];case ye.Data:var u=function(e,t,n){var r=Se.length-1,s=0,i=-1,a=Math.sign(e),o=Math.abs(e);if(t)for(var c=function(e){var a=-1,o=-1;if(Se[e].forEach((function(e,r){be(e,t)&&(a=r),be(e,n)&&(o=r)})),-1!==a)return r=e,s=a,i=o,"break"},l=0;l<Se.length&&"break"!==c(l);++l);else n&&(i=Se[r].findIndex((function(e){return be(e,n)})));var u=Se[r],h=u[s],p=h;if(-1===i)for(l=s+1;l<u.length&&o/(u[l].divisor/h.divisor)>=1;++l)p=u[l];else p=u[i];return n&&-1===i&&console.warn('Cannot convert unit "'+(t||h.display)+'" to "'+n+'"'),[o/(p.divisor/h.divisor)*a,p.display]}(e,t.unit,t.targetUnit),h=u[0],p=u[1];return[""+Ce(h,r,s),p];case ye.DataRate:var d=function(e,t,n){var r=Ae.length-1,s=0,i=-1,a=Math.sign(e),o=Math.abs(e);if(t)for(var c=function(e){var a=-1,o=-1;if(Ae[e].forEach((function(e,r){ve(e,t)&&(a=r),ve(e,n)&&(o=r)})),-1!==a)return r=e,s=a,i=o,"break"},l=0;l<Ae.length&&"break"!==c(l);++l);else n&&(i=Ae[r].findIndex((function(e){return ve(e,n)})));var u=Ae[r],h=u[s],p=h;if(-1===i)for(l=s+1;l<u.length&&o/(u[l].divisor/h.divisor)>=1;++l)p=u[l];else p=u[i];return n&&-1===i&&console.warn('Cannot convert unit "'+(t||h.display)+'" to "'+n+'"'),[o/(p.divisor/h.divisor)*a,p.display]}(e,t.unit,t.targetUnit),f=d[0],m=d[1];return[""+Ce(f,r,s),m];case ye.None:return[Ce(e,r,s),""];default:return[Te(e,t.unit,r,s),t.unit]}};function Oe(e,t,n,r,s){return void 0===n&&(n=2),Ie(e,{unit:t,precision:n,targetUnit:r,fixedPrecision:s})}var Le=n(1060);function Ne(e){var t;try{t=(0,Le.safeLoad)(e,{schema:Le.JSON_SCHEMA,json:!0})}catch(e){console.error(e)}return t}function Me(e,t,n){var r;void 0===t&&(t=2);try{r=(0,Le.safeDump)(e,_({indent:t,schema:Le.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0},n))}catch(e){console.error(e)}return r}function De(e,t){return(0,l.round)(e,t)}function Re(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function Be(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}},4395:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(s,i){if("string"==typeof t?s.name===t:t.includes(s.name)){const t=[];for(let a=1;a<=n;a++){const n=i[i.length-a];if("MemberExpression"===(null==n?void 0:n.node.type)&&"object"===n.key){const i=n.node;i.computed||"Identifier"!==i.property.type?i.computed&&"Literal"===i.property.type&&"string"==typeof i.property.value?t.push(r?`${s.name}.${i.property.value}`:i.property.value):e.hasNonStaticUsage=!0:t.push(r?`${s.name}.${i.property.name}`:i.property.name)}else e.hasNonStaticUsage=!0}t.length===n&&e.usedProperties.add(t.join("."))}}}function s(e,t){return function(n,r,s){if(r.name===e){const e=s[s.length-1],r=s[s.length-2];if("CallExpression"===(null==r?void 0:r.node.type)&&"callee"===(null==r?void 0:r.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=r.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?n.usedArgs.add(t.value):n.hasNonStaticUsage=!0}}}}}n.r(t),n.d(t,{beforeVisitGlobalMember:()=>r,collectAppGetMenuUsage:()=>i,collectInstalledAppsHasUsage:()=>a,collectMemberUsage:()=>h,collectMemberUsageInFunction:()=>g,createProviderClass:()=>c.createProviderClass,replaceUseChildren:()=>T,scanPermissionActionsInAny:()=>x,scanPermissionActionsInStoryboard:()=>w,strictCollectMemberUsage:()=>u,track:()=>d,trackAll:()=>f,traverseStoryboardExpressions:()=>l,traverseStoryboardFunction:()=>y,traverseStoryboardFunctions:()=>m,unwrapProvider:()=>c.unwrapProvider});const i=s("APP","getMenu"),a=s("INSTALLED_APPS","has");var o=n(8303),c=n(4113);function l(e,t,n){const r=new WeakSet,{matchExpressionString:s,visitNotMatchedExpressionString:i,visitNonExpressionString:a,visitObject:l}="string"==typeof n?{matchExpressionString:e=>e.includes(n)}:n;!function e(n){if("string"==typeof n)if((0,o.isEvaluable)(n))if(s(n))try{(0,o.preevaluate)(n,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,r){t(e,r,n)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==i||i(n);else null==a||a(n);else if((0,c.isObject)(n)){if(r.has(n))return;r.add(n),null==l||l(n);for(const t of Array.isArray(n)?n:Object.values(n))e(t)}}(e)}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:r,nonStaticUsage:s,usedProperties:i}=h(e,t,n);if(r)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${s}"`);return i}function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1},i=r(s,t,n);return l(e,((e,t,n)=>{i(e,t),s.hasNonStaticUsage&&(s.nonStaticUsage=n)}),t),s}const p=["CTX","STATE","FORM_STATE"];function d(e,t,n){if(e.includes(t)){const s={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,o.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:r(s,n)}});let a;if("SequenceExpression"===i.type&&(a=i.expressions[0])&&"Literal"===a.type&&a.value===t){if(s.usedProperties.size>0)return s.usedProperties;console.warn(`You are using "${t}" but no \`${n}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function f(e){if(p.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,o.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:r(t,p,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],n={context:!1,state:!1,formState:!1},r={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,s]=e.split(".");n[r[t]]||(n[r[t]]=[]),n[r[t]].push(s)})),n}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function m(e,t,n){if(Array.isArray(e))for(const r of e)null!=n&&n.matchSource&&!n.matchSource(r.source)||y(r,t)}function y(e,t,n){try{(0,o.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){n||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function g(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&y(e,r(i,t,s),n),i.hasNonStaticUsage&&!n)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return i.usedProperties.delete(e.name),i.usedProperties}const v="PERMISSIONS",b="check";function w(e){var t;const n=new Set,r=S(n),{customTemplates:s,functions:i}=null!==(t=e.meta)&&void 0!==t?t:{};return l([e.routes,s],r,v),m(i,r,{matchSource:e=>e.includes(v)}),Array.from(n)}function x(e){const t=new Set;return l(e,S(t),v),Array.from(t)}function S(e){return function(t,n){if(t.name===v){const t=n[n.length-1],r=n[n.length-2];if("CallExpression"===(null==r?void 0:r.node.type)&&"callee"===(null==r?void 0:r.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of r.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}var P=n(1030);const{pull:A}=P,E=/^\[\w+\]$/;function T(e){if(Array.isArray(e))for(const t of e)k(t);else k(e)}function k(e){let t=e.slots;const n=new Map;if(Array.isArray(e.children)&&!t){const t=[];for(const s of e.children){var r;const e=null!==(r=s.slot)&&void 0!==r?r:"";if(E.test(e)){delete s.slot;const r=n.get(e);r?r.push(s):n.set(e,[s]),t.push(s)}k(s)}A(e.children,...t)}else{null!=t||(t={});for(const[e,r]of Object.entries(t)){if(E.test(e)){const{bricks:s}=r;Array.isArray(s)&&s.length>0&&(n.set(e,s),T(s)),delete t[e]}Array.isArray(r.bricks)&&T(r.bricks)}}n.size>0&&_(e.properties,n)}function _(e,t){if(Array.isArray(e))for(const n of e)_(n,t);else if((0,c.isObject)(e))for(const[n,r]of Object.entries(e))if("useChildren"===n){const s=t.get(r);s&&(delete e[n],e.useBrick=1===s.length?s[0]:s)}else _(r,t)}},4396:(e,t,n)=>{"use strict";function r(e){return e&&"function"==typeof e.then}n.d(t,{HO:()=>c,UU:()=>p,aS:()=>i,fg:()=>s,mU:()=>h,o:()=>a,yL:()=>r,yy:()=>o,zs:()=>l});var s=Promise.resolve(!1),i=Promise.resolve(!0),a=Promise.resolve();function o(e,t){return e||(e=0),new Promise((function(n){return setTimeout((function(){return n(t)}),e)}))}function c(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function l(){return Math.random().toString(36).substring(2)}var u=0;function h(){var e=1e3*Date.now();return e<=u&&(e=u+1),u=e,e}function p(){return"undefined"!=typeof navigator&&void 0!==navigator.locks&&"function"==typeof navigator.locks.request}},4408:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var r=n(7551);const s=async(e,t,n)=>(await r.http.get(`api/gateway/logic.micro_app_standalone_service/api/v1/micro_app_standalone/runtime/${e}`,{...n,params:t})).data},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1369);function s(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4635:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2016);function s(e,t){(0,r.A)(e,t),t.add(e)}},4865:function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(9420))},4938:(e,t,n)=>{"use strict";var r=n(5417),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==s.exec(e)||null!==i.exec(e))},construct:function(e){var t,n,r,a,o,c,l,u,h=0,p=null;if(null===(t=s.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(o=+t[4],c=+t[5],l=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),u=new Date(Date.UTC(n,r,a,o,c,l,h)),p&&u.setTime(u.getTime()-p),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},5046:(e,t,n)=>{"use strict";var r=n(918),s=n(6121),i=n(829),a=n(3647),o=n(7551),c=n(7512),l=n(9780);n(1727),XMLHttpRequest.prototype.origOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.origOpen.apply(this,t);const r=l.auth.getAuth().csrfToken;r&&this.setRequestHeader("X-CSRF-Token",r)};var u=n(2193);let h=function(e){return e.LOGIN_CHANGED="LOGIN_CHANGED",e.LOGOUT_APPLIED="LOGOUT_APPLIED",e.BOOTSTRAP_ERROR="BOOTSTRAP_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.RELOAD="RELOAD",e}({});const p={[h.LOGIN_CHANGED]:"You have logged in as another account, click OK to refresh the page.",[h.LOGOUT_APPLIED]:"Your account has been logged out, click OK to refresh the page.",[h.BOOTSTRAP_ERROR]:"Bootstrap Error",[h.NETWORK_ERROR]:"Network Error",[h.RELOAD]:"Reload"},d={[h.LOGIN_CHANGED]:"您已经登录另一个账号,点击确定刷新页面。",[h.LOGOUT_APPLIED]:"您的账号已经登出,点击确定刷新页面。",[h.BOOTSTRAP_ERROR]:"启动错误",[h.NETWORK_ERROR]:"网络错误",[h.RELOAD]:"刷新"},f="-/container",m={en:p,zh:d},y="brick-next:authentication-change";let g=!1;async function v(e,t){g||"logout"!==e.type&&("check-login"!==e.type||e.org===t.org&&e.username===t.username)||!(0,a.getRuntime)().getFeatureFlags()["refresh-page-if-authentication-changed"]||(g=!0,await a.Dialog.show({type:"warn",content:c.i18n.t(`${f}:${"logout"===e.type?h.LOGOUT_APPLIED:h.LOGIN_CHANGED}`)}),window.location.reload())}async function b(){if(!window.NO_AUTH_GUARD){const e=await(0,u.n)();e.loggedIn&&(l.auth.authenticate(e),async function(e){if(window.BroadcastChannel){const t=new BroadcastChannel(y);t.postMessage({type:"check-login",org:e.org,username:e.username}),t.addEventListener("message",(t=>{v(t.data,e)}))}else{const t=new(0,(await n.e(668).then(n.bind(n,706))).BroadcastChannel)(y);t.postMessage({type:"check-login",org:e.org,username:e.username}),t.addEventListener("message",(t=>{v(t,e)}))}}(e))}}var w=n(7773),x=n(3443),S=n(9663),P=n(4113),A=n(1030),E=n(1060),T=n(4408);function k(e,t,n){return{get(r){if(t)return`${(0,a.getBasePath)()}api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/${r}`;let s=window.APP_ROOT?`${window.APP_ROOT}${window.BOOTSTRAP_UNION_FILE&&window.PUBLIC_DEPS?"":"-/"}`:"";return window.APP_ID&&window.APP_ID!==e&&(s=s.replace(new RegExp(`(^|/)${(0,A.escapeRegExp)(window.APP_ID)}/`),`$1${e}/`).replace(/\/\d+\.\d+\.\d+\//,`/${n}/`)),s.startsWith("/")||(s=(0,a.getBasePath)()+s),window.BOOTSTRAP_UNION_FILE&&window.PUBLIC_DEPS?`${s}images/${r}`:`${s}micro-apps/${e}/images/${r}`}}}function _(e,t){return{get(n){var r;return`${null!==(r=window.PUBLIC_ROOT)&&void 0!==r?r:""}bricks/${e}/${window.PUBLIC_ROOT_WITH_VERSION&&t?`${t}/`:""}dist/assets/${n}`}}}let C=null,I=[];const O=new Map;async function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0.0.0";if(O.has(e))return O.get(e);const n=(0,T.a)(e,{version:t}).catch((e=>{console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}));return O.set(e,n),n}async function N(e){var t;if(window.STANDALONE_MICRO_APPS){if(window.BOOTSTRAP_UNION_FILE&&!e.$$fullMerged){const t=`${window.APP_ROOT}${window.PUBLIC_DEPS?"":"-/"}${e.bootstrapFile}`,{storyboards:n}=await o.http.get(t),{routes:r,meta:s,app:i}=n[0];Object.assign(e,{routes:r,meta:s,app:{...e.app,...i},$$fullMerged:!0})}if(!window.NO_AUTH_GUARD){const t=await L(e.app.id,e.app.currentVersion);if(t){const{userConfig:n,injectMenus:r,blackList:s}=t;e.app.userConfig={...e.app.userConfig,...n},function(e){if(Array.isArray(e))for(const t of e)t.overrideApp&&(M(t.overrideApp),D(t.overrideApp))}(r),e.meta={...e.meta,injectMenus:r,blackList:s}}}}else{const{routes:t,meta:n,app:r}=await(0,S.m)(e.app.id,{});Object.assign(e,{routes:t,meta:n,app:{...e.app,...r}})}!function(e){var t;if(e.app.menuIcon&&"imgSrc"in e.app.menuIcon&&null!==(t=e.app.menuIcon.imgSrc)&&void 0!==t&&t.startsWith("api/")){const t=e.app.menuIcon.imgSrc.split("/"),n=t[t.length-1],r=k(e.app.id,e.app.isBuildPush,e.app.currentVersion).get(n);e.app.menuIcon.imgSrc=r}}(e),M(e.app),D(e.app),function(e){if(!e)return C=null,void(I=[]);C=e.mockId,I=e.mockList.map((e=>({...e,uri:`${l.flowApi.isFlowApiProvider(e.provider)?e.uri.replace(/(.+?)\/(.+)/,((e,t,n)=>`/${t}(@\\d+\\.\\d+\\.\\d+)?/${n}$`)):`/${e.uri.split(".").slice(2).join(".")}$`}`.replace(/:\w+/g,"([^/]+)")})))}(null===(t=e.meta)||void 0===t?void 0:t.mocks)}function M(e){var t,n,r;const s="override"===(null!==(t=null===(n=e.userConfig)||void 0===n?void 0:n.__merge_method)&&void 0!==t?t:null===(r=e.defaultConfig)||void 0===r?void 0:r.__merge_method)?{...e.defaultConfig,...e.userConfig}:(0,A.merge)({},e.defaultConfig,e.userConfig);e.config=(0,P.deepFreeze)(s)}function D(e){var t,n;const r=null!==(t=null===(n=e.config)||void 0===n||null===(n=n.settings)||void 0===n?void 0:n.locales)&&void 0!==t?t:e.locales;if(r){const t=`tmp/${e.id}`;Object.entries(r).forEach((e=>{let[n,r]=e;c.i18n.addResourceBundle(n,t,r)})),e.localeName=c.i18n.getFixedT(null,t)("name",e.name),e.localeTitle=c.i18n.getFixedT(null,t)("title",""),Object.keys(r).forEach((e=>{c.i18n.removeResourceBundle(e,t)}))}else e.localeName=e.name,e.localeTitle=""}var R=n(8856);let B=!1;const F=/^https?:\/\/localhost(?:$|:)/;var j=n(4586),U=n(5580);class Y extends HTMLElement{constructor(){super(...arguments),(0,j.A)(this,"errorTitle",void 0)}connectedCallback(){this.shadowRoot||(this.attachShadow({mode:"open"}).innerHTML=[`<style>${U.A}</style>`,'<div class="icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></div>',`<div class="title">${(0,A.escape)(this.errorTitle)}</div>`,'<div class="description"><slot></slot></div>','<div class="actions"><slot name="link"></slot></div>'].join(""))}}const $=!!new URLSearchParams(window.location.search).get("_experimental_app_preview_");function H(e,t){var n;null!==(n=t.options)&&void 0!==n&&null!==(n=n.interceptorParams)&&void 0!==n&&n.ignoreLoadingBar||window.dispatchEvent(new Event(e))}customElements.define("easyops-default-error",Y),l.analytics.initialize(`${(0,a.getBasePath)()}api/gateway/data_exchange.store.ClickHouseInsertData/api/v1/data_exchange/frontend_stat`),o.http.interceptors.request.use(l.analytics.http.onRequest),o.http.interceptors.request.use((e=>{var t,n;H("request.start",e);const r=new Headers((null===(t=e.options)||void 0===t?void 0:t.headers)||{});r.set("lang",null!==(n=c.i18n.resolvedLanguage)&&void 0!==n?n:c.i18n.language);const{csrfToken:s}=l.auth.getAuth();s&&r.set("X-CSRF-Token",s);const i=function(e,t){if(null!==C&&I.some((n=>new RegExp(n.uri).test(e)&&function(e){const t=null==e?void 0:e.toUpperCase();return"LIST"===t?"GET":t}(n.method)===(null==t?void 0:t.toUpperCase()))))return{mockId:C,url:e.replace(/(^|\/)(api\/gateway\/.+?)(?:@\d+\.\d+\.\d+)?\/(.+)/,((e,t,n,r)=>`${t}${n}/${r}`)).replace(/(^|\/)api\/gateway\//,`$1api/gateway/mock_server.proxy.${C}/`)}}(e.url,e.method);i&&(e.url=i.url,r.set("easyops-mock-id",i.mockId));const a=(()=>{let e="";for(let t=0;t<16;t+=1)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e})();return r.set("X-B3-Traceid",`ffffffffffffffff${a}`),r.set("X-B3-Spanid",a),r.set("X-B3-Sampled","1"),{...e,options:{...e.options,headers:r}}})),o.http.interceptors.response.use((function(e,t){return H("request.end",t),e}),(function(e,t){return H("request.end",t),Promise.reject(e)})),o.http.interceptors.response.use(l.analytics.http.onResponse,l.analytics.http.onResponseError);const W=document.querySelector("#global-loading-bar");W.classList.add("rendered");let V=!1,z=0;function q(){const e=z>0;e!==V&&(V=e,W.classList[e?"add":"remove"]("loading"))}const K=()=>{z++,q()},G=()=>{z>0&&(z--,q())};function J(){return(0,a.createRuntime)({hooks:{auth:l.auth,checkPermissions:l.checkPermissions,flowApi:l.flowApi,checkInstalledApps:l.checkInstalledApps,menu:l.menu,images:{imagesFactory:k,widgetImagesFactory:_},messageDispatcher:l.messageDispatcher,...$?null:{fulfilStoryboard:N,pageView:l.analytics.pageView}}})}window.addEventListener("request.start",K),window.addEventListener("request.end",G),(0,c.initializeI18n)(f,m);var X=new WeakMap;class Z{constructor(){(0,r.A)(this,X,!1)}async setup(e,t){try{if((0,i.A)(X,this))throw new Error("_preview_only_setupAppPreview can only be called once");(0,s.A)(X,this,!0),history.replaceState(null,"",t);const n=J();await b(),await n.bootstrap(e)}catch(e){Q(e)}G()}async update(e,t){a.__secret_internals.updateStoryboard(e,t)}reload(){(0,a.getHistory)().reload()}push(e){(0,a.getHistory)().push(e)}replace(e){(0,a.getHistory)().replace(e)}goBack(){(0,a.getHistory)().goBack()}goForward(){(0,a.getHistory)().goForward()}}function Q(e){if(console.error("bootstrap failed:",e),(0,a.shouldReloadForError)(e))return location.reload(),"failed";document.body.classList.add("bootstrap-error");const t=document.createElement("easyops-default-error");t.errorTitle=(0,a.isNetworkError)(e)?c.i18n.t(`${f}:${h.NETWORK_ERROR}`):c.i18n.t(`${f}:${h.BOOTSTRAP_ERROR}`),t.textContent=(0,a.httpErrorToString)(e);const n=document.createElement("a");n.slot="link",n.href=location.href,n.textContent=c.i18n.t(`${f}:${h.RELOAD}`),t.appendChild(n),document.querySelector("#main-mount-point").replaceChildren(t)}const ee=async function(){try{if($)return K(),window._preview_only_appPreviewer=new Z,"ok";{const e=J(),[,t]=await Promise.all([b(),window.STANDALONE_MICRO_APPS?async function(){const e=[window.BOOTSTRAP_UNION_FILE?o.http.get(window.BOOTSTRAP_UNION_FILE):o.http.get(window.BOOTSTRAP_FILE),window.BOOTSTRAP_UNION_FILE?Promise.resolve(""):o.http.get(`${window.APP_ROOT}conf.yaml`,{responseType:"text"}),(0,x.e)().catch((e=>{console.warn("request runtime api from api-gateway failed: ",e,", something might went wrong running standalone micro app")})),window.BOOTSTRAP_UNION_FILE?o.http.get(window.BOOTSTRAP_FILE):Promise.resolve(void 0)];if(!window.NO_AUTH_GUARD){const e=window.APP_ROOT?window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\/([^/]+)\//)||window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/micro-apps\/(?:v2|v3)\/([^/]+)\/([^/]+)\//):null;e&&L(e[1],e[2])}const[t,n,r,s]=await Promise.all(e);return function(e,t){let n;try{n=t?(0,E.safeLoad)(t,{schema:E.JSON_SCHEMA,json:!0}):void 0}catch(e){throw console.error("Parse conf.yaml failed",e),new Error("Invalid conf.yaml")}if(n){const{sys_settings:t,user_config:r,user_config_by_apps:s}=n;if(t){const{feature_flags:n,...r}=t;e.settings={featureFlags:n,...r}}if(r&&1===e.storyboards.length)e.storyboards[0].app.userConfig=r;else if(s)for(const{app:t}of e.storyboards)(0,P.hasOwnProperty)(s,t.id)&&(t.userConfig=s[t.id])}}(t,n),function(e,t){var n;if(!t)return;const{featureFlags:r,misc:s,...i}=t,a=null!==(n=e.settings)&&void 0!==n?n:e.settings={};a.featureFlags={...a.featureFlags,...r},a.misc={...a.misc,...s},Object.assign(a,i)}(t,null==r?void 0:r.settings),function(e,t){if(t){const{storyboards:n}=t,{routes:r,meta:s,app:i}=n[0],a=e.storyboards.find((e=>e.app.id===i.id));a&&Object.assign(a,{routes:r,meta:s,app:{...a.app,...i},$$fullMerged:!0})}}(t,s),t}():(0,w.K)({appFields:"defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons,standaloneMode",ignoreTemplateFields:"templates",ignoreBrickFields:"bricks,processors,providers,editors"})]);await e.bootstrap(t),(0,a.resetReloadForError)()}return"ok"}catch(e){return Q(e),"failed"}}();window.parent!==window&&function(e){const t=async n=>{let{data:r,origin:s}=n;const i=function(e){return"preview-container"===(null==e?void 0:e.sender)&&"start-preview"===e.type}(r),o=function(e){return"ui-test-preview"===(null==e?void 0:e.channel)&&"initialize"===e.type}(r);if(i||o){window.removeEventListener("message",t);const n=await async function(e,t){if(B||!t)return!1;if("failed"===await e)return!1;B=!0;let n=t===location.origin||F.test(t)||F.test(location.origin);if(!n){const{allowedPreviewFromOrigins:e}=(0,a.getRuntime)().getMiscSettings();Array.isArray(e)&&(n=e.some((e=>e===t))),n||console.error(`Preview is disallowed, from origin: ${t}, while allowing: ${JSON.stringify(e)}`)}return n}(e,s);if(n){let e,t;i?({agent:e,...t}=r.options):({agent:e,options:t}=r.payload),await(0,R.loadBricksImperatively)([e.brick],[e.pkg]);const n=document.createElement(e.brick);await n.resolve(s,t)}}};window.addEventListener("message",t)}(ee),window.__dev_only_getAllContextValues=a.__secret_internals.getAllContextValues},5060:function(e,t,n){var r,s;void 0===(s="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){o(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,a=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,n,a){var o=i.URL||i.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?s(c):r(c.href)?t(e,n,a):s(c,c.target="_blank")):(c.href=o.createObjectURL(e),setTimeout((function(){o.revokeObjectURL(c.href)}),4e4),setTimeout((function(){s(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,i){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),n);else if(r(e))t(e,n,i);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){s(a)}))}}:function(e,n,r,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var o="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||o&&c||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},u.readAsDataURL(e)}else{var h=i.URL||i.webkitURL,p=h.createObjectURL(e);s?s.location=p:location.href=p,s=null,setTimeout((function(){h.revokeObjectURL(p)}),4e4)}});i.saveAs=o.saveAs=o,e.exports=o})?r.apply(t,[]):r)||(e.exports=s)},5137:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},5152:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},5250:function(e,t,n){var r;e=n.nmd(e),function(){var s,i="Expected a function",a="__lodash_hash_undefined__",o="__lodash_placeholder__",c=32,l=128,u=1/0,h=9007199254740991,p=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",y="[object Array]",g="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",S="[object Map]",P="[object Number]",A="[object Object]",E="[object Promise]",T="[object RegExp]",k="[object Set]",_="[object String]",C="[object Symbol]",I="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",N="[object Float32Array]",M="[object Float64Array]",D="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",U="[object Uint16Array]",Y="[object Uint32Array]",$=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,q=RegExp(V.source),K=RegExp(z.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,se=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="["+xe+"]",Ce="["+ke+"]",Ie="["+Se+"]",Oe="\\d+",Le="["+Pe+"]",Ne="["+Ae+"]",Me="[^"+xe+ke+Oe+Pe+Ae+Ee+"]",De="\\ud83c[\\udffb-\\udfff]",Re="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Ee+"]",Ue="\\u200d",Ye="(?:"+Ne+"|"+Me+")",$e="(?:"+je+"|"+Me+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Ie+"|"+De+")?",ze="["+Te+"]?",qe=ze+Ve+"(?:"+Ue+"(?:"+[Re,Be,Fe].join("|")+")"+ze+Ve+")*",Ke="(?:"+[Le,Be,Fe].join("|")+")"+qe,Ge="(?:"+[Re+Ie+"?",Ie,Be,Fe,_e].join("|")+")",Je=RegExp("['’]","g"),Xe=RegExp(Ie,"g"),Ze=RegExp(De+"(?="+De+")|"+Ge+qe,"g"),Qe=RegExp([je+"?"+Ne+"+"+He+"(?="+[Ce,je,"$"].join("|")+")",$e+"+"+We+"(?="+[Ce,je+Ye,"$"].join("|")+")",je+"?"+Ye+"+"+He,je+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Ke].join("|"),"g"),et=RegExp("["+Ue+xe+Se+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,st={};st[N]=st[M]=st[D]=st[R]=st[B]=st[F]=st[j]=st[U]=st[Y]=!0,st[m]=st[y]=st[O]=st[g]=st[L]=st[v]=st[b]=st[w]=st[S]=st[P]=st[A]=st[T]=st[k]=st[_]=st[I]=!1;var it={};it[m]=it[y]=it[O]=it[L]=it[g]=it[v]=it[N]=it[M]=it[D]=it[R]=it[B]=it[S]=it[P]=it[A]=it[T]=it[k]=it[_]=it[C]=it[F]=it[j]=it[U]=it[Y]=!0,it[b]=it[w]=it[I]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,ct=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ut||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ft=dt&&dt.exports===pt,mt=ft&<.process,yt=function(){try{return dt&&dt.require&&dt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,vt=yt&&yt.isDate,bt=yt&&yt.isMap,wt=yt&&yt.isRegExp,xt=yt&&yt.isSet,St=yt&&yt.isTypedArray;function Pt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var s=-1,i=null==e?0:e.length;++s<i;){var a=e[s];t(r,a,n(a),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function _t(e,t){for(var n=-1,r=null==e?0:e.length,s=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[s++]=a)}return i}function Ct(e,t){return!(null==e||!e.length)&&jt(e,t,0)>-1}function It(e,t,n){for(var r=-1,s=null==e?0:e.length;++r<s;)if(n(t,e[r]))return!0;return!1}function Ot(e,t){for(var n=-1,r=null==e?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}function Lt(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function Nt(e,t,n,r){var s=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++s]);++s<i;)n=t(n,e[s],s,e);return n}function Mt(e,t,n,r){var s=null==e?0:e.length;for(r&&s&&(n=e[--s]);s--;)n=t(n,e[s],s,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Ht("length");function Bt(e,t,n){var r;return n(e,(function(e,n,s){if(t(e,n,s))return r=n,!1})),r}function Ft(e,t,n,r){for(var s=e.length,i=n+(r?1:-1);r?i--:++i<s;)if(t(e[i],i,e))return i;return-1}function jt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,Yt,n)}function Ut(e,t,n,r){for(var s=n-1,i=e.length;++s<i;)if(r(e[s],t))return s;return-1}function Yt(e){return e!=e}function $t(e,t){var n=null==e?0:e.length;return n?zt(e,t)/n:p}function Ht(e){return function(t){return null==t?s:t[e]}}function Wt(e){return function(t){return null==e?s:e[t]}}function Vt(e,t,n,r,s){return s(e,(function(e,s,i){n=r?(r=!1,e):t(n,e,s,i)})),n}function zt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==s&&(n=n===s?a:n+a)}return n}function qt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Gt(e){return function(t){return e(t)}}function Jt(e,t){return Ot(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&jt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&jt(t,e[n],0)>-1;);return n}var en=Wt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function an(e,t){return function(n){return e(t(n))}}function on(e,t){for(var n=-1,r=e.length,s=0,i=[];++n<r;){var a=e[n];a!==t&&a!==o||(e[n]=o,i[s++]=n)}return i}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function un(e){return rn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function hn(e){return rn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var dn=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),fn=function e(t){var n,r=(t=null==t?ht:fn.defaults(ht.Object(),t,fn.pick(ht,nt))).Array,se=t.Date,xe=t.Error,Se=t.Function,Pe=t.Math,Ae=t.Object,Ee=t.RegExp,Te=t.String,ke=t.TypeError,_e=r.prototype,Ce=Se.prototype,Ie=Ae.prototype,Oe=t["__core-js_shared__"],Le=Ce.toString,Ne=Ie.hasOwnProperty,Me=0,De=(n=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Ie.toString,Be=Le.call(Ae),Fe=ht._,je=Ee("^"+Le.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?t.Buffer:s,Ye=t.Symbol,$e=t.Uint8Array,He=Ue?Ue.allocUnsafe:s,We=an(Ae.getPrototypeOf,Ae),Ve=Ae.create,ze=Ie.propertyIsEnumerable,qe=_e.splice,Ke=Ye?Ye.isConcatSpreadable:s,Ge=Ye?Ye.iterator:s,Ze=Ye?Ye.toStringTag:s,et=function(){try{var e=ci(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,lt=se&&se.now!==ht.Date.now&&se.now,ut=t.setTimeout!==ht.setTimeout&&t.setTimeout,pt=Pe.ceil,dt=Pe.floor,mt=Ae.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:s,Rt=t.isFinite,Wt=_e.join,mn=an(Ae.keys,Ae),yn=Pe.max,gn=Pe.min,vn=se.now,bn=t.parseInt,wn=Pe.random,xn=_e.reverse,Sn=ci(t,"DataView"),Pn=ci(t,"Map"),An=ci(t,"Promise"),En=ci(t,"Set"),Tn=ci(t,"WeakMap"),kn=ci(Ae,"create"),_n=Tn&&new Tn,Cn={},In=Ri(Sn),On=Ri(Pn),Ln=Ri(An),Nn=Ri(En),Mn=Ri(Tn),Dn=Ye?Ye.prototype:s,Rn=Dn?Dn.valueOf:s,Bn=Dn?Dn.toString:s;function Fn(e){if(Qa(e)&&!$a(e)&&!(e instanceof $n)){if(e instanceof Yn)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Yn(e)}var jn=function(){function e(){}return function(t){if(!Za(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=s,n}}();function Un(){}function Yn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Kn(e,t){var n=$a(e),r=!n&&Ya(e),s=!n&&!r&&za(e),i=!n&&!r&&!s&&oo(e),a=n||r||s||i,o=a?qt(e.length,Te):[],c=o.length;for(var l in e)!t&&!Ne.call(e,l)||a&&("length"==l||s&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||mi(l,c))||o.push(l);return o}function Gn(e){var t=e.length;return t?e[Vr(0,t-1)]:s}function Jn(e,t){return Oi(Ts(e),ir(t,0,e.length))}function Xn(e){return Oi(Ts(e))}function Zn(e,t,n){(n!==s&&!Fa(e[t],n)||n===s&&!(t in e))&&rr(e,t,n)}function Qn(e,t,n){var r=e[t];Ne.call(e,t)&&Fa(r,n)&&(n!==s||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function tr(e,t,n,r){return ur(e,(function(e,s,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&ks(t,Io(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var n=-1,i=t.length,a=r(i),o=null==e;++n<i;)a[n]=o?s:Eo(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==s&&(e=e<=n?e:n),t!==s&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var o,c=1&t,l=2&t,u=4&t;if(n&&(o=i?n(e,r,i,a):n(e)),o!==s)return o;if(!Za(e))return e;var h=$a(e);if(h){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return Ts(e,o)}else{var p=hi(e),d=p==w||p==x;if(za(e))return ws(e,c);if(p==A||p==m||d&&!i){if(o=l||d?{}:di(e),!c)return l?function(e,t){return ks(e,ui(e),t)}(e,function(e,t){return e&&ks(t,Oo(t),e)}(o,e)):function(e,t){return ks(e,li(e),t)}(e,nr(o,e))}else{if(!it[p])return i?e:{};o=function(e,t,n){var r,s=e.constructor;switch(t){case O:return xs(e);case g:case v:return new s(+e);case L:return function(e,t){var n=t?xs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case M:case D:case R:case B:case F:case j:case U:case Y:return Ss(e,n);case S:return new s;case P:case _:return new s(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new s;case C:return r=e,Rn?Ae(Rn.call(r)):{}}}(e,p,c)}}a||(a=new qn);var f=a.get(e);if(f)return f;a.set(e,o),so(e)?e.forEach((function(r){o.add(ar(r,t,n,r,e,a))})):eo(e)&&e.forEach((function(r,s){o.set(s,ar(r,t,n,s,e,a))}));var y=h?s:(u?l?ti:ei:l?Oo:Io)(e);return Et(y||e,(function(r,s){y&&(r=e[s=r]),Qn(o,s,ar(r,t,n,s,e,a))})),o}function or(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var i=n[r],a=t[i],o=e[i];if(o===s&&!(i in e)||!a(o))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new ke(i);return ki((function(){e.apply(s,n)}),t)}function lr(e,t,n,r){var s=-1,i=Ct,a=!0,o=e.length,c=[],l=t.length;if(!o)return c;n&&(t=Ot(t,Gt(n))),r?(i=It,a=!1):t.length>=200&&(i=Xt,a=!1,t=new zn(t));e:for(;++s<o;){var u=e[s],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var p=l;p--;)if(t[p]===h)continue e;c.push(u)}else i(t,h,r)||c.push(u)}return c}Fn.templateSettings={escape:G,evaluate:J,interpolate:X,variable:"",imports:{_:Fn}},Fn.prototype=Un.prototype,Fn.prototype.constructor=Fn,Yn.prototype=jn(Un.prototype),Yn.prototype.constructor=Yn,$n.prototype=jn(Un.prototype),$n.prototype.constructor=$n,Hn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===a?s:n}return Ne.call(t,e)?t[e]:s},Hn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==s:Ne.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===s?a:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?s:t[n][1]},Wn.prototype.has=function(e){return er(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Pn||Wn),string:new Hn}},Vn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ai(this,e).get(e)},Vn.prototype.has=function(e){return ai(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ai(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},zn.prototype.add=zn.prototype.push=function(e){return this.__data__.set(e,a),this},zn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Wn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!Pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var ur=Is(vr),hr=Is(br,!0);function pr(e,t){var n=!0;return ur(e,(function(e,r,s){return n=!!t(e,r,s)})),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(null!=o&&(c===s?o==o&&!ao(o):n(o,c)))var c=o,l=a}return l}function fr(e,t){var n=[];return ur(e,(function(e,r,s){t(e,r,s)&&n.push(e)})),n}function mr(e,t,n,r,s){var i=-1,a=e.length;for(n||(n=fi),s||(s=[]);++i<a;){var o=e[i];t>0&&n(o)?t>1?mr(o,t-1,n,r,s):Lt(s,o):r||(s[s.length]=o)}return s}var yr=Os(),gr=Os(!0);function vr(e,t){return e&&yr(e,t,Io)}function br(e,t){return e&&gr(e,t,Io)}function wr(e,t){return _t(t,(function(t){return Ga(e[t])}))}function xr(e,t){for(var n=0,r=(t=ys(t,e)).length;null!=e&&n<r;)e=e[Di(t[n++])];return n&&n==r?e:s}function Sr(e,t,n){var r=t(e);return $a(e)?r:Lt(r,n(e))}function Pr(e){return null==e?e===s?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Ne.call(e,Ze),n=e[Ze];try{e[Ze]=s;var r=!0}catch(e){}var i=Re.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),i}(e):function(e){return Re.call(e)}(e)}function Ar(e,t){return e>t}function Er(e,t){return null!=e&&Ne.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function kr(e,t,n){for(var i=n?It:Ct,a=e[0].length,o=e.length,c=o,l=r(o),u=1/0,h=[];c--;){var p=e[c];c&&t&&(p=Ot(p,Gt(t))),u=gn(p.length,u),l[c]=!n&&(t||a>=120&&p.length>=120)?new zn(c&&p):s}p=e[0];var d=-1,f=l[0];e:for(;++d<a&&h.length<u;){var m=p[d],y=t?t(m):m;if(m=n||0!==m?m:0,!(f?Xt(f,y):i(h,y,n))){for(c=o;--c;){var g=l[c];if(!(g?Xt(g,y):i(e[c],y,n)))continue e}f&&f.push(y),h.push(m)}}return h}function _r(e,t,n){var r=null==(e=Ai(e,t=ys(t,e)))?e:e[Di(Ki(t))];return null==r?s:Pt(r,e,n)}function Cr(e){return Qa(e)&&Pr(e)==m}function Ir(e,t,n,r,i){return e===t||(null==e||null==t||!Qa(e)&&!Qa(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var o=$a(e),c=$a(t),l=o?y:hi(e),u=c?y:hi(t),h=(l=l==m?A:l)==A,p=(u=u==m?A:u)==A,d=l==u;if(d&&za(e)){if(!za(t))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new qn),o||oo(e)?Zs(e,t,n,r,i,a):function(e,t,n,r,s,i,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!i(new $e(e),new $e(t)));case g:case v:case P:return Fa(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case _:return e==t+"";case S:var o=sn;case k:var c=1&r;if(o||(o=cn),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var u=Zs(o(e),o(t),r,s,i,a);return a.delete(e),u;case C:if(Rn)return Rn.call(e)==Rn.call(t)}return!1}(e,t,l,n,r,i,a);if(!(1&n)){var f=h&&Ne.call(e,"__wrapped__"),w=p&&Ne.call(t,"__wrapped__");if(f||w){var x=f?e.value():e,E=w?t.value():t;return a||(a=new qn),i(x,E,n,r,a)}}return!!d&&(a||(a=new qn),function(e,t,n,r,i,a){var o=1&n,c=ei(e),l=c.length;if(l!=ei(t).length&&!o)return!1;for(var u=l;u--;){var h=c[u];if(!(o?h in t:Ne.call(t,h)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=o;++u<l;){var y=e[h=c[u]],g=t[h];if(r)var v=o?r(g,y,h,t,e,a):r(y,g,h,e,t,a);if(!(v===s?y===g||i(y,g,n,r,a):v)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,i,a))}(e,t,n,r,Ir,i))}function Or(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=Ae(e);i--;){var c=n[i];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var l=(c=n[i])[0],u=e[l],h=c[1];if(o&&c[2]){if(u===s&&!(l in e))return!1}else{var p=new qn;if(r)var d=r(u,h,l,e,t,p);if(!(d===s?Ir(h,u,3,r,p):d))return!1}}return!0}function Lr(e){return!(!Za(e)||(t=e,De&&De in t))&&(Ga(e)?je:me).test(Ri(e));var t}function Nr(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?$a(e)?Fr(e[0],e[1]):Br(e):hc(e)}function Mr(e){if(!wi(e))return mn(e);var t=[];for(var n in Ae(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function Rr(e,t){var n=-1,s=Wa(e)?r(e.length):[];return ur(e,(function(e,r,i){s[++n]=t(e,r,i)})),s}function Br(e){var t=oi(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Or(n,e,t)}}function Fr(e,t){return gi(e)&&xi(t)?Si(Di(e),t):function(n){var r=Eo(n,e);return r===s&&r===t?To(n,e):Ir(t,r,3)}}function jr(e,t,n,r,i){e!==t&&yr(t,(function(a,o){if(i||(i=new qn),Za(a))!function(e,t,n,r,i,a,o){var c=Ei(e,n),l=Ei(t,n),u=o.get(l);if(u)Zn(e,n,u);else{var h=a?a(c,l,n+"",e,t,o):s,p=h===s;if(p){var d=$a(l),f=!d&&za(l),m=!d&&!f&&oo(l);h=l,d||f||m?$a(c)?h=c:Va(c)?h=Ts(c):f?(p=!1,h=ws(l,!0)):m?(p=!1,h=Ss(l,!0)):h=[]:no(l)||Ya(l)?(h=c,Ya(c)?h=yo(c):Za(c)&&!Ga(c)||(h=di(l))):p=!1}p&&(o.set(l,h),i(h,l,r,a,o),o.delete(l)),Zn(e,n,h)}}(e,t,o,n,jr,r,i);else{var c=r?r(Ei(e,o),a,o+"",e,t,i):s;c===s&&(c=a),Zn(e,o,c)}}),Oo)}function Ur(e,t){var n=e.length;if(n)return mi(t+=t<0?n:0,n)?e[t]:s}function Yr(e,t,n){t=t.length?Ot(t,(function(e){return $a(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[nc];var r=-1;t=Ot(t,Gt(ii()));var s=Rr(e,(function(e,n,s){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,s=e.criteria,i=t.criteria,a=s.length,o=n.length;++r<a;){var c=Ps(s[r],i[r]);if(c)return r>=o?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(s)}function $r(e,t,n){for(var r=-1,s=t.length,i={};++r<s;){var a=t[r],o=xr(e,a);n(o,a)&&Jr(i,ys(a,e),o)}return i}function Hr(e,t,n,r){var s=r?Ut:jt,i=-1,a=t.length,o=e;for(e===t&&(t=Ts(t)),n&&(o=Ot(e,Gt(n)));++i<a;)for(var c=0,l=t[i],u=n?n(l):l;(c=s(o,u,c,r))>-1;)o!==e&&qe.call(o,c,1),qe.call(e,c,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var s=t[n];if(n==r||s!==i){var i=s;mi(s)?qe.call(e,s,1):cs(e,s)}}return e}function Vr(e,t){return e+dt(wn()*(t-e+1))}function zr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return _i(Pi(e,t,nc),e+"")}function Kr(e){return Gn(jo(e))}function Gr(e,t){var n=jo(e);return Oi(n,ir(t,0,n.length))}function Jr(e,t,n,r){if(!Za(e))return e;for(var i=-1,a=(t=ys(t,e)).length,o=a-1,c=e;null!=c&&++i<a;){var l=Di(t[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var h=c[l];(u=r?r(h,l,c):s)===s&&(u=Za(h)?h:mi(t[i+1])?[]:{})}Qn(c,l,u),c=c[l]}return e}var Xr=_n?function(e,t){return _n.set(e,t),e}:nc,Zr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Qo(t),writable:!0})}:nc;function Qr(e){return Oi(jo(e))}function es(e,t,n){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++s<i;)a[s]=e[s+t];return a}function ts(e,t){var n;return ur(e,(function(e,r,s){return!(n=t(e,r,s))})),!!n}function ns(e,t,n){var r=0,s=null==e?r:e.length;if("number"==typeof t&&t==t&&s<=2147483647){for(;r<s;){var i=r+s>>>1,a=e[i];null!==a&&!ao(a)&&(n?a<=t:a<t)?r=i+1:s=i}return s}return rs(e,t,nc,n)}function rs(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,c=null===t,l=ao(t),u=t===s;i<a;){var h=dt((i+a)/2),p=n(e[h]),d=p!==s,f=null===p,m=p==p,y=ao(p);if(o)var g=r||m;else g=u?m&&(r||d):c?m&&d&&(r||!f):l?m&&d&&!f&&(r||!y):!f&&!y&&(r?p<=t:p<t);g?i=h+1:a=h}return gn(a,4294967294)}function ss(e,t){for(var n=-1,r=e.length,s=0,i=[];++n<r;){var a=e[n],o=t?t(a):a;if(!n||!Fa(o,c)){var c=o;i[s++]=0===a?0:a}}return i}function is(e){return"number"==typeof e?e:ao(e)?p:+e}function as(e){if("string"==typeof e)return e;if($a(e))return Ot(e,as)+"";if(ao(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function os(e,t,n){var r=-1,s=Ct,i=e.length,a=!0,o=[],c=o;if(n)a=!1,s=It;else if(i>=200){var l=t?null:zs(e);if(l)return cn(l);a=!1,s=Xt,c=new zn}else c=t?[]:o;e:for(;++r<i;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue e;t&&c.push(h),o.push(u)}else s(c,h,n)||(c!==o&&c.push(h),o.push(u))}return o}function cs(e,t){return null==(e=Ai(e,t=ys(t,e)))||delete e[Di(Ki(t))]}function ls(e,t,n,r){return Jr(e,t,n(xr(e,t)),r)}function us(e,t,n,r){for(var s=e.length,i=r?s:-1;(r?i--:++i<s)&&t(e[i],i,e););return n?es(e,r?0:i,r?i+1:s):es(e,r?i+1:0,r?s:i)}function hs(e,t){var n=e;return n instanceof $n&&(n=n.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function ps(e,t,n){var s=e.length;if(s<2)return s?os(e[0]):[];for(var i=-1,a=r(s);++i<s;)for(var o=e[i],c=-1;++c<s;)c!=i&&(a[i]=lr(a[i]||o,e[c],t,n));return os(mr(a,1),t,n)}function ds(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var c=r<a?t[r]:s;n(o,e[r],c)}return o}function fs(e){return Va(e)?e:[]}function ms(e){return"function"==typeof e?e:nc}function ys(e,t){return $a(e)?e:gi(e,t)?[e]:Mi(go(e))}var gs=qr;function vs(e,t,n){var r=e.length;return n=n===s?r:n,!t&&n>=r?e:es(e,t,n)}var bs=at||function(e){return ht.clearTimeout(e)};function ws(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function xs(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ss(e,t){var n=t?xs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ps(e,t){if(e!==t){var n=e!==s,r=null===e,i=e==e,a=ao(e),o=t!==s,c=null===t,l=t==t,u=ao(t);if(!c&&!u&&!a&&e>t||a&&o&&l&&!c&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||c&&n&&i||!o&&i||!l)return-1}return 0}function As(e,t,n,s){for(var i=-1,a=e.length,o=n.length,c=-1,l=t.length,u=yn(a-o,0),h=r(l+u),p=!s;++c<l;)h[c]=t[c];for(;++i<o;)(p||i<a)&&(h[n[i]]=e[i]);for(;u--;)h[c++]=e[i++];return h}function Es(e,t,n,s){for(var i=-1,a=e.length,o=-1,c=n.length,l=-1,u=t.length,h=yn(a-c,0),p=r(h+u),d=!s;++i<h;)p[i]=e[i];for(var f=i;++l<u;)p[f+l]=t[l];for(;++o<c;)(d||i<a)&&(p[f+n[o]]=e[i++]);return p}function Ts(e,t){var n=-1,s=e.length;for(t||(t=r(s));++n<s;)t[n]=e[n];return t}function ks(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var c=t[a],l=r?r(n[c],e[c],c,n,e):s;l===s&&(l=e[c]),i?rr(n,c,l):Qn(n,c,l)}return n}function _s(e,t){return function(n,r){var s=$a(n)?At:tr,i=t?t():{};return s(n,e,ii(r,2),i)}}function Cs(e){return qr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:s,o=i>2?n[2]:s;for(a=e.length>3&&"function"==typeof a?(i--,a):s,o&&yi(n[0],n[1],o)&&(a=i<3?s:a,i=1),t=Ae(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))}function Is(e,t){return function(n,r){if(null==n)return n;if(!Wa(n))return e(n,r);for(var s=n.length,i=t?s:-1,a=Ae(n);(t?i--:++i<s)&&!1!==r(a[i],i,a););return n}}function Os(e){return function(t,n,r){for(var s=-1,i=Ae(t),a=r(t),o=a.length;o--;){var c=a[e?o:++s];if(!1===n(i[c],c,i))break}return t}}function Ls(e){return function(t){var n=rn(t=go(t))?hn(t):s,r=n?n[0]:t.charAt(0),i=n?vs(n,1).join(""):t.slice(1);return r[e]()+i}}function Ns(e){return function(t){return Nt(Jo($o(t).replace(Je,"")),e,"")}}function Ms(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Ds(e){return function(t,n,r){var i=Ae(t);if(!Wa(t)){var a=ii(n,3);t=Io(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:s}}function Rs(e){return Qs((function(t){var n=t.length,r=n,a=Yn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ke(i);if(a&&!c&&"wrapper"==ri(o))var c=new Yn([],!0)}for(r=c?r:n;++r<n;){var l=ri(o=t[r]),u="wrapper"==l?ni(o):s;c=u&&vi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ri(u[0])].apply(c,u[3]):1==o.length&&vi(o)?c[l]():c.thru(o)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&$a(r))return c.plant(r).value();for(var s=0,i=n?t[s].apply(this,e):r;++s<n;)i=t[s].call(this,i);return i}}))}function Bs(e,t,n,i,a,o,c,u,h,p){var d=t&l,f=1&t,m=2&t,y=24&t,g=512&t,v=m?s:Ms(e);return function l(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(y)var S=si(l),P=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,S);if(i&&(w=As(w,i,a,y)),o&&(w=Es(w,o,c,y)),b-=P,y&&b<p){var A=on(w,S);return Ws(e,t,Bs,l.placeholder,n,w,A,u,h,p-b)}var E=f?n:this,T=m?E[e]:e;return b=w.length,u?w=function(e,t){for(var n=e.length,r=gn(t.length,n),i=Ts(e);r--;){var a=t[r];e[r]=mi(a,n)?i[a]:s}return e}(w,u):g&&b>1&&w.reverse(),d&&h<b&&(w.length=h),this&&this!==ht&&this instanceof l&&(T=v||Ms(T)),T.apply(E,w)}}function Fs(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,s,i){t(r,n(e),s,i)})),r}(n,e,t(r),{})}}function js(e,t){return function(n,r){var i;if(n===s&&r===s)return t;if(n!==s&&(i=n),r!==s){if(i===s)return r;"string"==typeof n||"string"==typeof r?(n=as(n),r=as(r)):(n=is(n),r=is(r)),i=e(n,r)}return i}}function Us(e){return Qs((function(t){return t=Ot(t,Gt(ii())),qr((function(n){var r=this;return e(t,(function(e){return Pt(e,r,n)}))}))}))}function Ys(e,t){var n=(t=t===s?" ":as(t)).length;if(n<2)return n?zr(t,e):t;var r=zr(t,pt(e/un(t)));return rn(t)?vs(hn(r),0,e).join(""):r.slice(0,e)}function $s(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=s),t=ho(t),n===s?(n=t,t=0):n=ho(n),function(e,t,n,s){for(var i=-1,a=yn(pt((t-e)/(n||1)),0),o=r(a);a--;)o[s?a:++i]=e,e+=n;return o}(t,n,i=i===s?t<n?1:-1:ho(i),e)}}function Hs(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=mo(t),n=mo(n)),e(t,n)}}function Ws(e,t,n,r,i,a,o,l,u,h){var p=8&t;t|=p?c:64,4&(t&=~(p?64:c))||(t&=-4);var d=[e,t,i,p?a:s,p?o:s,p?s:a,p?s:o,l,u,h],f=n.apply(s,d);return vi(e)&&Ti(f,d),f.placeholder=r,Ci(f,e,t)}function Vs(e){var t=Pe[e];return function(e,n){if(e=mo(e),(n=null==n?0:gn(po(n),292))&&Rt(e)){var r=(go(e)+"e").split("e");return+((r=(go(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var zs=En&&1/cn(new En([,-0]))[1]==u?function(e){return new En(e)}:oc;function qs(e){return function(t){var n=hi(t);return n==S?sn(t):n==k?ln(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ks(e,t,n,a,u,h,p,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(i);var m=a?a.length:0;if(m||(t&=-97,a=u=s),p=p===s?p:yn(po(p),0),d=d===s?d:po(d),m-=u?u.length:0,64&t){var y=a,g=u;a=u=s}var v=f?s:ni(e),b=[e,t,n,a,u,y,g,h,p,d];if(v&&function(e,t){var n=e[1],r=t[1],s=n|r,i=s<131,a=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],s|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?As(u,c,t[4]):c,e[4]=u?on(e[3],o):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Es(u,c,t[6]):c,e[6]=u?on(e[5],o):t[6]),(c=t[7])&&(e[7]=c),r&l&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=s}(b,v),e=b[0],t=b[1],n=b[2],a=b[3],u=b[4],!(d=b[9]=b[9]===s?f?0:e.length:yn(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Ms(e);return function a(){for(var o=arguments.length,c=r(o),l=o,u=si(a);l--;)c[l]=arguments[l];var h=o<3&&c[0]!==u&&c[o-1]!==u?[]:on(c,u);return(o-=h.length)<n?Ws(e,t,Bs,a.placeholder,s,c,h,s,s,n-o):Pt(this&&this!==ht&&this instanceof a?i:e,this,c)}}(e,t,d):t!=c&&33!=t||u.length?Bs.apply(s,b):function(e,t,n,s){var i=1&t,a=Ms(e);return function t(){for(var o=-1,c=arguments.length,l=-1,u=s.length,h=r(u+c),p=this&&this!==ht&&this instanceof t?a:e;++l<u;)h[l]=s[l];for(;c--;)h[l++]=arguments[++o];return Pt(p,i?n:this,h)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,s=Ms(e);return function t(){return(this&&this!==ht&&this instanceof t?s:e).apply(r?n:this,arguments)}}(e,t,n);return Ci((v?Xr:Ti)(w,b),e,t)}function Gs(e,t,n,r){return e===s||Fa(e,Ie[n])&&!Ne.call(r,n)?t:e}function Js(e,t,n,r,i,a){return Za(e)&&Za(t)&&(a.set(t,e),jr(e,t,s,Js,a),a.delete(t)),e}function Xs(e){return no(e)?s:e}function Zs(e,t,n,r,i,a){var o=1&n,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var p=-1,d=!0,f=2&n?new zn:s;for(a.set(e,t),a.set(t,e);++p<c;){var m=e[p],y=t[p];if(r)var g=o?r(y,m,p,t,e,a):r(m,y,p,e,t,a);if(g!==s){if(g)continue;d=!1;break}if(f){if(!Dt(t,(function(e,t){if(!Xt(f,t)&&(m===e||i(m,e,n,r,a)))return f.push(t)}))){d=!1;break}}else if(m!==y&&!i(m,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Qs(e){return _i(Pi(e,s,Hi),e+"")}function ei(e){return Sr(e,Io,li)}function ti(e){return Sr(e,Oo,ui)}var ni=_n?function(e){return _n.get(e)}:oc;function ri(e){for(var t=e.name+"",n=Cn[t],r=Ne.call(Cn,t)?n.length:0;r--;){var s=n[r],i=s.func;if(null==i||i==e)return s.name}return t}function si(e){return(Ne.call(Fn,"placeholder")?Fn:e).placeholder}function ii(){var e=Fn.iteratee||rc;return e=e===rc?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function oi(e){for(var t=Io(e),n=t.length;n--;){var r=t[n],s=e[r];t[n]=[r,s,xi(s)]}return t}function ci(e,t){var n=function(e,t){return null==e?s:e[t]}(e,t);return Lr(n)?n:s}var li=mt?function(e){return null==e?[]:(e=Ae(e),_t(mt(e),(function(t){return ze.call(e,t)})))}:fc,ui=mt?function(e){for(var t=[];e;)Lt(t,li(e)),e=We(e);return t}:fc,hi=Pr;function pi(e,t,n){for(var r=-1,s=(t=ys(t,e)).length,i=!1;++r<s;){var a=Di(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=s?i:!!(s=null==e?0:e.length)&&Xa(s)&&mi(a,s)&&($a(e)||Ya(e))}function di(e){return"function"!=typeof e.constructor||wi(e)?{}:jn(We(e))}function fi(e){return $a(e)||Ya(e)||!!(Ke&&e&&e[Ke])}function mi(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?Wa(n)&&mi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function gi(e,t){if($a(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ao(e))||Q.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function vi(e){var t=ri(e),n=Fn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=ni(n);return!!r&&e===r[0]}(Sn&&hi(new Sn(new ArrayBuffer(1)))!=L||Pn&&hi(new Pn)!=S||An&&hi(An.resolve())!=E||En&&hi(new En)!=k||Tn&&hi(new Tn)!=I)&&(hi=function(e){var t=Pr(e),n=t==A?e.constructor:s,r=n?Ri(n):"";if(r)switch(r){case In:return L;case On:return S;case Ln:return E;case Nn:return k;case Mn:return I}return t});var bi=Oe?Ga:mc;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function xi(e){return e==e&&!Za(e)}function Si(e,t){return function(n){return null!=n&&n[e]===t&&(t!==s||e in Ae(n))}}function Pi(e,t,n){return t=yn(t===s?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=yn(s.length-t,0),o=r(a);++i<a;)o[i]=s[t+i];i=-1;for(var c=r(t+1);++i<t;)c[i]=s[i];return c[t]=n(o),Pt(e,this,c)}}function Ai(e,t){return t.length<2?e:xr(e,es(t,0,-1))}function Ei(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ti=Ii(Xr),ki=ut||function(e,t){return ht.setTimeout(e,t)},_i=Ii(Zr);function Ci(e,t,n){var r=t+"";return _i(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(f,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(oe):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Oi(e,t){var n=-1,r=e.length,i=r-1;for(t=t===s?r:t;++n<t;){var a=Vr(n,i),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Li,Ni,Mi=(Li=La((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,s){t.push(r?s.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Ni.size&&Ni.clear(),e})),Ni=Li.cache,Li);function Di(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ri(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bi(e){if(e instanceof $n)return e.clone();var t=new Yn(e.__wrapped__,e.__chain__);return t.__actions__=Ts(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=qr((function(e,t){return Va(e)?lr(e,mr(t,1,Va,!0)):[]})),ji=qr((function(e,t){var n=Ki(t);return Va(n)&&(n=s),Va(e)?lr(e,mr(t,1,Va,!0),ii(n,2)):[]})),Ui=qr((function(e,t){var n=Ki(t);return Va(n)&&(n=s),Va(e)?lr(e,mr(t,1,Va,!0),s,n):[]}));function Yi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=null==n?0:po(n);return s<0&&(s=yn(r+s,0)),Ft(e,ii(t,3),s)}function $i(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==s&&(i=po(n),i=n<0?yn(r+i,0):gn(i,r-1)),Ft(e,ii(t,3),i,!0)}function Hi(e){return null!=e&&e.length?mr(e,1):[]}function Wi(e){return e&&e.length?e[0]:s}var Vi=qr((function(e){var t=Ot(e,fs);return t.length&&t[0]===e[0]?kr(t):[]})),zi=qr((function(e){var t=Ki(e),n=Ot(e,fs);return t===Ki(n)?t=s:n.pop(),n.length&&n[0]===e[0]?kr(n,ii(t,2)):[]})),qi=qr((function(e){var t=Ki(e),n=Ot(e,fs);return(t="function"==typeof t?t:s)&&n.pop(),n.length&&n[0]===e[0]?kr(n,s,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:s}var Gi=qr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Xi=Qs((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return Wr(e,Ot(t,(function(e){return mi(e,n)?+e:e})).sort(Ps)),r}));function Zi(e){return null==e?e:xn.call(e)}var Qi=qr((function(e){return os(mr(e,1,Va,!0))})),ea=qr((function(e){var t=Ki(e);return Va(t)&&(t=s),os(mr(e,1,Va,!0),ii(t,2))})),ta=qr((function(e){var t=Ki(e);return t="function"==typeof t?t:s,os(mr(e,1,Va,!0),s,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Va(e))return t=yn(e.length,t),!0})),qt(t,(function(t){return Ot(e,Ht(t))}))}function ra(e,t){if(!e||!e.length)return[];var n=na(e);return null==t?n:Ot(n,(function(e){return Pt(t,s,e)}))}var sa=qr((function(e,t){return Va(e)?lr(e,t):[]})),ia=qr((function(e){return ps(_t(e,Va))})),aa=qr((function(e){var t=Ki(e);return Va(t)&&(t=s),ps(_t(e,Va),ii(t,2))})),oa=qr((function(e){var t=Ki(e);return t="function"==typeof t?t:s,ps(_t(e,Va),s,t)})),ca=qr(na),la=qr((function(e){var t=e.length,n=t>1?e[t-1]:s;return n="function"==typeof n?(e.pop(),n):s,ra(e,n)}));function ua(e){var t=Fn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=Qs((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof $n&&mi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:s}),new Yn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(s),e}))):this.thru(i)})),da=_s((function(e,t,n){Ne.call(e,n)?++e[n]:rr(e,n,1)})),fa=Ds(Yi),ma=Ds($i);function ya(e,t){return($a(e)?Et:ur)(e,ii(t,3))}function ga(e,t){return($a(e)?Tt:hr)(e,ii(t,3))}var va=_s((function(e,t,n){Ne.call(e,n)?e[n].push(t):rr(e,n,[t])})),ba=qr((function(e,t,n){var s=-1,i="function"==typeof t,a=Wa(e)?r(e.length):[];return ur(e,(function(e){a[++s]=i?Pt(t,e,n):_r(e,t,n)})),a})),wa=_s((function(e,t,n){rr(e,n,t)}));function xa(e,t){return($a(e)?Ot:Rr)(e,ii(t,3))}var Sa=_s((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Pa=qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Yr(e,mr(t,1),[])})),Aa=lt||function(){return ht.Date.now()};function Ea(e,t,n){return t=n?s:t,t=e&&null==t?e.length:t,Ks(e,l,s,s,s,s,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new ke(i);return e=po(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=s),n}}var ka=qr((function(e,t,n){var r=1;if(n.length){var s=on(n,si(ka));r|=c}return Ks(e,r,t,n,s)})),_a=qr((function(e,t,n){var r=3;if(n.length){var s=on(n,si(_a));r|=c}return Ks(t,r,e,n,s)}));function Ca(e,t,n){var r,a,o,c,l,u,h=0,p=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(i);function m(t){var n=r,i=a;return r=a=s,h=t,c=e.apply(i,n)}function y(e){var n=e-u;return u===s||n>=t||n<0||d&&e-h>=o}function g(){var e=Aa();if(y(e))return v(e);l=ki(g,function(e){var n=t-(e-u);return d?gn(n,o-(e-h)):n}(e))}function v(e){return l=s,f&&r?m(e):(r=a=s,c)}function b(){var e=Aa(),n=y(e);if(r=arguments,a=this,u=e,n){if(l===s)return function(e){return h=e,l=ki(g,t),p?m(e):c}(u);if(d)return bs(l),l=ki(g,t),m(u)}return l===s&&(l=ki(g,t)),c}return t=mo(t)||0,Za(n)&&(p=!!n.leading,o=(d="maxWait"in n)?yn(mo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==s&&bs(l),h=0,r=u=a=l=s},b.flush=function(){return l===s?c:v(Aa())},b}var Ia=qr((function(e,t){return cr(e,1,t)})),Oa=qr((function(e,t,n){return cr(e,mo(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(i);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var a=e.apply(this,r);return n.cache=i.set(s,a)||i,a};return n.cache=new(La.Cache||Vn),n}function Na(e){if("function"!=typeof e)throw new ke(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Vn;var Ma=gs((function(e,t){var n=(t=1==t.length&&$a(t[0])?Ot(t[0],Gt(ii())):Ot(mr(t,1),Gt(ii()))).length;return qr((function(r){for(var s=-1,i=gn(r.length,n);++s<i;)r[s]=t[s].call(this,r[s]);return Pt(e,this,r)}))})),Da=qr((function(e,t){var n=on(t,si(Da));return Ks(e,c,s,t,n)})),Ra=qr((function(e,t){var n=on(t,si(Ra));return Ks(e,64,s,t,n)})),Ba=Qs((function(e,t){return Ks(e,256,s,s,s,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var ja=Hs(Ar),Ua=Hs((function(e,t){return e>=t})),Ya=Cr(function(){return arguments}())?Cr:function(e){return Qa(e)&&Ne.call(e,"callee")&&!ze.call(e,"callee")},$a=r.isArray,Ha=gt?Gt(gt):function(e){return Qa(e)&&Pr(e)==O};function Wa(e){return null!=e&&Xa(e.length)&&!Ga(e)}function Va(e){return Qa(e)&&Wa(e)}var za=yt||mc,qa=vt?Gt(vt):function(e){return Qa(e)&&Pr(e)==v};function Ka(e){if(!Qa(e))return!1;var t=Pr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!no(e)}function Ga(e){if(!Za(e))return!1;var t=Pr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==po(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Qa(e){return null!=e&&"object"==typeof e}var eo=bt?Gt(bt):function(e){return Qa(e)&&hi(e)==S};function to(e){return"number"==typeof e||Qa(e)&&Pr(e)==P}function no(e){if(!Qa(e)||Pr(e)!=A)return!1;var t=We(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==Be}var ro=wt?Gt(wt):function(e){return Qa(e)&&Pr(e)==T},so=xt?Gt(xt):function(e){return Qa(e)&&hi(e)==k};function io(e){return"string"==typeof e||!$a(e)&&Qa(e)&&Pr(e)==_}function ao(e){return"symbol"==typeof e||Qa(e)&&Pr(e)==C}var oo=St?Gt(St):function(e){return Qa(e)&&Xa(e.length)&&!!st[Pr(e)]},co=Hs(Dr),lo=Hs((function(e,t){return e<=t}));function uo(e){if(!e)return[];if(Wa(e))return io(e)?hn(e):Ts(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=hi(e);return(t==S?sn:t==k?cn:jo)(e)}function ho(e){return e?(e=mo(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),n=t%1;return t==t?n?t-n:t:0}function fo(e){return e?ir(po(e),0,d):0}function mo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=fe.test(e);return n||ye.test(e)?ct(e.slice(2),n?2:8):de.test(e)?p:+e}function yo(e){return ks(e,Oo(e))}function go(e){return null==e?"":as(e)}var vo=Cs((function(e,t){if(wi(t)||Wa(t))ks(t,Io(t),e);else for(var n in t)Ne.call(t,n)&&Qn(e,n,t[n])})),bo=Cs((function(e,t){ks(t,Oo(t),e)})),wo=Cs((function(e,t,n,r){ks(t,Oo(t),e,r)})),xo=Cs((function(e,t,n,r){ks(t,Io(t),e,r)})),So=Qs(sr),Po=qr((function(e,t){e=Ae(e);var n=-1,r=t.length,i=r>2?t[2]:s;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=Oo(a),c=-1,l=o.length;++c<l;){var u=o[c],h=e[u];(h===s||Fa(h,Ie[u])&&!Ne.call(e,u))&&(e[u]=a[u])}return e})),Ao=qr((function(e){return e.push(s,Js),Pt(No,s,e)}));function Eo(e,t,n){var r=null==e?s:xr(e,t);return r===s?n:r}function To(e,t){return null!=e&&pi(e,t,Tr)}var ko=Fs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=n}),Qo(nc)),_o=Fs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),ii),Co=qr(_r);function Io(e){return Wa(e)?Kn(e):Mr(e)}function Oo(e){return Wa(e)?Kn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=wi(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}(e)}var Lo=Cs((function(e,t,n){jr(e,t,n)})),No=Cs((function(e,t,n,r){jr(e,t,n,r)})),Mo=Qs((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=ys(t,e),r||(r=t.length>1),t})),ks(e,ti(e),n),r&&(n=ar(n,7,Xs));for(var s=t.length;s--;)cs(n,t[s]);return n})),Do=Qs((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return To(e,n)}))}(e,t)}));function Ro(e,t){if(null==e)return{};var n=Ot(ti(e),(function(e){return[e]}));return t=ii(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var Bo=qs(Io),Fo=qs(Oo);function jo(e){return null==e?[]:Jt(e,Io(e))}var Uo=Ns((function(e,t,n){return t=t.toLowerCase(),e+(n?Yo(t):t)}));function Yo(e){return Go(go(e).toLowerCase())}function $o(e){return(e=go(e))&&e.replace(ve,en).replace(Xe,"")}var Ho=Ns((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wo=Ns((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Vo=Ls("toLowerCase"),zo=Ns((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),qo=Ns((function(e,t,n){return e+(n?" ":"")+Go(t)})),Ko=Ns((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Go=Ls("toUpperCase");function Jo(e,t,n){return e=go(e),(t=n?s:t)===s?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xo=qr((function(e,t){try{return Pt(e,s,t)}catch(e){return Ka(e)?e:new xe(e)}})),Zo=Qs((function(e,t){return Et(t,(function(t){t=Di(t),rr(e,t,ka(e[t],e))})),e}));function Qo(e){return function(){return e}}var ec=Rs(),tc=Rs(!0);function nc(e){return e}function rc(e){return Nr("function"==typeof e?e:ar(e,1))}var sc=qr((function(e,t){return function(n){return _r(n,e,t)}})),ic=qr((function(e,t){return function(n){return _r(e,n,t)}}));function ac(e,t,n){var r=Io(t),s=wr(t,r);null!=n||Za(t)&&(s.length||!r.length)||(n=t,t=e,e=this,s=wr(t,Io(t)));var i=!(Za(n)&&"chain"in n&&!n.chain),a=Ga(e);return Et(s,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Ts(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function oc(){}var cc=Us(Ot),lc=Us(kt),uc=Us(Dt);function hc(e){return gi(e)?Ht(Di(e)):function(e){return function(t){return xr(t,e)}}(e)}var pc=$s(),dc=$s(!0);function fc(){return[]}function mc(){return!1}var yc,gc=js((function(e,t){return e+t}),0),vc=Vs("ceil"),bc=js((function(e,t){return e/t}),1),wc=Vs("floor"),xc=js((function(e,t){return e*t}),1),Sc=Vs("round"),Pc=js((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new ke(i);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ea,Fn.assign=vo,Fn.assignIn=bo,Fn.assignInWith=wo,Fn.assignWith=xo,Fn.at=So,Fn.before=Ta,Fn.bind=ka,Fn.bindAll=Zo,Fn.bindKey=_a,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},Fn.chain=ua,Fn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===s)?1:yn(po(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,c=r(pt(i/t));a<i;)c[o++]=es(e,a,a+=t);return c},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,s=[];++t<n;){var i=e[t];i&&(s[r++]=i)}return s},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],s=e;s--;)t[s-1]=arguments[s];return Lt($a(n)?Ts(n):[n],mr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=ii();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new ke(i);return[n(e[0]),e[1]]})):[],qr((function(n){for(var r=-1;++r<t;){var s=e[r];if(Pt(s[0],this,n))return Pt(s[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Io(e);return function(n){return or(n,e,t)}}(ar(e,1))},Fn.constant=Qo,Fn.countBy=da,Fn.create=function(e,t){var n=jn(e);return null==t?n:nr(n,t)},Fn.curry=function e(t,n,r){var i=Ks(t,8,s,s,s,s,s,n=r?s:n);return i.placeholder=e.placeholder,i},Fn.curryRight=function e(t,n,r){var i=Ks(t,16,s,s,s,s,s,n=r?s:n);return i.placeholder=e.placeholder,i},Fn.debounce=Ca,Fn.defaults=Po,Fn.defaultsDeep=Ao,Fn.defer=Ia,Fn.delay=Oa,Fn.difference=Fi,Fn.differenceBy=ji,Fn.differenceWith=Ui,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?es(e,(t=n||t===s?1:po(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?es(e,0,(t=r-(t=n||t===s?1:po(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!0):[]},Fn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=po(n))<0&&(n=-n>i?0:i+n),(r=r===s||r>i?i:po(r))<0&&(r+=i),r=n>r?0:fo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return($a(e)?_t:fr)(e,ii(t,3))},Fn.flatMap=function(e,t){return mr(xa(e,t),1)},Fn.flatMapDeep=function(e,t){return mr(xa(e,t),u)},Fn.flatMapDepth=function(e,t,n){return n=n===s?1:po(n),mr(xa(e,t),n)},Fn.flatten=Hi,Fn.flattenDeep=function(e){return null!=e&&e.length?mr(e,u):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===s?1:po(t)):[]},Fn.flip=function(e){return Ks(e,512)},Fn.flow=ec,Fn.flowRight=tc,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var s=e[t];r[s[0]]=s[1]}return r},Fn.functions=function(e){return null==e?[]:wr(e,Io(e))},Fn.functionsIn=function(e){return null==e?[]:wr(e,Oo(e))},Fn.groupBy=va,Fn.initial=function(e){return null!=e&&e.length?es(e,0,-1):[]},Fn.intersection=Vi,Fn.intersectionBy=zi,Fn.intersectionWith=qi,Fn.invert=ko,Fn.invertBy=_o,Fn.invokeMap=ba,Fn.iteratee=rc,Fn.keyBy=wa,Fn.keys=Io,Fn.keysIn=Oo,Fn.map=xa,Fn.mapKeys=function(e,t){var n={};return t=ii(t,3),vr(e,(function(e,r,s){rr(n,t(e,r,s),e)})),n},Fn.mapValues=function(e,t){var n={};return t=ii(t,3),vr(e,(function(e,r,s){rr(n,r,t(e,r,s))})),n},Fn.matches=function(e){return Br(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=La,Fn.merge=Lo,Fn.mergeWith=No,Fn.method=sc,Fn.methodOf=ic,Fn.mixin=ac,Fn.negate=Na,Fn.nthArg=function(e){return e=po(e),qr((function(t){return Ur(t,e)}))},Fn.omit=Mo,Fn.omitBy=function(e,t){return Ro(e,Na(ii(t)))},Fn.once=function(e){return Ta(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(n=r?s:n)||(n=null==n?[]:[n]),Yr(e,t,n))},Fn.over=cc,Fn.overArgs=Ma,Fn.overEvery=lc,Fn.overSome=uc,Fn.partial=Da,Fn.partialRight=Ra,Fn.partition=Sa,Fn.pick=Do,Fn.pickBy=Ro,Fn.property=hc,Fn.propertyOf=function(e){return function(t){return null==e?s:xr(e,t)}},Fn.pull=Gi,Fn.pullAll=Ji,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,ii(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,s,n):e},Fn.pullAt=Xi,Fn.range=pc,Fn.rangeRight=dc,Fn.rearg=Ba,Fn.reject=function(e,t){return($a(e)?_t:fr)(e,Na(ii(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,s=[],i=e.length;for(t=ii(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),s.push(r))}return Wr(e,s),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new ke(i);return qr(e,t=t===s?t:po(t))},Fn.reverse=Zi,Fn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===s)?1:po(t),($a(e)?Jn:Gr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:s,null==e?e:Jr(e,t,n,r)},Fn.shuffle=function(e){return($a(e)?Xn:Qr)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:po(t),n=n===s?r:po(n)),es(e,t,n)):[]},Fn.sortBy=Pa,Fn.sortedUniq=function(e){return e&&e.length?ss(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?ss(e,ii(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=s),(n=n===s?d:n>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!ro(t))&&!(t=as(t))&&rn(e)?vs(hn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new ke(i);return t=null==t?0:yn(po(t),0),qr((function(n){var r=n[t],s=vs(n,0,t);return r&&Lt(s,r),Pt(e,this,s)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?es(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?es(e,0,(t=n||t===s?1:po(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?es(e,(t=r-(t=n||t===s?1:po(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?us(e,ii(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,s=!0;if("function"!=typeof e)throw new ke(i);return Za(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Ca(e,t,{leading:r,maxWait:t,trailing:s})},Fn.thru=ha,Fn.toArray=uo,Fn.toPairs=Bo,Fn.toPairsIn=Fo,Fn.toPath=function(e){return $a(e)?Ot(e,Di):ao(e)?[e]:Ts(Mi(go(e)))},Fn.toPlainObject=yo,Fn.transform=function(e,t,n){var r=$a(e),s=r||za(e)||oo(e);if(t=ii(t,4),null==n){var i=e&&e.constructor;n=s?r?new i:[]:Za(e)&&Ga(i)?jn(We(e)):{}}return(s?Et:vr)(e,(function(e,r,s){return t(n,e,r,s)})),n},Fn.unary=function(e){return Ea(e,1)},Fn.union=Qi,Fn.unionBy=ea,Fn.unionWith=ta,Fn.uniq=function(e){return e&&e.length?os(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?os(e,ii(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:s,e&&e.length?os(e,s,t):[]},Fn.unset=function(e,t){return null==e||cs(e,t)},Fn.unzip=na,Fn.unzipWith=ra,Fn.update=function(e,t,n){return null==e?e:ls(e,t,ms(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:s,null==e?e:ls(e,t,ms(n),r)},Fn.values=jo,Fn.valuesIn=function(e){return null==e?[]:Jt(e,Oo(e))},Fn.without=sa,Fn.words=Jo,Fn.wrap=function(e,t){return Da(ms(t),e)},Fn.xor=ia,Fn.xorBy=aa,Fn.xorWith=oa,Fn.zip=ca,Fn.zipObject=function(e,t){return ds(e||[],t||[],Qn)},Fn.zipObjectDeep=function(e,t){return ds(e||[],t||[],Jr)},Fn.zipWith=la,Fn.entries=Bo,Fn.entriesIn=Fo,Fn.extend=bo,Fn.extendWith=wo,ac(Fn,Fn),Fn.add=gc,Fn.attempt=Xo,Fn.camelCase=Uo,Fn.capitalize=Yo,Fn.ceil=vc,Fn.clamp=function(e,t,n){return n===s&&(n=t,t=s),n!==s&&(n=(n=mo(n))==n?n:0),t!==s&&(t=(t=mo(t))==t?t:0),ir(mo(e),t,n)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:s)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:s)},Fn.conformsTo=function(e,t){return null==t||or(e,t,Io(t))},Fn.deburr=$o,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bc,Fn.endsWith=function(e,t,n){e=go(e),t=as(t);var r=e.length,i=n=n===s?r:ir(po(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Fn.eq=Fa,Fn.escape=function(e){return(e=go(e))&&K.test(e)?e.replace(z,tn):e},Fn.escapeRegExp=function(e){return(e=go(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=$a(e)?kt:pr;return n&&yi(e,t,n)&&(t=s),r(e,ii(t,3))},Fn.find=fa,Fn.findIndex=Yi,Fn.findKey=function(e,t){return Bt(e,ii(t,3),vr)},Fn.findLast=ma,Fn.findLastIndex=$i,Fn.findLastKey=function(e,t){return Bt(e,ii(t,3),br)},Fn.floor=wc,Fn.forEach=ya,Fn.forEachRight=ga,Fn.forIn=function(e,t){return null==e?e:yr(e,ii(t,3),Oo)},Fn.forInRight=function(e,t){return null==e?e:gr(e,ii(t,3),Oo)},Fn.forOwn=function(e,t){return e&&vr(e,ii(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,ii(t,3))},Fn.get=Eo,Fn.gt=ja,Fn.gte=Ua,Fn.has=function(e,t){return null!=e&&pi(e,t,Er)},Fn.hasIn=To,Fn.head=Wi,Fn.identity=nc,Fn.includes=function(e,t,n,r){e=Wa(e)?e:jo(e),n=n&&!r?po(n):0;var s=e.length;return n<0&&(n=yn(s+n,0)),io(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&jt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=null==n?0:po(n);return s<0&&(s=yn(r+s,0)),jt(e,t,s)},Fn.inRange=function(e,t,n){return t=ho(t),n===s?(n=t,t=0):n=ho(n),function(e,t,n){return e>=gn(t,n)&&e<yn(t,n)}(e=mo(e),t,n)},Fn.invoke=Co,Fn.isArguments=Ya,Fn.isArray=$a,Fn.isArrayBuffer=Ha,Fn.isArrayLike=Wa,Fn.isArrayLikeObject=Va,Fn.isBoolean=function(e){return!0===e||!1===e||Qa(e)&&Pr(e)==g},Fn.isBuffer=za,Fn.isDate=qa,Fn.isElement=function(e){return Qa(e)&&1===e.nodeType&&!no(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||za(e)||oo(e)||Ya(e)))return!e.length;var t=hi(e);if(t==S||t==k)return!e.size;if(wi(e))return!Mr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Ir(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:s)?n(e,t):s;return r===s?Ir(e,t,s,n):!!r},Fn.isError=Ka,Fn.isFinite=function(e){return"number"==typeof e&&Rt(e)},Fn.isFunction=Ga,Fn.isInteger=Ja,Fn.isLength=Xa,Fn.isMap=eo,Fn.isMatch=function(e,t){return e===t||Or(e,t,oi(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:s,Or(e,t,oi(t),n)},Fn.isNaN=function(e){return to(e)&&e!=+e},Fn.isNative=function(e){if(bi(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=to,Fn.isObject=Za,Fn.isObjectLike=Qa,Fn.isPlainObject=no,Fn.isRegExp=ro,Fn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=h},Fn.isSet=so,Fn.isString=io,Fn.isSymbol=ao,Fn.isTypedArray=oo,Fn.isUndefined=function(e){return e===s},Fn.isWeakMap=function(e){return Qa(e)&&hi(e)==I},Fn.isWeakSet=function(e){return Qa(e)&&"[object WeakSet]"==Pr(e)},Fn.join=function(e,t){return null==e?"":Wt.call(e,t)},Fn.kebabCase=Ho,Fn.last=Ki,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==s&&(i=(i=po(n))<0?yn(r+i,0):gn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ft(e,Yt,i,!0)},Fn.lowerCase=Wo,Fn.lowerFirst=Vo,Fn.lt=co,Fn.lte=lo,Fn.max=function(e){return e&&e.length?dr(e,nc,Ar):s},Fn.maxBy=function(e,t){return e&&e.length?dr(e,ii(t,2),Ar):s},Fn.mean=function(e){return $t(e,nc)},Fn.meanBy=function(e,t){return $t(e,ii(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nc,Dr):s},Fn.minBy=function(e,t){return e&&e.length?dr(e,ii(t,2),Dr):s},Fn.stubArray=fc,Fn.stubFalse=mc,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xc,Fn.nth=function(e,t){return e&&e.length?Ur(e,po(t)):s},Fn.noConflict=function(){return ht._===this&&(ht._=Fe),this},Fn.noop=oc,Fn.now=Aa,Fn.pad=function(e,t,n){e=go(e);var r=(t=po(t))?un(e):0;if(!t||r>=t)return e;var s=(t-r)/2;return Ys(dt(s),n)+e+Ys(pt(s),n)},Fn.padEnd=function(e,t,n){e=go(e);var r=(t=po(t))?un(e):0;return t&&r<t?e+Ys(t-r,n):e},Fn.padStart=function(e,t,n){e=go(e);var r=(t=po(t))?un(e):0;return t&&r<t?Ys(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(go(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=s),n===s&&("boolean"==typeof t?(n=t,t=s):"boolean"==typeof e&&(n=e,e=s)),e===s&&t===s?(e=0,t=1):(e=ho(e),t===s?(t=e,e=0):t=ho(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return gn(e+i*(t-e+ot("1e-"+((i+"").length-1))),t)}return Vr(e,t)},Fn.reduce=function(e,t,n){var r=$a(e)?Nt:Vt,s=arguments.length<3;return r(e,ii(t,4),n,s,ur)},Fn.reduceRight=function(e,t,n){var r=$a(e)?Mt:Vt,s=arguments.length<3;return r(e,ii(t,4),n,s,hr)},Fn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===s)?1:po(t),zr(go(e),t)},Fn.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,i=(t=ys(t,e)).length;for(i||(i=1,e=s);++r<i;){var a=null==e?s:e[Di(t[r])];a===s&&(r=i,a=n),e=Ga(a)?a.call(e):a}return e},Fn.round=Sc,Fn.runInContext=e,Fn.sample=function(e){return($a(e)?Gn:Kr)(e)},Fn.size=function(e){if(null==e)return 0;if(Wa(e))return io(e)?un(e):e.length;var t=hi(e);return t==S||t==k?e.size:Mr(e).length},Fn.snakeCase=zo,Fn.some=function(e,t,n){var r=$a(e)?Dt:ts;return n&&yi(e,t,n)&&(t=s),r(e,ii(t,3))},Fn.sortedIndex=function(e,t){return ns(e,t)},Fn.sortedIndexBy=function(e,t,n){return rs(e,t,ii(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ns(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ns(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return rs(e,t,ii(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ns(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Fn.startCase=qo,Fn.startsWith=function(e,t,n){return e=go(e),n=null==n?0:ir(po(n),0,e.length),t=as(t),e.slice(n,n+t.length)==t},Fn.subtract=Pc,Fn.sum=function(e){return e&&e.length?zt(e,nc):0},Fn.sumBy=function(e,t){return e&&e.length?zt(e,ii(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&yi(e,t,n)&&(t=s),e=go(e),t=wo({},t,r,Gs);var i,a,o=wo({},t.imports,r.imports,Gs),c=Io(o),l=Jt(o,c),u=0,h=t.interpolate||be,p="__p += '",d=Ee((t.escape||be).source+"|"+h.source+"|"+(h===X?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),f="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,(function(t,n,r,s,o,c){return r||(r=s),p+=e.slice(u,c).replace(we,nn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),o&&(a=!0,p+="';\n"+o+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace($,""):p).replace(H,"$1").replace(W,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Xo((function(){return Se(c,f+"return "+p).apply(s,l)}));if(y.source=p,Ka(y))throw y;return y},Fn.times=function(e,t){if((e=po(e))<1||e>h)return[];var n=d,r=gn(e,d);t=ii(t),e-=d;for(var s=qt(r,t);++n<e;)t(n);return s},Fn.toFinite=ho,Fn.toInteger=po,Fn.toLength=fo,Fn.toLower=function(e){return go(e).toLowerCase()},Fn.toNumber=mo,Fn.toSafeInteger=function(e){return e?ir(po(e),-9007199254740991,h):0===e?e:0},Fn.toString=go,Fn.toUpper=function(e){return go(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=go(e))&&(n||t===s))return Kt(e);if(!e||!(t=as(t)))return e;var r=hn(e),i=hn(t);return vs(r,Zt(r,i),Qt(r,i)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=go(e))&&(n||t===s))return e.slice(0,pn(e)+1);if(!e||!(t=as(t)))return e;var r=hn(e);return vs(r,0,Qt(r,hn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=go(e))&&(n||t===s))return e.replace(re,"");if(!e||!(t=as(t)))return e;var r=hn(e);return vs(r,Zt(r,hn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(Za(t)){var i="separator"in t?t.separator:i;n="length"in t?po(t.length):n,r="omission"in t?as(t.omission):r}var a=(e=go(e)).length;if(rn(e)){var o=hn(e);a=o.length}if(n>=a)return e;var c=n-un(r);if(c<1)return r;var l=o?vs(o,0,c).join(""):e.slice(0,c);if(i===s)return l+r;if(o&&(c+=l.length-c),ro(i)){if(e.slice(c).search(i)){var u,h=l;for(i.global||(i=Ee(i.source,go(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;l=l.slice(0,p===s?c:p)}}else if(e.indexOf(as(i),c)!=c){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Fn.unescape=function(e){return(e=go(e))&&q.test(e)?e.replace(V,dn):e},Fn.uniqueId=function(e){var t=++Me;return go(e)+t},Fn.upperCase=Ko,Fn.upperFirst=Go,Fn.each=ya,Fn.eachRight=ga,Fn.first=Wi,ac(Fn,(yc={},vr(Fn,(function(e,t){Ne.call(Fn.prototype,t)||(yc[t]=e)})),yc),{chain:!1}),Fn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),Et(["drop","take"],(function(e,t){$n.prototype[e]=function(n){n=n===s?1:yn(po(n),0);var r=this.__filtered__&&!t?new $n(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(nc)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=qr((function(e,t){return"function"==typeof e?new $n(this):this.map((function(n){return _r(n,e,t)}))})),$n.prototype.reject=function(e){return this.filter(Na(ii(e)))},$n.prototype.slice=function(e,t){e=po(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $n(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==s&&(n=(t=po(t))<0?n.dropRight(-t):n.take(t-e)),n)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(d)},vr($n.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,c=t instanceof $n,l=o[0],u=c||$a(t),h=function(e){var t=i.apply(Fn,Lt([e],o));return r&&p?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&u){t=m?t:new $n(this);var y=e.apply(t,o);return y.__actions__.push({func:ha,args:[h],thisArg:s}),new Yn(y,p)}return f&&m?e.apply(this,o):(y=this.thru(h),f?r?y.value()[0]:y.value():y)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var s=this.value();return t.apply($a(s)?s:[],e)}return this[n]((function(n){return t.apply($a(n)?n:[],e)}))}})),vr($n.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Ne.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Bs(s,2).name]=[{name:"wrapper",func:s}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ts(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ts(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ts(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$a(e),r=t<0,s=n?e.length:0,i=function(e,t,n){for(var r=-1,s=n.length;++r<s;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,s,this.__views__),a=i.start,o=i.end,c=o-a,l=r?o:a-1,u=this.__iteratees__,h=u.length,p=0,d=gn(c,this.__takeCount__);if(!n||!r&&s==c&&d==c)return hs(e,this.__actions__);var f=[];e:for(;c--&&p<d;){for(var m=-1,y=e[l+=t];++m<h;){var g=u[m],v=g.iteratee,b=g.type,w=v(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}f[p++]=y}return f},Fn.prototype.at=pa,Fn.prototype.chain=function(){return ua(this)},Fn.prototype.commit=function(){return new Yn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===s&&(this.__values__=uo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?s:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Un;){var r=Bi(n);r.__index__=0,r.__values__=s,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Zi],thisArg:s}),new Yn(t,this.__chain__)}return this.thru(Zi)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return hs(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ge&&(Fn.prototype[Ge]=function(){return this}),Fn}();ht._=fn,(r=function(){return fn}.call(t,n,t,e))===s||(e.exports=r)}.call(this)},5417:(e,t,n)=>{"use strict";var r=n(1796),s=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},5506:(e,t,n)=>{"use strict";var r=n(3780),s=n(1796),i=n(9348),a=n(9590),o=n(2846),c=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=/[\x85\u2028\u2029]/,h=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function y(e){return 9===e||32===e}function g(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function w(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var S=new Array(256),P=new Array(256),A=0;A<256;A++)S[A]=w(A)?1:0,P[A]=w(A);function E(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||o,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function T(e,t){return new s(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function k(e,t){throw T(e,t)}function _(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}var C={YAML:function(e,t,n){var r,s,i;null!==e.version&&k(e,"duplication of %YAML directive"),1!==n.length&&k(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&k(e,"ill-formed argument of the YAML directive"),s=parseInt(r[1],10),i=parseInt(r[2],10),1!==s&&k(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&_(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,s;2!==n.length&&k(e,"TAG directive accepts exactly two arguments"),r=n[0],s=n[1],p.test(r)||k(e,"ill-formed tag handle (first argument) of the TAG directive"),c.call(e.tagMap,r)&&k(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(s)||k(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=s}};function I(e,t,n,r){var s,i,a,o;if(t<n){if(o=e.input.slice(t,n),r)for(s=0,i=o.length;s<i;s+=1)9===(a=o.charCodeAt(s))||32<=a&&a<=1114111||k(e,"expected valid JSON character");else l.test(o)&&k(e,"the stream contains non-printable characters");e.result+=o}}function O(e,t,n,s){var i,a,o,l;for(r.isObject(n)||k(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,l=(i=Object.keys(n)).length;o<l;o+=1)a=i[o],c.call(t,a)||(t[a]=n[a],s[a]=!0)}function L(e,t,n,r,s,i,a,o){var l,u;if(Array.isArray(s))for(l=0,u=(s=Array.prototype.slice.call(s)).length;l<u;l+=1)Array.isArray(s[l])&&k(e,"nested arrays are not supported inside keys"),"object"==typeof s&&"[object Object]"===f(s[l])&&(s[l]="[object Object]");if("object"==typeof s&&"[object Object]"===f(s)&&(s="[object Object]"),s=String(s),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(i))for(l=0,u=i.length;l<u;l+=1)O(e,t,i[l],n);else O(e,t,i,n);else e.json||c.call(n,s)||!c.call(t,s)||(e.line=a||e.line,e.position=o||e.position,k(e,"duplicated mapping key")),t[s]=i,delete n[s];return t}function N(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):k(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function M(e,t,n){for(var r=0,s=e.input.charCodeAt(e.position);0!==s;){for(;y(s);)s=e.input.charCodeAt(++e.position);if(t&&35===s)do{s=e.input.charCodeAt(++e.position)}while(10!==s&&13!==s&&0!==s);if(!m(s))break;for(N(e),s=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&_(e,"deficient indentation"),r}function D(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!g(t)))}function R(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function B(e,t){var n,r,s=e.tag,i=e.anchor,a=[],o=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&g(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),M(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)k(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=s,e.anchor=i,e.kind="sequence",e.result=a,!0)}function F(e){var t,n,r,s,i=!1,a=!1;if(33!==(s=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&k(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,i){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&62!==s);e.position<e.length?(r=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):k(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!g(s);)33===s&&(a?k(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),p.test(n)||k(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),h.test(r)&&k(e,"tag suffix cannot contain flow indicator characters")}return r&&!d.test(r)&&k(e,"tag name cannot contain such characters: "+r),i?e.tag=r:c.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:k(e,'undeclared tag handle "'+n+'"'),!0}function j(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&k(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!g(n)&&!v(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function U(e,t,n,s,i){var a,o,l,u,h,p,d,f,w=1,A=!1,E=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=l=4===n||3===n,s&&M(e,!0,-1)&&(A=!0,e.lineIndent>t?w=1:e.lineIndent===t?w=0:e.lineIndent<t&&(w=-1)),1===w)for(;F(e)||j(e);)M(e,!0,-1)?(A=!0,l=a,e.lineIndent>t?w=1:e.lineIndent===t?w=0:e.lineIndent<t&&(w=-1)):l=!1;if(l&&(l=A||i),1!==w&&4!==n||(d=1===n||2===n?t:t+1,f=e.position-e.lineStart,1===w?l&&(B(e,f)||function(e,t,n){var r,s,i,a,o,c=e.tag,l=e.anchor,u={},h={},p=null,d=null,f=null,m=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=u),o=e.input.charCodeAt(e.position);0!==o;){if(r=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==o&&58!==o||!g(r)){if(!U(e,n,2,!1,!0))break;if(e.line===i){for(o=e.input.charCodeAt(e.position);y(o);)o=e.input.charCodeAt(++e.position);if(58===o)g(o=e.input.charCodeAt(++e.position))||k(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(L(e,u,h,p,d,null),p=d=f=null),v=!0,m=!1,s=!1,p=e.tag,d=e.result;else{if(!v)return e.tag=c,e.anchor=l,!0;k(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=c,e.anchor=l,!0;k(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===o?(m&&(L(e,u,h,p,d,null),p=d=f=null),v=!0,m=!0,s=!0):m?(m=!1,s=!0):k(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,o=r;if((e.line===i||e.lineIndent>t)&&(U(e,t,4,!0,s)&&(m?d=e.result:f=e.result),m||(L(e,u,h,p,d,f,i,a),p=d=f=null),M(e,!0,-1),o=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==o)k(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&L(e,u,h,p,d,null),v&&(e.tag=c,e.anchor=l,e.kind="mapping",e.result=u),v}(e,f,d))||function(e,t){var n,r,s,i,a,o,c,l,u,h,p=!0,d=e.tag,f=e.anchor,m={};if(91===(h=e.input.charCodeAt(e.position)))s=93,o=!1,r=[];else{if(123!==h)return!1;s=125,o=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(M(e,!0,t),(h=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=d,e.anchor=f,e.kind=o?"mapping":"sequence",e.result=r,!0;p||k(e,"missed comma between flow collection entries"),u=null,i=a=!1,63===h&&g(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,M(e,!0,t)),n=e.line,U(e,t,1,!1,!0),l=e.tag,c=e.result,M(e,!0,t),h=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==h||(i=!0,h=e.input.charCodeAt(++e.position),M(e,!0,t),U(e,t,1,!1,!0),u=e.result),o?L(e,r,m,l,c,u):i?r.push(L(e,null,m,l,c,u)):r.push(c),M(e,!0,t),44===(h=e.input.charCodeAt(e.position))?(p=!0,h=e.input.charCodeAt(++e.position)):p=!1}k(e,"unexpected end of the stream within a flow collection")}(e,d)?E=!0:(o&&function(e,t){var n,s,i,a,o,c=1,l=!1,u=!1,h=t,p=0,d=!1;if(124===(a=e.input.charCodeAt(e.position)))s=!1;else{if(62!==a)return!1;s=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===c?c=43===a?3:2:k(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(o=a)&&o<=57?o-48:-1)>=0))break;0===i?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?k(e,"repeat of an indentation width identifier"):(h=t+i-1,u=!0)}if(y(a)){do{a=e.input.charCodeAt(++e.position)}while(y(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(N(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<h)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>h&&(h=e.lineIndent),m(a))p++;else{if(e.lineIndent<h){3===c?e.result+=r.repeat("\n",l?1+p:p):1===c&&l&&(e.result+="\n");break}for(s?y(a)?(d=!0,e.result+=r.repeat("\n",l?1+p:p)):d?(d=!1,e.result+=r.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",l?1+p:p),l=!0,u=!0,p=0,n=e.position;!m(a)&&0!==a;)a=e.input.charCodeAt(++e.position);I(e,n,e.position,!1)}}return!0}(e,d)||function(e,t){var n,r,s;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=s=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(I(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,s=e.position}else m(n)?(I(e,r,s,!0),R(e,M(e,!1,t)),r=s=e.position):e.position===e.lineStart&&D(e)?k(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);k(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,r,s,i,a,o,c;if(34!==(o=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return I(e,n,e.position,!0),e.position++,!0;if(92===o){if(I(e,n,e.position,!0),m(o=e.input.charCodeAt(++e.position)))M(e,!1,t);else if(o<256&&S[o])e.result+=P[o],e.position++;else if((a=120===(c=o)?2:117===c?4:85===c?8:0)>0){for(s=a,i=0;s>0;s--)(a=b(o=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:k(e,"expected hexadecimal character");e.result+=x(i),e.position++}else k(e,"unknown escape sequence");n=r=e.position}else m(o)?(I(e,n,r,!0),R(e,M(e,!1,t)),n=r=e.position):e.position===e.lineStart&&D(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?E=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!g(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),c.call(e.anchorMap,n)||k(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],M(e,!0,-1),!0}(e)?(E=!0,null===e.tag&&null===e.anchor||k(e,"alias node should not have any properties")):function(e,t,n){var r,s,i,a,o,c,l,u,h=e.kind,p=e.result;if(g(u=e.input.charCodeAt(e.position))||v(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(g(r=e.input.charCodeAt(e.position+1))||n&&v(r)))return!1;for(e.kind="scalar",e.result="",s=i=e.position,a=!1;0!==u;){if(58===u){if(g(r=e.input.charCodeAt(e.position+1))||n&&v(r))break}else if(35===u){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&D(e)||n&&v(u))break;if(m(u)){if(o=e.line,c=e.lineStart,l=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=c,e.lineIndent=l;break}}a&&(I(e,s,i,!1),R(e,e.line-o),s=i=e.position,a=!1),y(u)||(i=e.position+1),u=e.input.charCodeAt(++e.position)}return I(e,s,i,!1),!!e.result||(e.kind=h,e.result=p,!1)}(e,d,1===n)&&(E=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(E=l&&B(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&k(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,h=e.implicitTypes.length;u<h;u+=1)if((p=e.implicitTypes[u]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else c.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&p.kind!==e.kind&&k(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):k(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||E}function Y(e){var t,n,r,s,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(M(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(a=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!g(s);)s=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&k(e,"directive name must not be less than one character in length");0!==s;){for(;y(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!m(s));break}if(m(s))break;for(t=e.position;0!==s&&!g(s);)s=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==s&&N(e),c.call(C,n)?C[n](e,n,r):_(e,'unknown document directive "'+n+'"')}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):a&&k(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&u.test(e.input.slice(i,e.position))&&_(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&D(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position<e.length-1&&k(e,"end of the stream or a document separator is expected")}function $(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new E(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,k(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Y(n);return n.documents}function H(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=$(e,n);if("function"!=typeof t)return r;for(var s=0,i=r.length;s<i;s+=1)t(r[s])}function W(e,t){var n=$(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new s("expected a single document in the stream, but found more")}}e.exports.loadAll=H,e.exports.load=W,e.exports.safeLoadAll=function(e,t,n){return"object"==typeof t&&null!==t&&void 0===n&&(n=t,t=null),H(e,t,r.extend({schema:a},n))},e.exports.safeLoad=function(e,t){return W(e,r.extend({schema:a},t))}},5580:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6758),s=n.n(r),i=n(935),a=n.n(i)()(s());a.push([e.id,":host{display:flex;flex-direction:column;align-items:center;padding:48px 32px}:host([hidden]){display:none}.icon{color:var(--color-error);font-size:72px;margin-bottom:24px}.icon svg{display:block}.title{color:var(--antd-heading-color);font-size:24px;line-height:1.8}.description{color:var(--antd-text-color-secondary);font-size:14px;line-height:1.6;text-align:center}.actions{margin-top:1em}",""]);const o=a.toString()},5702:(e,t,n)=>{"use strict";n.r(t),n.d(t,{supply:()=>a});var r=n(1030),s=n(1916),i=n(5285);function a(e,t,n){const r={};for(const s of e)if(!Object.prototype.hasOwnProperty.call(r,s))if("undefined"===s)r[s]=void 0;else if(t&&Object.prototype.hasOwnProperty.call(t,s))r[s]=t[s];else{const e=u(s,n);void 0!==e&&(r[s]=e)}return r}const o=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),l=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URL","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function u(e,t){switch(e){case"Object":return n=Object,a=["entries","fromEntries","keys","values"],Object.fromEntries(a.map((e=>[e,function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return n[e].apply(n,r)}])));case"_":return Object.fromEntries(Object.entries(r).filter((e=>!o.has(e[0]))).concat(t?[["uniqueId",e=>`${null!=e?e:""}42`]]:[]));case"moment":return Object.assign((function(){return s(...arguments)}),Object.fromEntries(Object.entries(s).filter((e=>!c.has(e[0])))));case"PIPES":return i.pipes;case"TAG_URL":return h(!0);case"SAFE_TAG_URL":return h();default:if(l.has(e))return window[e]}var n,a}function h(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];const i=[];return t.forEach(((t,n)=>{i.push(t),n<r.length&&i.push(e?String(r[n]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(r[n])))})),i.join("")}}},5840:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r=n(4396),s=n(52);if(792==n.j)var i=n(6268);var a=function(e,t){var n=this;this.broadcastChannel=e,this._options=t,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=(0,r.zs)(),this._aplQ=r.o,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var s=function(e){"leader"===e.context&&("death"===e.action&&(n._hasLeader=!1),"tell"===e.action&&(n._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",s),this._lstns.push(s)};function o(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=function(e,t){return e||(e={}),(e=JSON.parse(JSON.stringify(e))).fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}(t,e);var n=(0,r.UU)()?new i._(e,t):new a(e,t);return e._befC.push((function(){return n.die()})),e._leaderElector=n,n}a.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(e){var t=this;return this.isLeader?(0,r.yy)(0,!0):this.isDead?(0,r.yy)(0,!1):this._aplQC>1?this._aplQ:(this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then((function(){return function(){if(t.isLeader)return r.aS;var n,i=!1,a=new Promise((function(e){n=function(){i=!0,e()}})),o=function(e){"leader"===e.context&&e.token!=t.token&&("apply"===e.action&&e.token>t.token&&n(),"tell"===e.action&&(n(),t._hasLeader=!0))};t.broadcastChannel.addEventListener("internal",o);var c=e?4*t._options.responseTime:t._options.responseTime;return(0,s.r)(t,"apply").then((function(){return Promise.race([(0,r.yy)(c),a.then((function(){return Promise.reject(new Error)}))])})).then((function(){return(0,s.r)(t,"apply")})).then((function(){return Promise.race([(0,r.yy)(c),a.then((function(){return Promise.reject(new Error)}))])})).catch((function(){})).then((function(){return t.broadcastChannel.removeEventListener("internal",o),!i&&(0,s.P)(t).then((function(){return!0}))}))}()})).then((function(){t._aplQC=t._aplQC-1})),this._aplQ.then((function(){return t.isLeader})))},awaitLeadership:function(){return this._aLP||(this._aLP=(e=this).isLeader?r.o:new Promise((function(t){var n=!1;function s(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",i),t(!0))}e.applyOnce().then((function(){e.isLeader&&s()})),function t(){return(0,r.yy)(e._options.fallbackInterval).then((function(){if(!e.isDead&&!n)return e.isLeader?void s():e.applyOnce(!0).then((function(){e.isLeader?s():t()}))}))}();var i=function(t){"leader"===t.context&&"death"===t.action&&(e._hasLeader=!1,e.applyOnce().then((function(){e.isLeader&&s()})))};e.broadcastChannel.addEventListener("internal",i),e._lstns.push(i)}))),this._aLP;var e},set onduplicate(e){this._dpL=e},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,s.r)(this,"death")}}},5853:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},5861:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9420))},5986:(e,t,n)=>{"use strict";var r;try{r=n(Object(function(){var e=new Error("Cannot find module 'esprima'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var s=n(5417);e.exports=new s("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",s=r.parse(n,{range:!0}),i=[];if("Program"!==s.type||1!==s.body.length||"ExpressionStatement"!==s.body[0].type||"ArrowFunctionExpression"!==s.body[0].expression.type&&"FunctionExpression"!==s.body[0].expression.type)throw new Error("Failed to resolve function");return s.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=s.body[0].expression.body.range,"BlockStatement"===s.body[0].expression.body.type?new Function(i,n.slice(t[0]+1,t[1]-1)):new Function(i,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},6076:(e,t,n)=>{"use strict";var r=n(3780),s=n(5417),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new s("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,s;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,s=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){s.unshift(parseFloat(e,10))})),t=0,r=1,s.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},6095:(e,t,n)=>{"use strict";n.r(t),n.d(t,{inject:()=>P,transform:()=>S,transformAndInject:()=>A});var r=n(1030),s=n(5285);let i=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),a=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),o=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function c(e){return new RegExp(`(${[].concat(e).map((e=>(0,r.escapeRegExp)(e))).join("|")})\\{`)}function l(e){var t;const n=x(e),r=null===(t=n.match(e.beginPlaceholder))||void 0===t?void 0:t[0],s=r?n.indexOf(r):-1;if(s>=0&&r&&"{"!==n.charAt(s+r.length)){const t=e.cursor+s;s>0&&e.tokens.push({type:a.Raw,value:n.substring(0,s)}),e.tokens.push({type:a.BeginPlaceHolder,loc:{start:t,end:t+r.length},value:r.substring(0,r.length-1)}),e.cursor+=s+r.length,e.status=i.ExpectField}else e.tokens.push({type:a.Raw,value:n}),e.cursor=e.raw.length}function u(e){e.cursor+=x(e).match(/^[ \r\n\t]*/)[0].length}function h(e){const[t]=x(e).match(/^[\w.*[\]\-\u{80}-\u{10FFFF}]*/u);e.tokens.push({type:a.Field,value:t}),e.cursor+=t.length,e.status=i.ExpectOptionalBeginDefault}function p(e){"="===x(e).charAt(0)?(e.tokens.push({type:a.BeginDefault}),e.cursor+=1,e.status=i.ExpectDefaultValue):e.status=i.ExpectOptionalBeginPipe}function d(e){w(e,i.ExpectOptionalBeginPipe)}function f(e){"|"===x(e).charAt(0)?(e.tokens.push({type:a.BeginPipe}),e.cursor+=1,e.status=i.ExpectPipeIdentifier):e.status=i.ExpectPlaceholderEnd}function m(e){const t=x(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error(`Expected a pipe identifier at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);const n=t[0];e.tokens.push({type:a.PipeIdentifier,value:n}),e.cursor+=n.length,e.status=i.ExpectOptionalBeginPipeParameter}function y(e){":"===x(e).charAt(0)?(e.tokens.push({type:a.BeginPipeParameter}),e.cursor+=1,e.status=i.ExpectPipeParameter):e.status=i.ExpectOptionalBeginPipe}function g(e){w(e,i.ExpectOptionalBeginPipeParameter)}function v(e){if("}"!==x(e).charAt(0))throw new Error(`Expected a placeholder end '}' at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:a.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=i.Initial}const b=new Map([["false",!1],["null",null],["true",!0]]);function w(e,t){const n=x(e);if(/[0-9[{"]/.test(n.charAt(0))||/-[0-9]/.test(n.substring(0,2)))!function(e,t){const n=x(e),r=n.charAt(0),s="["===r?o.Array:"{"===r?o.Object:'"'===r?o.String:o.Others;let i=0,c=0,l=0,u=!1,h=!1,p=!1;for(;i<n.length;){const e=n.charAt(i);if(h)h=!1;else if(u)'"'===e?u=!1:"\\"===e&&(h=!0);else switch(e){case"[":l+=1;break;case"{":c+=1;break;case"]":l-=1;break;case"}":c-=1;break;case'"':u=!0}switch(i+=1,s){case o.Array:p=!l;break;case o.Object:p=!c;break;case o.String:p=!u;break;default:p=i<n.length&&/[^a-z0-9E.+-]/.test(n.charAt(i))}if(p)break}if(!p)throw new Error(`Failed to match a JSON value at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:a.JsonValue,value:JSON.parse(n.substring(0,i))}),e.cursor+=i,e.status=t}(e,t);else{const[n]=x(e).match(/^[\w\-\u{80}-\u{10FFFF}]*/u);b.has(n)?e.tokens.push({type:a.JsonValue,value:b.get(n)}):e.tokens.push({type:a.LiteralString,value:n}),e.cursor+=n.length,e.status=t}}function x(e){return e.raw.substring(e.cursor)}function S(e,t){return E(e,"@",t)}function P(e,t){return E(e,"$",t)}function A(e,t){return E(e,["@","$"],t)}function E(e,t,n){if(!function(e,t){return c(t).test(e)}(e,t))return e;const o=(b=n.data,function(e){let t=e.field?(0,r.get)(b,e.field):b;return void 0===t&&(t=e.defaultValue),(0,s.processPipes)(t,e.pipes)});var b;const w=function(e,t){return function(n){var i,a;const o=n.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!o)return t.substring(n.loc.start,n.loc.end);let c,[,l,u]=o;!l&&/^[A-Z_]+$/.test(u)&&(l=u,u="*");const h={SYS:"sys",FLAGS:"flags"};switch(l){case"QUERY":case"query":c="*"===u?e.query:e.query.has(u)?e.query.get(u):void 0;break;case"QUERY_ARRAY":c=e.query.has(u)?e.query.getAll(u):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(n.loc.start,n.loc.end);c="*"===u?e.event:(0,r.get)(e.event,u);break;case"APP":c="*"===u?null!==(i=e.overrideApp)&&void 0!==i?i:e.app:(0,r.get)(null!==(a=e.overrideApp)&&void 0!==a?a:e.app,u);break;case"HASH":c=e.location.hash;break;case"SYS":case"FLAGS":c="*"===u?e[h[l]]:(0,r.get)(e[h[l]],u);break;case"ANCHOR":{const t=e.location.hash?e.location.hash.substr(1):null;c="*"===u?t:(0,r.get)(t,u);break}case"CTX":{const e=t.substring(n.loc.start,n.loc.end);return console.error(`CTX is not supported in placeholder any more: "${e}"`),e}default:if(!e.match)return t.substring(n.loc.start,n.loc.end);c=e.match.params[u]}return void 0===c&&(c=n.defaultValue),(0,s.processPipes)(c,n.pipes)}}(n,e);return x=function(e,t){return function(e){const t={type:"InjectableString",elements:[]};let n;function r(t){return t===e[0].type&&(n=e.shift(),!0)}function s(t){if(n=e.shift(),Array.isArray(t)?!t.includes(n.type):t!==n.type)throw new Error(`Expected token: ${t}, received token: ${n.type}`)}for(;e.length>0;)if(r(a.Raw))t.elements.push({type:"RawString",value:n.value});else{s(a.BeginPlaceHolder);const e=n.loc.start,i=n.value;s(a.Field);const o={type:"Placeholder",symbol:i,field:n.value,defaultValue:void 0,pipes:[],loc:{start:e,end:e}};for(t.elements.push(o),r(a.BeginDefault)&&(s([a.JsonValue,a.LiteralString]),o.defaultValue=n.value);r(a.BeginPipe);){s(a.PipeIdentifier);const e={type:"PipeCall",identifier:n.value,parameters:[]};for(o.pipes.push(e);r(a.BeginPipeParameter);)s([a.JsonValue,a.LiteralString]),e.parameters.push(n.value)}s(a.EndPlaceHolder),o.loc.end=n.loc.end}return t}(function(e,t){const n={beginPlaceholder:c(t),raw:e,cursor:0,status:i.Initial,tokens:[]};for(;n.cursor<e.length;)switch(n.status){case i.Initial:l(n);break;case i.ExpectField:u(n),h(n);break;case i.ExpectOptionalBeginDefault:u(n),p(n);break;case i.ExpectDefaultValue:u(n),d(n);break;case i.ExpectOptionalBeginPipe:u(n),f(n);break;case i.ExpectPipeIdentifier:u(n),m(n);break;case i.ExpectOptionalBeginPipeParameter:u(n),y(n);break;case i.ExpectPipeParameter:u(n),g(n);break;case i.ExpectPlaceholderEnd:u(n),v(n)}if(n.status!==i.Initial)throw new Error("Expected a placeholder end '}' at the end");return n.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?w(e):o(e))),1===x.length?x[0]:x.join("");var x}},6121:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2559);function s(e,t,n){return e.set((0,r.A)(e,t),n),n}},6268:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(4396),s=n(52),i=function(e,t){var n=this;this.broadcastChannel=e,e._befC.push((function(){return n.die()})),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,r.zs)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name};i.prototype={hasLeader:function(){var e=this;return navigator.locks.query().then((function(t){var n=t.held?t.held.filter((function(t){return t.name===e.lN})):[];return!!(n&&n.length>0)}))},awaitLeadership:function(){var e=this;if(!this._wLMP){this._wKMC.c=new AbortController;var t=new Promise((function(t,n){e._wKMC.res=t,e._wKMC.rej=n}));this._wLMP=new Promise((function(n){navigator.locks.request(e.lN,{signal:e._wKMC.c.signal},(function(){return e._wKMC.c=void 0,(0,s.P)(e),n(),t})).catch((function(){}))}))}return this._wLMP},set onduplicate(e){},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),(0,s.r)(this,"death")}}},6319:(e,t,n)=>{"use strict";n.r(t),n.d(t,{i18n:()=>h,i18nText:()=>u,initializeI18n:()=>c});var r=n(5630),s=n(7512),i=n(848);let a=!1;const o=new Set;function c(e,t){if(a||(a=!0,s.i18n.use(i.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&t&&!o.has(e)){o.add(e);for(const[n,r]of Object.entries(t))s.i18n.addResourceBundle(n,e,r)}}var l=n(4113);function u(e){var t;if(!e)return;const n=null!==(t=s.i18n.language)&&void 0!==t?t:"zh-CN";if((0,l.hasOwnProperty)(e,n))return e[n];const r=n.split("-")[0];if(r!==n)return(0,l.hasOwnProperty)(e,r)?e[r]:void 0;const i=`${r}-`;for(const t of Object.keys(e))if(t.startsWith(i))return e[t]}const h=r.default},6384:(e,t,n)=>{"use strict";var r=n(3780),s=n(1796),i=n(2846),a=n(9590),o=Object.prototype.toString,c=Object.prototype.hasOwnProperty,l={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function h(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new s("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+r.repeat("0",i-t.length)+t}function p(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,s,i,a,o,l;if(null===t)return{};for(n={},s=0,i=(r=Object.keys(t)).length;s<i;s+=1)a=r[s],o=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&c.call(l.styleAliases,o)&&(o=l.styleAliases[o]),n[a]=o;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function d(e,t){for(var n,s=r.repeat(" ",t),i=0,a=-1,o="",c=e.length;i<c;)-1===(a=e.indexOf("\n",i))?(n=e.slice(i),i=c):(n=e.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(o+=s),o+=n;return o}function f(e,t){return"\n"+r.repeat(" ",e.indent*t)}function m(e){return 32===e||9===e}function y(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function g(e,t){return y(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&58!==e&&(35!==e||t&&function(e){return y(e)&&!m(e)&&65279!==e&&13!==e&&10!==e}(t))}function v(e){return/^\n* /.test(e)}function b(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==u.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,s){var i,a,o,c,l=!1,u=!1,h=-1!==r,p=-1,d=y(c=e.charCodeAt(0))&&65279!==c&&!m(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!m(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(!y(a=e.charCodeAt(i)))return 5;o=i>0?e.charCodeAt(i-1):null,d=d&&g(a,o)}else{for(i=0;i<e.length;i++){if(10===(a=e.charCodeAt(i)))l=!0,h&&(u=u||i-p-1>r&&" "!==e[p+1],p=i);else if(!y(a))return 5;o=i>0?e.charCodeAt(i-1):null,d=d&&g(a,o)}u=u||h&&i-p-1>r&&" "!==e[p+1]}return l||u?n>9&&v(e)?5:u?4:3:d&&!s(e)?1:2}(t,o,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}))){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+w(t,e.indent)+x(d(t,i));case 4:return">"+w(t,e.indent)+x(d(function(e,t){for(var n,r,s,i=/(\n+)([^\n]*)/g,a=(s=-1!==(s=e.indexOf("\n"))?s:e.length,i.lastIndex=s,S(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];r=i.exec(e);){var c=r[1],l=r[2];n=" "===l[0],a+=c+(o||n||""===l?"":"\n")+S(l,t),o=n}return a}(t,a),i));case 5:return'"'+function(e){for(var t,n,r,s="",i=0;i<e.length;i++)(t=e.charCodeAt(i))>=55296&&t<=56319&&(n=e.charCodeAt(i+1))>=56320&&n<=57343?(s+=h(1024*(t-55296)+n-56320+65536),i++):s+=!(r=l[t])&&y(t)?e[i]:r||h(t);return s}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function w(e,t){var n=v(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var n,r,s=/ [^ ]/g,i=0,a=0,o=0,c="";n=s.exec(e);)(o=n.index)-i>t&&(r=a>i?a:o,c+="\n"+e.slice(i,r),i=r+1),a=o;return c+="\n",e.length-i>t&&a>i?c+=e.slice(i,a)+"\n"+e.slice(a+1):c+=e.slice(i),c.slice(1)}function P(e,t,n){var r,i,a,l,u,h;for(a=0,l=(i=n?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((u=i[a]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=n?u.tag:"?",u.represent){if(h=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===o.call(u.represent))r=u.represent(t,h);else{if(!c.call(u.represent,h))throw new s("!<"+u.tag+'> tag resolver accepts not "'+h+'" style');r=u.represent[h](t,h)}e.dump=r}return!0}return!1}function A(e,t,n,r,i,a){e.tag=null,e.dump=n,P(e,n,!1)||P(e,n,!0);var c=o.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var l,u,h="[object Object]"===c||"[object Array]"===c;if(h&&(u=-1!==(l=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(h&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),"[object Object]"===c)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var i,a,o,c,l,u,h="",p=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)u="",r&&0===i||(u+=f(e,t)),c=n[o=d[i]],A(e,t+1,o,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,l&&(u+=f(e,t)),A(e,t+1,c,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",h+=u+=e.dump));e.tag=p,e.dump=h||"{}"}(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(function(e,t,n){var r,s,i,a,o,c="",l=e.tag,u=Object.keys(n);for(r=0,s=u.length;r<s;r+=1)o="",0!==r&&(o+=", "),e.condenseFlow&&(o+='"'),a=n[i=u[r]],A(e,t,i,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),A(e,t,a,!1,!1)&&(c+=o+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if("[object Array]"===c){var p=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(function(e,t,n,r){var s,i,a="",o=e.tag;for(s=0,i=n.length;s<i;s+=1)A(e,t+1,n[s],!0,!0)&&(r&&0===s||(a+=f(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=o,e.dump=a||"[]"}(e,p,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(function(e,t,n){var r,s,i="",a=e.tag;for(r=0,s=n.length;r<s;r+=1)A(e,t,n[r],!1,!1)&&(0!==r&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,p,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else{if("[object String]"!==c){if(e.skipInvalid)return!1;throw new s("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&b(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function E(e,t){var n,r,s=[],i=[];for(T(e,s,i),n=0,r=i.length;n<r;n+=1)t.duplicates.push(s[i[n]]);t.usedDuplicates=new Array(r)}function T(e,t,n){var r,s,i;if(null!==e&&"object"==typeof e)if(-1!==(s=t.indexOf(e)))-1===n.indexOf(s)&&n.push(s);else if(t.push(e),Array.isArray(e))for(s=0,i=e.length;s<i;s+=1)T(e[s],t,n);else for(s=0,i=(r=Object.keys(e)).length;s<i;s+=1)T(e[r[s]],t,n)}function k(e,t){var n=new p(t=t||{});return n.noRefs||E(e,n),A(n,0,e,!0,!0)?n.dump+"\n":""}e.exports.dump=k,e.exports.safeDump=function(e,t){return k(e,r.extend({schema:a},t))}},6562:(e,t,n)=>{"use strict";var r=n(5417),s=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(s.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},6751:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},6758:e=>{"use strict";e.exports=function(e){return e[1]}},6773:(e,t)=>{"use strict";function n(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}}class s{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}}function i(e,t){const{line:n,column:s,index:i}=e;return new r(n,s+t,i+t)}const a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var o={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}};const c={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},l=e=>"UpdateExpression"===e.type?c.UpdateExpression[`${e.prefix}`]:c[e.type];var u={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${l(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${l(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${l(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`};const p=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var d=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'});const f=["message"];function m(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function y({toMessage:e,code:t,reasonCode:n,syntaxPlugin:s}){const i="MissingPlugin"===n||"MissingOneOfPlugins"===n;{const e={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};e[n]&&(n=e[n])}return function a(o,c){const l=new SyntaxError;return l.code=t,l.reasonCode=n,l.loc=o,l.pos=o.index,l.syntaxPlugin=s,i&&(l.missingPlugin=c.missingPlugin),m(l,"clone",(function(e={}){var t;const{line:n,column:s,index:i}=null!=(t=e.loc)?t:o;return a(new r(n,s,i),Object.assign({},c,e.details))})),m(l,"details",c),Object.defineProperty(l,"message",{configurable:!0,get(){const t=`${e(c)} (${o.line}:${o.column})`;return this.message=t,t},set(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),l}}function g(e,t){if(Array.isArray(e))return t=>g(t,e[0]);const r={};for(const s of Object.keys(e)){const i=e[s],a="string"==typeof i?{message:()=>i}:"function"==typeof i?{message:i}:i,{message:o}=a,c=n(a,f),l="string"==typeof o?()=>o:o;r[s]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},c))}return r}const v=Object.assign({},g(o),g(u),g({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),g(h),g`pipelineOperator`(d)),{defineProperty:b}=Object,w=(e,t)=>{e&&b(e,t,{enumerable:!1,value:e[t]})};function x(e){return w(e.loc.start,"index"),w(e.loc.end,"index"),e}class S{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const P={brace:new S("{"),j_oTag:new S("<tag"),j_cTag:new S("</tag"),j_expr:new S("<tag>...</tag>",!0)};P.template=new S("`",!0);const A=!0,E=!0,T=!0,k=!0,_=!0;class C{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const I=new Map;function O(e,t={}){t.keyword=e;const n=U(e,t);return I.set(e,n),n}function L(e,t){return U(e,{beforeExpr:A,binop:t})}let N=-1;const M=[],D=[],R=[],B=[],F=[],j=[];function U(e,t={}){var n,r,s,i;return++N,D.push(e),R.push(null!=(n=t.binop)?n:-1),B.push(null!=(r=t.beforeExpr)&&r),F.push(null!=(s=t.startsExpr)&&s),j.push(null!=(i=t.prefix)&&i),M.push(new C(e,t)),N}function Y(e,t={}){var n,r,s,i;return++N,I.set(e,N),D.push(e),R.push(null!=(n=t.binop)?n:-1),B.push(null!=(r=t.beforeExpr)&&r),F.push(null!=(s=t.startsExpr)&&s),j.push(null!=(i=t.prefix)&&i),M.push(new C("name",t)),N}const $={bracketL:U("[",{beforeExpr:A,startsExpr:E}),bracketHashL:U("#[",{beforeExpr:A,startsExpr:E}),bracketBarL:U("[|",{beforeExpr:A,startsExpr:E}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:A,startsExpr:E}),braceBarL:U("{|",{beforeExpr:A,startsExpr:E}),braceHashL:U("#{",{beforeExpr:A,startsExpr:E}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:A,startsExpr:E}),parenR:U(")"),comma:U(",",{beforeExpr:A}),semi:U(";",{beforeExpr:A}),colon:U(":",{beforeExpr:A}),doubleColon:U("::",{beforeExpr:A}),dot:U("."),question:U("?",{beforeExpr:A}),questionDot:U("?."),arrow:U("=>",{beforeExpr:A}),template:U("template"),ellipsis:U("...",{beforeExpr:A}),backQuote:U("`",{startsExpr:E}),dollarBraceL:U("${",{beforeExpr:A,startsExpr:E}),templateTail:U("...`",{startsExpr:E}),templateNonTail:U("...${",{beforeExpr:A,startsExpr:E}),at:U("@"),hash:U("#",{startsExpr:E}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:A,isAssign:k}),assign:U("_=",{beforeExpr:A,isAssign:k}),slashAssign:U("_=",{beforeExpr:A,isAssign:k}),xorAssign:U("_=",{beforeExpr:A,isAssign:k}),moduloAssign:U("_=",{beforeExpr:A,isAssign:k}),incDec:U("++/--",{prefix:_,postfix:!0,startsExpr:E}),bang:U("!",{beforeExpr:A,prefix:_,startsExpr:E}),tilde:U("~",{beforeExpr:A,prefix:_,startsExpr:E}),doubleCaret:U("^^",{startsExpr:E}),doubleAt:U("@@",{startsExpr:E}),pipeline:L("|>",0),nullishCoalescing:L("??",1),logicalOR:L("||",1),logicalAND:L("&&",2),bitwiseOR:L("|",3),bitwiseXOR:L("^",4),bitwiseAND:L("&",5),equality:L("==/!=/===/!==",6),lt:L("</>/<=/>=",7),gt:L("</>/<=/>=",7),relational:L("</>/<=/>=",7),bitShift:L("<</>>/>>>",8),bitShiftL:L("<</>>/>>>",8),bitShiftR:L("<</>>/>>>",8),plusMin:U("+/-",{beforeExpr:A,binop:9,prefix:_,startsExpr:E}),modulo:U("%",{binop:10,startsExpr:E}),star:U("*",{binop:10}),slash:L("/",10),exponent:U("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:O("in",{beforeExpr:A,binop:7}),_instanceof:O("instanceof",{beforeExpr:A,binop:7}),_break:O("break"),_case:O("case",{beforeExpr:A}),_catch:O("catch"),_continue:O("continue"),_debugger:O("debugger"),_default:O("default",{beforeExpr:A}),_else:O("else",{beforeExpr:A}),_finally:O("finally"),_function:O("function",{startsExpr:E}),_if:O("if"),_return:O("return",{beforeExpr:A}),_switch:O("switch"),_throw:O("throw",{beforeExpr:A,prefix:_,startsExpr:E}),_try:O("try"),_var:O("var"),_const:O("const"),_with:O("with"),_new:O("new",{beforeExpr:A,startsExpr:E}),_this:O("this",{startsExpr:E}),_super:O("super",{startsExpr:E}),_class:O("class",{startsExpr:E}),_extends:O("extends",{beforeExpr:A}),_export:O("export"),_import:O("import",{startsExpr:E}),_null:O("null",{startsExpr:E}),_true:O("true",{startsExpr:E}),_false:O("false",{startsExpr:E}),_typeof:O("typeof",{beforeExpr:A,prefix:_,startsExpr:E}),_void:O("void",{beforeExpr:A,prefix:_,startsExpr:E}),_delete:O("delete",{beforeExpr:A,prefix:_,startsExpr:E}),_do:O("do",{isLoop:T,beforeExpr:A}),_for:O("for",{isLoop:T}),_while:O("while",{isLoop:T}),_as:Y("as",{startsExpr:E}),_assert:Y("assert",{startsExpr:E}),_async:Y("async",{startsExpr:E}),_await:Y("await",{startsExpr:E}),_defer:Y("defer",{startsExpr:E}),_from:Y("from",{startsExpr:E}),_get:Y("get",{startsExpr:E}),_let:Y("let",{startsExpr:E}),_meta:Y("meta",{startsExpr:E}),_of:Y("of",{startsExpr:E}),_sent:Y("sent",{startsExpr:E}),_set:Y("set",{startsExpr:E}),_source:Y("source",{startsExpr:E}),_static:Y("static",{startsExpr:E}),_using:Y("using",{startsExpr:E}),_yield:Y("yield",{startsExpr:E}),_asserts:Y("asserts",{startsExpr:E}),_checks:Y("checks",{startsExpr:E}),_exports:Y("exports",{startsExpr:E}),_global:Y("global",{startsExpr:E}),_implements:Y("implements",{startsExpr:E}),_intrinsic:Y("intrinsic",{startsExpr:E}),_infer:Y("infer",{startsExpr:E}),_is:Y("is",{startsExpr:E}),_mixins:Y("mixins",{startsExpr:E}),_proto:Y("proto",{startsExpr:E}),_require:Y("require",{startsExpr:E}),_satisfies:Y("satisfies",{startsExpr:E}),_keyof:Y("keyof",{startsExpr:E}),_readonly:Y("readonly",{startsExpr:E}),_unique:Y("unique",{startsExpr:E}),_abstract:Y("abstract",{startsExpr:E}),_declare:Y("declare",{startsExpr:E}),_enum:Y("enum",{startsExpr:E}),_module:Y("module",{startsExpr:E}),_namespace:Y("namespace",{startsExpr:E}),_interface:Y("interface",{startsExpr:E}),_type:Y("type",{startsExpr:E}),_opaque:Y("opaque",{startsExpr:E}),name:U("name",{startsExpr:E}),placeholder:U("%%",{startsExpr:!0}),string:U("string",{startsExpr:E}),num:U("num",{startsExpr:E}),bigint:U("bigint",{startsExpr:E}),decimal:U("decimal",{startsExpr:E}),regexp:U("regexp",{startsExpr:E}),privateName:U("#name",{startsExpr:E}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:!0}),jsxTagStart:U("jsxTagStart",{startsExpr:!0}),jsxTagEnd:U("jsxTagEnd")};function H(e){return e>=93&&e<=133}function W(e){return e>=58&&e<=133}function V(e){return e>=58&&e<=137}function z(e){return F[e]}function q(e){return e>=129&&e<=131}function K(e){return e>=58&&e<=92}function G(e){return D[e]}function J(e){return R[e]}function X(e){return e>=24&&e<=25}function Z(e){return M[e]}M[8].updateContext=e=>{e.pop()},M[5].updateContext=M[7].updateContext=M[23].updateContext=e=>{e.push(P.brace)},M[22].updateContext=e=>{e[e.length-1]===P.template?e.pop():e.push(P.template)},M[143].updateContext=e=>{e.push(P.j_expr,P.j_oTag)};let Q="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ee="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const te=new RegExp("["+Q+"]"),ne=new RegExp("["+Q+ee+"]");Q=ee=null;const re=[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],se=[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];function ie(e,t){let n=65536;for(let r=0,s=t.length;r<s;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function ae(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&te.test(String.fromCharCode(e)):ie(e,re)))}function oe(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ne.test(String.fromCharCode(e)):ie(e,re)||ie(e,se))))}const ce=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),le=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),ue=new Set(["eval","arguments"]);function he(e,t){return t&&"await"===e||"enum"===e}function pe(e,t){return he(e,t)||le.has(e)}function de(e){return ue.has(e)}function fe(e,t){return pe(e,t)||de(e)}const me=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);class ye{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}}class ge{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&!(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(707&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ye(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,n){let r=this.currentScope();if(8&t||16&t){this.checkRedeclarationInScope(r,e,t,n);let s=r.names.get(e)||0;16&t?s|=4:(r.firstLexicalName||(r.firstLexicalName=e),s|=2),r.names.set(e,s),8&t&&this.maybeExportDefined(r,e)}else if(4&t)for(let s=this.scopeStack.length-1;s>=0&&(r=this.scopeStack[s],this.checkRedeclarationInScope(r,e,t,n),r.names.set(e,1|(r.names.get(e)||0)),this.maybeExportDefined(r,e),!(643&r.flags));--s);this.parser.inModule&&1&r.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(1&n))return!1;if(8&n)return e.names.has(t);const r=e.names.get(t);return 16&n?(2&r)>0||!this.treatFunctionsAsVarInScope(e)&&(1&r)>0:(2&r)>0&&!(8&e.flags&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(4&r)>0}checkLocalExport(e){const{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(643&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(707&t&&!(4&t))return t}}}class ve extends ye{constructor(...e){super(...e),this.declareFunctions=new Set}}class be extends ge{createScope(e){return new ve(e)}declareName(e,t,n){const r=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e),void r.declareFunctions.add(e);super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){if(super.isRedeclaredInScope(e,t,n))return!0;if(2048&n&&!e.declareFunctions.has(t)){const n=e.names.get(t);return(4&n)>0||(2&n)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const we=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),xe=g`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:n})=>`Enum \`${e}\` has type \`${n}\`, so the initializer of \`${t}\` needs to be a ${n} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:n})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${n}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Se(e){return"type"===e.importKind||"typeof"===e.importKind}const Pe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},Ae=/\*?\s*@((?:no)?flow)\b/,Ee={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Te=new RegExp(/\r\n|[\r\n\u2028\u2029]/.source,"g");function ke(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function _e(e,t,n){for(let r=t;r<n;r++)if(ke(e.charCodeAt(r)))return!0;return!1}const Ce=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ie=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Oe(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}const Le=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Ne(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function Me(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return Me(e.object)+"."+Me(e.property);throw new Error("Node had unexpected type: "+e.type)}class De extends ye{constructor(...e){super(...e),this.tsNames=new Map}}class Re extends ge{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new De(e)}enter(e){512===e&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return 512===e&&this.importsStack.pop(),e}hasImport(e,t){const n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1)for(let t=0;t<n-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,n){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,n,{identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const r=this.currentScope();let s=r.tsNames.get(e)||0;if(1024&t)return this.maybeExportDefined(r,e),void r.tsNames.set(e,16|s);super.declareName(e,t,n),2&t&&(1&t||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),s|=1),256&t&&(s|=2),512&t&&(s|=4),128&t&&(s|=8),s&&r.tsNames.set(e,s)}isRedeclaredInScope(e,t,n){const r=e.tsNames.get(t);return(2&r)>0?!(256&n)||!!(512&n)!=(4&r)>0:128&n&&(8&r)>0?!!(2&e.names.get(t))&&!!(1&n):!!(2&n&&(1&r)>0)||super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){const{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){const n=this.scopeStack[e].tsNames.get(t);if((1&n)>0||(16&n)>0)return}super.checkLocalExport(e)}}}class Be{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function Fe(e,t){return(e?2:0)|(t?1:0)}class je{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,n]=e;if(!this.hasPlugin(t))return!1;const r=this.plugins.get(t);for(const e of Object.keys(n))if((null==r?void 0:r[e])!==n[e])return!1;return!0}}getPluginOption(e,t){var n;return null==(n=this.plugins.get(e))?void 0:n[t]}}function Ue(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ye(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function $e(e,t,n){let r=null,s=t.length;for(;null===r&&s>0;)r=t[--s];null===r||r.start>n.start?Ye(e,n.comments):Ue(r,n.comments)}class He extends je{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:t}=this.state,n=t.length;if(0===n)return;let r=n-1;const s=t[r];s.start===e.end&&(s.leadingNode=e,r--);const{start:i}=e;for(;r>=0;r--){const n=t[r],s=n.end;if(!(s>i)){s===i&&(n.trailingNode=e);break}n.containingNode=e,this.finalizeComment(n),t.splice(r,1)}}finalizeComment(e){var t;const{comments:n}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Ue(e.leadingNode,n),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,n);else{const{containingNode:r,start:s}=e;if(44===this.input.charCodeAt(this.offsetToSourcePos(s)-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":$e(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":$e(r,r.arguments,e);break;case"ImportExpression":$e(r,[r.source,null!=(t=r.options)?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":$e(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":$e(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":$e(r,r.specifiers,e);break;case"TSEnumDeclaration":case"TSEnumBody":$e(r,r.members,e);break;default:Ye(r,n)}else Ye(r,n)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:n}=t;if(0===n)return;const r=t[n-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,n){const{commentStack:r}=this.state,s=r.length;if(0===s)return;let i=s-1;for(;i>=0;i--){const s=r[i],a=s.end;if(s.start===n)s.leadingNode=e;else if(a===t)s.trailingNode=e;else if(a<t)break}}}class We{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[P.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(1&this.flags)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:n,startLine:s,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.startIndex=n,this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new r(s,i,n)}get maybeInArrowParameters(){return(2&this.flags)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(256&this.flags)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(512&this.flags)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(1024&this.flags)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(2048&this.flags)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(4096&this.flags)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const e=new We;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}}var Ve=function(e){return e>=48&&e<=57};const ze={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},qe={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Ke(e,t,n,r,s,i){const a=n,o=r,c=s;let l="",u=null,h=n;const{length:p}=t;for(;;){if(n>=p){i.unterminated(a,o,c),l+=t.slice(h,n);break}const d=t.charCodeAt(n);if(Ge(e,d,t,n)){l+=t.slice(h,n);break}if(92===d){l+=t.slice(h,n);const a=Je(t,n,r,s,"template"===e,i);null!==a.ch||u?l+=a.ch:u={pos:n,lineStart:r,curLine:s},({pos:n,lineStart:r,curLine:s}=a),h=n}else 8232===d||8233===d?(++s,r=++n):10===d||13===d?"template"===e?(l+=t.slice(h,n)+"\n",++n,13===d&&10===t.charCodeAt(n)&&++n,++s,h=r=n):i.unterminated(a,o,c):++n}return{pos:n,str:l,firstInvalidLoc:u,lineStart:r,curLine:s,containsInvalid:!!u}}function Ge(e,t,n,r){return"template"===e?96===t||36===t&&123===n.charCodeAt(r+1):t===("double"===e?34:39)}function Je(e,t,n,r,s,i){const a=!s;t++;const o=e=>({pos:t,ch:e,lineStart:n,curLine:r}),c=e.charCodeAt(t++);switch(c){case 110:return o("\n");case 114:return o("\r");case 120:{let s;return({code:s,pos:t}=Xe(e,t,n,r,2,!1,a,i)),o(null===s?null:String.fromCharCode(s))}case 117:{let s;return({code:s,pos:t}=Qe(e,t,n,r,a,i)),o(null===s?null:String.fromCodePoint(s))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:n=t,++r;case 8232:case 8233:return o("");case 56:case 57:if(s)return o(null);i.strictNumericEscape(t-1,n,r);default:if(c>=48&&c<=55){const a=t-1;let c=/^[0-7]+/.exec(e.slice(a,t+2))[0],l=parseInt(c,8);l>255&&(c=c.slice(0,-1),l=parseInt(c,8)),t+=c.length-1;const u=e.charCodeAt(t);if("0"!==c||56===u||57===u){if(s)return o(null);i.strictNumericEscape(a,n,r)}return o(String.fromCharCode(l))}return o(String.fromCharCode(c))}}function Xe(e,t,n,r,s,i,a,o){const c=t;let l;return({n:l,pos:t}=Ze(e,t,n,r,16,s,i,!1,o,!a)),null===l&&(a?o.invalidEscapeSequence(c,n,r):t=c-1),{code:l,pos:t}}function Ze(e,t,n,r,s,i,a,o,c,l){const u=t,h=16===s?ze.hex:ze.decBinOct,p=16===s?qe.hex:10===s?qe.dec:8===s?qe.oct:qe.bin;let d=!1,f=0;for(let u=0,m=null==i?1/0:i;u<m;++u){const i=e.charCodeAt(t);let u;if(95!==i||"bail"===o){if(u=i>=97?i-97+10:i>=65?i-65+10:Ve(i)?i-48:1/0,u>=s){if(u<=9&&l)return{n:null,pos:t};if(u<=9&&c.invalidDigit(t,n,r,s))u=0;else{if(!a)break;u=0,d=!0}}++t,f=f*s+u}else{const s=e.charCodeAt(t-1),i=e.charCodeAt(t+1);if(o){if(Number.isNaN(i)||!p(i)||h.has(s)||h.has(i)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,n,r)}}else{if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,n,r)}++t}}return t===u||null!=i&&t-u!==i||d?{n:null,pos:t}:{n:f,pos:t}}function Qe(e,t,n,r,s,i){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Xe(e,t,n,r,e.indexOf("}",t)-t,!0,s,i)),++t,null!==a&&a>1114111){if(!s)return{code:null,pos:t};i.invalidCodePoint(t,n,r)}}else({code:a,pos:t}=Xe(e,t,n,r,4,!1,s,i));return{code:a,pos:t}}function et(e,t,n){return new r(n,e-t,e)}const tt=new Set([103,109,115,105,121,117,100,118]);class nt{constructor(e){const t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new s(e.startLoc,e.endLoc)}}class rt extends He{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,n,r)=>!!(2048&this.optionFlags)&&(this.raise(v.InvalidDigit,et(e,t,n),{radix:r}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(v.StrictNumericEscape,et(e,t,n))},unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedString,et(e-1,t,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedTemplate,et(e,t,n))}}),this.state=new We,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),256&this.optionFlags&&this.pushToken(new nt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ce.lastIndex=e,Ce.test(this.input)?Ce.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Ie.lastIndex=e,Ie.test(this.input)?Ie.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const n=this.input.charCodeAt(e);56320==(64512&n)&&(t=65536+((1023&t)<<10)+(1023&n))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(140):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const n=this.state.pos,r=this.input.indexOf(e,n+2);if(-1===r)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+e.length,Te.lastIndex=n+2;Te.test(this.input)&&Te.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Te.lastIndex;if(this.isLookahead)return;const i={type:"CommentBlock",value:this.input.slice(n+2,r),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(r+e.length),loc:new s(t,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(i),i}skipLineComment(e){const t=this.state.pos;let n;this.isLookahead||(n=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!ke(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const i=this.state.pos,a={type:"CommentLine",value:this.input.slice(t+e,i),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(i),loc:new s(n,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(a),a}skipSpace(){const e=this.state.pos,t=4096&this.optionFlags?[]:null;e:for(;this.state.pos<this.length;){const n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),null==t||t.push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),null==t||t.push(e));break}default:break e}break;default:if(Oe(n))++this.state.pos;else if(45===n&&!this.inModule&&8192&this.optionFlags){const n=this.state.pos;if(45!==this.input.charCodeAt(n+1)||62!==this.input.charCodeAt(n+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}else{if(60!==n||this.inModule||!(8192&this.optionFlags))break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}}}}if((null==t?void 0:t.length)>0){const n=this.state.pos,r={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else ae(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!ke(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=42===e?55:54,n=1,r=this.input.charCodeAt(this.state.pos+1);42===e&&42===r&&(n++,r=this.input.charCodeAt(this.state.pos+2),t=57),61!==r||this.state.inType||(n++,t=37===e?33:30),this.finishOp(t,n)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(ae(e))return void this.readWord(e)}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){const n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){const e=this.state.startLoc,t=this.state.start+1;let n,r,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(v.UnterminatedRegExp,i(e,1));const t=this.input.charCodeAt(s);if(ke(t))throw this.raise(v.UnterminatedRegExp,i(e,1));if(n)n=!1;else{if(91===t)r=!0;else if(93===t&&r)r=!1;else if(47===t&&!r)break;n=92===t}}const a=this.input.slice(t,s);++s;let o="";const c=()=>i(e,s+2-t);for(;s<this.length;){const e=this.codePointAtPos(s),t=String.fromCharCode(e);if(tt.has(e))118===e?o.includes("u")&&this.raise(v.IncompatibleRegExpUVFlags,c()):117===e&&o.includes("v")&&this.raise(v.IncompatibleRegExpUVFlags,c()),o.includes(t)&&this.raise(v.DuplicateRegExpFlags,c());else{if(!oe(e)&&92!==e)break;this.raise(v.MalformedRegExpFlags,c())}++s,o+=t}this.state.pos=s,this.finishToken(138,{pattern:a,flags:o})}readInt(e,t,n=!1,r=!0){const{n:s,pos:i}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,r,this.errorHandlers_readInt,!1);return this.state.pos=i,s}readRadixNumber(e){const t=this.state.pos,n=this.state.curPosition();let r=!1;this.state.pos+=2;const s=this.readInt(e);null==s&&this.raise(v.InvalidDigit,i(n,2),{radix:e});const a=this.input.charCodeAt(this.state.pos);if(110===a)++this.state.pos,r=!0;else if(109===a)throw this.raise(v.InvalidDecimal,n);if(ae(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());if(r){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,e)}else this.finishToken(135,s)}readNumber(e){const t=this.state.pos,n=this.state.curPosition();let r=!1,s=!1,a=!1,o=!1;e||null!==this.readInt(10)||this.raise(v.InvalidNumber,this.state.curPosition());const c=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(c){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,n),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(v.ZeroDigitNumericSeparator,i(n,t))}o=c&&!/[89]/.test(e)}let l=this.input.charCodeAt(this.state.pos);if(46!==l||o||(++this.state.pos,this.readInt(10),r=!0,l=this.input.charCodeAt(this.state.pos)),69!==l&&101!==l||o||(l=this.input.charCodeAt(++this.state.pos),43!==l&&45!==l||++this.state.pos,null===this.readInt(10)&&this.raise(v.InvalidOrMissingExponent,n),r=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),110===l&&((r||c)&&this.raise(v.InvalidBigIntLiteral,n),++this.state.pos,s=!0),109===l){this.expectPlugin("decimal",this.state.curPosition()),(a||c)&&this.raise(v.InvalidDecimal,n),++this.state.pos;var u=!0}if(ae(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());const h=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(136,h);if(u)return void this.finishToken(137,h);const p=o?parseInt(h,8):parseFloat(h);this.finishToken(135,p)}readCodePoint(e){const{code:t,pos:n}=Qe(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){const{str:t,pos:n,curLine:r,lineStart:s}=Ke(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=s,this.state.curLine=r,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:s,curLine:i,lineStart:a}=Ke("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=i,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),96===this.input.codePointAt(s)?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,t){const n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,t):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const n=this.state.pos;let r=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(oe(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);const e=this.state.curPosition(),s=this.state.pos===n?ae:oe;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(v.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;const i=this.readCodePoint(!0);null!==i&&(s(i)||this.raise(v.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(i)),r=this.state.pos}}}return t+this.input.slice(r,this.state.pos)}readWord(e){const t=this.readWord1(e),n=I.get(t);void 0!==n?this.finishToken(n,G(n)):this.finishToken(132,t)}checkKeywordEscapes(){const{type:e}=this.state;K(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:G(e)})}raise(e,t,n={}){const s=e(t instanceof r?t:t.loc.start,n);if(!(2048&this.optionFlags))throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(e,t,n={}){const s=t instanceof r?t:t.loc.start,i=s.index,a=this.state.errors;for(let t=a.length-1;t>=0;t--){const r=a[t];if(r.loc.index===i)return a[t]=e(s,n);if(r.loc.index<i)break}return this.raise(e,t,n)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,null!=e?e:this.state.startLoc,{expected:t?G(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,null!=t?t:this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,et(t,n,r))}}}class st{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class it{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new st)}exit(){const e=this.stack.pop(),t=this.current();for(const[n,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,r):this.parser.raise(v.InvalidPrivateFieldResolution,r,{identifierName:n})}declarePrivateName(e,t,n){const{privateNames:r,loneAccessors:s,undefinedPrivateNames:i}=this.current();let a=r.has(e);if(3&t){const n=a&&s.get(e);n?(a=(3&n)==(3&t)||(4&n)!=(4&t),a||s.delete(e)):a||s.set(e,t)}a&&this.parser.raise(v.PrivateNameRedeclaration,n,{identifierName:e}),r.add(e),i.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,t,{identifierName:e})}}class at{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class ot extends at{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){const n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class ct{constructor(e){this.parser=void 0,this.stack=[new at],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const n=t.loc.start,{stack:r}=this;let s=r.length-1,i=r[s];for(;!i.isCertainlyParameterDeclaration();){if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,n),i=r[--s]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){const{stack:n}=this,r=n[n.length-1],s=t.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,s);else{if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(e,s)}}recordAsyncArrowParametersError(e){const{stack:t}=this;let n=t.length-1,r=t[n];for(;r.canBeArrowParameterDeclaration();)2===r.type&&r.recordDeclarationError(v.AwaitBindingIdentifier,e),r=t[--n]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,n])=>{this.parser.raise(t,n);let r=e.length-2,s=e[r];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(n.index),s=e[--r]}))}}function lt(){return new at}class ut extends rt{addExtra(e,t,n,r=!0){if(!e)return;let{extra:s}=e;null==s&&(s={},e.extra=s),r?s[t]=n:Object.defineProperty(s,t,{enumerable:r,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){const n=e+t.length;if(this.input.slice(e,n)===t){const e=this.input.charCodeAt(n);return!(oe(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return _e(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return _e(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const n={node:null};try{const r=e(((e=null)=>{throw n.node=e,n}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:n,doubleProtoLoc:r,privateKeyLoc:s,optionalParametersLoc:i}=e;if(!t)return!!(n||r||i||s);null!=n&&this.raise(v.InvalidCoverInitializedName,n),null!=r&&this.raise(v.DuplicateProto,r),null!=s&&this.raise(v.UnexpectedPrivateField,s),null!=i&&this.unexpected(i)}isLiteralPropertyName(){return V(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=e;const s=this.scope,i=this.getScopeHandler();this.scope=new i(this,e);const a=this.prodParam;this.prodParam=new Be;const o=this.classScope;this.classScope=new it(this);const c=this.expressionScope;return this.expressionScope=new ct(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=s,this.prodParam=a,this.classScope=o,this.expressionScope=c}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),32&this.optionFlags&&(e|=1),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class ht{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class pt{constructor(e,t,n){this.type="",this.start=t,this.end=0,this.loc=new s(n),128&(null==e?void 0:e.optionFlags)&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}}const dt=pt.prototype;dt.__clone=function(){const e=new pt(void 0,this.start,this.loc.start),t=Object.keys(this);for(let n=0,r=t.length;n<r;n++){const r=t[n];"leadingComments"!==r&&"trailingComments"!==r&&"innerComments"!==r&&(e[r]=this[r])}return e};class ft extends ut{startNode(){const e=this.state.startLoc;return new pt(this,e.index,e)}startNodeAt(e){return new pt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,128&this.optionFlags&&(e.range[1]=n.index),4096&this.optionFlags&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,128&this.optionFlags&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,128&this.optionFlags&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){const{type:t,start:n,end:r,loc:s,range:i,name:a}=e,o=Object.create(dt);return o.type=t,o.start=n,o.end=r,o.loc=s,o.range=i,o.name=a,e.extra&&(o.extra=e.extra),o}cloneStringLiteral(e){const{type:t,start:n,end:r,loc:s,range:i,extra:a}=e,o=Object.create(dt);return o.type=t,o.start=n,o.end=r,o.loc=s,o.range=i,o.extra=a,o.value=e.value,o}}const mt=e=>"ParenthesizedExpression"===e.type?mt(e.expression):e;class yt extends ft{toAssignable(e,t=!1){var n,r;let s;switch(("ParenthesizedExpression"===e.type||null!=(n=e.extra)&&n.parenthesized)&&(s=mt(e),t?"Identifier"===s.type?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,e):"MemberExpression"===s.type||this.isOptionalMemberExpression(s)||this.raise(v.InvalidParenthesizedAssignment,e):this.raise(v.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let n=0,r=e.properties.length,s=r-1;n<r;n++){var i;const r=e.properties[n],a=n===s;this.toAssignableObjectExpressionProp(r,a,t),a&&"RestElement"===r.type&&null!=(i=e.extra)&&i.trailingCommaLoc&&this.raise(v.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,null==(r=e.extra)?void 0:r.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(v.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(s,t)}}toAssignableObjectExpressionProp(e,t,n){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?v.PatternHasAccessor:v.PatternHasMethod,e.key);else if("SpreadElement"===e.type){this.castNodeTo(e,"RestElement");const r=e.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,n),t||this.raise(v.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,t,n){const r=e.length-1;for(let s=0;s<=r;s++){const i=e[s];i&&(this.toAssignableListItem(e,s,n),"RestElement"===i.type&&(s<r?this.raise(v.RestTrailingComma,i):t&&this.raise(v.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){const r=e[t];if("SpreadElement"===r.type){this.castNodeTo(r,"RestElement");const e=r.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,n)}else this.toAssignable(r,n)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every(((e,n)=>"ObjectMethod"!==e.type&&(n===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,n){const r=1&n,s=[];let i=!0;for(;!this.eat(e);)if(i?i=!1:this.expect(12),r&&this.match(12))s.push(null);else{if(this.eat(e))break;if(this.match(21)){let r=this.parseRestBinding();if((this.hasPlugin("flow")||2&n)&&(r=this.parseFunctionParamType(r)),s.push(r),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(2&n)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());s.push(this.parseBindingElement(n,e))}}return s}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:t}=this.state;if(21===e)return this.parseBindingRestProperty(this.startNode());const n=this.startNode();return 139===e?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseBindingElement(e,t){const n=this.parseMaybeDefault();return(this.hasPlugin("flow")||2&e)&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(null!=e||(e=this.state.startLoc),t=null!=t?t:this.parseBindingAtom(),!this.eat(29))return t;const n=this.startNodeAt(e);return n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,n){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(e){return"OptionalMemberExpression"===e.type}checkLVal(e,t,n=64,r=!1,s=!1,i=!1){var a;const o=e.type;if(this.isObjectMethod(e))return;const c=this.isOptionalMemberExpression(e);if(c||"MemberExpression"===o)return c&&(this.expectPlugin("optionalChainingAssign",e.loc.start),"AssignmentExpression"!==t.type&&this.raise(v.InvalidLhsOptionalChaining,e,{ancestor:t})),void(64!==n&&this.raise(v.InvalidPropertyBindingPattern,e));if("Identifier"===o){this.checkIdentifier(e,n,s);const{name:t}=e;return void(r&&(r.has(t)?this.raise(v.ParamDupe,e):r.add(t)))}const l=this.isValidLVal(o,!(i||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,n);if(!0===l)return;if(!1===l){const r=64===n?v.InvalidLhs:v.InvalidLhsBinding;return void this.raise(r,e,{ancestor:t})}let u,h;"string"==typeof l?(u=l,h="ParenthesizedExpression"===o):[u,h]=l;const p="ArrayPattern"===o||"ObjectPattern"===o?{type:o}:t,d=e[u];if(Array.isArray(d))for(const e of d)e&&this.checkLVal(e,p,n,r,s,h);else d&&this.checkLVal(d,p,n,r,s,h)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?fe(e.name,this.inModule):de(e.name))&&(64===t?this.raise(v.StrictEvalArguments,e,{referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,e,{bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(v.LetInLexicalBinding,e),64&t||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(v.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0)}}function gt(e){if(!e)throw new Error("Assert fail")}const vt=g`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function bt(e){return"private"===e||"public"===e||"protected"===e}function wt(e){return"in"===e||"out"===e}function xt(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:n}=e;return(!t||"StringLiteral"===n.type||!("TemplateLiteral"!==n.type||n.expressions.length>0))&&At(e.object)}function St(e,t){var n;const{type:r}=e;if(null!=(n=e.extra)&&n.parenthesized)return!1;if(t){if("Literal"===r){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===r||"BooleanLiteral"===r)return!0;return!(!Pt(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:n,argument:r}=e;if("-"===n&&Pt(r,t))return!0}return!1}(e,t))||"TemplateLiteral"===r&&0===e.expressions.length||!!xt(e)}function Pt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function At(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&At(e.object)}const Et=g`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Tt=["minimal","fsharp","hack","smart"],kt=["^^","@@","^","%","#"],_t={estree:e=>class extends e{parse(){const e=x(super.parse());return 256&this.optionFlags&&(e.tokens=e.tokens.map(x)),e}parseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch(e){}const r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,t){const n=this.startNodeAtNode(e);return n.expression=e,this.finishNodeAt(n,"ChainExpression",t)}directiveToStmt(e){const t=e.value;delete e.value,this.castNodeTo(t,"Literal"),t.raw=t.extra.raw,t.value=t.extra.expressionValue;const n=this.castNodeTo(e,"ExpressionStatement");return n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){const{start:t,end:n,loc:r,range:s,raw:i,value:a}=e,o=Object.create(e.constructor.prototype);return o.type="Literal",o.start=t,o.end=n,o.loc=r,o.range=s,o.raw=i,o.value=a,o}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,n,r,s){super.parseBlockBody(e,t,n,r,s);const i=e.directives.map((e=>this.directiveToStmt(e)));e.body=i.concat(e.body),delete e.directives}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const n=super.parseLiteral(e,t);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,n,r,s,i,a=!1){let o=this.startNode();o.kind=e.kind,o=super.parseMethod(o,t,n,r,s,i,a),delete o.kind;const{typeParameters:c}=e;c&&(delete e.typeParameters,o.typeParameters=c,this.resetStartLocationFromNode(o,c));const l=this.castNodeTo(o,"FunctionExpression");return e.value=l,"ClassPrivateMethod"===i&&(e.computed=!1),"ObjectMethod"===i?("method"===e.kind&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return"Literal"===e.type?"constructor"===e.value:super.nameIsConstructor(e)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t):t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t.computed=!1,t):t}parseClassAccessorProperty(e){const t=super.parseClassAccessorProperty(e);return this.getPluginOption("estree","classFeatures")?(t.abstract&&this.hasPlugin("typescript")?(delete t.abstract,this.castNodeTo(t,"TSAbstractAccessorProperty")):this.castNodeTo(t,"AccessorProperty"),t):t}parseObjectProperty(e,t,n,r){const s=super.parseObjectProperty(e,t,n,r);return s&&(s.kind="init",this.castNodeTo(s,"Property")),s}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,t,n){return"Property"===e?"value":super.isValidLVal(e,t,n)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){"Property"!==e.type||"get"!==e.kind&&"set"!==e.kind?"Property"===e.type&&e.method?this.raise(v.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,n):this.raise(v.PatternHasAccessor,e.key)}finishCallExpression(e,t){const n=super.finishCallExpression(e,t);var r,s;return"Import"===n.callee.type?(this.castNodeTo(n,"ImportExpression"),n.source=n.arguments[0],n.options=null!=(r=n.arguments[1])?r:null,n.attributes=null!=(s=n.arguments[1])?s:null,delete n.arguments,delete n.callee):"OptionalCallExpression"===n.type?this.castNodeTo(n,"CallExpression"):n.optional=!1,n}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){const n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":1===r.specifiers.length&&"ExportNamespaceSpecifier"===r.specifiers[0].type&&(this.castNodeTo(r,"ExportAllDeclaration"),r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var s;const{declaration:e}=r;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(s=e.decorators)?void 0:s.length)>0&&e.start===r.start&&this.resetStartLocation(r,n)}}return r}stopParseSubscript(e,t){const n=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(n,e.loc.end):n}parseMember(e,t,n,r,s){const i=super.parseMember(e,t,n,r,s);return"OptionalMemberExpression"===i.type?this.castNodeTo(i,"MemberExpression"):i.optional=!1,i}isOptionalMemberExpression(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return"Property"===e.type&&(e.method||"get"===e.kind||"set"===e.kind)}castNodeTo(e,t){const n=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(e){const t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return"Literal"===e.type?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,n){return x(super.finishNodeAt(e,t,n))}finishNode(e,t){const n=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(e,t){super.resetStartLocation(e,t),x(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),x(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Le.UnterminatedJsxContent,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?void(60===n&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(142,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:ke(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let n;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,n=e?"\n":"\r\n"):n=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let t="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):ke(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}t+=this.input.slice(n,this.state.pos++),this.finishToken(134,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,n=!1;for(;t++<10&&this.state.pos<this.length&&!(n=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(n){const t=this.input.slice(e,this.state.pos),n=Ee[t];if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(oe(e)||45===e);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(141)?e.name=this.state.value:K(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;const n=this.startNodeAt(e);return n.namespace=t,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){const n=this.startNodeAt(e);n.object=t,n.property=this.jsxParseIdentifier(),t=this.finishNode(n,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(P.brace),this.next(),e=this.jsxParseExpressionContainer(e,P.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(Le.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Le.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(P.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{const t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){const e=this.startNode();return this.match(5)?(this.setContext(P.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(P.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){const t=this.startNodeAt(e),n=[],r=this.jsxParseOpeningElementAt(e);let s=null;if(!r.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){s=this.jsxParseClosingElementAt(e);break e}n.push(this.jsxParseElementAt(e));break;case 142:n.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const e=this.startNode();this.setContext(P.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e,P.j_expr));break}default:this.unexpected()}Ne(r)&&!Ne(s)&&null!==s?this.raise(Le.MissingClosingTagFragment,s):!Ne(r)&&Ne(s)?this.raise(Le.MissingClosingTagElement,s,{openingTagName:Me(r.name)}):Ne(r)||Ne(s)||Me(s.name)!==Me(r.name)&&this.raise(Le.MissingClosingTagElement,s,{openingTagName:Me(r.name)})}if(Ne(r)?(t.openingFragment=r,t.closingFragment=s):(t.openingElement=r,t.closingElement=s),t.children=n,this.match(47))throw this.raise(Le.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ne(r)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==P.j_expr){if(t===P.j_oTag||t===P.j_cTag){if(ae(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(144);if((34===e||39===e)&&t===P.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(143);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:n}=this.state;if(56===n&&143===e)t.splice(-2,2,P.j_cTag),this.state.canStartJSXElement=!1;else if(143===n)t.push(P.j_oTag);else if(144===n){const n=t[t.length-1];n===P.j_oTag&&56===e||n===P.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===P.j_expr):(this.setContext(P.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=B[n]}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return be}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(e,t){134!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=Ae.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||14);const n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(xe.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,n=null;return this.match(54)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);const s=this.flowParseFunctionTypeParams();return n.params=s.params,n.rest=s.rest,n.this=s._this,this.expect(11),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(127)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(xe.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e)):this.isContextual(130)?this.flowParseDeclareTypeAlias(e):this.isContextual(131)?this.flowParseDeclareOpaqueType(e):this.isContextual(129)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),n=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(xe.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(e)):(this.expectContextual(125,xe.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),n.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let r=null,s=!1;return n.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(s&&this.raise(xe.DuplicateDeclareModuleExports,e),"ES"===r&&this.raise(xe.AmbiguousDeclareModuleKind,e),r="CommonJS",s=!0):("CommonJS"===r&&this.raise(xe.AmbiguousDeclareModuleKind,e),r="ES")})),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){const e=this.state.value;throw this.raise(xe.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:Pe[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(131)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131)?"ExportNamedDeclaration"===(e=this.parseExport(e,null)).type?(e.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration"):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return this.castNodeTo(t,"DeclareTypeAlias"),t}flowParseDeclareOpaqueType(e){this.next();const t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,"DeclareOpaqueType"),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(xe.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,n){we.has(e)&&this.raise(n?xe.AssignReservedType:xe.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return n.name=s.name,n.variance=r,n.bound=s.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):e&&this.raise(xe.MissingTypeParamDefault,t),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{const e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()===P.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}flowParseTypeParameterInstantiationInExpression(){if(47===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext((()=>{this.expect(47);const t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=t})),this.state.inType=t,this.state.inType||this.curContext()!==P.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(47!==this.reScan_lt())return;const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:s}){const i=this.state.inType;this.state.inType=!0;const a=this.startNode();let o,c;a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let l=!1;for(t&&this.match(6)?(this.expect(6),o=9,c=!0):(this.expect(5),o=8,c=!1),a.exact=c;!this.match(o);){let t=!1,i=null,o=null;const u=this.startNode();if(r&&this.isContextual(118)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),i=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}const h=this.flowParseVariance();if(this.eat(0))null!=i&&this.unexpected(i),this.eat(0)?(h&&this.unexpected(h.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):a.indexers.push(this.flowParseObjectTypeIndexer(u,t,h));else if(this.match(10)||this.match(47))null!=i&&this.unexpected(i),h&&this.unexpected(h.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e="init";(this.isContextual(99)||this.isContextual(104))&&V(this.lookahead().type)&&(e=this.state.value,this.next());const r=this.flowParseObjectTypeProperty(u,t,i,h,e,n,null!=s?s:!c);null===r?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(r)}this.flowObjectTypeSemicolon(),!o||this.match(8)||this.match(9)||this.raise(xe.UnexpectedExplicitInexactInObject,o)}this.expect(o),n&&(a.inexact=l);const u=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=i,u}flowParseObjectTypeProperty(e,t,n,r,s,i,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(i?a||this.raise(xe.InexactInsideExact,this.state.lastTokStartLoc):this.raise(xe.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(xe.InexactVariance,r),null):(i||this.raise(xe.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=n&&this.unexpected(n),r&&this.raise(xe.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=n,e.kind=s;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),"get"!==s&&"set"!==s||this.flowCheckGetterSetterParams(e),!i&&"constructor"===e.key.name&&e.value.this&&this.raise(xe.ThisParamBannedInConstructor,e.value.this)):("init"!==s&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,n=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?xe.GetterMayNotHaveThisParam:xe.SetterMayNotHaveThisParam,e.value.this),n!==t&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,e),"set"===e.kind&&e.value.rest&&this.raise(v.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const t=this.startNodeAt(e);t.qualification=n,t.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(t,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,t){const n=this.startNodeAt(e);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,n=!1,r=null;const s=this.startNode(),i=this.lookahead(),a=78===this.state.type;return 14===i.type||17===i.type?(a&&!e&&this.raise(xe.ThisParamMustBeFirst,s),t=this.parseIdentifier(a),this.eat(17)&&(n=!0,a&&this.raise(xe.ThisParamMayNotBeOptional,s)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),s.name=t,s.optional=n,s.typeAnnotation=r,this.finishNode(s,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:n}}flowIdentToTypeAnnotation(e,t,n){switch(n.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,n)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let n,r,s=!1;const i=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=i,r;case 47:{const e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),this.finishNode(e,"FunctionTypeAnnotation")}case 10:{const e=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(H(this.state.type)||this.match(78)){const e=this.lookahead().type;s=17!==e&&14!==e}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=i,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),r;this.eat(12)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(xe.UnexpectedSubtractionOperand,this.state.startLoc)}return void this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(K(this.state.type)){const e=G(this.state.type);return this.next(),super.createIdentifier(t,e)}if(H(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const r=this.startNodeAt(e),s=this.eat(18);n=n||s,this.expect(0),!s&&this.match(3)?(r.elementType=t,this.next(),t=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=t,r.indexType=this.flowParseType(),this.expect(3),n?(r.optional=s,t=this.finishNode(r,"OptionalIndexedAccessType")):t=this.finishNode(r,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(45);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(43);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(132===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){const t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,n=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,n))):super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(14)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){if(W(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t,n){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||H(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(H(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,n)}shouldParseExportDeclaration(){const{type:e}=this.state;return 126===e||q(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return 126===e||q(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(n),e}this.expect(17);const r=this.state.clone(),s=this.state.noArrowAt,i=this.startNodeAt(t);let{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[c,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){const e=[...s];if(l.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(a)}o&&c.length>1&&this.raise(xe.AmbiguousConditionalArrow,r.startLoc),o&&1===c.length&&(this.state=r,e.push(c[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=s,this.expect(14),i.test=e,i.consequent=a,i.alternate=this.forwardNoArrowParamsConversionAt(i,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(i,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const n=[e],r=[];for(;0!==n.length;){const e=n.pop();"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):"ConditionalExpression"===e.type&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach((e=>this.finishArrowValidation(e))),[r,[]]):function(e,t){const n=[],r=[];for(let s=0;s<e.length;s++)(t(e[s])?n:r).push(e[s]);return[n,r]}(r,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()):n=t(),n}parseParenItem(e,t){const n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){const e=this.startNodeAt(t);return e.expression=n,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,"TypeCastExpression")}return n}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(131)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(129)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.isContextual(126)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,n=super.maybeParseExportNamespaceSpecifier(e);return n&&"type"===e.exportKind&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,n){const{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,n),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(xe.DeclareClassElement,r):t.value&&this.raise(xe.DeclareClassFieldInitializer,t.value))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,n){return 64===e&&64===t&&ae(n)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,n){for(let t=0;t<e.length;t++){const n=e[t];"TypeCastExpression"===(null==n?void 0:n.type)&&(e[t]=this.typeCastToParameter(n))}super.toAssignableList(e,t,n)}toReferencedList(e,t){for(let r=0;r<e.length;r++){var n;const s=e[r];!s||"TypeCastExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized||!(e.length>1)&&t||this.raise(xe.TypeCastInPattern,s.typeAnnotation)}return e}parseArrayLike(e,t,n,r){const s=super.parseArrayLike(e,t,n,r);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(s.elements),s}isValidLVal(e,t,n){return"TypeCastExpression"===e||super.isValidLVal(e,t,n)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,s,i){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,s,i),t.params&&s){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(xe.ThisParamBannedInConstructor,t)}else if("MethodDefinition"===t.type&&s&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(xe.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const n=t[0];this.isThisParam(n)&&"get"===e.kind?this.raise(xe.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(xe.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,s,i,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!i&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const c=super.parseObjPropValue(e,t,n,r,s,i,a);return o&&((c.value||c).typeParameters=o),c}parseFunctionParamType(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(xe.PatternIsOptional,e),this.isThisParam(e)&&this.raise(xe.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(xe.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(xe.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const n=super.parseMaybeDefault(e,t);return"AssignmentPattern"===n.type&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(xe.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(xe.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,n){t.local=Se(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;const t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){if(super.applyImportPhase(e,t,n,r),t){if(!n&&this.match(65))return;e.exportKind="type"===n?n:"value"}else"type"===n&&this.match(55)&&this.unexpected(),e.importKind="type"===n||"typeof"===n?n:"value"}parseImportSpecifier(e,t,n,r,s){const i=e.imported;let a=null;"Identifier"===i.type&&("type"===i.name?a="type":"typeof"===i.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===a||W(this.state.type)?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=this.cloneIdentifier(t))}else{if(null!==a&&W(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(v.ImportBindingIsString,e,{importName:i.value});e.imported=i,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=this.cloneIdentifier(e.imported))}const c=Se(e);return n&&c&&this.raise(xe.ImportTypeShorthandOnlyInPureImport,e),(n||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),!o||n||c||this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const n=e.kind;"get"!==n&&"set"!==n&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var n;let r,s=null;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),r=this.tryParse((()=>super.parseMaybeAssign(e,t)),s),!r.error)return r.node;const{context:n}=this.state,i=n[n.length-1];i!==P.j_oTag&&i!==P.j_expr||n.pop()}if(null!=(n=r)&&n.error||this.match(47)){var i,a;let n;s=s||this.state.clone();const o=this.tryParse((r=>{var s;n=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(n,(()=>{const r=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(r,n),r}));null!=(s=i.extra)&&s.parenthesized&&r();const a=this.maybeUnwrapTypeCastExpression(i);return"ArrowFunctionExpression"!==a.type&&r(),a.typeParameters=n,this.resetStartLocationFromNode(a,n),i}),s);let c=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(xe.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),o.node;c=o.node}if(null!=(i=r)&&i.node)return this.state=r.failState,r.node;if(c)return this.state=o.failState,c;if(null!=(a=r)&&a.thrown)throw r.error;if(o.thrown)throw o.error;throw this.raise(xe.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,n,r=!0){if(!n||!this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(xe.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,n,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,n){if("Identifier"===e.type&&"async"===e.name&&this.state.noArrowAt.includes(t.index)){this.next();const n=this.startNodeAt(t);n.callee=e,n.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(n,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){const r=this.state.clone(),s=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),r);if(!s.error&&!s.aborted)return s.node;const i=this.tryParse((()=>super.parseSubscripts(e,t,n)),r);if(i.node&&!i.error)return i.node;if(s.node)return this.state=s.failState,s.node;if(i.node)return this.state=i.failState,i.node;throw s.error||i.error}return super.parseSubscripts(e,t,n)}parseSubscript(e,t,n,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,n)return r.stop=!0,e;this.next();const s=this.startNodeAt(t);return s.callee=e,s.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),s.arguments=this.parseCallExpressionArguments(11),s.optional=!0,this.finishCallExpression(s,!0)}if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const n=this.startNodeAt(t);n.callee=e;const s=this.tryParse((()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember))));if(s.node)return s.error&&(this.state=s.failState),s.node}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){const n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(xe.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(xe.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return 58===n&&58===r?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===n&&58!==r&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(xe.EnumBooleanMemberNotInitialized,e,{memberName:n,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?xe.EnumInvalidMemberInitializerSymbolType:xe.EnumInvalidMemberInitializerPrimaryType:xe.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(xe.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(xe.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const n=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}case 134:{const n=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}case 85:case 86:{const n=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){const{explicitType:r}=t;null!==r&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let s=!1;for(;!this.match(8);){if(this.eat(21)){s=!0;break}const i=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),c=a.name;if(""===c)continue;/^[a-z]/.test(c)&&this.raise(xe.EnumInvalidMemberName,a,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(xe.EnumDuplicateMemberName,a,{memberName:c,enumName:e}),n.add(c);const l={enumName:e,explicitType:t,memberName:c};switch(i.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),i.init=o.value,r.booleanMembers.push(this.finishNode(i,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),i.init=o.value,r.numberMembers.push(this.finishNode(i,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),i.init=o.value,r.stringMembers.push(this.finishNode(i,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:r.defaultedMembers.push(this.finishNode(i,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:s}}flowEnumStringMembers(e,t,{enumName:n}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:n});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:n});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!H(this.state.type))throw this.raise(xe.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(xe.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const n=t.name,r=t.loc.start,s=this.flowEnumParseExplicitType({enumName:n});this.expect(5);const{members:i,hasUnknownMembers:a}=this.flowEnumMembers({enumName:n,explicitType:s});switch(e.hasUnknownMembers=a,s){case"boolean":return e.explicitType=!0,e.members=i.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=i.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=i.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const s=i.booleanMembers.length,a=i.numberMembers.length,o=i.stringMembers.length,c=i.defaultedMembers.length;if(s||a||o||c){if(s||a){if(!a&&!o&&s>=c){for(const e of i.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=i.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!s&&!o&&a>=c){for(const e of i.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=i.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(xe.EnumInconsistentMemberValues,r,{enumName:n}),t()}return e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:vt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter})}getScopeHandler(){return Re}tsIsIdentifier(){return H(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),!this.hasPrecedingLineBreak()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,n){if(!H(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const r=this.state.value;if(e.includes(r)){if(n&&this.match(106))return;if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:n,errorTemplate:r=vt.InvalidModifierOnTypeMember},s){const i=(e,t,n,r)=>{t===n&&s[r]&&this.raise(vt.InvalidModifiersOrder,e,{orderedModifiers:[n,r]})},a=(e,t,n,r)=>{(s[n]&&t===r||s[r]&&t===n)&&this.raise(vt.IncompatibleModifiers,e,{modifiers:[n,r]})};for(;;){const{startLoc:o}=this.state,c=this.tsParseModifier(e.concat(null!=t?t:[]),n,s.static);if(!c)break;bt(c)?s.accessibility?this.raise(vt.DuplicateAccessibilityModifier,o,{modifier:c}):(i(o,c,c,"override"),i(o,c,c,"static"),i(o,c,c,"readonly"),s.accessibility=c):wt(c)?(s[c]&&this.raise(vt.DuplicateModifier,o,{modifier:c}),s[c]=!0,i(o,c,"in","out")):(hasOwnProperty.call(s,c)?this.raise(vt.DuplicateModifier,o,{modifier:c}):(i(o,c,"static","readonly"),i(o,c,"static","override"),i(o,c,"override","readonly"),i(o,c,"abstract","override"),a(o,c,"declare","override"),a(o,c,"static","abstract")),s[c]=!0),null!=t&&t.includes(c)&&this.raise(r,o,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){const n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t,n){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,n))}tsParseDelimitedListWorker(e,t,n,r){const s=[];let i=-1;for(;!this.tsIsListTerminator(e);){i=-1;const r=t();if(null==r)return;if(s.push(r),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(12))}i=this.state.lastTokStartLoc.index}return r&&(r.value=i),s}tsParseBracketedList(e,t,n,r,s){r||(n?this.expect(0):this.expect(47));const i=this.tsParseDelimitedList(e,t,s);return n?this.expect(3):this.expect(48),i}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(vt.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseImportTypeOptions(){const e=this.startNode();this.expect(5);const t=this.startNode();return this.isContextual(76)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,76),this.expect(14),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.expect(8),this.finishNode(e,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const e=this.startNode(),t=[];for(this.expect(5);!this.match(8);){const e=this.state.type;H(e)||134===e?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=t,this.next(),this.finishNode(e,"ObjectExpression")}tsParseEntityName(e){let t;if(1&e&&this.match(78))if(2&e)t=this.parseIdentifier(!0);else{const e=this.startNode();this.next(),t=this.finishNode(e,"ThisExpression")}else t=this.parseIdentifier(!!(1&e));for(;this.eat(16);){const n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(!!(1&e)),t=this.finishNode(n,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const n={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,n),0===t.params.length&&this.raise(vt.EmptyTypeParameters,t),-1!==n.value&&this.addExtra(t,"trailingComma",n.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const n=19===e;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(vt.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!H(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){t&&this.raise(vt.ReadonlyForMethodSignature,e);const n=e;n.kind&&this.match(47)&&this.raise(vt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const r="parameters",s="typeAnnotation";if("get"===n.kind)n[r].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(n[r][0])&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===n.kind){if(1!==n[r].length)this.raise(v.BadSetterArity,this.state.curPosition());else{const e=n[r][0];this.isThisParam(e)&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===e.type&&e.optional&&this.raise(vt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===e.type&&this.raise(vt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[s]&&this.raise(vt.SetAccessorCannotHaveReturnType,n[s])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{const n=e;t&&(n.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(n.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);return this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,super.parsePropertyName(e),this.match(10)||this.match(47)||this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedType(){const e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{const t=this.startNode();t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach((e=>{const{type:n}=e;!t||"TSRestType"===n||"TSOptionalType"===n||"TSNamedTupleMember"===n&&e.optional||this.raise(vt.OptionalTypeBeforeRequired,e),t||(t="TSNamedTupleMember"===n&&e.optional||"TSOptionalType"===n)})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const e=this.state.startLoc,t=this.eat(21),{startLoc:n}=this.state;let r,s,i,a;const o=W(this.state.type)?this.lookaheadCharCode():null;if(58===o)r=!0,i=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(63===o){i=!0;const e=this.state.value,t=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(r=!0,s=this.createIdentifier(this.startNodeAt(n),e),this.expect(17),this.expect(14),a=this.tsParseType()):(r=!1,a=t,this.expect(17))}else a=this.tsParseType(),i=this.eat(17),r=this.eat(14);if(r){let e;s?(e=this.startNodeAt(n),e.optional=i,e.label=s,e.elementType=a,this.eat(17)&&(e.optional=!0,this.raise(vt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(n),e.optional=i,this.raise(vt.InvalidTupleMemberLabel,a),e.label=a,e.elementType=this.tsParseType()),a=this.finishNode(e,"TSNamedTupleMember")}else if(i){const e=this.startNodeAt(n);e.typeAnnotation=a,a=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=a,a=this.finishNode(t,"TSRestType")}return a}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const n=this.startNode();return"TSConstructorType"===e&&(n.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,n))),this.finishNode(n,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){{const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const e=this.startNode(),t=this.lookahead();return 135!==t.type&&136!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(H(e)||88===e||84===e){const t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:e}=this.state;let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const n=this.startNodeAt(e);n.elementType=t,this.expect(3),t=this.finishNode(n,"TSArrayType")}else{const n=this.startNodeAt(e);n.objectType=t,n.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(n,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(vt.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){var e;return(e=this.state.type)>=121&&e<=123&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,n){const r=this.startNode(),s=this.eat(n),i=[];do{i.push(t())}while(this.eat(n));return 1!==i.length||s?(r.types=i,this.finishNode(r,e)):i[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(H(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch(e){return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch(e){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const n=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(n.parameterName=e,n.asserts=!0,n.typeAnnotation=null,e=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(e,n),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return r?(n.parameterName=this.parseIdentifier(),n.asserts=r,n.typeAnnotation=null,t.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const i=this.tsParseTypeAnnotation(!1);return n.parameterName=s,n.typeAnnotation=i,n.asserts=r,t.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(109!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!H(this.state.type)&&!this.match(78)||(e&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),0))}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){gt(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&77===this.lookahead().type}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(vt.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.startLoc,n=this.tsParseDelimitedList("HeritageClauseElement",(()=>{{const e=this.startNode();return e.expression=this.tsParseEntityName(3),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}}));return n.length||this.raise(vt.EmptyHeritageClauseType,t,{token:e}),n}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),H(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(vt.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&16!==this.lookahead().type){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()===P.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){const e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(512),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(512),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,n){e.isExport=n||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const r=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==r.type&&this.raise(vt.ImportAliasHasImportType,r),e.moduleReference=r,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),n=e();return this.state=t,n}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),n=e();if(void 0!==n&&!1!==n)return n;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;const t=this.state.type;return this.tsInAmbientContext((()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,this.state.value,!0));case 107:if(this.hasPlugin("explicitResourceManagement")&&this.isUsing())return this.raise(vt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 96:if(this.hasPlugin("explicitResourceManagement")&&this.isAwaitUsing())return this.raise(vt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 129:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(H(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,n){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(512),this.prodParam.enter(0);const n=e;return n.kind="global",e.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,n)}}tsParseDeclaration(e,t,n,r){switch(t){case"abstract":if(this.tsCheckLineTerminator(n)&&(this.match(80)||H(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(H(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(n)&&H(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(n)&&H(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const n=this.tsTryParseAndCatch((()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,n?super.parseArrowExpression(n,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInTopLevelContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(vt.EmptyTypeArguments,e):this.state.inType||this.curContext()!==P.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=124&&e<=130;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(e,t){const n=t.length?t[0].loc.start:this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);const s=r.accessibility,i=r.override,a=r.readonly;4&e||!(s||a||i)||this.raise(vt.UnexpectedParameterModifier,n);const o=this.parseMaybeDefault();2&e&&this.parseFunctionParamType(o);const c=this.parseMaybeDefault(o.loc.start,o);if(s||a||i){const e=this.startNodeAt(n);return t.length&&(e.decorators=t),s&&(e.accessibility=s),a&&(e.readonly=a),i&&(e.override=i),"Identifier"!==c.type&&"AssignmentPattern"!==c.type&&this.raise(vt.UnsupportedParameterPropertyKind,e),e.parameter=c,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),c}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(vt.PatternIsOptional,t)}setArrowFunctionParameters(e,t,n){super.setArrowFunctionParameters(e,t,n),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,n=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const r="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):"TSDeclareFunction"===r&&this.state.isAmbientContext&&(this.raise(vt.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,n):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,n))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(vt.UnexpectedTypeAnnotation,e.typeAnnotation)}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,n,r){const s=super.parseArrayLike(e,t,n,r);return"ArrayExpression"===s.type&&this.tsCheckForInvalidTypeCasts(s.elements),s}parseSubscript(e,t,n,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const n=this.startNodeAt(t);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}let s=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(n)return r.stop=!0,e;r.optionalChainMember=s=!0,this.next()}if(this.match(47)||this.match(51)){let i;const a=this.tsTryParseAndCatch((()=>{if(!n&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}const a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(s&&!this.match(10))return void(i=this.state.curPosition());if(X(this.state.type)){const n=super.parseTaggedTemplateExpression(e,t,r);return n.typeParameters=a,n}if(!n&&this.eat(10)){const n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(n.arguments),n.typeParameters=a,r.optionalChainMember&&(n.optional=s),this.finishCallExpression(n,r.optionalChainMember)}const o=this.state.type;if(48===o||52===o||10!==o&&z(o)&&!this.hasPrecedingLineBreak())return;const c=this.startNodeAt(t);return c.expression=e,c.typeParameters=a,this.finishNode(c,"TSInstantiationExpression")}));if(i&&this.unexpected(i,10),a)return"TSInstantiationExpression"===a.type&&((this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(vt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(16)||this.match(18)||(a.expression=super.stopParseSubscript(e,r))),a}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){var t;super.parseNewCallee(e);const{callee:n}=e;"TSInstantiationExpression"!==n.type||null!=(t=n.extra)&&t.parenthesized||(e.typeParameters=n.typeParameters,e.callee=n.expression)}parseExprOp(e,t,n){let r;if(J(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(r&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(s,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,t,n)}return super.parseExprOp(e,t,n)}checkReservedWord(e,t,n,r){this.state.isAmbientContext||super.checkReservedWord(e,t,n,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(vt.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){super.applyImportPhase(e,t,n,r),t?e.exportKind="type"===n?"type":"value":e.importKind="type"===n||"typeof"===n?n:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(H(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const n=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,n);t=super.parseImportSpecifiersAndAfter(e,n)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(vt.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){const t=e;this.next();let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(t,!1):t.importKind="value",this.tsParseImportEqualsDeclaration(t,n,!0)}if(this.eat(29)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){const t=e;return this.expectContextual(128),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,n=!1){const{isAmbientContext:r}=this.state,s=super.parseVarStatement(e,t,n||r);if(!r)return s;for(const{id:e,init:n}of s.declarations)n&&("var"===t||"let"===t||e.typeAnnotation?this.raise(vt.InitializerNotAllowedInAmbientContext,n):St(n,this.hasPlugin("estree"))||this.raise(vt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return s}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){const e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>bt(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&123===this.lookaheadCharCode()}parseClassMember(e,t,n){const r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:vt.InvalidModifierOnTypeParameterPositions},t);const s=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(vt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,n,!!t.static)};t.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(e,t,n,r){const s=this.tsTryParseIndexSignature(t);if(s)return e.body.push(s),t.abstract&&this.raise(vt.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(vt.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(vt.IndexSignatureHasDeclare,t),void(t.override&&this.raise(vt.IndexSignatureHasOverride,t));!this.state.inAbstractClass&&t.abstract&&this.raise(vt.NonAbstractClassHasAbstractMethod,t),t.override&&(n.hadSuperClass||this.raise(vt.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,n,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(vt.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(vt.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,n){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,n):void 0)||super.parseExpressionStatement(e,t,n)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(n),e}return super.parseConditional(e,t,n)}parseParenItem(e,t){const n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){const n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));const t=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(vt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const r=H(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return r?(("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||n)&&(e.exportKind="type"),n&&"TSImportEqualsDeclaration"!==r.type&&(this.resetStartLocation(r,t),r.declare=!0),r):null}parseClassId(e,t,n,r){if((!t||n)&&this.isContextual(113))return;super.parseClassId(e,t,n,e.declare?1024:8331);const s=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);s&&(e.typeParameters=s)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(29)&&this.raise(vt.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:t}=e;this.raise(vt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(vt.PrivateElementHasAbstract,e),e.accessibility&&this.raise(vt.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(vt.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,n,r,s,i){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&s&&this.raise(vt.ConstructorHasTypeParameters,a);const{declare:o=!1,kind:c}=t;!o||"get"!==c&&"set"!==c||this.raise(vt.DeclareAccessor,t,{kind:c}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,n,r,s,i)}pushClassPrivateMethod(e,t,n,r){const s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(t.typeParameters=s),super.pushClassPrivateMethod(e,t,n,r)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&null==e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,n,r,s,i,a){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,n,r,s,i,a)}parseFunctionParams(e,t){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(e.typeParameters=n),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var n,r,s,i,a;let o,c,l,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(o=this.state.clone(),c=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!c.error)return c.node;const{context:n}=this.state,r=n[n.length-1];r!==P.j_oTag&&r!==P.j_expr||n.pop()}if(!(null!=(n=c)&&n.error||this.match(47)))return super.parseMaybeAssign(e,t);o&&o!==this.state||(o=this.state.clone());const h=this.tryParse((n=>{var r,s;u=this.tsParseTypeParameters(this.tsParseConstModifier);const i=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==i.type||null!=(r=i.extra)&&r.parenthesized)&&n(),0!==(null==(s=u)?void 0:s.params.length)&&this.resetStartLocationFromNode(i,u),i.typeParameters=u,i}),o);if(!h.error&&!h.aborted)return u&&this.reportReservedArrowTypeParam(u),h.node;if(!c&&(gt(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(r=c)&&r.node)return this.state=c.failState,c.node;if(h.node)return this.state=h.failState,u&&this.reportReservedArrowTypeParam(u),h.node;if(null!=(s=l)&&s.node)return this.state=l.failState,l.node;throw(null==(i=c)?void 0:i.error)||h.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1!==e.params.length||e.params[0].constraint||null!=(t=e.extra)&&t.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(vt.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(vt.UnexpectedTypeCastInParameter,e):this.raise(vt.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,n){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==n||!t)&&["expression",!0];default:return super.isValidLVal(e,t,n)}}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){const n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e,t);return r.typeParameters=n,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){const n=super.parseMaybeDefault(e,t);return"AssignmentPattern"===n.type&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(vt.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,t,n){const r=e[t];"TSTypeCastExpression"===r.type&&(e[t]=this.typeCastToParameter(r)),super.toAssignableListItem(e,t,n)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:t,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=n}}parseClass(e,t,n){const r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,n)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(vt.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,n,r,s,i,a){const o=super.parseMethod(e,t,n,r,s,i,a);if((o.abstract||"TSAbstractMethodDefinition"===o.type)&&(this.hasPlugin("estree")?o.value:o).body){const{key:e}=o;this.raise(vt.AbstractMethodHasImplementation,o,{methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}return o}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,n,r){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,n),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,n,r))}parseImportSpecifier(e,t,n,r,s){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,n),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,n,r,n?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,n){const r=t?"imported":"local",s=t?"local":"exported";let i,a=e[r],o=!1,c=!0;const l=a.loc.start;if(this.isContextual(93)){const e=this.parseIdentifier();if(this.isContextual(93)){const n=this.parseIdentifier();W(this.state.type)?(o=!0,a=e,i=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(i=n,c=!1)}else W(this.state.type)?(c=!1,i=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else W(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&n&&this.raise(t?vt.TypeModifierIsUsedInTypeImports:vt.TypeModifierIsUsedInTypeExports,l),e[r]=a,e[s]=i,e[t?"importKind":"exportKind"]=o?"type":"value",c&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=this.cloneIdentifier(e[r])),t&&this.checkIdentifier(e[s],o?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ExpressionStatement":return void(null!=e.directive||(e.directive=void 0));case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return null!=e.decorators||(e.decorators=[]),null!=e.optional||(e.optional=!1),void(null!=e.typeAnnotation||(e.typeAnnotation=void 0));case"TSParameterProperty":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return null!=e.declare||(e.declare=!1),null!=e.returnType||(e.returnType=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"Property":return void(null!=e.optional||(e.optional=!1));case"TSMethodSignature":case"TSPropertySignature":null!=e.optional||(e.optional=!1);case"TSIndexSignature":return null!=e.accessibility||(e.accessibility=void 0),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":null!=e.declare||(e.declare=!1),null!=e.definite||(e.definite=!1),null!=e.readonly||(e.readonly=!1),null!=e.typeAnnotation||(e.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),void(null!=e.optional||(e.optional=!1));case"ClassExpression":null!=e.id||(e.id=null);case"ClassDeclaration":return null!=e.abstract||(e.abstract=!1),null!=e.declare||(e.declare=!1),null!=e.decorators||(e.decorators=[]),null!=e.implements||(e.implements=[]),null!=e.superTypeArguments||(e.superTypeArguments=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(null!=e.declare||(e.declare=!1));case"VariableDeclarator":return void(null!=e.definite||(e.definite=!1));case"TSEnumDeclaration":return null!=e.const||(e.const=!1),void(null!=e.declare||(e.declare=!1));case"TSEnumMember":return void(null!=e.computed||(e.computed=!1));case"TSImportType":return null!=e.qualifier||(e.qualifier=null),void(null!=e.options||(e.options=null));case"TSInterfaceDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.extends||(e.extends=[]));case"TSModuleDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.global||(e.global="global"===e.kind));case"TSTypeParameter":return null!=e.const||(e.const=!1),null!=e.in||(e.in=!1),void(null!=e.out||(e.out=!1))}}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,t=this.startNode();if(this.next(),H(this.state.type)){const e=this.parseIdentifierName(),n=this.createIdentifier(t,e);if(this.castNodeTo(n,"V8IntrinsicIdentifier"),this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(133)){const t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let n=e;return n.expectedNode&&n.type||(n=this.finishNode(n,"Placeholder")),n.expectedNode=t,n}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,n,r){void 0!==e&&super.checkReservedWord(e,t,n,r)}cloneIdentifier(e){const t=super.cloneIdentifier(e);return"Placeholder"===t.type&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return"Placeholder"===e.type?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,n){return"Placeholder"===e||super.isValidLVal(e,t,n)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!super.chStartsBindingIdentifier(e,t)||133===this.lookahead().type}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var n;if("Placeholder"!==t.type||null!=(n=t.extra)&&n.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){const n=e;return n.label=this.finishPlaceholder(t,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}this.semicolon();const r=e;return r.name=t.name,this.finishPlaceholder(r,"Statement")}parseBlock(e,t,n){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,n)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,n){const r=t?"ClassDeclaration":"ClassExpression";this.next();const s=this.state.strict,i=this.parsePlaceholder("Identifier");if(i){if(!(this.match(81)||this.match(133)||this.match(5))){if(n||!t)return e.id=null,e.body=this.finishPlaceholder(i,"ClassBody"),this.finishNode(e,r);throw this.raise(Et.ClassNameIsRequired,this.state.startLoc)}e.id=i}else this.parseClassId(e,t,n);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,s),this.finishNode(e,r)}parseExport(e,t){const n=this.parsePlaceholder("Identifier");if(!n)return super.parseExport(e,t);const r=e;if(!this.isContextual(98)&&!this.match(12))return r.specifiers=[],r.source=null,r.declaration=this.finishPlaceholder(n,"Declaration"),this.finishNode(r,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=n,r.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(r,t)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var n;return!(null==(n=e.specifiers)||!n.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishNode(n,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Et.UnexpectedSpace,this.state.lastTokEndLoc)}}},Ct=Object.keys(_t);class It extends yt{checkProto(e,t,n,r){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return n;const s=e.key;return"__proto__"===("Identifier"===s.type?s.name:s.value)?t?(this.raise(v.RecordNoProto,s),!0):(n&&(r?null===r.doubleProtoLoc&&(r.doubleProtoLoc=s.loc.start):this.raise(v.DuplicateProto,s)),!0):n}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(v.ParseExpressionEmptyInput,this.state.startLoc);const e=this.parseExpression();if(!this.match(140))throw this.raise(v.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,256&this.optionFlags&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(12)){const r=this.startNodeAt(t);for(r.expressions=[n];this.eat(12);)r.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){const n=this.state.startLoc,r=this.isContextual(108);if(r&&this.prodParam.hasYield){this.next();let e=this.parseYield(n);return t&&(e=t.call(this,e,n)),e}let s;e?s=!1:(e=new ht,s=!0);const{type:i}=this.state;(10===i||H(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,n)),(o=this.state.type)>=29&&o<=33){const t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(a,!0),t.left=a;const r=n.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=a;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(t,"AssignmentExpression")),t}var o;if(s&&this.checkExpressionErrors(e,!0),r){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.YieldNotInGeneratorFunction,n),this.parseYield(n)}return a}parseMaybeConditional(e){const t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprOps(e);return this.shouldExitDescending(r,n)?r:this.parseConditional(r,t,e)}parseConditional(e,t,n){if(this.eat(17)){const n=this.startNodeAt(t);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(r,n)?r:this.parseExprOp(r,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e);(n>=J(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}const r=this.state.type;if((s=r)>=39&&s<=59&&(this.prodParam.hasIn||!this.match(58))){let s=J(r);if(s>n){if(39===r){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}const i=this.startNodeAt(t);i.left=e,i.operator=this.state.value;const a=41===r||42===r,o=40===r;if(o&&(s=J(42)),this.next(),39===r&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);i.right=this.parseExprOpRightExpr(r,s);const c=this.finishNode(i,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,n)}}var s;return e}parseExprOpRightExpr(e,t){const n=this.state.startLoc;if(39===e){switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}if("smart"===this.getPluginOption("pipelineOperator","proposal"))return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),n)}))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,57===e?t-1:t)}parseHackPipeBody(){var e;const{startLoc:t}=this.state,n=this.parseMaybeAssign();return!p.has(n.type)||null!=(e=n.extra)&&e.parenthesized||this.raise(v.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,t),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){const n=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();const e=this.parseAwait(n);return t||this.checkExponentialAfterUnary(e),e}const s=this.match(34),i=this.startNode();if(a=this.state.type,j[a]){i.operator=this.state.value,i.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const n=this.match(89);if(this.next(),i.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&n){const e=i.argument;"Identifier"===e.type?this.raise(v.StrictDelete,i):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,i)}if(!s)return t||this.checkExponentialAfterUnary(i),this.finishNode(i,"UnaryExpression")}var a;const o=this.parseUpdate(i,s,e);if(r){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(e,t,n){if(t){const t=e;return this.checkLVal(t.argument,this.finishNode(t,"UpdateExpression")),e}const r=this.state.startLoc;let s=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return s;for(;34===this.state.type&&!this.canInsertSemicolon();){const e=this.startNodeAt(r);e.operator=this.state.value,e.prefix=!1,e.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(e,"UpdateExpression"))}return s}parseExprSubscripts(e){const t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprAtom(e);return this.shouldExitDescending(r,n)?r:this.parseSubscripts(r,t)}parseSubscripts(e,t,n){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,n,r),r.maybeAsyncArrow=!1}while(!r.stop);return e}parseSubscript(e,t,n,r){const{type:s}=this.state;if(!n&&15===s)return this.parseBind(e,t,n,r);if(X(s))return this.parseTaggedTemplateExpression(e,t,r);let i=!1;if(18===s){if(n&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(e,r);r.optionalChainMember=i=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,r,i);{const n=this.eat(0);return n||i||this.eat(16)?this.parseMember(e,t,r,n,i):this.stopParseSubscript(e,r)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,n,r,s){const i=this.startNodeAt(t);return i.object=e,i.computed=r,r?(i.property=this.parseExpression(),this.expect(3)):this.match(139)?("Super"===e.type&&this.raise(v.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),n.optionalChainMember?(i.optional=s,this.finishNode(i,"OptionalMemberExpression")):this.finishNode(i,"MemberExpression")}parseBind(e,t,n,r){const s=this.startNodeAt(t);return s.object=e,this.next(),s.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),t,n)}parseCoverCallAndAsyncArrowHead(e,t,n,r){const s=this.state.maybeInArrowParameters;let i=null;this.state.maybeInArrowParameters=!0,this.next();const a=this.startNodeAt(t);a.callee=e;const{maybeAsyncArrow:o,optionalChainMember:c}=n;o&&(this.expressionScope.enter(new ot(2)),i=new ht),c&&(a.optional=r),a.arguments=r?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Super"!==e.type,a,i);let l=this.finishCallExpression(a,c);return o&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(i),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(i,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=s,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){const r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,t),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if("Import"===e.callee.type)if(0===e.arguments.length||e.arguments.length>2)this.raise(v.ImportCallArity,e);else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(v.ImportCallSpreadArgument,t);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,n,r){const s=[];let i=!0;const a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(i)i=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,r,t))}return this.state.inFSharpPipelineDirectBody=a,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var n;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(n=t.extra)?void 0:n.trailingCommaLoc),t.innerComments&&Ye(e,t.innerComments),t.callee.trailingComments&&Ye(e,t.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,n=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?512&this.optionFlags?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 0:return this.parseArrayLike(3,!0,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(v.UnsupportedBind,e)}case 139:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{const e=this.input.codePointAt(this.nextTokenStart());ae(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(137===r)return this.parseDecimalLiteral(this.state.value);if(2===r||1===r)return this.parseArrayLike(2===this.state.type?4:3,!1,!0);if(6===r||7===r)return this.parseObjectLike(6===this.state.type?9:8,!1,!0);if(H(r)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,n=this.parseIdentifier();if(!t&&"async"===n.name&&!this.canInsertSemicolon()){const{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(H(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(90===e)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(n);this.unexpected()}parseTopicReference(e){const t=this.startNode(),n=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(t,n,e,r)}finishTopicReference(e,t,n,r){if(this.testTopicReferenceConfiguration(n,t,r))return"hack"===n?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(v.PipeTopicUnconfiguredToken,t,{token:G(r)})}testTopicReferenceConfiguration(e,t,n){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(n)}]);case"smart":return 27===n;default:throw this.raise(v.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Fe(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();const n=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=n,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||16&this.optionFlags?this.scope.allowSuper||16&this.optionFlags||this.raise(v.UnexpectedSuper,e):this.raise(v.SuperNotAllowed,e),this.match(10)||this.match(0)||this.match(16)||this.raise(v.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(t,n),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t;const r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(v.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){const t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}{const t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,n){return this.addExtra(n,"rawValue",e),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=e,this.next(),this.finishNode(n,t)}parseLiteral(e,t){const n=this.startNode();return this.parseLiteralAtNode(e,t,n)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let n;this.next(),this.expressionScope.enter(new ot(1));const r=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const i=this.state.startLoc,a=[],o=new ht;let c,l,u=!0;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,null===o.optionalParametersLoc?null:o.optionalParametersLoc),this.match(11)){l=this.state.startLoc;break}if(this.match(21)){const e=this.state.startLoc;if(c=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(o,this.parseParenItem))}const h=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=s;let p=this.startNodeAt(t);return e&&this.shouldParseArrow(a)&&(p=this.parseArrow(p))?(this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(p,a,!1),p):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),l&&this.unexpected(l),c&&this.unexpected(c),this.checkExpressionErrors(o,!0),this.toReferencedListDeep(a,!0),a.length>1?(n=this.startNodeAt(i),n.expressions=a,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,h)):n=a[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(1024&this.optionFlags))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const n=this.parseMetaProperty(e,t,"target");return this.scope.inNonArrowFunction||this.scope.inClass||4&this.optionFlags||this.raise(v.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const t=this.match(83),n=this.parseNoCallExpr();e.callee=n,!t||"Import"!==n.type&&"ImportExpression"!==n.type||this.raise(v.ImportCallNotNewExpression,n)}parseTemplateElement(e){const{start:t,startLoc:n,end:r,value:s}=this.state,a=t+1,o=this.startNodeAt(i(n,1));null===s&&(e||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));const c=this.match(24),l=c?-1:-2,u=r+l;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=c,this.next();const h=this.finishNode(o,"TemplateElement");return this.resetEndLocation(h,i(this.state.lastTokEndLoc,l)),h}parseTemplate(e){const t=this.startNode();let n=this.parseTemplateElement(e);const r=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(n=this.parseTemplateElement(e));return t.expressions=s,t.quasis=r,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,n,r){n&&this.expectPlugin("recordAndTuple");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=!1,a=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let s;t?s=this.parseBindingProperty():(s=this.parsePropertyDefinition(r),i=this.checkProto(s,n,i,r)),n&&!this.isObjectProperty(s)&&"SpreadElement"!==s.type&&this.raise(v.InvalidRecordProperty,s),s.shorthand&&this.addExtra(s,"shorthand",!0),o.properties.push(s)}this.next(),this.state.inFSharpPipelineDirectBody=s;let c="ObjectExpression";return t?c="ObjectPattern":n&&(c="RecordExpression"),this.finishNode(o,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());const n=this.startNode();let r,s=!1,i=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(r=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);const o=this.state.containsEsc;if(this.parsePropertyName(n,e),!a&&!o&&this.maybeAsyncOrAccessorProp(n)){const{key:e}=n,t=e.name;"async"!==t||this.hasPrecedingLineBreak()||(s=!0,this.resetPreviousNodeTrailingComments(e),a=this.eat(55),this.parsePropertyName(n)),"get"!==t&&"set"!==t||(i=!0,this.resetPreviousNodeTrailingComments(e),n.kind=t,this.match(55)&&(a=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,a,s,!1,i,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const n=this.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e);r.length!==n&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,e),"set"===e.kind&&"RestElement"===(null==(t=r[r.length-1])?void 0:t.type)&&this.raise(v.BadSetterRestParameter,e)}parseObjectMethod(e,t,n,r,s){if(s){const n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(n||t||this.match(10))return r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,n,r){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishObjectProperty(e);if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){const n=this.state.startLoc;null!=r?null===r.shorthandAssignLoc&&(r.shorthandAssignLoc=n):this.raise(v.InvalidCoverInitializedName,n),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,n,r,s,i,a){const o=this.parseObjectMethod(e,n,r,s,i)||this.parseObjectProperty(e,t,s,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:n,value:r}=this.state;let s;if(W(n))s=this.parseIdentifier(!0);else switch(n){case 135:s=this.parseNumericLiteral(r);break;case 134:s=this.parseStringLiteral(r);break;case 136:s=this.parseBigIntLiteral(r);break;case 139:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(v.UnexpectedPrivateField,e),s=this.parsePrivateName();break}default:if(137===n){s=this.parseDecimalLiteral(r);break}this.unexpected()}e.key=s,139!==n&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,n,r,s,i,a=!1){this.initFunction(e,n),e.generator=t,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(Fe(n,e.generator)),this.parseFunctionParams(e,r);const o=this.parseFunctionBodyAndFinish(e,i,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,n,r){n&&this.expectPlugin("recordAndTuple");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!n,r,i),this.state.inFSharpPipelineDirectBody=s,this.finishNode(i,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,n,r){this.scope.enter(6);let s=Fe(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(e,n);const i=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=i,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){const r=t&&!this.match(5);if(this.expressionScope.enter(lt()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const r=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(s=>{const i=!this.isSimpleParamList(e.params);s&&i&&this.raise(v.IllegalLanguageModeDirective,"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end);const a=!r&&this.state.strict;this.checkParams(e,!(this.state.strict||t||n||i),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,r=!0){const s=!t&&new Set,i={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,i,5,s,r)}parseExprList(e,t,n,r){const s=[];let i=!0;for(;!this.eat(e);){if(i)i=!1;else if(this.expect(12),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}s.push(this.parseExprListItem(t,n))}return s}parseExprListItem(e,t,n){let r;if(this.match(12))e||this.raise(v.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){const e=this.state.startLoc;r=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(v.UnexpectedArgumentPlaceholder,this.state.startLoc);const e=this.startNode();this.next(),r=this.finishNode(e,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return r}parseIdentifier(e){const t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",n)}parseIdentifierName(e){let t;const{startLoc:n,type:r}=this.state;W(r)?t=this.state.value:this.unexpected();const s=r<=92;return e?s&&this.replaceToken(132):this.checkReservedWord(t,n,s,!1),this.next(),t}checkReservedWord(e,t,n,r){if(!(e.length>10)&&function(e){return me.has(e)}(e))if(n&&function(e){return ce.has(e)}(e))this.raise(v.UnexpectedKeyword,t,{keyword:e});else if((this.state.strict?r?fe:pe:he)(e,this.inModule))this.raise(v.UnexpectedReservedWord,t,{reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(v.YieldBindingIdentifier,t)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(v.AwaitBindingIdentifier,t);if(this.scope.inStaticBlock)return void this.raise(v.AwaitBindingIdentifierInStaticBlock,t);this.expressionScope.recordAsyncArrowParametersError(t)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(v.ArgumentsInClass,t)}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait||1&this.optionFlags&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){const t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,t),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 53===e||10===e||0===e||X(e)||102===e&&!this.state.containsEsc||138===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(e){const t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(v.YieldInParameter,t);let n=!1,r=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:r=this.parseMaybeAssign()}return t.delegate=n,t.argument=r,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12))if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do{this.parseMaybeAssignAllowIn()}while(this.eat(12)&&!this.match(11));this.raise(v.ImportCallArity,e)}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(v.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){const n=this.startNodeAt(t);return n.callee=e,this.finishNode(n,"PipelineBareFunction")}{const n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=e,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,e)}withTopicBindingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const t=this.startNodeAt(this.state.endLoc);this.next();const n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{n()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const Ot={kind:1},Lt={kind:2},Nt=/[\uD800-\uDFFF]/u,Mt=/in(?:stanceof)?/y;class Dt extends It{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.comments,256&this.optionFlags&&(e.tokens=function(e,t,n){for(let r=0;r<e.length;r++){const s=e[r],{type:a}=s;if("number"==typeof a){if(139===a){const{loc:t,start:n,value:a,end:o}=s,c=n+1,l=i(t.start,1);e.splice(r,1,new nt({type:Z(27),value:"#",start:n,end:c,startLoc:t.start,endLoc:l}),new nt({type:Z(132),value:a,start:c,end:o,startLoc:l,endLoc:t.end})),r++;continue}if(X(a)){const{loc:o,start:c,value:l,end:u}=s,h=c+1,p=i(o.start,1);let d,f,m,y,g;d=96===t.charCodeAt(c-n)?new nt({type:Z(22),value:"`",start:c,end:h,startLoc:o.start,endLoc:p}):new nt({type:Z(8),value:"}",start:c,end:h,startLoc:o.start,endLoc:p}),24===a?(m=u-1,y=i(o.end,-1),f=null===l?null:l.slice(1,-1),g=new nt({type:Z(22),value:"`",start:m,end:u,startLoc:y,endLoc:o.end})):(m=u-2,y=i(o.end,-2),f=null===l?null:l.slice(1,-2),g=new nt({type:Z(23),value:"${",start:m,end:u,startLoc:y,endLoc:o.end})),e.splice(r,1,d,new nt({type:Z(20),value:f,start:h,end:m,startLoc:p,endLoc:y}),g),r+=2;continue}s.type=Z(a)}}return e}(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t=140,n=this.options.sourceType){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,t,{localName:e});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return r=140===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),r}stmtToDirective(e){const t=this.castNodeTo(e,"Directive"),n=this.castNodeTo(e.expression,"DirectiveLiteral"),r=n.value,s=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),i=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",i),this.addExtra(n,"expressionValue",r),t.value=n,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(100)&&this.hasFollowingBindingAtom()}isUsing(){if(!this.isContextual(107))return!1;const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);const t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}chStartsBindingIdentifier(e,t){if(ae(e)){if(Mt.lastIndex=t,Mt.test(this.input)){const e=this.codePointAtPos(Mt.lastIndex);if(!oe(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 123===t||this.chStartsBindingIdentifier(t,e)}allowsForUsing(){const{type:e,containsEsc:t,end:n}=this.lookahead();if(102===e&&!t){const e=this.lookaheadCharCodeSince(n);if(61!==e&&58!==e&&59!==e)return!1}return!(!H(e)||this.hasFollowingLineBreak()||(this.expectPlugin("explicitResourceManagement"),0))}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){const n=this.state.type,r=this.startNode(),s=!!(2&e),i=!!(4&e),a=1&e;switch(n){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(46===this.lookaheadCharCode())break;return i||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!s&&i);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(this.isAwaitUsing())return this.allowsUsing()?s?this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,r):this.raise(v.UnexpectedLexicalDeclaration,r):this.raise(v.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),this.allowsUsing()?s||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!s&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 75:s||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const e=this.state.value;return this.parseVarStatement(r,e)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return 8&this.optionFlags||a||this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next(),e=83===n?this.parseImport(r):this.parseExport(r,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return s||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!s&&i)}const o=this.state.value,c=this.parseExpression();return H(n)&&"Identifier"===c.type&&this.eat(14)?this.parseLabeledStatement(r,o,c,e):this.parseExpressionStatement(r,c,t)}assertModuleNodeAllowed(e){8&this.optionFlags||this.inModule||this.raise(v.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,n){var r;return e&&(null!=(r=t.decorators)&&r.length?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let n;if(this.match(10)){const t=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(t,n);const r=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==n&&this.raise(v.DecoratorArgumentsOutsideParentheses,r)}else{for(n=this.parseIdentifier(!1);this.eat(16);){const e=this.startNodeAt(t);e.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,n=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(n,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){const n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let n;for(n=0;n<this.state.labels.length;++n){const r=this.state.labels[n];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(t||1===r.kind))break;if(e.label&&t)break}}if(n===this.state.labels.length){const n=t?"BreakStatement":"ContinueStatement";this.raise(v.IllegalBreakContinue,e,{type:n})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ot);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);const n=this.isContextual(100);{const r=this.isAwaitUsing(),s=r||this.isContextual(107)&&this.allowsForUsing(),i=n&&this.hasFollowingBindingAtom()||s;if(this.match(74)||this.match(75)||i){const n=this.startNode();let i;r?(i="await using",this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):i=this.state.value,this.next(),this.parseVar(n,!0,i);const a=this.finishNode(n,"VariableDeclaration"),o=this.match(58);return o&&s&&this.raise(v.ForInUsing,a),(o||this.isContextual(102))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}const r=this.isContextual(95),s=new ht,i=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(v.ForOfLet,i),null===t&&r&&"Identifier"===i.type&&this.raise(v.ForOfAsync,i)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(i,!0);const n=a?"ForOfStatement":"ForInStatement";return this.checkLVal(i,{type:n}),this.parseForIn(e,i,t)}return this.checkExpressionErrors(s,!0),null!==t&&this.unexpected(t),this.parseFor(e,i)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||2&this.optionFlags||this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let n;this.expect(5),this.state.labels.push(Lt),this.scope.enter(256);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){const r=this.match(61);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,e.handler||e.finalizer||this.raise(v.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,n=!1){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,n,r){for(const e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,n,{labelName:t});const s=(i=this.state.type)>=90&&i<=92?1:this.match(71)?2:null;var i;for(let t=this.state.labels.length-1;t>=0;t--){const n=this.state.labels[t];if(n.statementStart!==e.start)break;n.statementStart=this.sourceToOffsetPos(this.state.start),n.kind=s}return this.state.labels.push({name:t,kind:s,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=8&r?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,n){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,n){const r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,8,n),t&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,r,s){const i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,n,r,s)}parseBlockOrModuleBlockBody(e,t,n,r,s){const i=this.state.strict;let a=!1,o=!1;for(;!this.match(r);){const r=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(r)){const e=this.stmtToDirective(r);t.push(e),a||"use strict"!==e.value.value||(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(r)}null==s||s.call(this,a),i||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,n){const r=this.match(58);return this.next(),r?null!==n&&this.unexpected(n):e.await=null!==n,"VariableDeclaration"!==t.type||null==t.declarations[0].init||r&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(v.ForInOfLoopInitializer,t,{type:r?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(v.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,n,r=!1){const s=e.declarations=[];for(e.kind=n;;){const e=this.startNode();if(this.parseVarId(e,n),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||r||("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(102))?"const"!==n&&"using"!==n&&"await using"!==n||this.match(58)||this.isContextual(102)||this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n}):this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),s.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){const n=this.parseBindingAtom();"using"!==t&&"await using"!==t||"ArrayPattern"!==n.type&&"ObjectPattern"!==n.type||this.raise(v.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},"var"===t?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const n=2&t,r=!!(1&t),s=r&&!(4&t),i=!!(8&t);this.initFunction(e,i),this.match(55)&&(n&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(s));const a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Fe(i,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),r&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||H(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new at(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,n){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return"Identifier"===e.type&&"constructor"===e.name||"StringLiteral"===e.type&&"constructor"===e.value}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();const n={hadConstructor:!1,hadSuperClass:e};let r=[];const s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const e=this.startNode();r.length&&(e.decorators=r,this.resetStartLocationFromNode(e,r[0]),r=[]),this.parseClassMember(s,e,n),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,e)}})),this.state.strict=t,this.next(),r.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(e,t){const n=this.parseIdentifier(!0);if(this.isClassMethod()){const r=t;return r.kind="method",r.computed=!1,r.key=n,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}if(this.isClassProperty()){const r=t;return r.computed=!1,r.key=n,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,t,n){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,n,r)}parseClassMemberWithIsStatic(e,t,n,r){const s=t,i=t,a=t,o=t,c=t,l=s,u=s;if(t.static=r,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";const t=this.match(139);return this.parseClassElementName(l),this.parsePostMemberNameModifiers(l),t?void this.pushClassPrivateMethod(e,i,!0,!1):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsGenerator,s.key),void this.pushClassMethod(e,s,!0,!1,!1,!1))}const h=!this.state.containsEsc&&H(this.state.type),p=this.parseClassElementName(t),d=h?p.name:null,f=this.isPrivateName(p),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(l.kind="method",f)return void this.pushClassPrivateMethod(e,i,!1,!1);const r=this.isNonstaticConstructor(s);let a=!1;r&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,p),r&&this.hasPlugin("typescript")&&t.override&&this.raise(v.OverrideOnConstructor,p),n.hadConstructor=!0,a=n.hadSuperClass),this.pushClassMethod(e,s,!1,!1,r,a)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(55)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);const t=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(e,c,t)}else{this.resetPreviousNodeTrailingComments(p),l.kind=d;const t=this.match(139);this.parseClassElementName(s),t?this.pushClassPrivateMethod(e,i,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsAccessor,s.key),this.pushClassMethod(e,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else{this.resetPreviousNodeTrailingComments(p);const t=this.eat(55);u.optional&&this.unexpected(m),l.kind="method";const n=this.match(139);this.parseClassElementName(l),this.parsePostMemberNameModifiers(u),n?this.pushClassPrivateMethod(e,i,t,!0):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsAsync,s.key),this.pushClassMethod(e,s,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:n}=this.state;if(132!==t&&134!==t||!e.static||"prototype"!==n||this.raise(v.StaticPrototype,this.state.startLoc),139===t){"constructor"===n&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var n;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const s=t.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,e.body.push(this.finishNode(t,"StaticBlock")),null!=(n=t.decorators)&&n.length&&this.raise(v.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){n||t.computed||!this.nameIsConstructor(t.key)||this.raise(v.ConstructorClassField,t.key);const r=this.parseClassAccessorProperty(t);e.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(e,t,n,r,s,i){e.body.push(this.parseMethod(t,n,r,s,i,"ClassMethod",!0))}pushClassPrivateMethod(e,t,n,r){const s=this.parseMethod(t,n,r,!1,!1,"ClassPrivateMethod",!0);e.body.push(s);const i="get"===s.kind?s.static?6:2:"set"===s.kind?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,i)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(lt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,r=8331){if(H(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else{if(!n&&t)throw this.raise(v.MissingClassName,this.state.startLoc);e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){const n=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,n),s=!r||this.eat(12),i=s&&this.eatExportStar(e),a=i&&this.maybeParseExportNamespaceSpecifier(e),o=s&&(!a||this.eat(12)),c=r||i;if(i&&!a){if(r&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}const l=this.maybeParseExportNamedSpecifiers(e);let u;if(r&&s&&!i&&!l&&this.unexpected(null,5),a&&o&&this.unexpected(null,98),c||l){if(u=!1,t)throw this.raise(v.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else u=this.maybeParseExportDeclaration(e);if(c||l||u){var h;const n=e;if(this.checkExport(n,!0,!1,!!n.source),"ClassDeclaration"===(null==(h=n.declaration)?void 0:h.type))this.maybeTakeDecorators(t,n.declaration,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(n,"ExportNamedDeclaration")}if(this.eat(65)){const n=e,r=this.parseExportDefaultExpression();if(n.declaration=r,"ClassDeclaration"===r.type)this.maybeTakeDecorators(t,r,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.checkExport(n,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(n,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);const n=t||this.parseIdentifier(!0),r=this.startNodeAtNode(n);return r.exported=n,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t;null!=(t=e).specifiers||(t.specifiers=[]);const n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){const t=e;t.specifiers||(t.specifiers=[]);const n="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.hasPlugin("explicitResourceManagement")&&(this.isUsing()||this.isAwaitUsing()))throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(H(e)){if(95===e&&!this.state.containsEsc||100===e)return!1;if((130===e||129===e)&&!this.state.containsEsc){const{type:e}=this.lookahead();if(H(e)&&98!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||H(this.state.type)&&n)return!0;if(this.match(65)&&n){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;if(26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")))return!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0;if(this.hasPlugin("explicitResourceManagement")){if(this.isUsing())return this.raise(v.UsingDeclarationExport,this.state.startLoc),!0;if(this.isAwaitUsing())return this.raise(v.UsingDeclarationExport,this.state.startLoc),!0}return 74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){var s;if(t)if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;const t=e.declaration;"Identifier"!==t.type||"from"!==t.name||t.end-t.start!=4||null!=(i=t.extra)&&i.parenthesized||this.raise(v.ExportDefaultFromAsIdentifier,t)}}else if(null!=(s=e.specifiers)&&s.length)for(const t of e.specifiers){const{exported:e}=t,n="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,n),!r&&t.local){const{local:e}=t;"Identifier"!==e.type?this.raise(v.ExportBindingIsString,t,{localName:e.value,exportName:n}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration){const t=e.declaration;if("FunctionDeclaration"===t.type||"ClassDeclaration"===t.type){const{id:n}=t;if(!n)throw new Error("Assertion failure");this.checkDuplicateExports(e,n.name)}else if("VariableDeclaration"===t.type)for(const e of t.declarations)this.checkDeclaration(e.id)}}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(v.DuplicateDefaultExport,e):this.raise(v.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),s=this.match(134),i=this.startNode();i.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(i,s,e,r))}return t}parseExportSpecifier(e,t,n,r){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const e=this.parseStringLiteral(this.state.value),t=Nt.exec(e.value);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){const{specifiers:t}=e,n=1===t.length?t[0].type:null;if("source"===e.phase)"ImportDefaultSpecifier"!==n&&this.raise(v.SourcePhaseImportRequiresDefault,t[0].loc.start);else if("defer"===e.phase)"ImportNamespaceSpecifier"!==n&&this.raise(v.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var r;"ImportDefaultSpecifier"!==n&&this.raise(v.ImportReflectionNotBinding,t[0].loc.start),(null==(r=e.assertions)?void 0:r.length)>0&&this.raise(v.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){const{specifiers:t}=e;if(null!=t){const e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(v.ImportJSONBindingNotDefault,e.loc.start)}}}isPotentialImportPhase(e){return!e&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}applyImportPhase(e,t,n,r){t||("module"===n?(this.expectPlugin("importReflection",r),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),"source"===n?(this.expectPlugin("sourcePhaseImports",r),e.phase="source"):"defer"===n?(this.expectPlugin("deferredImportEvaluation",r),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;const n=this.startNode(),r=this.parseIdentifierName(!0),{type:s}=this.state;return(W(s)?98!==s||102===this.lookaheadCharCode():12!==s)?(this.applyImportPhase(e,t,r,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(e){const{type:t}=this.state;return H(t)?98!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];const n=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),r=n&&this.maybeParseStarImportSpecifier(e);return n&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,n){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(e,t,n=8201){return this.checkLVal(e.local,{type:t},n),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);const e=[],t=new Set;do{if(this.match(8))break;const n=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(134)?n.key=this.parseStringLiteral(r):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){const e=[],t=new Set;do{const n=this.startNode();if(n.key=this.parseIdentifier(!0),"type"!==n.key.name&&this.raise(v.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.hasPlugin("importAssertions")||this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){const n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}return!!W(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){const t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const n=this.startNode(),r=this.match(134),s=this.isContextual(130);n.imported=this.parseModuleExportName();const i=this.parseImportSpecifier(n,r,"type"===e.importKind||"typeof"===e.importKind,s,void 0);e.specifiers.push(i)}}parseImportSpecifier(e,t,n,r,s){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:n}=e;if(t)throw this.raise(v.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(n))}return this.finishImportSpecifier(e,"ImportSpecifier",s)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}class Rt extends Dt{constructor(e,t,n){super(e=function(e){const t={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==e)return t;if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const n of Object.keys(t))null!=e[n]&&(t[n]=e[n]);if(1===t.startLine)null==e.startIndex&&t.startColumn>0?t.startIndex=t.startColumn:null==e.startColumn&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((null==e.startColumn||null==e.startIndex)&&null!=e.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return t}(e),t),this.options=e,this.initializeScopes(),this.plugins=n,this.filename=e.sourceFilename,this.startIndex=e.startIndex;let r=0;e.allowAwaitOutsideFunction&&(r|=1),e.allowReturnOutsideFunction&&(r|=2),e.allowImportExportEverywhere&&(r|=8),e.allowSuperOutsideMethod&&(r|=16),e.allowUndeclaredExports&&(r|=64),e.allowNewTargetOutsideFunction&&(r|=4),e.allowYieldOutsideFunction&&(r|=32),e.ranges&&(r|=128),e.tokens&&(r|=256),e.createImportExpressions&&(r|=512),e.createParenthesizedExpressions&&(r|=1024),e.errorRecovery&&(r|=2048),e.attachComment&&(r|=4096),e.annexB&&(r|=8192),this.optionFlags=r}getScopeHandler(){return ge}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}}const Bt=function(e){const t={};for(const n of Object.keys(e))t[n]=Z(e[n]);return t}($);function Ft(e,t){let n=Rt;const r=new Map;if(null!=e&&e.plugins){for(const t of e.plugins){let e,n;"string"==typeof t?e=t:[e,n]=t,r.has(e)||r.set(e,n||{})}!function(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=e.get("decorators").decoratorsBeforeExport;if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const n=e.get("decorators").allowCallParenthesized;if(null!=n&&"boolean"!=typeof n)throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;const r=e.get("pipelineOperator").proposal;if(!Tt.includes(r)){const e=Tt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if("hack"===r){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=e.get("pipelineOperator").topicToken;if(!kt.includes(t)){const e=kt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}var n;if("#"===t&&"hash"===(null==(n=e.get("recordAndTuple"))?void 0:n.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if("smart"===r&&"hash"===(null==(t=e.get("recordAndTuple"))?void 0:t.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if("may-2020"!==e.get("moduleAttributes").version)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){const t=e.get("recordAndTuple").syntaxType;if(null!=t){const e=["hash","bar"];if(!e.includes(t))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+e.map((e=>`'${e}'`)).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(e.has("optionalChainingAssign")&&"2023-07"!==e.get("optionalChainingAssign").version)throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}(r),n=function(e){const t=[];for(const n of Ct)e.has(n)&&t.push(n);const n=t.join("|");let r=jt.get(n);if(!r){r=Rt;for(const e of t)r=_t[e](r);jt.set(n,r)}return r}(r)}return new n(e,t,r)}const jt=new Map;t.parse=function(e,t){var n;if("unambiguous"!==(null==(n=t)?void 0:n.sourceType))return Ft(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";const n=Ft(t,e),r=n.parse();if(n.sawUnambiguousESM)return r;if(n.ambiguousScriptDifferentAst)try{return t.sourceType="script",Ft(t,e).parse()}catch(e){}else r.program.sourceType="script";return r}catch(n){try{return t.sourceType="script",Ft(t,e).parse()}catch(e){}throw n}},t.parseExpression=function(e,t){const n=Ft(t,e);return n.options.strictMode&&(n.state.strict=!0),n.getExpression()},t.tokTypes=Bt},6963:function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(9420))},7042:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},7050:function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(9420))},7542:(e,t,n)=>{"use strict";n.d(t,{X2:()=>T,Ot:()=>A,ki:()=>k,lO:()=>_});var r=n(4396),s={create:function(e){var t={time:(0,r.mU)(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(e){t.messagesCallback&&t.messagesCallback(e.data)},t},close:function(e){e.bc.close(),e.subFns=[]},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){try{return e.bc.postMessage(t,!1),r.o}catch(e){return Promise.reject(e)}},canBeUsed:function(){if("undefined"!=typeof globalThis&&globalThis.Deno&&globalThis.Deno.args)return!0;if("undefined"==typeof window&&"undefined"==typeof self||"function"!=typeof BroadcastChannel)return!1;if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0},type:"native",averageResponseTime:function(){return 150},microSeconds:r.mU};class i{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,a()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(e){const t=a()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const s=r[0];if(!(r[1]<t))return;e.map.delete(s)}}(this)}),0))}clear(){this.map.clear()}}function a(){return Date.now()}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}var c=r.mU,l="messages",u={durability:"relaxed"};function h(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function p(e){e.commit&&e.commit()}function d(e){e.closed||f(e).then((function(){return(0,r.yy)(e.options.idb.fallbackInterval)})).then((function(){return d(e)}))}function f(e){return e.closed?r.o:e.messagesCallback?function(e,t){var n=e.transaction(l,"readonly",u),r=n.objectStore(l),s=[],i=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var a=r.getAll(i);return new Promise((function(e,t){a.onerror=function(e){return t(e)},a.onsuccess=function(t){e(t.target.result)}}))}return new Promise((function(e,a){var o=function(){try{return i=IDBKeyRange.bound(t+1,1/0),r.openCursor(i)}catch(e){return r.openCursor()}}();o.onerror=function(e){return a(e)},o.onsuccess=function(r){var i=r.target.result;i?i.value.id<t+1?i.continue(t+1):(s.push(i.value),i.continue()):(p(n),e(s))}}))}(e.db,e.lastCursorId).then((function(t){var n=t.filter((function(e){return!!e})).map((function(t){return t.id>e.lastCursorId&&(e.lastCursorId=t.id),t})).filter((function(t){return function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e)})).sort((function(e,t){return e.time-t.time}));return n.forEach((function(t){e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),r.o})):r.o}var m={create:function(e,t){return t=o(t),function(e){var t="pubkey.broadcast-channel-0-"+e,n=h().open(t);return n.onupgradeneeded=function(e){e.target.result.createObjectStore(l,{keyPath:"id",autoIncrement:!0})},new Promise((function(e,t){n.onerror=function(e){return t(e)},n.onsuccess=function(){e(n.result)}}))}(e).then((function(n){var s={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:(0,r.zs)(),eMIs:new i(2*t.idb.ttl),writeBlockPromise:r.o,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){s.closed=!0,t.idb.onclose&&t.idb.onclose()},d(s),s}))},close:function(e){e.closed=!0,e.db.close()},onMessage:function(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,f(e)},postMessage:function(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((function(){return function(e,t,n){var r={uuid:t,time:Date.now(),data:n},s=e.transaction([l],"readwrite",u);return new Promise((function(e,t){s.oncomplete=function(){return e()},s.onerror=function(e){return t(e)},s.objectStore(l).add(r),p(s)}))}(e.db,e.uuid,t)})).then((function(){0===(0,r.HO)(0,10)&&function(e){return(t=e.db,n=e.options.idb.ttl,r=Date.now()-n,s=t.transaction(l,"readonly",u),i=s.objectStore(l),a=[],new Promise((function(e){i.openCursor().onsuccess=function(t){var n=t.target.result;if(n){var i=n.value;i.time<r?(a.push(i),n.continue()):(p(s),e(a))}else e(a)}}))).then((function(t){return function(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(l,"readwrite",u).objectStore(l);return Promise.all(t.map((function(e){var t=n.delete(e);return new Promise((function(e){t.onsuccess=function(){return e()}}))})))}(e,t.map((function(e){return e.id})))}));var t,n,r,s,i,a}(e)})),e.writeBlockPromise},canBeUsed:function(){return!!h()},type:"idb",averageResponseTime:function(e){return 2*e.idb.fallbackInterval},microSeconds:c};function y(){var e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function g(e){return"pubkey.broadcastChannel-"+e}function v(){var e=y();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}var b={create:function(e,t){if(t=o(t),!v())throw new Error("BroadcastChannel: localstorage cannot be used");var n=(0,r.zs)(),s=new i(t.localstorage.removeTimeout),a={channelName:e,uuid:n,eMIs:s};return a.listener=function(e){var t=g(e),r=function(e){var r;e.key===t&&(r=JSON.parse(e.newValue),a.messagesCallback&&r.uuid!==n&&r.token&&!s.has(r.token)&&(r.data.time&&r.data.time<a.messagesCallbackTime||(s.add(r.token),a.messagesCallback(r.data))))};return window.addEventListener("storage",r),r}(e),a},close:function(e){var t;t=e.listener,window.removeEventListener("storage",t)},onMessage:function(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(n){(0,r.yy)().then((function(){var s=g(e.channelName),i={token:(0,r.zs)(),time:Date.now(),data:t,uuid:e.uuid},a=JSON.stringify(i);y().setItem(s,a);var o=document.createEvent("Event");o.initEvent("storage",!0,!0),o.key=s,o.newValue=a,window.dispatchEvent(o),n()}))}))},canBeUsed:v,type:"localstorage",averageResponseTime:function(){var e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120},microSeconds:r.mU},w=n(3459),x=[s,m,b];function S(e){var t=[].concat(e.methods,x).filter(Boolean);if(e.type){if("simulate"===e.type)return w.MQ;var n=t.find((function(t){return t.type===e.type}));if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter((function(e){return"idb"!==e.type})));var r=t.find((function(e){return e.canBeUsed()}));if(r)return r;throw new Error("No usable method found in "+JSON.stringify(x.map((function(e){return e.type}))))}var P,A=new Set,E=0,T=function(e,t){var n,s;this.id=E++,A.add(this),this.name=e,P&&(t=P),this.options=o(t),this.method=S(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,s=(n=this).method.create(n.name,n.options),(0,r.yL)(s)?(n._prepP=s,s.then((function(e){n._state=e}))):n._state=s};function k(e){var t=S(e=o(e));return"node"===t.type?t.clearNodeFolder().then((function(){return!0})):r.fg}function _(e){P=e}function C(e,t,n){var s={time:e.method.microSeconds(),type:t,data:n};return(e._prepP?e._prepP:r.o).then((function(){var t=e.method.postMessage(e._state,s);return e._uMP.add(t),t.catch().then((function(){return e._uMP.delete(t)})),t}))}function I(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function O(e,t,n){e._addEL[t].push(n),function(e){if(!e._iL&&I(e)){var t=function(t){e._addEL[t.type].forEach((function(e){t.time>=e.time&&e.fn(t.data)}))},n=e.method.microSeconds();e._prepP?e._prepP.then((function(){e._iL=!0,e.method.onMessage(e._state,t,n)})):(e._iL=!0,e.method.onMessage(e._state,t,n))}}(e)}function L(e,t,n){e._addEL[t]=e._addEL[t].filter((function(e){return e!==n})),function(e){if(e._iL&&!I(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}T._pubkey=!0,T.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return C(this,"message",e)},postInternal:function(e){return C(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};L(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,O(this,"message",t)):this._onML=null},addEventListener:function(e,t){O(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){L(this,e,this._addEL[e].find((function(e){return e.fn===t})))},close:function(){var e=this;if(!this.closed){A.delete(this),this.closed=!0;var t=this._prepP?this._prepP:r.o;return this._onML=null,this._addEL.message=[],t.then((function(){return Promise.all(Array.from(e._uMP))})).then((function(){return Promise.all(e._befC.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}}},7545:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},7696:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9420))},7773:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var r=n(7551);const s=async(e,t)=>(await r.http.get("api/auth/v2/bootstrap",{...t,params:e})).data},8028:(e,t,n)=>{"use strict";var r=n(2290);e.exports=new r({explicit:[n(2621),n(5853),n(1256)]})},8382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__dev_only_clearGlobalExecutionContextStack:()=>W,__dev_only_getGlobalExecutionContextStack:()=>V,clearExpressionASTCache:()=>ae,clearFunctionASTCache:()=>ee,cook:()=>z,isEvaluable:()=>re,isTrackAll:()=>ie,precook:()=>J,precookFunction:()=>Q,preevaluate:()=>ne,shouldAllowRecursiveEvaluations:()=>se});var r=n(4586);let s=function(e){return e[e.LEXICAL=0]="LEXICAL",e[e.STRICT=1]="STRICT",e}({});const i=Symbol.for("SourceNode"),a=Symbol.for("FormalParameters"),o=Symbol.for("ECMAScriptCode"),c=Symbol.for("Environment"),l=Symbol.for("IsConstructor"),u=Symbol.for("ThisMode"),h=Symbol.for("$DebuggerCall$"),p=Symbol.for("$DebuggerScope$"),d=Symbol.for("$DebuggerNode$"),f=Symbol.for("$DebuggerReturn$");class m{constructor(){(0,r.A)(this,"VariableEnvironment",void 0),(0,r.A)(this,"LexicalEnvironment",void 0),(0,r.A)(this,"Function",void 0)}}let y=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LEXICAL=1]="LEXICAL",e[e.INITIALIZED=2]="INITIALIZED",e}({});class g{constructor(e){(0,r.A)(this,"OuterEnv",void 0),(0,r.A)(this,"bindingMap",new Map),(0,r.A)(this,"ThisValue",void 0),(0,r.A)(this,"ThisBindingStatus",void 0),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),S(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),S(void 0)}InitializeBinding(e,t){const n=this.bindingMap.get(e);return Object.assign(n,{initialized:!0,value:t}),S(void 0)}SetMutableBinding(e,t,n){const r=this.bindingMap.get(e);if(!r.initialized)throw new ReferenceError(`${e} is not initialized`);if(!r.mutable)throw new TypeError("Assignment to constant variable");return r.value=t,S(void 0)}GetBindingValue(e,t){const n=this.bindingMap.get(e);if(!n.initialized)throw new ReferenceError(`${e} is not initialized`);return n.value}HasThisBinding(){return!1}}class v extends g{}class b extends g{constructor(e){super(e[c]),e[u]===s.LEXICAL?this.ThisBindingStatus=y.LEXICAL:this.ThisBindingStatus=y.UNINITIALIZED}HasThisBinding(){return this.ThisBindingStatus!==y.LEXICAL}BindThisValue(e){if(this.ThisBindingStatus===y.INITIALIZED)throw new Error("This binding has been initialized");this.ThisValue=e,this.ThisBindingStatus=y.INITIALIZED}GetThisBinding(){if(this.ThisBindingStatus===y.UNINITIALIZED)throw new Error("This binding is not initialized");return this.ThisValue}}class w{constructor(e,t,n){(0,r.A)(this,"Base",void 0),(0,r.A)(this,"ReferenceName",void 0),(0,r.A)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=n}}class x{constructor(e,t){(0,r.A)(this,"Type",void 0),(0,r.A)(this,"Value",void 0),this.Type=e,this.Value=t}}function S(e){return new x("normal",e)}const P=Symbol("empty completion");function A(e){const t=new Set,n=e=>{if(Array.isArray(e))for(const t of e)n(t);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return n(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return n(e.id);case"ArrayPattern":return n(e.elements);case"AssignmentPattern":return n(e.left);case"ObjectPattern":return n(e.properties);case"Property":return n(e.value);case"RestElement":return n(e.argument)}};return n(e),Array.from(t)}function E(e){const t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function T(e,t){const n=[],r={var:t.var},s=(e,t)=>{if(Array.isArray(e))for(const n of e)s(n,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&n.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&n.push(e));case"SwitchCase":return void s(e.consequent,r);case"CatchClause":return void s(e.body,r)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void s(e.body,r);case"IfStatement":return s(e.consequent,r),void s(e.alternate,r);case"ForStatement":return s(e.init,r),void s(e.body,r);case"ForInStatement":case"ForOfStatement":return s(e.left,r),void s(e.body,r);case"SwitchStatement":return void s(e.cases,r);case"TryStatement":return s(e.block,r),s(e.handler,r),void s(e.finalizer,r)}}};return s(e,t),n}function k(e){return"unresolvable"!==e.Base&&!(e.Base instanceof g)}function _(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function C(e,t,n){if(null==t)return e;const r=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(const s of r)if(!n.has(s)){const n=Object.getOwnPropertyDescriptor(t,s);null!=n&&n.enumerable&&(e[s]=t[s])}return e}function I(e,t){const n="const"===e.kind;for(const r of A(e))n?t.CreateImmutableBinding(r,!0):t.CreateMutableBinding(r,!1)}function O(e){return"normal"===e.Type||"continue"==e.Type}function L(e,t){return e.Value!==P?e:new x(e.Type,t)}function N(e){if(e instanceof x&&(e=e.Value),!(e instanceof w))return e;if("unresolvable"===e.Base)throw new ReferenceError(`${e.ReferenceName} is not defined`);return e.Base instanceof g?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function M(e){return"symbol"==typeof e?e:String(e)}function D(e,t){return e[t]}function R(e,t){if("unresolvable"===e.Base)throw new ReferenceError(`${e.ReferenceName} is not defined`);return e.Base instanceof g?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,S(void 0))}function B(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError(typeof e+" is not iterable");var t;return e[Symbol.iterator]()}function F(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function j(e,t,n){return e?e.HasBinding(t)?new w(e,t,n):j(e.OuterEnv,t,n):new w("unresolvable",t,n)}function U(e,t,n){switch(t){case"+":return e+n;case"-":return e-n;case"/":return e/n;case"%":return e%n;case"*":return e*n;case"**":return e**n;case"==":return e==n;case"===":return e===n;case"!=":return e!=n;case"!==":return e!==n;case">":return e>n;case"<":return e<n;case">=":return e>=n;case"<=":return e<=n;case"in":return e in n}throw new SyntaxError(`Unsupported binary operator \`${t}\``)}const Y=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]),$=new WeakSet([Array,Map,Set,URL,URLSearchParams,WeakMap,WeakSet,RegExp]),H=[];function W(){H.length=0}function V(){return H}function z(e,t){var n;let{rules:r,debug:y,externalSourceForDebug:g,globalVariables:W={},ArrayConstructor:V=Array,hooks:z={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const K="FunctionDeclaration"!==e.type;function G(e){g||function(e){if(Y.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}(e)}const J=new v(null),X=new m;X.VariableEnvironment=J,X.LexicalEnvironment=J;const Z=[X];for(const[e,t]of Object.entries(W))J.CreateImmutableBinding(e,!0),J.InitializeBinding(e,t);const Q=new WeakMap;let ee;function*te(e,n,r){var s,i;switch(null===(s=z.beforeEvaluate)||void 0===s||s.call(z,e),ee=e,y&&(r||e.type.endsWith("Statement")&&("ExpressionStatement"!==e.type||"CallExpression"!==e.expression.type&&"TaggedTemplateExpression"!==e.expression.type)&&"TryStatement"!==e.type&&"BlockStatement"!==e.type&&"DoWhileStatement"!==e.type&&"WhileStatement"!==e.type&&"ForStatement"!==e.type&&"ForInStatement"!==e.type&&"ForOfStatement"!==e.type)&&(yield),e.type){case"ArrayExpression":{const t=new V;for(const n of e.elements)if(n)if("SpreadElement"===n.type){const e=N(yield*te(n.argument));t.push(...e)}else t.push(N(yield*te(n)));else t.length+=1;return S(t)}case"ArrowFunctionExpression":return _e(e),S(we(e));case"BinaryExpression":{const n=N(yield*te(e.left)),r=yield*te(e.right),s=N(r);if(K&&"|>"===e.operator){if("function"!=typeof s){const n=t.substring(e.right.start,e.right.end);throw new TypeError(`${n} is not a function`)}let i;return r instanceof w&&k(r)&&(i=r.Base),S(s.call(i,n))}return S(U(n,e.operator,s))}case"CallExpression":{const t=(yield*te(e.callee,n)).Value,r=N(t);return null==r&&(e.optional||null!=n&&n.skipped)?(n.skipped=!0,S(void 0)):(G(r),y&&(yield),yield*pe(r,t,e.arguments,e.callee))}case"ChainExpression":return yield*te(e.expression,{});case"ConditionalExpression":return S(N(yield*te(N(yield*te(e.test))?e.consequent:e.alternate)));case"Identifier":return S(re(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError(`Invalid regular expression: ${e.raw}`);if(e.regex.flags.includes("u"))throw new SyntaxError(`Unsupported unicode flag in regular expression: ${e.raw}`);return S(new RegExp(e.regex.pattern,e.regex.flags))}return S(e.value);case"LogicalExpression":{const t=N(yield*te(e.left));switch(e.operator){case"&&":return S(t&&N(yield*te(e.right)));case"||":return S(t||N(yield*te(e.right)));case"??":return S(null!=t?t:N(yield*te(e.right)));default:throw new SyntaxError(`Unsupported logical operator '${e.operator}'`)}}case"MemberExpression":{const t=N((yield*te(e.object,n)).Value);if(null==t&&(e.optional||null!=n&&n.skipped))return n.skipped=!0,S(void 0);G(t);const r=e.computed?yield*function*(e,t){const n=M(N(yield*te(t)));return new w(e,n,!0)}(t,e.property):function(e,t){ee=t;const n=t.name;return new w(e,n,!0)}(t,e.property);return G(r),S(r)}case"NewExpression":return yield*function*(e,n){const r=N(yield*te(e)),s=yield*de(n);if("function"!=typeof r||!1===r[l]){const n=t.substring(e.start,e.end);throw new TypeError(`${n} is not a constructor`)}if(!g&&!function(e){return $.has(e)||e===Date}(r)&&r!==V){const n=t.substring(e.start,e.end);throw new TypeError(`${n} is not an allowed constructor`)}return S(new r(...s))}(e.callee,e.arguments);case"ObjectExpression":{const t={};for(const n of e.properties)if("SpreadElement"===n.type)C(t,N(yield*te(n.argument)),new Set);else{if("init"!==n.kind)throw new SyntaxError("Unsupported object getter/setter");const e=n.computed||"Identifier"!==n.key.type?yield*Ae(n.key):n.key.name;if("__proto__"===e)throw new TypeError("Setting '__proto__' property is not allowed");const r=N(yield*te(n.value));n.method&&"function"==typeof r&&xe(r,e),t[e]=r}return S(t)}case"SequenceExpression":{let t;for(const n of e.expressions)t=S(N(yield*te(n)));return t}case"TemplateLiteral":{const t=[e.quasis[0].value.cooked];let n=0;for(const r of e.expressions){const s=N(yield*te(r));t.push(String(s)),t.push(e.quasis[n+=1].value.cooked)}return S(t.join(""))}case"TaggedTemplateExpression":{const t=(yield*te(e.tag)).Value,n=N(t);return G(n),y&&(yield),yield*pe(n,t,e.quasi,e.tag)}case"UnaryExpression":{const t=(yield*te(e.argument)).Value;if(!K&&"delete"===e.operator){if(!(t instanceof w))return S(!0);if(k(t))return S(delete t.Base[t.ReferenceName])}return"typeof"===e.operator?t instanceof w&&"unresolvable"===t.Base?S("undefined"):S(typeof N(t)):S(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError(`Unsupported unary operator \`${t}\``)}(N(t),e.operator))}}if(!K)switch(e.type){case"AssignmentExpression":{if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){const t=(yield*te(e.left)).Value;let n;return n=ye(e.right)&&"Identifier"===e.left.type?ge(e.right,e.left.name):N(yield*te(e.right)),R(t,n),S(n)}const t=N(yield*te(e.right));return yield*ce(e.left,t),S(t)}const t=(yield*te(e.left)).Value,n=N(t),r=N(yield*te(e.right)),s=function(e,t,n){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return U(e,t.substr(0,t.length-1),n)}throw new SyntaxError(`Unsupported assignment operator \`${t}\``)}(n,e.operator,r);return R(t,s),S(s)}case"BlockStatement":{if(!e.body.length)return S(P);const t=ne().LexicalEnvironment,n=new v(t);he(e.body,n),ne().LexicalEnvironment=n;const r=yield*me(e.body);return ne().LexicalEnvironment=t,r}case"BreakStatement":return new x("break",P);case"ContinueStatement":return new x("continue",P);case"EmptyStatement":case"FunctionDeclaration":return S(P);case"DoWhileStatement":return se(yield*function*(e){let t;for(;;){const n=yield*te(e.body);if(!O(n))return L(n,t);if(n.Value!==P&&(t=n.Value),!N(yield*te(e.test,void 0,!0)))return S(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return yield*te(e.expression);case"ForInStatement":case"ForOfStatement":return se(yield*function*(e){const t=e.left,n="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",r="lexicalBinding"===n?A(t):[],s="ForInStatement"===e.type?"enumerate":"iterate",i=yield*function*(e,t,n){const r=ne(),s=r.LexicalEnvironment;if(e.length>0){const t=new v(s);for(const n of e)t.CreateMutableBinding(n,!1);r.LexicalEnvironment=t}const i=yield*te(t,void 0,!0);r.LexicalEnvironment=s;const a=N(i);return"enumerate"===n?null==a?new x("break",P):S(function*(e){for(const t in e)yield t}(a)):S(B(a))}(r,e.right,s);return"normal"!==i.Type?i:yield*function*(e,t,n,r,s){const i="assignment"===s?e:e.declarations[0].id,a=ne().LexicalEnvironment;let o;const c="ObjectPattern"===i.type||"ArrayPattern"===i.type;for(;;){ee=i;const{done:l,value:u}=n.next();if(l)return y&&(yield),S(o);let h,p;if("lexicalBinding"===s){if(p=new v(a),I(e,p),ne().LexicalEnvironment=p,y&&(yield),!c){const[e]=A(i);h=re(e)}}else y&&(yield),c||(h=(yield*te(i)).Value);c?"assignment"===s?yield*ce(i,u):"varBinding"===s?yield*Pe(i,u,void 0):yield*Pe(i,u,p):"lexicalBinding"===s?_(h,u):R(h,u);const d=yield*te(t);if(ne().LexicalEnvironment=a,!O(d)){const e=L(d,o);if("enumerate"!==r&&void 0!==n.return){const e=n.return();if(!e||!["object","function"].includes(typeof e))throw new TypeError("Iterator result is not an object")}return e}d.Value!==P&&(o=d.Value)}}(t,e.body,i.Value,s,n)}(e));case"ForStatement":return se(yield*function*(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return yield*te(e.init),yield*ae(e.test,e.update,e.body,[]);const t=ne().LexicalEnvironment,n=new v(t),r="const"===e.init.kind,s=A(e.init);for(const e of s)r?n.CreateImmutableBinding(e,!0):n.CreateMutableBinding(e,!1);ne().LexicalEnvironment=n,yield*te(e.init);const i=r?[]:Array.from(s),a=yield*ae(e.test,e.update,e.body,i);return ne().LexicalEnvironment=t,a}return e.init&&N(yield*te(e.init)),yield*ae(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return _e(e),S(be(e));case"IfStatement":var a;return N(yield*te(e.test))?(null===(a=z.beforeBranch)||void 0===a||a.call(z,e,"if"),L(yield*te(e.consequent),void 0)):(null===(i=z.beforeBranch)||void 0===i||i.call(z,e,"else"),e.alternate?L(yield*te(e.alternate),void 0):S(void 0));case"ReturnStatement":{let t;return e.argument&&(t=N(yield*te(e.argument))),new x("return",t)}case"ThisExpression":if(!g)break;return S(function(){let e=ne().LexicalEnvironment;for(;e;){if(e.HasThisBinding())return e;e=e.OuterEnv}throw new Error("Accessing global this is forbidden")}().GetThisBinding());case"ThrowStatement":throw N(yield*te(e.argument));case"UpdateExpression":{const t=(yield*te(e.argument)).Value,n=Number(N(t)),r="++"===e.operator?n+1:n-1;return R(t,r),S(e.prefix?r:n)}case"SwitchCase":return yield*me(e.consequent);case"SwitchStatement":{const t=N(yield*te(e.discriminant)),n=ne().LexicalEnvironment,r=new v(n);he(e.cases,r),ne().LexicalEnvironment=r;const s=yield*function*(e,t){let n;const r=e.findIndex((e=>!e.test)),s=r>=0,i=s?e.slice(0,r):e;let a=!1;for(const e of i)if(a||(a=yield*ie(e,t)),a){const t=yield*te(e);if(t.Value!==P&&(n=t.Value),"normal"!==t.Type)return L(t,n)}if(!s)return S(n);let o=!1;const c=e.slice(r+1);if(!a)for(const e of c)if(o||(o=yield*ie(e,t)),o){const t=yield*te(e);if(t.Value!==P&&(n=t.Value),"normal"!==t.Type)return L(t,n)}if(o)return S(n);const l=yield*te(e[r]);if(l.Value!==P&&(n=l.Value),"normal"!==l.Type)return L(l,n);for(const e of c){const t=yield*te(e);if(t.Value!==P&&(n=t.Value),"normal"!==t.Type)return L(t,n)}return S(n)}(e.cases,t);return ne().LexicalEnvironment=n,se(s)}case"TryStatement":{let t;try{t=yield*te(e.block)}catch(n){if(!e.handler)throw n;var o;ee=e.handler,null===(o=z.beforeEvaluate)||void 0===o||o.call(z,e.handler),t=yield*function*(e,t){if(!e.param)return yield*te(e.body);const n=ne().LexicalEnvironment,r=new v(n);for(const t of A(e.param))r.CreateMutableBinding(t,!1);ne().LexicalEnvironment=r,yield*Pe(e.param,t,r);const s=yield*te(e.body);return ne().LexicalEnvironment=n,s}(e.handler,n)}finally{if(e.finalizer){const n=yield*te(e.finalizer);"normal"!==n.Type&&(t=n)}}return t}case"VariableDeclaration":{let t;for(const n of e.declarations)if(ee=n,n.init)if("Identifier"===n.id.type){ee=n.init,y&&"CallExpression"!==ee.type&&"TaggedTemplateExpression"!==ee.type&&(yield);const r=n.id.name,s=re(r);let i;i=ye(n.init)?ge(n.init,r):N(yield*te(n.init)),t="var"===e.kind?R(s,i):_(s,i)}else{ee=n.init,y&&"CallExpression"!==ee.type&&"TaggedTemplateExpression"!==ee.type&&(yield);const r=N(yield*te(n.init));t=yield*Pe(n.id,r,"var"===e.kind?void 0:ne().LexicalEnvironment)}else t="var"===e.kind?S(P):_(re(n.id.name),void 0);return t}case"WhileStatement":return se(yield*function*(e){let t;for(;;){if(!N(yield*te(e.test,void 0,!0)))return S(t);const n=yield*te(e.body);if(!O(n))return L(n,t);n.Value!==P&&(t=n.Value)}}(e))}throw new SyntaxError(`Unsupported node type \`${e.type}\``)}function ne(){return Z[Z.length-1]}function re(e,t){return t||(t=ne().LexicalEnvironment),j(t,e,!0)}function se(e){return"break"===e.Type?e.Value===P?S(void 0):S(e.Value):e}function*ie(e,t){return t===N(yield*te(e.test))}function*ae(e,t,n,r){let s;for(oe(r);;){if(e&&!N(yield*te(e,void 0,!0)))return S(s);const i=yield*te(n);if(!O(i))return L(i,s);i.Value&&(s=i.Value),oe(r),t&&N(yield*te(t,void 0,!0))}}function oe(e){if(0===e.length)return;const t=ne().LexicalEnvironment,n=t.OuterEnv,r=new v(n);for(const n of e){r.CreateMutableBinding(n,!1);const e=t.GetBindingValue(n,!1);r.InitializeBinding(n,e)}ne().LexicalEnvironment=r}function*ce(e,t){if("ObjectPattern"===e.type)return F(t),e.properties.length>0&&(yield*function*(e,t){const n=new Set;for(const r of e)if("Property"===r.type){const e=r.computed||"Identifier"!==r.key.type?yield*Ae(r.key):r.key.name,s="AssignmentPattern"===r.value.type?r.value.left:r.value;if("Identifier"===s.type){const i=re(s.name);let a=D(t,e);"AssignmentPattern"===r.value.type&&void 0===a&&(a=ye(r.value.right)?ge(r.value.right,s.name):N(yield*te(r.value.right))),R(i,a),n.add(e)}else yield*le(r.value,t,e),n.add(e)}else yield*ue(r,t,n)}(e.properties,t)),S(P);const n=B(t);return yield*function*(e,t){let n=S(P);for(const r of e){if(!r){t.next(),n=S(P);continue}const e="RestElement"===r.type?r.argument:"AssignmentPattern"===r.type?r.left:r,s="ArrayPattern"===e.type||"ObjectPattern"===e.type;let i,a;if(s||(i=(yield*te(e)).Value),"RestElement"!==r.type){const{done:n,value:s}=t.next(),i=n?void 0:s;a="AssignmentPattern"===r.type&&void 0===i?ye(r.right)&&"Identifier"===e.type?ge(r.right,e.name):N(yield*te(r.right)):i}else{a=new V;let e=0;for(;;){const{done:n,value:r}=t.next();if(n)break;a[e]=r,e++}}n=s?yield*ce(e,a):R(i,a)}return n}(e.elements,n)}function*le(e,t,n){const r="AssignmentPattern"===e.type?e.left:e,s="ArrayPattern"===r.type||"ObjectPattern"===r.type;let i;s||(i=(yield*te(r)).Value);const a=D(t,n);let o;return o="AssignmentPattern"===e.type&&void 0===a?N(yield*te(e.right)):a,s?yield*ce(r,o):R(i,o)}function*ue(e,t,n){return R((yield*te(e.argument)).Value,C({},t,n))}function he(e,t){const n=T(e,{var:!1,topLevel:!1});for(const e of n){const n="VariableDeclaration"===e.type&&"const"===e.kind;for(const r of A(e))n?t.CreateImmutableBinding(r,!0):t.CreateMutableBinding(r,!1);if("FunctionDeclaration"===e.type){const[n]=A(e),r=ve(e,t);t.InitializeBinding(n,r)}}}function*pe(e,n,r,s){let i;n instanceof w&&k(n)&&(i=n.Base);const a=yield*de(r);if("function"!=typeof e){const e=t.substring(s.start,s.end);throw new TypeError(`${e} is not a function`)}if(y||g){const t=e[h];if(t){const e=yield*t.apply(i,a);return G(e),S(e)}}const o=e.apply(i,a);return G(o),S(o)}function*de(e){const t=[];if(Array.isArray(e))for(const n of e)if("SpreadElement"===n.type){const e=N(yield*te(n.argument));t.push(...e)}else t.push(N(yield*te(n)));else{t.push(function(e){const t=Q.get(e);if(t)return t;const n=e.quasis.map((e=>e.value.raw)),r=e.quasis.map((e=>e.value.cooked));return Object.freeze(n),Object.defineProperty(r,"raw",{value:n,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(r),Q.set(e,r),r}(e));for(const n of e.expressions)t.push(N(yield*te(n)))}return t}function*fe(e,t,n){var c;null===(c=z.beforeCall)||void 0===c||c.call(z,e[i]),function(e,t,n){if(e[u]===s.LEXICAL)return;const r=t.LexicalEnvironment;null==r||r.BindThisValue(n)}(e,function(e){const t=new m;t.Function=e;const n=new b(e);return t.VariableEnvironment=n,t.LexicalEnvironment=n,Z.push(t),H.push(t),t}(e),t);const l=yield*function*(e,t){return yield*function*(e,t,n){return yield*function*(e,t){const n=ne(),i=e[o],c=e[a],l=A(c),h=E(c),p=T(i,{var:!0,topLevel:!0}),d=A(p),f=[],m=[];for(let e=p.length-1;e>=0;e--){const t=p[e];if("FunctionDeclaration"===t.type){_e(t);const[e]=A(t);f.includes(e)||(f.unshift(e),m.unshift(t))}else if(null!=r&&r.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}const y=!!g&&e[u]!==s.LEXICAL,b=n.LexicalEnvironment;for(const e of l)b.CreateMutableBinding(e,!1);let w=l;if(y){const e=function(e){const t=[...e],n={};Object.defineProperty(n,"length",{value:t.length,writable:!0,configurable:!0});for(let e=0;e<t.length;e++)n[String(e)]=t[e];Object.defineProperty(n,Symbol.iterator,{value:Array.prototype.values,writable:!0,configurable:!0});const r=()=>{throw new TypeError("'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them")};return Object.defineProperty(n,"callee",{get:r,set:r}),n}(t);b.CreateImmutableBinding("arguments",!1),b.InitializeBinding("arguments",e),w=l.concat("arguments")}const x=B(t);let S;if(yield*Te(c,x,b),h){S=new v(b),n.VariableEnvironment=S;const e=[];for(const t of d)if(!e.includes(t)){let n;e.push(t),S.CreateMutableBinding(t,!1),w.includes(t)&&!f.includes(t)&&(n=b.GetBindingValue(t,!1)),S.InitializeBinding(t,n)}}else{const e=[...w];for(const t of d)e.includes(t)||(e.push(t),b.CreateMutableBinding(t,!1),b.InitializeBinding(t,void 0));S=b}const P=S;n.LexicalEnvironment=P;const k=T(i,{var:!1,topLevel:!0});for(const e of k)for(const t of A(e))"const"===e.kind?P.CreateImmutableBinding(t,!0):P.CreateMutableBinding(t,!1);for(const e of m){const[t]=A(e),n=ve(e,P);S.SetMutableBinding(t,n,!1)}}(t,n),Array.isArray(e)?yield*me(e):new x("return",N(yield*te(e)))}(e[o],e,t)}(e,n);if(y&&(ee={...e[i],[f]:!0},yield{type:"return",value:"return"===l.Type?l.Value:void 0}),Z.pop(),H.pop(),"return"===l.Type)return l.Value}function*me(e){let t=S(P);for(const n of e){const e=yield*te(n);if("normal"!==e.Type)return e;t=L(t,e.Value)}return t}function ye(e){return"FunctionExpression"===e.type&&!e.id||"ArrowFunctionExpression"===e.type}function ge(e,t){var n;switch(null===(n=z.beforeEvaluate)||void 0===n||n.call(z,e),e.type){case"FunctionExpression":return be(e,t);case"ArrowFunctionExpression":return we(e,t);default:throw new Error(`Unexpected node type for NamedEvaluation: ${e.type}`)}}function ve(e,t){const n=Se(e,t,!0,!1);return e.id&&xe(n,e.id.name),n}function be(e,t){const n=ne().LexicalEnvironment;if(e.id){const t=e.id.name,r=new v(n);r.CreateImmutableBinding(t,!1);const s=Se(e,r,!0,!1);return xe(s,t),r.InitializeBinding(t,s),s}{const r=Se(e,n,!0,!1);return xe(r,null!=t?t:""),r}}function we(e,t){const n=Se(e,ne().LexicalEnvironment,!1,!0);return xe(n,null!=t?t:""),n}function xe(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}function Se(e,t,n,r){const p=function(){return q(fe(p,this,arguments))};Object.defineProperties(p,{[i]:{value:e},[a]:{value:e.params},[o]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[c]:{value:t},[l]:{value:n},[u]:{value:r?s.LEXICAL:s.STRICT}});const d=function(e){let t=0;for(const n of e)switch(n.type){case"AssignmentPattern":case"RestElement":return t;default:t++}return t}(e.params);return Object.defineProperty(p,"length",{configurable:!0,value:d}),(y||g)&&Object.defineProperty(p,h,{value:function(){return fe(p,this,arguments)}}),p}function*Pe(e,t,n){switch(e.type){case"Identifier":return function(e,t,n){return n.InitializeBinding(e,t),S(P)}(e.name,t,n);case"ObjectPattern":return F(t),yield*function*(e,t,n){const r=new Set;for(const s of e){if("RestElement"===s.type)return Ee(s,t,n,r);if(s.computed||"Identifier"!==s.key.type){const e=yield*Ae(s.key);yield*ke(s.value,t,n,e),r.add(e)}else yield*ke(s.value,t,n,s.key.name),r.add(s.key.name)}return S(P)}(e.properties,t,n);case"ArrayPattern":{const r=B(t);return yield*Te(e.elements,r,n)}}}function*Ae(e){return M(N(yield*te(e)))}function Ee(e,t,n,r){const s=re(e.argument.name,n),i=C({},t,r);return n?_(s,i):R(s,i)}function*Te(e,t,n){if(0===e.length)return S(P);let r;for(const s of e)if(s)if("RestElement"===s.type)if("Identifier"===s.argument.type){const e=re(s.argument.name,n),i=new V;let a=0;for(;;){const{done:s,value:o}=t.next();if(s){r=n?_(e,i):R(e,i);break}i[a]=o,a++}}else{const e=new V;let i=0;for(;;){const{done:a,value:o}=t.next();if(a){r=yield*Pe(s.argument,e,n);break}e[i]=o,i++}}else{const e="AssignmentPattern"===s.type?s.left:s;switch(e.type){case"ObjectPattern":case"ArrayPattern":{let i;const{done:a,value:o}=t.next();a||(i=o),"AssignmentPattern"===s.type&&void 0===i&&(i=N(yield*te(s.right))),r=yield*Pe(e,i,n);break}case"Identifier":{const i=e.name,a=re(i,n);let o;const{done:c,value:l}=t.next();c||(o=l),"AssignmentPattern"===s.type&&void 0===o&&(o=ye(s.right)?ge(s.right,i):N(yield*te(s.right))),r=n?_(a,o):R(a,o);break}}}else t.next(),r=S(P);return r}function*ke(e,t,n,r){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){const s="Identifier"===e.type?e.name:e.left.name,i=re(s,n);let a=D(t,r);return"AssignmentPattern"===e.type&&void 0===a&&(a=ye(e.right)?ge(e.right,s):N(yield*te(e.right))),n?_(i,a):R(i,a)}let s=D(t,r);return"AssignmentPattern"===e.type&&void 0===s&&(s=N(yield*te(e.right))),yield*Pe("AssignmentPattern"===e.type?e.left:e,s,n)}function _e(e){if(e.async||e.generator)throw new SyntaxError((e.async?"Async":"Generator")+" function is not allowed");if(K&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(K)return N(q(te(e)));null===(n=z.beforeEvaluate)||void 0===n||n.call(z,e),_e(e);const[Ce]=A(e);J.CreateImmutableBinding(Ce,!0);const Ie=ve(e,J);return J.InitializeBinding(Ce,Ie),y&&Object.defineProperties(Ie,{[p]:{value:function(){return ne().LexicalEnvironment}},[d]:{value:function(){return ee}}}),Ie}function q(e){for(;;){const{done:t,value:n}=e.next();if(t)return n}}class K{constructor(){(0,r.A)(this,"VariableEnvironment",void 0),(0,r.A)(this,"LexicalEnvironment",void 0)}}class G{constructor(e){(0,r.A)(this,"OuterEnv",void 0),(0,r.A)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function J(e){let{expressionOnly:t,visitors:n,withParent:r,externalSourceForDebug:s,hooks:i={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=new Set,o=[],c=new G(null),l=new K;function u(){return o[o.length-1]}function h(e,t,n){for(const r of t)p(e[r],null==n?void 0:n.concat({node:e,key:r}))}function p(e,r){if(Array.isArray(e))e.forEach(((e,t)=>{p(e,r?r.slice(0,-1).concat({...r[r.length-1],index:t}):r)}));else if(e){var o,c;switch(null===(o=i.beforeVisit)||void 0===o||o.call(i,e,r),function(e){var t,r;n&&(t=n,r=e.type,Object.prototype.hasOwnProperty.call(t,r))&&n[e.type](e)}(e),e.type){case"Identifier":var l;return b=e.name,void(f(u().LexicalEnvironment,b)||(null===(l=i.beforeVisitGlobal)||void 0===l||l.call(i,e,r),a.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void h(e,["elements"],r);case"ArrowFunctionExpression":return void y(g(e,u().LexicalEnvironment,!0),r);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void h(e,["left","right"],r);case"CallExpression":case"NewExpression":return void h(e,["callee","arguments"],r);case"ChainExpression":return void h(e,["expression"],r);case"ConditionalExpression":return void h(e,["test","consequent","alternate"],r);case"MemberExpression":return h(e,["object"],r),void(e.computed&&h(e,["property"],r));case"ObjectExpression":case"ObjectPattern":return void h(e,["properties"],r);case"Property":return e.computed&&h(e,["key"],r),void h(e,["value"],r);case"RestElement":case"SpreadElement":case"UnaryExpression":return void h(e,["argument"],r);case"SequenceExpression":case"TemplateLiteral":return void h(e,["expressions"],r);case"TaggedTemplateExpression":return void h(e,["tag","quasi"],r);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void h(e,["right","left"],r);case"BlockStatement":{if(!e.body.length)return;const t=u(),n=t.LexicalEnvironment,s=new G(n);return m(e.body,s),t.LexicalEnvironment=s,h(e,["body"],r),void(t.LexicalEnvironment=n)}case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":{const t=u(),n=t.LexicalEnvironment,s=new G(n);return d(e.param,s),t.LexicalEnvironment=s,h(e,["param","body"],r),void(t.LexicalEnvironment=n)}case"DoWhileStatement":return void h(e,["body","test"],r);case"ExpressionStatement":case"TSAsExpression":return void h(e,["expression"],r);case"ForInStatement":case"ForOfStatement":{const t="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,n=u(),s=n.LexicalEnvironment;if(t){const t=new G(s);d(e.left,t),n.LexicalEnvironment=t}if(h(e,["right"],r),n.LexicalEnvironment=s,t){const t=new G(s);d(e.left,t),n.LexicalEnvironment=t}return h(e,["left","body"],r),void(n.LexicalEnvironment=s)}case"ForStatement":{var v;const t="VariableDeclaration"===(null===(v=e.init)||void 0===v?void 0:v.type)&&"var"!==e.init.kind,n=u(),s=n.LexicalEnvironment;if(t){const t=new G(s);d(e.init,t),n.LexicalEnvironment=t}return h(e,["init","test","body","update"],r),void(n.LexicalEnvironment=s)}case"FunctionDeclaration":{const[t]=A(e),n=u().LexicalEnvironment,s=g(e,n);return n.CreateBinding(t),void y(s,r)}case"FunctionExpression":{const t=function(e){const t=u().LexicalEnvironment;if(!e.id)return g(e,t);const n=e.id.name,r=new G(t);return r.CreateBinding(n),g(e,r)}(e);return void y(t,r)}case"IfStatement":return void h(e,["test","consequent","alternate"],r);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void h(e,["argument"],r);case"SwitchCase":return void h(e,["test","consequent"],r);case"SwitchStatement":{h(e,["discriminant"],r);const t=u(),n=t.LexicalEnvironment,s=new G(n);return m(e.cases,s),t.LexicalEnvironment=s,h(e,["cases"],r),void(t.LexicalEnvironment=n)}case"ThisExpression":if(!s)break;return;case"TryStatement":return void h(e,["block","handler","finalizer"],r);case"VariableDeclaration":return void h(e,["declarations"],r);case"VariableDeclarator":return void h(e,["id","init"],r);case"WhileStatement":return void h(e,["test","body"],r)}(null===(c=i.beforeVisitUnknown)||void 0===c?void 0:c.call(i,e,r))||console.warn(`Unsupported node type \`${e.type}\``)}var b}function d(e,t){for(const n of A(e))t.CreateBinding(n)}function f(e,t){return!!e&&(e.HasBinding(t)||f(e.OuterEnv,t))}function m(e,t){d(T(e,{var:!1,topLevel:!1}),t)}function y(e,t){!function(e){const t=new K,n=new G(e.Environment);t.VariableEnvironment=n,t.LexicalEnvironment=n,o.push(t)}(e),function(e,t){const n=u(),r=e.ECMAScriptCode,i=e.FormalParameters,a=E(i),o=A(T(r,{var:!0,topLevel:!0})),c=!!s&&"LEXICAL"!==e.ThisMode,l=n.LexicalEnvironment;let h;if(d(i,l),c&&l.CreateBinding("arguments"),p(i,null==t?void 0:t.concat({node:e.Function,key:"params"})),a){h=new G(l),n.VariableEnvironment=h;for(const e of o)h.CreateBinding(e)}else{for(const e of o)l.CreateBinding(e);h=l}const f=h;n.LexicalEnvironment=f,d(T(r,{var:!1,topLevel:!0}),f)}(e,t),p(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),o.pop()}function g(e,t,n){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t,ThisMode:n?"LEXICAL":"STRICT"}}return l.VariableEnvironment=c,l.LexicalEnvironment=c,o.push(l),p(e,r?[]:void 0),a}var X=n(580);let Z=new WeakMap;function Q(e){let{typescript:t,cacheKey:n,...r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=n?Z.get(n):void 0;return s||(s=function(e){let{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,X.parse)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,r=t?[]:n;if(t)for(const e of n)if(e.type.startsWith("TS")){if(/Enum|Import|Export/.test(e.type))throw new SyntaxError(`Unsupported TypeScript syntax: ${e.type}`)}else r.push(e);if(0===r.length)throw new SyntaxError("Function declaration not found");if(r.length>1||"FunctionDeclaration"!==r[0].type)throw new SyntaxError(`Expect a single function declaration at top level, but received: ${r.map((e=>`"${e.type}"`)).join(", ")}`);return r[0]}(e,{typescript:t}),n&&Z.set(n,s)),{function:s,attemptToVisitGlobals:J(s,r)}}function ee(){Z=new WeakMap}const te=new Map;function ne(e){let{cache:t,...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[],s=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(r.push(e),"")));let i=t?te.get(s):void 0;return i||(i=function(e){return(0,X.parseExpression)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(s),t&&te.set(s,i)),{expression:i,attemptToVisitGlobals:J(i,{...n,expressionOnly:!0}),source:s,prefix:r[0],suffix:r[1]}}function re(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function se(e){return/^\s*<%~\s/.test(e)}function ie(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}function ae(){te.clear()}},8604:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pipes:()=>r.pipes,processPipes:()=>i,utils:()=>r.utils});var r=n(8377);const s=new Map(Array.from(Object.entries(r.pipes)));function i(e,t){if(0===t.length)return e;let n=e;for(const e of t){const t=s.get(e.identifier);if(!t)return void console.warn(`Unknown pipe: ${e.identifier}`);n=t(n,...e.parameters)}return n}},8739:(e,t,n)=>{"use strict";var r=n(2290);e.exports=new r({include:[n(8028)],implicit:[n(5137),n(1548),n(8920),n(6076)]})},8774:(e,t,n)=>{"use strict";var r=n(2290);e.exports=new r({include:[n(8739)]})},8920:(e,t,n)=>{"use strict";var r=n(3780),s=n(5417);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new s("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,s=0,o=!1;if(!r)return!1;if("-"!==(t=e[s])&&"+"!==t||(t=e[++s]),"0"===t){if(s+1===r)return!0;if("b"===(t=e[++s])){for(s++;s<r;s++)if("_"!==(t=e[s])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(s++;s<r;s++)if("_"!==(t=e[s])){if(!(48<=(n=e.charCodeAt(s))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;o=!0}return o&&"_"!==t}for(;s<r;s++)if("_"!==(t=e[s])){if(!i(e.charCodeAt(s)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;s<r;s++)if("_"!==(t=e[s])){if(":"===t)break;if(!a(e.charCodeAt(s)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(s)))},construct:function(e){var t,n,r=e,s=1,i=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(s=-1),t=(r=r.slice(1))[0]),"0"===r?0:"0"===t?"b"===r[1]?s*parseInt(r.slice(2),2):"x"===r[1]?s*parseInt(r,16):s*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach((function(e){i.unshift(parseInt(e,10))})),r=0,n=1,i.forEach((function(e){r+=e*n,n*=60})),s*r):s*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},9142:(e,t,n)=>{"use strict";var r=n(5506),s=n(6384);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(5417),e.exports.Schema=n(2290),e.exports.FAILSAFE_SCHEMA=n(8028),e.exports.JSON_SCHEMA=n(8739),e.exports.CORE_SCHEMA=n(8774),e.exports.DEFAULT_SAFE_SCHEMA=n(9590),e.exports.DEFAULT_FULL_SCHEMA=n(2846),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=s.dump,e.exports.safeDump=s.safeDump,e.exports.YAMLException=n(1796),e.exports.MINIMAL_SCHEMA=n(8028),e.exports.SAFE_SCHEMA=n(9590),e.exports.DEFAULT_SCHEMA=n(2846),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},9280:(e,t,n)=>{"use strict";var r=n(5417);e.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},9321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BrickLoadError:()=>v,enqueueStableLoadBricks:()=>d,enqueueStableLoadProcessors:()=>f,flushStableLoadBricks:()=>p,loadBricksImperatively:()=>m,loadEditorsImperatively:()=>g,loadProcessorsImperatively:()=>y,loadScript:()=>i,loadSharedModule:()=>o,loadStyle:()=>a});const r=new Map;function s(e,t,n,i){if(Array.isArray(t))return Promise.all(t.map((t=>s(e,t,n))));const a=n&&!/^https?:/.test(t)?`${n}${t}`:t,o=r.get(a);if(o)return o;const c=new Promise(((t,n)=>{const r=()=>{window.dispatchEvent(new Event("request.end"))},s=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(s,{type:"text/javascript",async:!0,...i,src:a}):Object.assign(s,{rel:"stylesheet",...i,href:a}),s.onload=()=>{t(a),r()},s.onerror=e=>{n(e),r()};const o=document.currentScript||document.getElementsByTagName("script")[0];o.parentNode.insertBefore(s,o),window.dispatchEvent(new Event("request.start"))}));return r.set(a,c),c}function i(e,t,n){return s("script",e,t,n)}function a(e,t,n){return s("style",e,t,n)}async function o(e,t){await n.I("default");const r=window[e];return await r.init(n.S.default),(await r.get(t))()}let c,l,u=!1;const h=new Promise(((e,t)=>{c=e,l=t}));function p(){u||c()}function d(e,t){return E(A("bricks",e,t))}function f(e,t){return E(A("processors",e,t))}async function m(e,t){const n=A("bricks",e,t);return p(),E(n)}function y(e,t){const n=A("processors",e,t);return p(),E(n)}function g(e,t){const n=A("editors",e,t);return p(),E(n)}class v extends Error{constructor(e){super(e),this.name="BrickLoadError",Error.captureStackTrace&&Error.captureStackTrace(this,v)}}let b;const w="v2-adapter.load-bricks";function x(e,t,n){const r=new Map,s=new Set,i=t=>{var a;if(s.has(t))return;let o,c,l;if(s.add(t),"editors"===e){l=t;for(const e of n.values()){var u,h;null!==(u=null!==(h=e.propertyEditors)&&void 0!==h?h:e.editors)&&void 0!==u&&u.some((e=>e===l))&&(o=e)}}else if("processors"===e||t.includes(".")){[c,l]=t.split(".");const r=`bricks/${"processors"===e?(f=c,f.replace(/[A-Z]/g,(e=>`-${e[0].toLocaleLowerCase()}`)).replace(/_[0-9]/g,(e=>`-${e[1]}`))):c}`;o=n.get(r)}else{let e;l=t;for(const r of n.values()){var p;if(null!==(p=r.elements)&&void 0!==p&&p.some((e=>e===l))){var d;if(null===(d=r.deprecatedElements)||void 0===d||!d.includes(t)){o=r;break}e=r}}!o&&e&&(o=e)}var f;if(!o)return void console.error(`Package for ${t} not found.`);let m=r.get(o);m||(m=[],r.set(o,m)),m.push({fullName:t,lastName:l});const y=null===(a=o.dependencies)||void 0===a?void 0:a[t];if(y)for(const e of y)i(e)};for(const e of t)i(e);return r}async function S(e,t,n){const r=`${"processors"===e||"editors"===e?`./${e}/`:"./"}${"editors"===e?n.fullName:n.lastName}`,s=performance.now();try{await o(t,r)}catch(t){console.error(t);const r=Math.round(performance.now()-s);throw new v(`Load ${e} of "${n.fullName}" failed (${r>1e3?+(r/1e3).toFixed(2)+"s":`${r}ms`}): ${null==t?void 0:t.message}`)}}function P(e,t,n){return t.map((async t=>{var r;return await i(t.filePath,null!==(r=window.PUBLIC_ROOT)&&void 0!==r?r:""),await h,Promise.all(n.get(t).map((n=>S(e,t.id,n))))}))}async function A(e,t,n){const r=new Map;for(const e of n){const t=e.id||T(e.filePath);r.set(t,e)}const s=x(e,t,r);let a;const o=[],h=[];let p;for(const e of s.keys())if(e.id)"bricks/basic"===e.id?a=e:h.push(e);else if(o.push(e),p=r.get("bricks/v2-adapter"),!p)throw new Error("Using v2 bricks, but v2-adapter not found");const d=p;let f;const m=a;if(m){var y;const t=i(m.filePath,null!==(y=window.PUBLIC_ROOT)&&void 0!==y?y:"");u||(u=!0,t.then((()=>Promise.resolve())).then(c,l)),f=t.then((()=>Promise.all(s.get(m).map((t=>S(e,m.id,t))))))}const g=[f].concat(P(e,h,s));if(d&&o.length>0){if(!b){const e=x("bricks",[w],r),t=[...e.keys()];b=(async()=>(await Promise.all(P("bricks",t,e)),document.createElement(w)))()}g.push(b.then((t=>Promise.all(o.map((r=>{var i;const a=T(r.filePath).split("/")[1];return t.resolve(d.filePath,"editors"===e&&null!==(i=r.propertyEditorsJsFilePath)&&void 0!==i?i:r.filePath,"bricks"===e?s.get(r).map((e=>`${a}.${e.lastName}`)):[],r.dll,n)}))))))}await Promise.all(g)}async function E(e){window.dispatchEvent(new Event("request.start"));try{await e}finally{window.dispatchEvent(new Event("request.end"))}}function T(e){return e.split("/").slice(0,2).join("/")}},9348:(e,t,n)=>{"use strict";var r=n(3780);function s(e,t,n,r,s){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=s}s.prototype.getSnippet=function(e,t){var n,s,i,a,o;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",s=this.position;s>0&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(s-1));)if(s-=1,this.position-s>t/2-1){n=" ... ",s+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i=" ... ",a-=5;break}return o=this.buffer.slice(s,a),r.repeat(" ",e)+n+o+i+"\n"+r.repeat(" ",e+this.position-s+n.length)+"^"},s.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=s},9420:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,r;function s(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Mt(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){var t=null,n=!1,s=e._d&&!isNaN(e._d.getTime());return s&&(t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function g(e){var t=f(NaN);return null!=e?d(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=s.momentProperties=[],b=!1;function w(e,t){var n,r,s,i=v.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)l(s=t[r=v[n]])||(e[r]=s);return e}function x(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,s.updateOffset(this),b=!1)}function S(e){return e instanceof x||null!=e&&null!=e._isAMomentObject}function P(e){!1===s.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function A(e,t){var n=!0;return d((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),n){var r,i,a,c=[],l=arguments.length;for(i=0;i<l;i++){if(r="","object"==typeof arguments[i]){for(a in r+="\n["+i+"] ",arguments[0])o(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[i];c.push(r)}P(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var E,T={};function k(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),T[e]||(P(t),T[e]=!0)}function _(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function C(e,t){var n,r=d({},e);for(n in t)o(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&a(e[n])&&(r[n]=d({},r[n]));return r}function I(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};function O(e,t,n){var r=""+Math.abs(e),s=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},D={};function R(e,t,n,r){var s=r;"string"==typeof r&&(s=function(){return this[r]()}),e&&(D[e]=s),t&&(D[t[0]]=function(){return O(s.apply(this,arguments),t[1],t[2])}),n&&(D[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function B(e,t){return e.isValid()?(t=F(t,e.localeData()),M[t]=M[t]||function(e){var t,n,r,s=e.match(L);for(t=0,n=s.length;t<n;t++)D[s[t]]?s[t]=D[s[t]]:s[t]=(r=s[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=_(s[r])?s[r].call(t,e):s[r];return i}}(t),M[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;n>=0&&N.test(e);)e=e.replace(N,r),N.lastIndex=0,n-=1;return e}var j={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function U(e){return"string"==typeof e?j[e]||j[e.toLowerCase()]:void 0}function Y(e){var t,n,r={};for(n in e)o(e,n)&&(t=U(n))&&(r[t]=e[n]);return r}var $={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var H,W=/\d/,V=/\d\d/,z=/\d{3}/,q=/\d{4}/,K=/[+-]?\d{6}/,G=/\d\d?/,J=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,Z=/\d{1,3}/,Q=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ne=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae=/^[1-9]\d?/,oe=/^([1-9]\d|\d)/;function ce(e,t,n){H[e]=_(t)?t:function(e,r){return e&&n?n:t}}function le(e,t){return o(H,e)?H[e](t._strict,t._locale):new RegExp(ue(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,s){return t||n||r||s}))))}function ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function he(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function pe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=he(t)),n}H={};var de={};function fe(e,t){var n,r,s=t;for("string"==typeof e&&(e=[e]),u(t)&&(s=function(e,n){n[t]=pe(e)}),r=e.length,n=0;n<r;n++)de[e[n]]=s}function me(e,t){fe(e,(function(e,n,r,s){r._w=r._w||{},t(e,r._w,r,s)}))}function ye(e,t,n){null!=t&&o(de,e)&&de[e](t,n._a,n,e)}function ge(e){return e%4==0&&e%100!=0||e%400==0}var ve=0,be=1,we=2,xe=3,Se=4,Pe=5,Ae=6,Ee=7,Te=8;function ke(e){return ge(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?O(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),ce("Y",ne),ce("YY",G,V),ce("YYYY",Q,q),ce("YYYYY",ee,K),ce("YYYYYY",ee,K),fe(["YYYYY","YYYYYY"],ve),fe("YYYY",(function(e,t){t[ve]=2===e.length?s.parseTwoDigitYear(e):pe(e)})),fe("YY",(function(e,t){t[ve]=s.parseTwoDigitYear(e)})),fe("Y",(function(e,t){t[ve]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return pe(e)+(pe(e)>68?1900:2e3)};var _e,Ce=Ie("FullYear",!0);function Ie(e,t){return function(n){return null!=n?(Le(this,e,n),s.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Le(e,t,n){var r,s,i,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,a=e.month(),o=29!==(o=e.date())||1!==a||ge(i)?o:28,s?r.setUTCFullYear(i,a,o):r.setFullYear(i,a,o)}}function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ce("M",G,ae),ce("MM",G,V),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),fe(["M","MM"],(function(e,t){t[be]=pe(e)-1})),fe(["MMM","MMMM"],(function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);null!=s?t[be]=s:m(n).invalidMonth=e}));var Me="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Be=ie,Fe=ie;function je(e,t,n){var r,s,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(s=_e.call(this._shortMonthsParse,a))?s:null:-1!==(s=_e.call(this._longMonthsParse,a))?s:null:"MMM"===t?-1!==(s=_e.call(this._shortMonthsParse,a))||-1!==(s=_e.call(this._longMonthsParse,a))?s:null:-1!==(s=_e.call(this._longMonthsParse,a))||-1!==(s=_e.call(this._shortMonthsParse,a))?s:null}function Ue(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=pe(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ne(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ye(e){return null!=e?(Ue(this,e),s.updateOffset(this,!0),this):Oe(this,"Month")}function $e(){function e(e,t){return t.length-e.length}var t,n,r,s,i=[],a=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r=ue(this.monthsShort(n,"")),s=ue(this.months(n,"")),i.push(r),a.push(s),o.push(s),o.push(r);i.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function He(e,t,n,r,s,i,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,s,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,s,i,a),o}function We(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ve(e,t,n){var r=7+t-n;return-(7+We(e,0,r).getUTCDay()-t)%7+r-1}function ze(e,t,n,r,s){var i,a,o=1+7*(t-1)+(7+n-r)%7+Ve(e,r,s);return o<=0?a=ke(i=e-1)+o:o>ke(e)?(i=e+1,a=o-ke(e)):(i=e,a=o),{year:i,dayOfYear:a}}function qe(e,t,n){var r,s,i=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+Ke(s=e.year()-1,t,n):a>Ke(e.year(),t,n)?(r=a-Ke(e.year(),t,n),s=e.year()+1):(s=e.year(),r=a),{week:r,year:s}}function Ke(e,t,n){var r=Ve(e,t,n),s=Ve(e+1,t,n);return(ke(e)-r+s)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),ce("w",G,ae),ce("ww",G,V),ce("W",G,ae),ce("WW",G,V),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=pe(e)}));function Ge(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),ce("d",G),ce("e",G),ce("E",G),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=pe(e)}));var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ie,et=ie,tt=ie;function nt(e,t,n){var r,s,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(s=_e.call(this._weekdaysParse,a))?s:null:"ddd"===t?-1!==(s=_e.call(this._shortWeekdaysParse,a))?s:null:-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:"dddd"===t?-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._shortWeekdaysParse,a))||-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:"ddd"===t?-1!==(s=_e.call(this._shortWeekdaysParse,a))||-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:-1!==(s=_e.call(this._minWeekdaysParse,a))||-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._shortWeekdaysParse,a))?s:null}function rt(){function e(e,t){return t.length-e.length}var t,n,r,s,i,a=[],o=[],c=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ue(this.weekdaysMin(n,"")),s=ue(this.weekdaysShort(n,"")),i=ue(this.weekdays(n,"")),a.push(r),o.push(s),c.push(i),l.push(r),l.push(s),l.push(i);a.sort(e),o.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function at(e,t){return t._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,st),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+st.apply(this)+O(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+st.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+O(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)})),it("a",!0),it("A",!1),ce("a",at),ce("A",at),ce("H",G,oe),ce("h",G,ae),ce("k",G,ae),ce("HH",G,V),ce("hh",G,V),ce("kk",G,V),ce("hmm",J),ce("hmmss",X),ce("Hmm",J),ce("Hmmss",X),fe(["H","HH"],xe),fe(["k","kk"],(function(e,t,n){var r=pe(e);t[xe]=24===r?0:r})),fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),fe(["h","hh"],(function(e,t,n){t[xe]=pe(e),m(n).bigHour=!0})),fe("hmm",(function(e,t,n){var r=e.length-2;t[xe]=pe(e.substr(0,r)),t[Se]=pe(e.substr(r)),m(n).bigHour=!0})),fe("hmmss",(function(e,t,n){var r=e.length-4,s=e.length-2;t[xe]=pe(e.substr(0,r)),t[Se]=pe(e.substr(r,2)),t[Pe]=pe(e.substr(s)),m(n).bigHour=!0})),fe("Hmm",(function(e,t,n){var r=e.length-2;t[xe]=pe(e.substr(0,r)),t[Se]=pe(e.substr(r))})),fe("Hmmss",(function(e,t,n){var r=e.length-4,s=e.length-2;t[xe]=pe(e.substr(0,r)),t[Se]=pe(e.substr(r,2)),t[Pe]=pe(e.substr(s))}));var ot=Ie("Hours",!0);var ct,lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Me,monthsShort:De,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Ze,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},ut={},ht={};function pt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dt(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var r=null;if(void 0===ut[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{r=ct._abbr,n(9844)("./"+t),mt(r)}catch(e){ut[t]=null}return ut[t]}function mt(e,t){var n;return e&&((n=l(t)?gt(e):yt(e,t))?ct=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ct._abbr}function yt(e,t){if(null!==t){var n,r=lt;if(t.abbr=e,null!=ut[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])r=ut[t.parentLocale]._config;else{if(null==(n=ft(t.parentLocale)))return ht[t.parentLocale]||(ht[t.parentLocale]=[]),ht[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ut[e]=new I(C(r,t)),ht[e]&&ht[e].forEach((function(e){yt(e.name,e.config)})),mt(e),ut[e]}return delete ut[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ct;if(!i(e)){if(t=ft(e))return t;e=[e]}return function(e){for(var t,n,r,s,i=0;i<e.length;){for(t=(s=dt(e[i]).split("-")).length,n=(n=dt(e[i+1]))?n.split("-"):null;t>0;){if(r=ft(s.slice(0,t).join("-")))return r;if(n&&n.length>=t&&pt(s,n)>=t-1)break;t--}i++}return ct}(e)}function vt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[be]<0||n[be]>11?be:n[we]<1||n[we]>Ne(n[ve],n[be])?we:n[xe]<0||n[xe]>24||24===n[xe]&&(0!==n[Se]||0!==n[Pe]||0!==n[Ae])?xe:n[Se]<0||n[Se]>59?Se:n[Pe]<0||n[Pe]>59?Pe:n[Ae]<0||n[Ae]>999?Ae:-1,m(e)._overflowDayOfYear&&(t<ve||t>we)&&(t=we),m(e)._overflowWeeks&&-1===t&&(t=Ee),m(e)._overflowWeekday&&-1===t&&(t=Te),m(e).overflow=t),e}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xt=/Z|[+-]\d\d(?::?\d\d)?/,St=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],At=/^\/?Date\((-?\d+)/i,Et=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,r,s,i,a,o=e._i,c=bt.exec(o)||wt.exec(o),l=St.length,u=Pt.length;if(c){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(St[t][1].exec(c[1])){s=St[t][0],r=!1!==St[t][2];break}if(null==s)return void(e._isValid=!1);if(c[3]){for(t=0,n=u;t<n;t++)if(Pt[t][1].exec(c[3])){i=(c[2]||" ")+Pt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(c[4]){if(!xt.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=s+(i||"")+(a||""),Lt(e)}else e._isValid=!1}function _t(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ct(e){var t,n,r,s,i,a,o,c,l=Et.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],r=l[3],s=l[2],i=l[5],a=l[6],o=l[7],c=[_t(n),De.indexOf(r),parseInt(s,10),parseInt(i,10),parseInt(a,10)],o&&c.push(parseInt(o,10)),t=c,!function(e,t,n){return!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),s=r%100;return(r-s)/100*60+s}(l[8],l[9],l[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function It(e,t,n){return null!=e?e:null!=t?t:n}function Ot(e){var t,n,r,i,a,o=[];if(!e._d){for(r=function(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[be]&&function(e){var t,n,r,s,i,a,o,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,a=4,n=It(t.GG,e._a[ve],qe(Dt(),1,4).year),r=It(t.W,1),((s=It(t.E,1))<1||s>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=qe(Dt(),i,a),n=It(t.gg,e._a[ve],l.year),r=It(t.w,l.week),null!=t.d?((s=t.d)<0||s>6)&&(c=!0):null!=t.e?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),r<1||r>Ke(n,i,a)?m(e)._overflowWeeks=!0:null!=c?m(e)._overflowWeekday=!0:(o=ze(n,r,s,i,a),e._a[ve]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=It(e._a[ve],r[ve]),(e._dayOfYear>ke(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[be]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[xe]&&0===e._a[Se]&&0===e._a[Pe]&&0===e._a[Ae]&&(e._nextDay=!0,e._a[xe]=0),e._d=(e._useUTC?We:He).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[xe]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}function Lt(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,i,a,o,c,l=""+e._i,u=l.length,h=0;for(c=(r=F(e._f,e._locale).match(L)||[]).length,t=0;t<c;t++)i=r[t],(n=(l.match(le(i,e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),h+=n.length),D[i]?(n?m(e).empty=!1:m(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&m(e).unusedTokens.push(i);m(e).charsLeftOver=u-h,l.length>0&&m(e).unusedInput.push(l),e._a[xe]<=12&&!0===m(e).bigHour&&e._a[xe]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[xe]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[xe],e._meridiem),null!==(o=m(e).era)&&(e._a[ve]=e._locale.erasConvertYear(o,e._a[ve])),Ot(e),vt(e)}else Ct(e);else kt(e)}function Nt(e){var t=e._i,n=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new x(vt(t)):(h(t)?e._d=t:i(n)?function(e){var t,n,r,s,i,a,o=!1,c=e._f.length;if(0===c)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;s<c;s++)i=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[s],Lt(t),y(t)&&(a=!0),i+=m(t).charsLeftOver,i+=10*m(t).unusedTokens.length,m(t).score=i,o?i<r&&(r=i,n=t):(null==r||i<r||a)&&(r=i,n=t,a&&(o=!0));d(e,n||t)}(e):n?Lt(e):function(e){var t=e._i;l(t)?e._d=new Date(s.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=At.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Ct(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Ot(e)):a(t)?function(e){if(!e._d){var t=Y(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Ot(e)}}(e):u(t)?e._d=new Date(t):s.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Mt(e,t,n,r,s){var o,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&c(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=n,l._i=e,l._f=t,l._strict=r,(o=new x(vt(Nt(l))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Dt(e,t,n,r){return Mt(e,t,n,r,!1)}s.createFromInputFallback=A("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var Rt=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),Bt=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function Ft(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var jt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ut(e){var t=Y(e),n=t.year||0,r=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,c=t.hour||0,l=t.minute||0,u=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,s=jt.length;for(t in e)if(o(e,t)&&(-1===_e.call(jt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<s;++n)if(e[jt[n]]){if(r)return!1;parseFloat(e[jt[n]])!==pe(e[jt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+h+1e3*u+6e4*l+1e3*c*60*60,this._days=+a+7*i,this._months=+s+3*r+12*n,this._data={},this._locale=gt(),this._bubble()}function Yt(e){return e instanceof Ut}function $t(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ht(e,t){R(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+O(~~(e/60),2)+t+O(~~e%60,2)}))}Ht("Z",":"),Ht("ZZ",""),ce("Z",se),ce("ZZ",se),fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Vt(se,e)}));var Wt=/([\+\-]|\d\d)/gi;function Vt(e,t){var n,r,s=(t||"").match(e);return null===s?null:0===(r=60*(n=((s[s.length-1]||[])+"").match(Wt)||["-",0,0])[1]+pe(n[2]))?0:"+"===n[0]?r:-r}function zt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(S(e)||h(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),s.updateOffset(n,!1),n):Dt(e).local()}function qt(e){return-Math.round(e._d.getTimezoneOffset())}function Kt(){return!!this.isValid()&&this._isUTC&&0===this._offset}s.updateOffset=function(){};var Gt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Xt(e,t){var n,r,s,i,a,c,l=e,h=null;return Yt(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(l={},t?l[t]=+e:l.milliseconds=+e):(h=Gt.exec(e))?(n="-"===h[1]?-1:1,l={y:0,d:pe(h[we])*n,h:pe(h[xe])*n,m:pe(h[Se])*n,s:pe(h[Pe])*n,ms:pe($t(1e3*h[Ae]))*n}):(h=Jt.exec(e))?(n="-"===h[1]?-1:1,l={y:Zt(h[2],n),M:Zt(h[3],n),w:Zt(h[4],n),d:Zt(h[5],n),h:Zt(h[6],n),m:Zt(h[7],n),s:Zt(h[8],n)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(i=Dt(l.from),a=Dt(l.to),s=i.isValid()&&a.isValid()?(a=zt(a,i),i.isBefore(a)?c=Qt(i,a):((c=Qt(a,i)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=s.milliseconds,l.M=s.months),r=new Ut(l),Yt(e)&&o(e,"_locale")&&(r._locale=e._locale),Yt(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function en(e,t){return function(n,r){var s;return null===r||isNaN(+r)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),tn(this,Xt(n,r),e),this}}function tn(e,t,n,r){var i=t._milliseconds,a=$t(t._days),o=$t(t._months);e.isValid()&&(r=null==r||r,o&&Ue(e,Oe(e,"Month")+o*n),a&&Le(e,"Date",Oe(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&s.updateOffset(e,a||o))}Xt.fn=Ut.prototype,Xt.invalid=function(){return Xt(NaN)};var nn=en(1,"add"),rn=en(-1,"subtract");function sn(e){return"string"==typeof e||e instanceof String}function an(e){return S(e)||h(e)||sn(e)||u(e)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&sn(e)})).length),t&&n}(e)||function(e){var t,n,r=a(e)&&!c(e),s=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=i.length;for(t=0;t<l;t+=1)n=i[t],s=s||o(e,n);return r&&s}(e)||null==e}function on(e,t){if(e.date()<t.date())return-on(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function cn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ln=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function un(){return this._locale}var hn=1e3,pn=6e4,dn=36e5,fn=126227808e5;function mn(e,t){return(e%t+t)%t}function yn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fn:new Date(e,t,n).valueOf()}function gn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fn:Date.UTC(e,t,n)}function vn(e,t){return t.erasAbbrRegex(e)}function bn(){var e,t,n,r,s,i=[],a=[],o=[],c=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=ue(l[e].name),r=ue(l[e].abbr),s=ue(l[e].narrow),a.push(n),i.push(r),o.push(s),c.push(n),c.push(r),c.push(s);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function wn(e,t){R(0,[e,e.length],0,t)}function xn(e,t,n,r,s){var i;return null==e?qe(this,r,s).year:(t>(i=Ke(e,r,s))&&(t=i),Sn.call(this,e,t,n,r,s))}function Sn(e,t,n,r,s){var i=ze(e,t,n,r,s),a=We(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),ce("N",vn),ce("NN",vn),ce("NNN",vn),ce("NNNN",(function(e,t){return t.erasNameRegex(e)})),ce("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?m(n).era=s:m(n).invalidEra=e})),ce("y",te),ce("yy",te),ce("yyy",te),ce("yyyy",te),ce("yo",(function(e,t){return t._eraYearOrdinalRegex||te})),fe(["y","yy","yyy","yyyy"],ve),fe(["yo"],(function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ve]=n._locale.eraYearOrdinalParse(e,s):t[ve]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),wn("gggg","weekYear"),wn("ggggg","weekYear"),wn("GGGG","isoWeekYear"),wn("GGGGG","isoWeekYear"),ce("G",ne),ce("g",ne),ce("GG",G,V),ce("gg",G,V),ce("GGGG",Q,q),ce("gggg",Q,q),ce("GGGGG",ee,K),ce("ggggg",ee,K),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=pe(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),ce("Q",W),fe("Q",(function(e,t){t[be]=3*(pe(e)-1)})),R("D",["DD",2],"Do","date"),ce("D",G,ae),ce("DD",G,V),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],we),fe("Do",(function(e,t){t[we]=pe(e.match(G)[0])}));var Pn=Ie("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),ce("DDD",Z),ce("DDDD",z),fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=pe(e)})),R("m",["mm",2],0,"minute"),ce("m",G,oe),ce("mm",G,V),fe(["m","mm"],Se);var An=Ie("Minutes",!1);R("s",["ss",2],0,"second"),ce("s",G,oe),ce("ss",G,V),fe(["s","ss"],Pe);var En,Tn,kn=Ie("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ce("S",Z,W),ce("SS",Z,V),ce("SSS",Z,z),En="SSSS";En.length<=9;En+="S")ce(En,te);function _n(e,t){t[Ae]=pe(1e3*("0."+e))}for(En="S";En.length<=9;En+="S")fe(En,_n);Tn=Ie("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var Cn=x.prototype;function In(e){return e}Cn.add=nn,Cn.calendar=function(e,t){1===arguments.length&&(arguments[0]?an(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=a(e)&&!c(e),r=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)r=r||o(e,s[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Dt(),r=zt(n,this).startOf("day"),i=s.calendarFormat(this,r)||"sameElse",l=t&&(_(t[i])?t[i].call(this,n):t[i]);return this.format(l||this.localeData().calendar(i,this,Dt(n)))},Cn.clone=function(){return new x(this)},Cn.diff=function(e,t,n){var r,s,i;if(!this.isValid())return NaN;if(!(r=zt(e,this)).isValid())return NaN;switch(s=6e4*(r.utcOffset()-this.utcOffset()),t=U(t)){case"year":i=on(this,r)/12;break;case"month":i=on(this,r);break;case"quarter":i=on(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-s)/864e5;break;case"week":i=(this-r-s)/6048e5;break;default:i=this-r}return n?i:he(i)},Cn.endOf=function(e){var t,n;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gn:yn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-mn(t+(this._isUTC?0:this.utcOffset()*pn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=pn-mn(t,pn)-1;break;case"second":t=this._d.valueOf(),t+=hn-mn(t,hn)-1}return this._d.setTime(t),s.updateOffset(this,!0),this},Cn.format=function(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)},Cn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Xt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Cn.fromNow=function(e){return this.from(Dt(),e)},Cn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Xt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Cn.toNow=function(e){return this.to(Dt(),e)},Cn.get=function(e){return _(this[e=U(e)])?this[e]():this},Cn.invalidAt=function(){return m(this).overflow},Cn.isAfter=function(e,t){var n=S(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Cn.isBefore=function(e,t){var n=S(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Cn.isBetween=function(e,t,n,r){var s=S(e)?e:Dt(e),i=S(t)?t:Dt(t);return!!(this.isValid()&&s.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(s,n):!this.isBefore(s,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Cn.isSame=function(e,t){var n,r=S(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Cn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Cn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Cn.isValid=function(){return y(this)},Cn.lang=ln,Cn.locale=cn,Cn.localeData=un,Cn.max=Bt,Cn.min=Rt,Cn.parsingFlags=function(){return d({},m(this))},Cn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:$[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=Y(e)),s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(_(this[e=U(e)]))return this[e](t);return this},Cn.startOf=function(e){var t,n;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gn:yn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mn(t+(this._isUTC?0:this.utcOffset()*pn),dn);break;case"minute":t=this._d.valueOf(),t-=mn(t,pn);break;case"second":t=this._d.valueOf(),t-=mn(t,hn)}return this._d.setTime(t),s.updateOffset(this,!0),this},Cn.subtract=rn,Cn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Cn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Cn.toDate=function(){return new Date(this.valueOf())},Cn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?B(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(n,"Z")):B(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Cn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",s="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=s+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Cn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Cn.toJSON=function(){return this.isValid()?this.toISOString():null},Cn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Cn.unix=function(){return Math.floor(this.valueOf()/1e3)},Cn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Cn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Cn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Cn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Cn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Cn.eraYear=function(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-s(i[e].since).year())*n+i[e].offset;return this.year()},Cn.year=Ce,Cn.isLeapYear=function(){return ge(this.year())},Cn.weekYear=function(e){return xn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Cn.isoWeekYear=function(e){return xn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Cn.quarter=Cn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Cn.month=Ye,Cn.daysInMonth=function(){return Ne(this.year(),this.month())},Cn.week=Cn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Cn.isoWeek=Cn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Cn.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},Cn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ke(this.weekYear(),e.dow,e.doy)},Cn.isoWeeksInYear=function(){return Ke(this.year(),1,4)},Cn.isoWeeksInISOWeekYear=function(){return Ke(this.isoWeekYear(),1,4)},Cn.date=Pn,Cn.day=Cn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Oe(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Cn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Cn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Cn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Cn.hour=Cn.hours=ot,Cn.minute=Cn.minutes=An,Cn.second=Cn.seconds=kn,Cn.millisecond=Cn.milliseconds=Tn,Cn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Vt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=qt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?tn(this,Xt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:qt(this)},Cn.utc=function(e){return this.utcOffset(0,e)},Cn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},Cn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Vt(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Cn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Cn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Cn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Cn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Cn.isUtc=Kt,Cn.isUTC=Kt,Cn.zoneAbbr=function(){return this._isUTC?"UTC":""},Cn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Cn.dates=A("dates accessor is deprecated. Use date instead.",Pn),Cn.months=A("months accessor is deprecated. Use month instead",Ye),Cn.years=A("years accessor is deprecated. Use year instead",Ce),Cn.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Cn.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Nt(t))._a?(e=t._isUTC?f(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<s;r++)(n&&e[r]!==t[r]||!n&&pe(e[r])!==pe(t[r]))&&a++;return a+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var On=I.prototype;function Ln(e,t,n,r){var s=gt(),i=f().set(r,t);return s[n](i,e)}function Nn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Ln(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=Ln(e,r,n,"month");return s}function Mn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var s,i=gt(),a=e?i._week.dow:0,o=[];if(null!=n)return Ln(t,(n+a)%7,r,"day");for(s=0;s<7;s++)o[s]=Ln(t,(s+a)%7,r,"day");return o}On.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return _(r)?r.call(t,n):r},On.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},On.invalidDate=function(){return this._invalidDate},On.ordinal=function(e){return this._ordinal.replace("%d",e)},On.preparse=In,On.postformat=In,On.relativeTime=function(e,t,n,r){var s=this._relativeTime[n];return _(s)?s(e,t,n,r):s.replace(/%d/i,e)},On.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return _(n)?n(t):n.replace(/%s/i,t)},On.set=function(e){var t,n;for(n in e)o(e,n)&&(_(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},On.eras=function(e,t){var n,r,i,a=this._eras||gt("en")._eras;for(n=0,r=a.length;n<r;++n)switch("string"==typeof a[n].since&&(i=s(a[n].since).startOf("day"),a[n].since=i.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=s(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf()}return a},On.erasParse=function(e,t,n){var r,s,i,a,o,c=this.eras();for(e=e.toUpperCase(),r=0,s=c.length;r<s;++r)if(i=c[r].name.toUpperCase(),a=c[r].abbr.toUpperCase(),o=c[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return c[r];break;case"NNNN":if(i===e)return c[r];break;case"NNNNN":if(o===e)return c[r]}else if([i,a,o].indexOf(e)>=0)return c[r]},On.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n},On.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||bn.call(this),e?this._erasAbbrRegex:this._erasRegex},On.erasNameRegex=function(e){return o(this,"_erasNameRegex")||bn.call(this),e?this._erasNameRegex:this._erasRegex},On.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||bn.call(this),e?this._erasNarrowRegex:this._erasRegex},On.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Re).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},On.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Re.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},On.monthsParse=function(e,t,n){var r,s,i;if(this._monthsParseExact)return je.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},On.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||$e.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},On.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||$e.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Be),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},On.week=function(e){return qe(e,this._week.dow,this._week.doy).week},On.firstDayOfYear=function(){return this._week.doy},On.firstDayOfWeek=function(){return this._week.dow},On.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ge(n,this._week.dow):e?n[e.day()]:n},On.weekdaysMin=function(e){return!0===e?Ge(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},On.weekdaysShort=function(e){return!0===e?Ge(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},On.weekdaysParse=function(e,t,n){var r,s,i;if(this._weekdaysParseExact)return nt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},On.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},On.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},On.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},On.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},On.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=A("moment.lang is deprecated. Use moment.locale instead.",mt),s.langData=A("moment.langData is deprecated. Use moment.localeData instead.",gt);var Dn=Math.abs;function Rn(e,t,n,r){var s=Xt(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Fn(e){return 4800*e/146097}function jn(e){return 146097*e/4800}function Un(e){return function(){return this.as(e)}}var Yn=Un("ms"),$n=Un("s"),Hn=Un("m"),Wn=Un("h"),Vn=Un("d"),zn=Un("w"),qn=Un("M"),Kn=Un("Q"),Gn=Un("y"),Jn=Yn;function Xn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Zn=Xn("milliseconds"),Qn=Xn("seconds"),er=Xn("minutes"),tr=Xn("hours"),nr=Xn("days"),rr=Xn("months"),sr=Xn("years");var ir=Math.round,ar={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function or(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}var cr=Math.abs;function lr(e){return(e>0)-(e<0)||+e}function ur(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,s,i,a,o,c=cr(this._milliseconds)/1e3,l=cr(this._days),u=cr(this._months),h=this.asSeconds();return h?(e=he(c/60),t=he(e/60),c%=60,e%=60,n=he(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",s=h<0?"-":"",i=lr(this._months)!==lr(h)?"-":"",a=lr(this._days)!==lr(h)?"-":"",o=lr(this._milliseconds)!==lr(h)?"-":"",s+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(l?a+l+"D":"")+(t||e||c?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(c?o+r+"S":"")):"P0D"}var hr=Ut.prototype;return hr.isValid=function(){return this._isValid},hr.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},hr.add=function(e,t){return Rn(this,e,t,1)},hr.subtract=function(e,t){return Rn(this,e,t,-1)},hr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=U(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Fn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(jn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},hr.asMilliseconds=Yn,hr.asSeconds=$n,hr.asMinutes=Hn,hr.asHours=Wn,hr.asDays=Vn,hr.asWeeks=zn,hr.asMonths=qn,hr.asQuarters=Kn,hr.asYears=Gn,hr.valueOf=Jn,hr._bubble=function(){var e,t,n,r,s,i=this._milliseconds,a=this._days,o=this._months,c=this._data;return i>=0&&a>=0&&o>=0||i<=0&&a<=0&&o<=0||(i+=864e5*Bn(jn(o)+a),a=0,o=0),c.milliseconds=i%1e3,e=he(i/1e3),c.seconds=e%60,t=he(e/60),c.minutes=t%60,n=he(t/60),c.hours=n%24,a+=he(n/24),o+=s=he(Fn(a)),a-=Bn(jn(s)),r=he(o/12),o%=12,c.days=a,c.months=o,c.years=r,this},hr.clone=function(){return Xt(this)},hr.get=function(e){return e=U(e),this.isValid()?this[e+"s"]():NaN},hr.milliseconds=Zn,hr.seconds=Qn,hr.minutes=er,hr.hours=tr,hr.days=nr,hr.weeks=function(){return he(this.days()/7)},hr.months=rr,hr.years=sr,hr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,s=!1,i=ar;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(s=e),"object"==typeof t&&(i=Object.assign({},ar,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var s=Xt(e).abs(),i=ir(s.as("s")),a=ir(s.as("m")),o=ir(s.as("h")),c=ir(s.as("d")),l=ir(s.as("M")),u=ir(s.as("w")),h=ir(s.as("y")),p=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||l<=1&&["M"]||l<n.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=t,p[3]=+e>0,p[4]=r,or.apply(null,p)}(this,!s,i,n=this.localeData()),s&&(r=n.pastFuture(+this,r)),n.postformat(r)},hr.toISOString=ur,hr.toString=ur,hr.toJSON=ur,hr.locale=cn,hr.localeData=un,hr.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ur),hr.lang=ln,R("X",0,0,"unix"),R("x",0,0,"valueOf"),ce("x",ne),ce("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),fe("x",(function(e,t,n){n._d=new Date(pe(e))})),s.version="2.30.1",t=Dt,s.fn=Cn,s.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},s.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},s.now=function(){return Date.now?Date.now():+new Date},s.utc=f,s.unix=function(e){return Dt(1e3*e)},s.months=function(e,t){return Nn(e,t,"months")},s.isDate=h,s.locale=mt,s.invalid=g,s.duration=Xt,s.isMoment=S,s.weekdays=function(e,t,n){return Mn(e,t,n,"weekdays")},s.parseZone=function(){return Dt.apply(null,arguments).parseZone()},s.localeData=gt,s.isDuration=Yt,s.monthsShort=function(e,t){return Nn(e,t,"monthsShort")},s.weekdaysMin=function(e,t,n){return Mn(e,t,n,"weekdaysMin")},s.defineLocale=yt,s.updateLocale=function(e,t){if(null!=t){var n,r,s=lt;null!=ut[e]&&null!=ut[e].parentLocale?ut[e].set(C(ut[e]._config,t)):(null!=(r=ft(e))&&(s=r._config),t=C(s,t),null==r&&(t.abbr=e),(n=new I(t)).parentLocale=ut[e],ut[e]=n),mt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?(ut[e]=ut[e].parentLocale,e===mt()&&mt(e)):null!=ut[e]&&delete ut[e]);return ut[e]},s.locales=function(){return E(ut)},s.weekdaysShort=function(e,t,n){return Mn(e,t,n,"weekdaysShort")},s.normalizeUnits=U,s.relativeTimeRounding=function(e){return void 0===e?ir:"function"==typeof e&&(ir=e,!0)},s.relativeTimeThreshold=function(e,t){return void 0!==ar[e]&&(void 0===t?ar[e]:(ar[e]=t,"s"===e&&(ar.ss=t-1),!0))},s.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},s.prototype=Cn,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}()},9515:(e,t,n)=>{"use strict";var r=n(9142);e.exports=r},9590:(e,t,n)=>{"use strict";var r=n(2290);e.exports=new r({include:[n(8774)],implicit:[n(4938),n(7042)],explicit:[n(273),n(3901),n(343),n(6562)]})},9663:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(7551);const s=async(e,t,n)=>(await r.http.get(`api/auth/v2/bootstrap/${e}`,{...n,params:t})).data},9669:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}function s(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,s=e.length;r<s;n+=1,r+=1)e[n]=e[r];e.pop()}n.r(t),n.d(t,{createBrowserHistory:()=>T,createHashHistory:()=>L,createLocation:()=>v,createMemoryHistory:()=>M,createPath:()=>g,locationsAreEqual:()=>b,parsePath:()=>y});const a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],o=e&&s(e),c=t&&s(t),l=o||c;if(e&&s(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var u=a[a.length-1];n="."===u||".."===u||""===u}else n=!1;for(var h=0,p=a.length;p>=0;p--){var d=a[p];"."===d?i(a,p):".."===d?(i(a,p),h++):h&&(i(a,p),h--)}if(!l)for(;h--;h)a.unshift("..");!l||""===a[0]||a[0]&&s(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function o(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const c=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=o(t),s=o(n);return r!==t||s!==n?e(r,s):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var l=!0,u="Invariant failed";function h(e,t){if(!e){if(l)throw new Error(u);var n="function"==typeof t?t():t,r=n?"".concat(u,": ").concat(n):u;throw new Error(r)}}function p(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function y(e){var t=e||"/",n="",r="",s=t.indexOf("#");-1!==s&&(r=t.substr(s),t=t.substr(0,s));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}function g(e){var t=e.pathname,n=e.search,r=e.hash,s=t||"/";return n&&"?"!==n&&(s+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(s+="#"===r.charAt(0)?r:"#"+r),s}function v(e,t,n,s){var i;"string"==typeof e?(i=y(e)).state=t:(void 0===(i=r({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),s?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,s.pathname)):i.pathname=s.pathname:i.pathname||(i.pathname="/"),i}function b(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&c(e.state,t.state)}function w(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,s){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,s):s(!0):s(!1!==i)}else s(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var x=!("undefined"==typeof window||!window.document||!window.document.createElement);function S(e,t){t(window.confirm(e))}var P="popstate",A="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function T(e){void 0===e&&(e={}),x||h(!1);var t,n=window.history,s=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,o=a.forceRefresh,c=void 0!==o&&o,l=a.getUserConfirmation,u=void 0===l?S:l,d=a.keyLength,y=void 0===d?6:d,b=e.basename?m(p(e.basename)):"";function T(e){var t=e||{},n=t.key,r=t.state,s=window.location,i=s.pathname+s.search+s.hash;return b&&(i=f(i,b)),v(i,r,n)}function k(){return Math.random().toString(36).substr(2,y)}var _=w();function C(e){r(Y,e),Y.length=n.length,_.notifyListeners(Y.location,Y.action)}function I(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(T(e.state))}function O(){N(T(E()))}var L=!1;function N(e){L?(L=!1,C()):_.confirmTransitionTo(e,"POP",u,(function(t){t?C({action:"POP",location:e}):function(e){var t=Y.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var s=n-r;s&&(L=!0,B(s))}(e)}))}var M=T(E()),D=[M.key];function R(e){return b+g(e)}function B(e){n.go(e)}var F=0;function j(e){1===(F+=e)&&1===e?(window.addEventListener(P,I),i&&window.addEventListener(A,O)):0===F&&(window.removeEventListener(P,I),i&&window.removeEventListener(A,O))}var U=!1,Y={length:n.length,action:"POP",location:M,createHref:R,push:function(e,t){var r="PUSH",i=v(e,t,k(),Y.location);_.confirmTransitionTo(i,r,u,(function(e){if(e){var t=R(i),a=i.key,o=i.state;if(s)if(n.pushState({key:a,state:o},null,t),c)window.location.href=t;else{var l=D.indexOf(Y.location.key),u=D.slice(0,l+1);u.push(i.key),D=u,C({action:r,location:i})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",i=v(e,t,k(),Y.location);_.confirmTransitionTo(i,r,u,(function(e){if(e){var t=R(i),a=i.key,o=i.state;if(s)if(n.replaceState({key:a,state:o},null,t),c)window.location.replace(t);else{var l=D.indexOf(Y.location.key);-1!==l&&(D[l]=i.key),C({action:r,location:i})}else window.location.replace(t)}}))},go:B,goBack:function(){B(-1)},goForward:function(){B(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return U||(j(1),U=!0),function(){return U&&(U=!1,j(-1)),t()}},listen:function(e){var t=_.appendListener(e);return j(1),function(){j(-1),t()}}};return Y}var k="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:p},slash:{encodePath:p,decodePath:p}};function C(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function I(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function O(e){window.location.replace(C(window.location.href)+"#"+e)}function L(e){void 0===e&&(e={}),x||h(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),s=n.getUserConfirmation,i=void 0===s?S:s,a=n.hashType,o=void 0===a?"slash":a,c=e.basename?m(p(e.basename)):"",l=_[o],u=l.encodePath,d=l.decodePath;function y(){var e=d(I());return c&&(e=f(e,c)),v(e)}var b=w();function P(e){r(U,e),U.length=t.length,b.notifyListeners(U.location,U.action)}var A=!1,E=null;function T(){var e,t,n=I(),r=u(n);if(n!==r)O(r);else{var s=y(),a=U.location;if(!A&&(t=s,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(E===g(s))return;E=null,function(e){if(A)A=!1,P();else{b.confirmTransitionTo(e,"POP",i,(function(t){t?P({action:"POP",location:e}):function(e){var t=U.location,n=D.lastIndexOf(g(t));-1===n&&(n=0);var r=D.lastIndexOf(g(e));-1===r&&(r=0);var s=n-r;s&&(A=!0,R(s))}(e)}))}}(s)}}var L=I(),N=u(L);L!==N&&O(N);var M=y(),D=[g(M)];function R(e){t.go(e)}var B=0;function F(e){1===(B+=e)&&1===e?window.addEventListener(k,T):0===B&&window.removeEventListener(k,T)}var j=!1,U={length:t.length,action:"POP",location:M,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=C(window.location.href)),n+"#"+u(c+g(e))},push:function(e,t){var n="PUSH",r=v(e,void 0,void 0,U.location);b.confirmTransitionTo(r,n,i,(function(e){if(e){var t=g(r),s=u(c+t);if(I()!==s){E=t,function(e){window.location.hash=e}(s);var i=D.lastIndexOf(g(U.location)),a=D.slice(0,i+1);a.push(t),D=a,P({action:n,location:r})}else P()}}))},replace:function(e,t){var n="REPLACE",r=v(e,void 0,void 0,U.location);b.confirmTransitionTo(r,n,i,(function(e){if(e){var t=g(r),s=u(c+t);I()!==s&&(E=t,O(s));var i=D.indexOf(g(U.location));-1!==i&&(D[i]=t),P({action:n,location:r})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&(e=!1);var t=b.setPrompt(e);return j||(F(1),j=!0),function(){return j&&(j=!1,F(-1)),t()}},listen:function(e){var t=b.appendListener(e);return F(1),function(){F(-1),t()}}};return U}function N(e,t,n){return Math.min(Math.max(e,t),n)}function M(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,s=t.initialEntries,i=void 0===s?["/"]:s,a=t.initialIndex,o=void 0===a?0:a,c=t.keyLength,l=void 0===c?6:c,u=w();function h(e){r(b,e),b.length=b.entries.length,u.notifyListeners(b.location,b.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=N(o,0,i.length-1),f=i.map((function(e){return v(e,void 0,"string"==typeof e?p():e.key||p())})),m=g;function y(e){var t=N(b.index+e,0,b.entries.length-1),r=b.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?h({action:"POP",location:r,index:t}):h()}))}var b={length:f.length,action:"POP",location:f[d],index:d,entries:f,createHref:m,push:function(e,t){var r="PUSH",s=v(e,t,p(),b.location);u.confirmTransitionTo(s,r,n,(function(e){if(e){var t=b.index+1,n=b.entries.slice(0);n.length>t?n.splice(t,n.length-t,s):n.push(s),h({action:r,location:s,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",s=v(e,t,p(),b.location);u.confirmTransitionTo(s,r,n,(function(e){e&&(b.entries[b.index]=s,h({action:r,location:s}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=b.index+e;return t>=0&&t<b.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return b}},9844:(e,t,n)=>{var r={"./en-au":4073,"./en-au.js":4073,"./en-ca":1387,"./en-ca.js":1387,"./en-gb":1386,"./en-gb.js":1386,"./en-ie":3537,"./en-ie.js":3537,"./en-il":7050,"./en-il.js":7050,"./en-in":627,"./en-in.js":627,"./en-nz":6963,"./en-nz.js":6963,"./en-sg":4865,"./en-sg.js":4865,"./zh-cn":1329,"./zh-cn.js":1329,"./zh-hk":3005,"./zh-hk.js":3005,"./zh-mo":7696,"./zh-mo.js":7696,"./zh-tw":5861,"./zh-tw.js":5861};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=i,e.exports=s,s.id=9844}}]);
|
|
3
|
+
//# sourceMappingURL=all.d747c648.js.map
|