next
Version:
The React Framework
74 lines • 1.4 MB
JavaScript
(()=>{var e={7043:(e,t,r)=>{e.exports=r(5619)},2119:(e,t,r)=>{e.exports=r(7286)},1498:(e,t,r)=>{"use strict";const s=r(3654);const a=Object.freeze(Object.keys(s));for(const e of a){Object.freeze(s[e])}Object.freeze(s);const n=new Set(["parent","leadingComments","trailingComments"]);function filterKey(e){return!n.has(e)&&e[0]!=="_"}e.exports=Object.freeze({KEYS:s,getKeys(e){return Object.keys(e).filter(filterKey)},unionWith(e){const t=Object.assign({},s);for(const r of Object.keys(e)){if(t.hasOwnProperty(r)){const s=new Set(e[r]);for(const e of t[r]){s.add(e)}t[r]=Object.freeze(Array.from(s))}else{t[r]=Object.freeze(Array.from(e[r]))}}return Object.freeze(t)}})},2155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=annotateAsPure;var s=r(8622);const a="#__PURE__";const isPureAnnotated=({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value)));function annotateAsPure(e){const t=e["node"]||e;if(isPureAnnotated(t)){return}s.addComment(t,"leading",a)}},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3223);var a=r(8622);function _default(e){const{build:t,operator:r}=e;return{AssignmentExpression(e){const{node:n,scope:o}=e;if(n.operator!==r+"=")return;const i=[];const l=(0,s.default)(n.left,i,this,o);i.push(a.assignmentExpression("=",l.ref,t(l.uid,n.right)));e.replaceWith(a.sequenceExpression(i))},BinaryExpression(e){const{node:s}=e;if(s.operator===r){e.replaceWith(t(s.left,s.right))}}}}},9750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getInclusionReasons=getInclusionReasons;var s=r(7849);var a=r(4794);var n=r(3406);function getInclusionReasons(e,t,r){const o=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const i=(0,n.getLowestImplementedVersion)(o,r);const l=t[r];if(!i){e[r]=(0,a.prettifyVersion)(l)}else{const t=(0,n.isUnreleasedVersion)(i,r);const o=(0,n.isUnreleasedVersion)(l,r);if(!o&&(t||s.lt(l.toString(),(0,n.semverify)(i)))){e[r]=(0,a.prettifyVersion)(l)}}return e}),{})}},9578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.targetsSupported=targetsSupported;t.isRequired=isRequired;t["default"]=filterItems;var s=r(7849);var a=r(2119);var n=r(3406);function targetsSupported(e,t){const r=Object.keys(e);if(r.length===0){return false}const a=r.filter((r=>{const a=(0,n.getLowestImplementedVersion)(t,r);if(!a){return true}const o=e[r];if((0,n.isUnreleasedVersion)(o,r)){return false}if((0,n.isUnreleasedVersion)(a,r)){return true}if(!s.valid(o.toString())){throw new Error(`Invalid version passed for target "${r}": "${o}". `+"Versions must be in semver format (major.minor.patch)")}return s.gt((0,n.semverify)(a),o.toString())}));return a.length===0}function isRequired(e,t,{compatData:r=a,includes:s,excludes:n}={}){if(n!=null&&n.has(e))return false;if(s!=null&&s.has(e))return true;return!targetsSupported(t,r[e])}function filterItems(e,t,r,s,a,n,o){const i=new Set;const l={compatData:e,includes:t,excludes:r};for(const t in e){if(isRequired(t,s,l)){i.add(t)}else if(o){const e=o.get(t);if(e){i.add(e)}}}if(a){a.forEach((e=>!r.has(e)&&i.add(e)))}if(n){n.forEach((e=>!t.has(e)&&i.delete(e)))}return i}},797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isBrowsersQueryValid=isBrowsersQueryValid;t["default"]=getTargets;Object.defineProperty(t,"unreleasedLabels",{enumerable:true,get:function(){return i.unreleasedLabels}});Object.defineProperty(t,"TargetNames",{enumerable:true,get:function(){return l.TargetNames}});Object.defineProperty(t,"prettifyTargets",{enumerable:true,get:function(){return c.prettifyTargets}});Object.defineProperty(t,"getInclusionReasons",{enumerable:true,get:function(){return u.getInclusionReasons}});Object.defineProperty(t,"filterItems",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"isRequired",{enumerable:true,get:function(){return p.isRequired}});var s=r(4907);var a=r(7347);var n=r(7043);var o=r(3406);var i=r(6555);var l=r(5748);var c=r(4794);var u=r(9750);var p=r(9578);const f=n["es6.module"];const d=new a.OptionValidator("@babel/helper-compilation-targets");function validateTargetNames(e){const t=Object.keys(l.TargetNames);for(const r of Object.keys(e)){if(!(r in l.TargetNames)){throw new Error(d.formatMessage(`'${r}' is not a valid target\n- Did you mean '${(0,a.findSuggestion)(r,t)}'?`))}}return e}function isBrowsersQueryValid(e){return typeof e==="string"||Array.isArray(e)&&e.every((e=>typeof e==="string"))}function validateBrowsers(e){d.invariant(e===undefined||isBrowsersQueryValid(e),`'${String(e)}' is not a valid browserslist query`);return e}function getLowestVersions(e){return e.reduce(((e,t)=>{const[r,s]=t.split(" ");const a=i.browserNameMap[r];if(!a){return e}try{const t=s.split("-")[0].toLowerCase();const n=(0,o.isUnreleasedVersion)(t,r);if(!e[a]){e[a]=n?t:(0,o.semverify)(t);return e}const i=e[a];const l=(0,o.isUnreleasedVersion)(i,r);if(l&&n){e[a]=(0,o.getLowestUnreleased)(i,t,r)}else if(l){e[a]=(0,o.semverify)(t)}else if(!l&&!n){const r=(0,o.semverify)(t);e[a]=(0,o.semverMin)(i,r)}}catch(e){}return e}),{})}function outputDecimalWarning(e){if(!e.length){return}console.warn("Warning, the following targets are using a decimal version:\n");e.forEach((({target:e,value:t})=>console.warn(` ${e}: ${t}`)));console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`)}function semverifyTarget(e,t){try{return(0,o.semverify)(t)}catch(r){throw new Error(d.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const m={__default(e,t){const r=(0,o.isUnreleasedVersion)(t,e)?t.toLowerCase():semverifyTarget(e,t);return[e,r]},node(e,t){const r=t===true||t==="current"?process.versions.node:semverifyTarget(e,t);return[e,r]}};function generateTargets(e){const t=Object.assign({},e);delete t.esmodules;delete t.browsers;return t}function resolveTargets(e){const t=s(e,{mobileToDesktop:true});return getLowestVersions(t)}function getTargets(e={},t={}){var r;let{browsers:a,esmodules:n}=e;const{configPath:i="."}=t;validateBrowsers(a);const l=generateTargets(e);let c=validateTargetNames(l);const u=!!a;const p=u||Object.keys(c).length>0;const d=!t.ignoreBrowserslistConfig&&!p;if(!a&&d){a=s.loadConfig({config:t.configFile,path:i,env:t.browserslistEnv});if(a==null){{a=[]}}}if(n&&(n!=="intersect"||!((r=a)!=null&&r.length))){a=Object.keys(f).map((e=>`${e} >= ${f[e]}`)).join(", ");n=false}if(a){const e=resolveTargets(a);if(n==="intersect"){for(const t of Object.keys(e)){const r=e[t];if(f[t]){e[t]=(0,o.getHighestUnreleased)(r,(0,o.semverify)(f[t]),t)}else{delete e[t]}}}c=Object.assign(e,c)}const y={};const g=[];for(const e of Object.keys(c).sort()){var h;const t=c[e];if(typeof t==="number"&&t%1!==0){g.push({target:e,value:t})}const r=(h=m[e])!=null?h:m.__default;const[s,a]=r(e,t);if(a){y[s]=a}}outputDecimalWarning(g);return y}},5748:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TargetNames=void 0;const r={node:"node",chrome:"chrome",opera:"opera",edge:"edge",firefox:"firefox",safari:"safari",ie:"ie",ios:"ios",android:"android",electron:"electron",samsung:"samsung"};t.TargetNames=r},4794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.prettifyVersion=prettifyVersion;t.prettifyTargets=prettifyTargets;var s=r(7849);var a=r(6555);function prettifyVersion(e){if(typeof e!=="string"){return e}const t=[s.major(e)];const r=s.minor(e);const a=s.patch(e);if(r||a){t.push(r)}if(a){t.push(a)}return t.join(".")}function prettifyTargets(e){return Object.keys(e).reduce(((t,r)=>{let s=e[r];const n=a.unreleasedLabels[r];if(typeof s==="string"&&n!==s){s=prettifyVersion(s)}t[r]=s;return t}),{})}},6555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.browserNameMap=t.unreleasedLabels=void 0;const r={safari:"tp"};t.unreleasedLabels=r;const s={and_chr:"chrome",and_ff:"firefox",android:"android",chrome:"chrome",edge:"edge",firefox:"firefox",ie:"ie",ie_mob:"ie",ios_saf:"ios",node:"node",op_mob:"opera",opera:"opera",safari:"safari",samsung:"samsung"};t.browserNameMap=s},3406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.semverMin=semverMin;t.semverify=semverify;t.isUnreleasedVersion=isUnreleasedVersion;t.getLowestUnreleased=getLowestUnreleased;t.getHighestUnreleased=getHighestUnreleased;t.getLowestImplementedVersion=getLowestImplementedVersion;var s=r(7849);var a=r(7347);var n=r(6555);const o=/^(\d+|\d+.\d+)$/;const i=new a.OptionValidator("@babel/helper-compilation-targets");function semverMin(e,t){return e&&s.lt(e,t)?e:t}function semverify(e){if(typeof e==="string"&&s.valid(e)){return e}i.invariant(typeof e==="number"||typeof e==="string"&&o.test(e),`'${e}' is not a valid version`);const t=e.toString().split(".");while(t.length<3){t.push("0")}return t.join(".")}function isUnreleasedVersion(e,t){const r=n.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()}function getLowestUnreleased(e,t,r){const s=n.unreleasedLabels[r];const a=[e,t].some((e=>e===s));if(a){return e===a?t:e||t}return semverMin(e,t)}function getHighestUnreleased(e,t,r){return getLowestUnreleased(e,t,r)===e?t:e}function getLowestImplementedVersion(e,t){const r=e[t];if(!r&&t==="android"){return e.chrome}return r}},6429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasOwnDecorators=hasOwnDecorators;t.hasDecorators=hasDecorators;t.buildDecoratedClass=buildDecoratedClass;var s=r(8304);var a=r(6833);var n=r(550);function hasOwnDecorators(e){return!!(e.decorators&&e.decorators.length)}function hasDecorators(e){return hasOwnDecorators(e)||e.body.body.some(hasOwnDecorators)}function prop(e,t){if(!t)return null;return s.types.objectProperty(s.types.identifier(e),t)}function method(e,t){return s.types.objectMethod("method",s.types.identifier(e),[],s.types.blockStatement(t))}function takeDecorators(e){let t;if(e.decorators&&e.decorators.length>0){t=s.types.arrayExpression(e.decorators.map((e=>e.expression)))}e.decorators=undefined;return t}function getKey(e){if(e.computed){return e.key}else if(s.types.isIdentifier(e.key)){return s.types.stringLiteral(e.key.name)}else{return s.types.stringLiteral(String(e.key.value))}}function extractElementDescriptor(e,t,r){const{node:o,scope:i}=r;const l=r.isClassMethod();if(r.isPrivate()){throw r.buildCodeFrameError(`Private ${l?"methods":"fields"} in decorated classes are not supported yet.`)}new a.default({methodPath:r,objectRef:e,superRef:t,file:this,refToPreserve:e}).replace();const c=[prop("kind",s.types.stringLiteral(l?o.kind:"field")),prop("decorators",takeDecorators(o)),prop("static",o.static&&s.types.booleanLiteral(true)),prop("key",getKey(o))].filter(Boolean);if(l){const e=o.computed?null:o.key;s.types.toExpression(o);c.push(prop("value",(0,n.default)({node:o,id:e,scope:i})||o))}else if(o.value){c.push(method("value",s.template.statements.ast`return ${o.value}`))}else{c.push(prop("value",i.buildUndefinedNode()))}r.remove();return s.types.objectExpression(c)}function addDecorateHelper(e){try{return e.addHelper("decorate")}catch(e){if(e.code==="BABEL_HELPER_UNKNOWN"){e.message+="\n '@babel/plugin-transform-decorators' in non-legacy mode"+" requires '@babel/core' version ^7.0.2 and you appear to be using"+" an older version."}throw e}}function buildDecoratedClass(e,t,r,a){const{node:n,scope:o}=t;const i=o.generateUidIdentifier("initialize");const l=n.id&&t.isDeclaration();const c=t.isInStrictMode();const{superClass:u}=n;n.type="ClassDeclaration";if(!n.id)n.id=s.types.cloneNode(e);let p;if(u){p=o.generateUidIdentifierBasedOnNode(n.superClass,"super");n.superClass=p}const f=takeDecorators(n);const d=s.types.arrayExpression(r.filter((e=>!e.node.abstract)).map(extractElementDescriptor.bind(a,n.id,p)));const m=s.template.expression.ast`
${addDecorateHelper(a)}(
${f||s.types.nullLiteral()},
function (${i}, ${u?s.types.cloneNode(p):null}) {
${n}
return { F: ${s.types.cloneNode(n.id)}, d: ${d} };
},
${u}
)
`;if(!c){m.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let y=m;let g="arguments.1.body.body.0";if(l){y=s.template.statement.ast`let ${e} = ${m}`;g="declarations.0.init."+g}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(i)}(this)`],wrapClass(e){e.replaceWith(y);return e.get(g)}}}},7497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.isLoose=isLoose;t.verifyUsedFeatures=verifyUsedFeatures;t.FEATURES=void 0;var s=r(6429);const a=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});t.FEATURES=a;const n=new Map([[a.fields,"@babel/plugin-proposal-class-properties"],[a.privateMethods,"@babel/plugin-proposal-private-methods"],[a.privateIn,"@babel/plugin-proposal-private-property-in-object"]]);const o="@babel/plugin-class-features/featuresKey";const i="@babel/plugin-class-features/looseKey";const l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function enableFeature(e,t,r){if(!hasFeature(e,t)||canIgnoreLoose(e,t)){e.set(o,e.get(o)|t);if(r==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,t,true);e.set(l,e.get(l)|t)}else if(r==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,t,false);e.set(l,e.get(l)|t)}else{setLoose(e,t,r)}}let s;let a;for(const[t,r]of n){if(!hasFeature(e,t))continue;const n=isLoose(e,t);if(canIgnoreLoose(e,t)){continue}else if(s===!n){throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, "+"@babel/plugin-proposal-private-methods and "+"@babel/plugin-proposal-private-property-in-object (when they are enabled).")}else{s=n;a=r}}if(s!==undefined){for(const[t,r]of n){if(hasFeature(e,t)&&isLoose(e,t)!==s){setLoose(e,t,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${r} since the "loose" mode option was set to `+`"${s}" for ${a}.\nThe "loose" option must be the `+`same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods `+`and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${r}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,t){return!!(e.get(o)&t)}function isLoose(e,t){return!!(e.get(i)&t)}function setLoose(e,t,r){if(r)e.set(i,e.get(i)|t);else e.set(i,e.get(i)&~t);e.set(l,e.get(l)&~t)}function canIgnoreLoose(e,t){return!!(e.get(l)&t)}function verifyUsedFeatures(e,t){if((0,s.hasOwnDecorators)(e.node)){if(!hasFeature(t,a.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "legacy": true }], '+'make sure it comes *before* "@babel/plugin-proposal-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n'+'\t["@babel/plugin-proposal-class-properties", { "loose": true }]')}if(e.isPrivate()){throw e.buildCodeFrameError(`Private ${e.isClassMethod()?"methods":"fields"} in decorated classes are not supported yet.`)}}if(e.isPrivateMethod!=null&&e.isPrivateMethod()){if(!hasFeature(t,a.privateMethods)){throw e.buildCodeFrameError("Class private methods are not enabled.")}}if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:"in",left:e.node})){if(!hasFeature(t,a.privateIn)){throw e.buildCodeFrameError("Private property in checks are not enabled.")}}if(e.isProperty()){if(!hasFeature(t,a.fields)){throw e.buildCodeFrameError("Class fields are not enabled.")}}if(e.isStaticBlock!=null&&e.isStaticBlock()){if(!hasFeature(t,a.staticBlocks)){throw e.buildCodeFrameError("Static class blocks are not enabled. "+"Please add `@babel/plugin-proposal-class-static-block` to your configuration.")}}}},3647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildPrivateNamesMap=buildPrivateNamesMap;t.buildPrivateNamesNodes=buildPrivateNamesNodes;t.transformPrivateNamesUsage=transformPrivateNamesUsage;t.buildFieldsInitNodes=buildFieldsInitNodes;var s=r(8304);var a=r(6833);var n=r(3316);var o=r(6721);var i=r(2155);var l=r(6339);function buildPrivateNamesMap(e){const t=new Map;for(const r of e){const e=r.isPrivate();const s=!r.isProperty();const a=!r.node.static;if(e){const{name:e}=r.node.key.id;const n=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:!a,method:s};if(r.node.kind==="get"){n.getId=r.scope.generateUidIdentifier(`get_${e}`)}else if(r.node.kind==="set"){n.setId=r.scope.generateUidIdentifier(`set_${e}`)}else if(r.node.kind==="method"){n.methodId=r.scope.generateUidIdentifier(e)}t.set(e,n)}}return t}function buildPrivateNamesNodes(e,t,r){const a=[];for(const[n,o]of e){const{static:e,method:l,getId:c,setId:u}=o;const p=c||u;const f=s.types.cloneNode(o.id);let d;if(t){d=s.types.callExpression(r.addHelper("classPrivateFieldLooseKey"),[s.types.stringLiteral(n)])}else if(!e){d=s.types.newExpression(s.types.identifier(!l||p?"WeakMap":"WeakSet"),[])}if(d){(0,i.default)(d);a.push(s.template.statement.ast`var ${f} = ${d}`)}}return a}function privateNameVisitorFactory(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:s}=this;const a=e.get("body.body");const n=new Map(s);const o=[];for(const e of a){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;n.delete(t);o.push(t)}if(!o.length){return}e.get("body").traverse(r,Object.assign({},this,{redeclared:o}));e.traverse(t,Object.assign({},this,{privateNamesMap:n}));e.skipKey("body")}});const r=s.traverse.visitors.merge([Object.assign({},e),a.environmentVisitor]);return t}const c=privateNameVisitorFactory({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:s}=this;const{node:a,parentPath:n}=e;if(!n.isMemberExpression({property:a})&&!n.isOptionalMemberExpression({property:a})){return}const{name:o}=a.id;if(!r.has(o))return;if(s&&s.includes(o))return;this.handle(n,t)}});const u=privateNameVisitorFactory({BinaryExpression(e){const{operator:t,left:r,right:a}=e.node;if(t!=="in")return;if(!e.get("left").isPrivateName())return;const{privateFieldsAsProperties:n,privateNamesMap:o,redeclared:i}=this;const{name:l}=r.id;if(!o.has(l))return;if(i&&i.includes(l))return;if(n){const{id:t}=o.get(l);e.replaceWith(s.template.expression.ast`
Object.prototype.hasOwnProperty.call(${a}, ${s.types.cloneNode(t)})
`);return}const{id:c,static:u}=o.get(l);if(u){e.replaceWith(s.template.expression.ast`${a} === ${this.classRef}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(c)}.has(${a})`)}});const p={memoise(e,t){const{scope:r}=e;const{object:s}=e.node;const a=r.maybeGenerateMemoised(s);if(!a){return}this.memoiser.set(s,a,t)},receiver(e){const{object:t}=e.node;if(this.memoiser.has(t)){return s.types.cloneNode(this.memoiser.get(t))}return s.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i,method:l,methodId:c,getId:u,setId:p}=r.get(n);const f=u||p;if(i){const r=l&&!f?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return s.types.callExpression(a.addHelper(r),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(o)])}if(l){if(f){if(!u&&p){if(a.availableHelper("writeOnlyError")){return s.types.sequenceExpression([this.receiver(e),s.types.callExpression(a.addHelper("writeOnlyError"),[s.types.stringLiteral(`#${n}`)])])}console.warn(`@babel/helpers is outdated, update it to silence this warning.`)}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(o)])}return s.types.callExpression(a.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(o),s.types.cloneNode(c)])}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(o)])},boundGet(e){this.memoise(e,1);return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:a,file:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,setId:u,getId:p}=a.get(o);const f=p||u;if(l){const a=c&&!f?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(n.addHelper(a),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(i),t])}if(c){if(u){return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),t])}return s.types.sequenceExpression([this.receiver(e),t,s.types.callExpression(n.addHelper("readOnlyError"),[s.types.stringLiteral(`#${o}`)])])}return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i}=r.get(n);if(i){try{var l=a.addHelper("classStaticPrivateFieldDestructureSet")}catch(e){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n"+"please update @babel/helpers to the latest version.")}return s.types.memberExpression(s.types.callExpression(l,[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(o)]),s.types.identifier("value"))}return s.types.memberExpression(s.types.callExpression(a.addHelper("classPrivateFieldDestructureSet"),[this.receiver(e),s.types.cloneNode(o)]),s.types.identifier("value"))},call(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,false)},optionalCall(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,true)}};const f={get(e){const{privateNamesMap:t,file:r}=this;const{object:a}=e.node;const{name:n}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(a),PROP:s.types.cloneNode(t.get(n).id)})},boundGet(e){return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[s.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return s.types.callExpression(this.get(e),t)},optionalCall(e,t){return s.types.optionalCallExpression(this.get(e),t,true)}};function transformPrivateNamesUsage(e,t,r,{privateFieldsAsProperties:s,noDocumentAll:a},o){if(!r.size)return;const i=t.get("body");const l=s?f:p;(0,n.default)(i,c,Object.assign({privateNamesMap:r,classRef:e,file:o},l,{noDocumentAll:a}));i.traverse(u,{privateNamesMap:r,classRef:e,file:o,privateFieldsAsProperties:s})}function buildPrivateFieldInitLoose(e,t,r){const{id:a}=r.get(t.node.key.id.name);const n=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`
Object.defineProperty(${e}, ${s.types.cloneNode(a)}, {
// configurable is false by default
// enumerable is false by default
writable: true,
value: ${n}
});
`}function buildPrivateInstanceFieldInitSpec(e,t,r){const{id:a}=r.get(t.node.key.id.name);const n=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`${s.types.cloneNode(a)}.set(${e}, {
// configurable is always false for private elements
// enumerable is always false for private elements
writable: true,
value: ${n},
})`}function buildPrivateStaticFieldInitSpec(e,t){const r=t.get(e.node.key.id.name);const{id:a,getId:n,setId:o,initAdded:i}=r;const l=n||o;if(!e.isProperty()&&(i||!l))return;if(l){t.set(e.node.key.id.name,Object.assign({},r,{initAdded:true}));return s.template.statement.ast`
var ${s.types.cloneNode(a)} = {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${n?n.name:e.scope.buildUndefinedNode()},
set: ${o?o.name:e.scope.buildUndefinedNode()}
}
`}const c=e.node.value||e.scope.buildUndefinedNode();return s.template.statement.ast`
var ${s.types.cloneNode(a)} = {
// configurable is false by default
// enumerable is false by default
writable: true,
value: ${c}
};
`}function buildPrivateMethodInitLoose(e,t,r){const a=r.get(t.node.key.id.name);const{methodId:n,id:o,getId:i,setId:l,initAdded:c}=a;if(c)return;if(n){return s.template.statement.ast`
Object.defineProperty(${e}, ${o}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
value: ${n.name}
});
`}const u=i||l;if(u){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast`
Object.defineProperty(${e}, ${o}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${i?i.name:t.scope.buildUndefinedNode()},
set: ${l?l.name:t.scope.buildUndefinedNode()}
});
`}}function buildPrivateInstanceMethodInitSpec(e,t,r){const a=r.get(t.node.key.id.name);const{id:n,getId:o,setId:i,initAdded:l}=a;if(l)return;const c=o||i;if(c){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast`
${n}.set(${e}, {
get: ${o?o.name:t.scope.buildUndefinedNode()},
set: ${i?i.name:t.scope.buildUndefinedNode()}
});
`}return s.template.statement.ast`${n}.add(${e})`}function buildPublicFieldInitLoose(e,t){const{key:r,computed:a}=t.node;const n=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,r,a||s.types.isLiteral(r)),n))}function buildPublicFieldInitSpec(e,t,r){const{key:a,computed:n}=t.node;const o=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.callExpression(r.addHelper("defineProperty"),[e,n||s.types.isLiteral(a)?a:s.types.stringLiteral(a.name),o]))}function buildPrivateStaticMethodInitLoose(e,t,r,a){const n=a.get(t.node.key.id.name);const{id:o,methodId:i,getId:l,setId:c,initAdded:u}=n;if(u)return;const p=l||c;if(p){a.set(t.node.key.id.name,Object.assign({},n,{initAdded:true}));return s.template.statement.ast`
Object.defineProperty(${e}, ${o}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${l?l.name:t.scope.buildUndefinedNode()},
set: ${c?c.name:t.scope.buildUndefinedNode()}
})
`}return s.template.statement.ast`
Object.defineProperty(${e}, ${o}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
value: ${i.name}
});
`}function buildPrivateMethodDeclaration(e,t,r=false){const a=t.get(e.node.key.id.name);const{id:n,methodId:o,getId:i,setId:l,getterDeclared:c,setterDeclared:u,static:p}=a;const{params:f,body:d,generator:m,async:y}=e.node;const g=i&&!c&&f.length===0;const h=l&&!u&&f.length>0;let b=o;if(g){t.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));b=i}else if(h){t.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));b=l}else if(p&&!r){b=n}return s.types.functionDeclaration(s.types.cloneNode(b),f,d,m,y)}const d=s.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=true;e.replaceWith(s.types.cloneNode(t.classRef))}},a.environmentVisitor]);const m={ReferencedIdentifier(e,t){if(e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)){t.needsClassRef=true;e.node.name=t.classRef.name}}};function replaceThisContext(e,t,r,n,o,i,l){var c;const u={classRef:t,needsClassRef:false,innerBinding:l};const p=new a.default({methodPath:e,constantSuper:i,file:n,refToPreserve:t,getSuperRef:r,getObjectRef(){u.needsClassRef=true;return o||e.node.static?t:s.types.memberExpression(t,s.types.identifier("prototype"))}});p.replace();if(o||e.isProperty()){e.traverse(d,u)}if((c=u.classRef)!=null&&c.name&&u.classRef.name!==(l==null?void 0:l.name)){e.traverse(m,u)}return u.needsClassRef}function buildFieldsInitNodes(e,t,r,a,n,o,i,c,u){let p=false;let f;const d=[];const m=[];const y=[];const g=s.types.isIdentifier(t)?()=>t:()=>{var e;(e=f)!=null?e:f=r[0].scope.generateUidIdentifierBasedOnNode(t);return f};for(const t of r){l.assertFieldTransformed(t);const r=t.node.static;const f=!r;const h=t.isPrivate();const b=!h;const x=t.isProperty();const v=!x;const E=t.isStaticBlock==null?void 0:t.isStaticBlock();if(r||v&&h||E){const r=replaceThisContext(t,e,g,n,E,c,u);p=p||r}switch(true){case E:d.push(s.template.statement.ast`(() => ${s.types.blockStatement(t.node.body)})()`);break;case r&&h&&x&&i:p=true;d.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),t,a));break;case r&&h&&x&&!i:p=true;d.push(buildPrivateStaticFieldInitSpec(t,a));break;case r&&b&&x&&o:p=true;d.push(buildPublicFieldInitLoose(s.types.cloneNode(e),t));break;case r&&b&&x&&!o:p=true;d.push(buildPublicFieldInitSpec(s.types.cloneNode(e),t,n));break;case f&&h&&x&&i:m.push(buildPrivateFieldInitLoose(s.types.thisExpression(),t,a));break;case f&&h&&x&&!i:m.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),t,a));break;case f&&h&&v&&i:m.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),t,a));y.push(buildPrivateMethodDeclaration(t,a,i));break;case f&&h&&v&&!i:m.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),t,a));y.push(buildPrivateMethodDeclaration(t,a,i));break;case r&&h&&v&&!i:p=true;d.unshift(buildPrivateStaticFieldInitSpec(t,a));y.push(buildPrivateMethodDeclaration(t,a,i));break;case r&&h&&v&&i:p=true;d.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),t,n,a));y.push(buildPrivateMethodDeclaration(t,a,i));break;case f&&b&&x&&o:m.push(buildPublicFieldInitLoose(s.types.thisExpression(),t));break;case f&&b&&x&&!o:m.push(buildPublicFieldInitSpec(s.types.thisExpression(),t,n));break;default:throw new Error("Unreachable.")}}return{staticNodes:d.filter(Boolean),instanceNodes:m.filter(Boolean),pureStaticNodes:y.filter(Boolean),wrapClass(t){for(const e of r){e.remove()}if(f){t.scope.push({id:s.types.cloneNode(f)});t.set("superClass",s.types.assignmentExpression("=",f,t.node.superClass))}if(!p)return t;if(t.isClassExpression()){t.scope.push({id:e});t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))}else if(!t.node.id){t.node.id=e}return t}}}},6758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createClassFeaturePlugin=createClassFeaturePlugin;Object.defineProperty(t,"injectInitialization",{enumerable:true,get:function(){return l.injectInitialization}});Object.defineProperty(t,"enableFeature",{enumerable:true,get:function(){return c.enableFeature}});Object.defineProperty(t,"FEATURES",{enumerable:true,get:function(){return c.FEATURES}});var s=r(8304);var a=r(550);var n=r(7058);var o=r(3647);var i=r(6429);var l=r(5617);var c=r(7497);const u="7.14.6".split(".").reduce(((e,t)=>e*1e5+ +t),0);const p="@babel/plugin-class-features/version";function createClassFeaturePlugin({name:e,feature:t,loose:r,manipulateOptions:f,api:d={assumption:()=>{}}}){const m=d.assumption("setPublicClassFields");const y=d.assumption("privateFieldsAsProperties");const g=d.assumption("constantSuper");const h=d.assumption("noDocumentAll");if(r===true){const t=[];if(m!==undefined){t.push(`"setPublicClassFields"`)}if(y!==undefined){t.push(`"privateFieldsAsProperties"`)}if(t.length!==0){console.warn(`[${e}]: You are using the "loose: true" option and you are`+` explicitly setting a value for the ${t.join(" and ")}`+` assumption${t.length>1?"s":""}. The "loose" option`+` can cause incompatibilities with the other class features`+` plugins, so it's recommended that you replace it with the`+` following top-level option:\n`+`\t"assumptions": {\n`+`\t\t"setPublicClassFields": true,\n`+`\t\t"privateFieldsAsProperties": true\n`+`\t}`)}}return{name:e,manipulateOptions:f,pre(){(0,c.enableFeature)(this.file,t,r);if(!this.file.get(p)||this.file.get(p)<u){this.file.set(p,u)}},visitor:{Class(e,r){if(this.file.get(p)!==u)return;(0,c.verifyUsedFeatures)(e,this.file);const n=(0,c.isLoose)(this.file,t);let f;let d=(0,i.hasOwnDecorators)(e.node);const b=[];const x=[];const v=[];const E=new Set;const j=e.get("body");for(const e of j.get("body")){(0,c.verifyUsedFeatures)(e,this.file);if(e.node.computed){v.push(e)}if(e.isPrivate()){const{name:t}=e.node.key.id;const r=`get ${t}`;const s=`set ${t}`;if(e.node.kind==="get"){if(E.has(r)||E.has(t)&&!E.has(s)){throw e.buildCodeFrameError("Duplicate private field")}E.add(r).add(t)}else if(e.node.kind==="set"){if(E.has(s)||E.has(t)&&!E.has(r)){throw e.buildCodeFrameError("Duplicate private field")}E.add(s).add(t)}else{if(E.has(t)&&!E.has(r)&&!E.has(s)||E.has(t)&&(E.has(r)||E.has(s))){throw e.buildCodeFrameError("Duplicate private field")}E.add(t)}}if(e.isClassMethod({kind:"constructor"})){f=e}else{x.push(e);if(e.isProperty()||e.isPrivate()||e.isStaticBlock!=null&&e.isStaticBlock()){b.push(e)}}if(!d)d=(0,i.hasOwnDecorators)(e.node)}if(!b.length&&!d)return;const w=e.node.id;let _;if(!w||e.isClassExpression()){(0,a.default)(e);_=e.scope.generateUidIdentifier("class")}else{_=s.types.cloneNode(e.node.id)}const S=(0,o.buildPrivateNamesMap)(b);const k=(0,o.buildPrivateNamesNodes)(S,y!=null?y:n,r);(0,o.transformPrivateNamesUsage)(_,e,S,{privateFieldsAsProperties:y!=null?y:n,noDocumentAll:h},r);let O,I,P,D,C;if(d){I=P=O=[];({instanceNodes:D,wrapClass:C}=(0,i.buildDecoratedClass)(_,e,x,this.file))}else{O=(0,l.extractComputedKeys)(_,e,v,this.file);({staticNodes:I,pureStaticNodes:P,instanceNodes:D,wrapClass:C}=(0,o.buildFieldsInitNodes)(_,e.node.superClass,b,S,r,m!=null?m:n,y!=null?y:n,g!=null?g:n,w))}if(D.length>0){(0,l.injectInitialization)(e,f,D,((e,t)=>{if(d)return;for(const r of b){if(r.node.static)continue;r.traverse(e,t)}}))}e=C(e);e.insertBefore([...k,...O]);if(I.length>0){e.insertAfter(I)}if(P.length>0){e.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(P)}},PrivateName(e){if(this.file.get(p)!==u||e.parentPath.isPrivate({key:e.node})){return}throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(p)!==u)return;const t=e.get("declaration");if(t.isClassDeclaration()&&(0,i.hasDecorators)(t.node)){if(t.node.id){(0,n.default)(e)}else{t.node.type="ClassExpression"}}}}}}},5617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.injectInitialization=injectInitialization;t.extractComputedKeys=extractComputedKeys;var s=r(8304);var a=r(6833);const n=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},a.environmentVisitor]);const o={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){if(this.scope.hasOwnBinding(e.node.name)){this.scope.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const a=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([a,e.node]));e.skip()}}const i={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,a){if(!r.length)return;const i=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(i){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(a){a(o,{scope:t.scope})}if(i){const e=[];t.traverse(n,e);let a=true;for(const t of e){if(a){t.insertAfter(r);a=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r,a){const n=[];const o={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:a};for(const e of r){const r=e.get("key");if(r.isReferencedIdentifier()){handleClassTDZ(r,o)}else{r.traverse(i,o)}const a=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(a.key);t.scope.push({id:e,kind:"let"});n.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),a.key)));a.key=s.types.cloneNode(e)}}return n}},6339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-proposal-class-properties\n`+` - @babel/plugin-proposal-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},3316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(e.isOptionalMemberExpression()){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:n}=s.node;const o=e.scope.maybeGenerateMemoised(n)||n;s.get("object").replaceWith(a.assignmentExpression("=",o,n));return a.callExpression(a.memberExpression(t,a.identifier("call")),[o,...r.arguments])}return a.callExpression(t,r.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:o}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const i=e.find((({node:t,parent:r,parentPath:s})=>{if(s.isOptionalMemberExpression()){return r.optional||r.object!==t}if(s.isOptionalCallExpression()){return t!==e.node&&r.optional||r.callee!==t}return true}));if(o.path.isPattern()){i.replaceWith(a.callExpression(a.arrowFunctionExpression([],i.node),[]));return}const l=willPathCastToBoolean(i);const c=i.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const u=c.isUnaryExpression({operator:"delete"});if(u&&i.isOptionalMemberExpression()&&i.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let p=e;for(;;){if(p.isOptionalMemberExpression()){if(p.node.optional)break;p=p.get("object");continue}else if(p.isOptionalCallExpression()){if(p.node.optional)break;p=p.get("callee");continue}throw new Error(`Internal error: unexpected ${p.node.type}`)}const f=p.isOptionalMemberExpression()?"object":"callee";const d=p.node[f];const m=o.maybeGenerateMemoised(d);const y=m!=null?m:d;const g=n.isOptionalCallExpression({callee:r});const h=n.isCallExpression({callee:r});p.replaceWith(toNonOptional(p,y));if(g){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(h){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==i;){const{parentPath:e}=t;if(e===i&&g&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=i.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:i.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=i;if(u){E=v;b=v.node}const j=m?a.assignmentExpression("=",a.cloneNode(y),a.cloneNode(d)):a.cloneNode(y);if(l){let e;if(t){e=a.binaryExpression("!=",j,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",j,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(y),o.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",j,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",j,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(y),o.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,u?a.booleanLiteral(true):o.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(n.isUpdateExpression({argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:o}=s;this.memoise(e,2);const i=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(o){n.replaceWith(this.set(e,i))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});i.left=a.assignmentExpression("=",a.cloneNode(s),i.left);n.replaceWith(a.sequenceExpression([this.set(e,i),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=s;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,s.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(o.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,s.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}e.replaceWith(this.get(e))}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},3852:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.hasFeature=hasFeature;t.runtimeKey=t.featuresKey=t.FEATURES=void 0;const r=Object.freeze({unicodeFlag:1<<0,dotAllFlag:1<<1,unicodePropertyEscape:1<<2,namedCaptureGroups:1<<3});t.FEATURES=r;const s="@babel/plugin-regexp-features/featuresKey";t.featuresKey=s;const a="@babel/plugin-regexp-features/runtimeKey";t.runtimeKey=a;function enableFeature(e,t){return e|t}function hasFeature(e,t){return!!(e&t)}},6550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRegExpFeaturePlugin=createRegExpFeaturePlugin;var s=r(5756);var a=r(3852);var n=r(3889);var o=r(8304);var i=r(2155);function pullFlag(e,t){e.flags=e.flags.replace(t,"")}const l="7.14.5".split(".").reduce(((e,t)=>e*1e5+ +t),0);const c="@babel/plugin-regexp-features/version";function createRegExpFeaturePlugin({name:e,feature:t,options:r={}}){return{name:e,pre(){var e;const{file:s}=this;const n=(e=s.get(a.featuresKey))!=null?e:0;let o=(0,a.enableFeature)(n,a.FEATURES[t]);const{useUnicodeFlag:i,runtime:u=true}=r;if(i===false){o=(0,a.enableFeature)(o,a.FEATURES.unicodeFlag)}if(o!==n){s.set(a.featuresKey,o)}if(!u){s.set(a.runtimeKey,false)}if(!s.has(c)||s.get(c)<l){s.set(c,l)}},visitor:{RegExpLiteral(e){var t;const{node:r}=e;const{file:l}=this;const c=l.get(a.featuresKey);const u=(t=l.get(a.runtimeKey))!=null?t:true;const p=(0,n.generateRegexpuOptions)(r,c);if(p===null){return}const f={};if(p.namedGroup){p.onNamedGroup=(e,t)=>{f[e]=t}}r.pattern=s(r.pattern,r.flags,p);if(p.namedGroup&&Object.keys(f).length>0&&u&&!isRegExpTest(e)){const t=o.types.callExpression(this.addHelper("wrapRegExp"),[r,o.types.valueToNode(f)]);(0,i.default)(t);e.replaceWith(t)}if((0,a.hasFeature)(c,a.FEATURES.unicodeFlag)){pullFlag(r,"u")}if((0,a.hasFeature)(c,a.FEATURES.dotAllFlag)){pullFlag(r,"s")}}}}}function isRegExpTest(e){return e.parentPath.isMemberExpression({object:e.node,computed:false})&&e.parentPath.get("property").isIdentifier({name:"test"})}},3889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateRegexpuOptions=generateRegexpuOptions;var s=r(3852);function generateRegexpuOptions(e,t){let r=false,a=false,n=false,o=false;const{flags:i,pattern:l}=e;const c=i.includes("u");if(c){if(!(0,s.hasFeature)(t,s.FEATURES.unicodeFlag)){r=true}if((0,s.hasFeature)(t,s.FEATURES.unicodePropertyEscape)&&/\\[pP]{/.test(l)){n=true}}if((0,s.hasFeature)(t,s.FEATURES.dotAllFlag)&&i.indexOf("s")>=0){a=true}if((0,s.hasFeature)(t,s.FEATURES.namedCaptureGroups)&&/\(\?<(?![=!])/.test(l)){o=true}if(!o&&!n&&!a&&(!c||r)){return null}if(c&&i.indexOf("s")>=0){a=true}return{useUnicodeFlag:r,onNamedGroup:()=>{},namedGroup:o,unicodePropertyEscape:n,dotAllFlag:a,lookbehind:true}}},2062:(e,t,r)=>{"use strict";t.__esModule=true;t.stringifyTargetsMultiline=stringifyTargetsMultiline;t.stringifyTargets=stringifyTargets;t.presetEnvSilentDebugHeader=void 0;var s=r(797);const a="#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets";t.presetEnvSilentDebugHeader=a;function stringifyTargetsMultiline(e){return JSON.stringify((0,s.prettifyTargets)(e),null,2)}function stringifyTargets(e){return JSON.stringify(e).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }')}},4299:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=_interopRequireWildcard(r(8304));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var n=s?Object.getOwnPropertyDescriptor(e,a):null;if(n&&(n.get||n.set)){Object.defineProperty(r,a,n)}else{r[a]=e[a]}}}r.default=e;if(t){t.set(e,r)}return r}const{types:a}=s.default||s;class ImportsCache{constructor(e){this._imports=new WeakMap;this._anonymousImports=new WeakMap;this._lastImports=new WeakMap;this._resolver=e}storeAnonymous(e,t,r){const s=this._normalizeKey(e,t);const n=this._ensure(this._anonymousImports,e,Set);if(n.has(s))return;const o=r(e.node.sourceType==="script",a.stringLiteral(this._resolver(t)));n.add(s);this._injectImport(e,o)}storeNamed(e,t,r,s){const n=this._normalizeKey(e,t,r);const o=this._ensure(this._imports,e,Map);if(!o.has(n)){const{node:i,name:l}=s(e.node.sourceType==="script",a.stringLiteral(this._resolver(t)),a.identifier(r));o.set(n,l);this._injectImport(e,i)}return a.identifier(o.get(n))}_injectImport(e,t){let r=this._lastImports.get(e);if(r&&r.node&&r.parent===e.node&&r.container===e.node.body){r=r.insertAfter(t)}else{r=e.unshiftContainer("body",t)}r=r[r.length-1];this._lastImports.set(e,r)}_ensure(e,t,r){let s=e.get(t);if(!s){s=new r;e.set(t,s)}return s}_normalizeKey(e,t,r=""){const{sourceType:s}=e.node;return`${r&&s}::${t}::${r}`}}t["default"]=ImportsCache},8038:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=definePolyfillProvider;var s=r(1403);var a=_interopRequireWildcard(r(797));var n=r(4182);var o=_interopRequireDefault(r(4299));var i=r(2062);var l=r(1522);var c=_interopRequireWildcard(r(9313));var u=_interopRequireWildcard(r(6814));var p=_interopRequireDefault(r(8510));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var n=s?Object.getOwnPropertyDescriptor(e,a):null;if(n&&(n.get||n.set)){Object.defineProperty(r,a,n)}else{r[a]=e[a]}}}r.default=e;if(t){t.set(e,r)}return r}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var s=Object.keys(e);var a,n;for(n=0;n<s.length;n++){a=s[n];if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}const f=a.default.default||a.default;function resolveOptions(e,t){const{method:r,targets:s,ignoreBrowserslistConfig:a,configPath:n,debug:o,shouldInjectPolyfill:i,absoluteImports:l}=e,c=_objectWithoutPropertiesLoose(e,["method","targets","ignoreBrowserslistConfig","configPath","debug","shouldInjectPolyfi