@lemon-fe/vite-plugin-micro-frontend 1.0.9 → 1.1.0
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/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +4 -3
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@ import*as e from"path";import{join as t,basename as n,extname as r,relative as i
|
|
|
10
10
|
|
|
11
11
|
return ${L(i)};
|
|
12
12
|
})(${w(this.node)})
|
|
13
|
-
`;return this.replaceWith(p)[0].get("arguments.0")},fa.splitExportDeclaration=function(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(this.isExportNamedDeclaration()&&this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const e=this.get("declaration");if(this.isExportDefaultDeclaration()){const t=e.isFunctionDeclaration()||e.isClassDeclaration(),n=e.isFunctionExpression()||e.isClassExpression(),r=e.isScope()?e.scope.parent:e.scope;let i=e.node.id,s=!1;i?n&&r.hasBinding(i.name)&&(s=!0,i=r.generateUidIdentifier(i.name)):(s=!0,i=r.generateUidIdentifier("default"),(t||n)&&(e.node.id=L(i)));const a=t?e.node:M("var",[F(L(i),e.node)]),o=B(null,[j(L(i),u("default"))]);return this.insertAfter(o),this.replaceWith(a),s&&r.registerDeclaration(this),this}if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const t=e.getOuterBindingIdentifiers(),n=Object.keys(t).map(e=>j(u(e),u(e))),r=B(null,n);return this.insertAfter(r),this.replaceWith(e.node),this},fa.toComputedKey=function(){let e;if(this.isMemberExpression())e=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");e=this.node.key}this.node.computed||h(e)&&(e=v(e.name));return e},fa.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");K(this)};var e=Pr(),t=function(){if(_a)return ma;_a=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.statements=ma.statement=ma.smart=ma.program=ma.expression=ma.default=void 0;var e=Ta(),t=Fa();const n=ma.smart=(0,t.default)(e.smart),r=ma.statement=(0,t.default)(e.statement),i=ma.statements=(0,t.default)(e.statements),s=ma.expression=(0,t.default)(e.expression),a=ma.program=(0,t.default)(e.program);return ma.default=Object.assign(n.bind(void 0),{smart:n,statement:r,statements:i,expression:s,program:a,ast:n.ast}),ma}(),n=ei(),r=Qa();const{arrowFunctionExpression:i,assignmentExpression:s,binaryExpression:a,blockStatement:o,callExpression:l,conditionalExpression:c,expressionStatement:p,identifier:u,isIdentifier:h,jsxIdentifier:d,logicalExpression:f,LOGICAL_OPERATORS:m,memberExpression:y,metaProperty:T,numericLiteral:g,objectExpression:x,restElement:S,returnStatement:b,sequenceExpression:P,spreadElement:E,stringLiteral:v,super:A,thisExpression:C,toExpression:w,unaryExpression:I,toBindingIdentifierName:k,isFunction:N,isAssignmentPattern:O,isRestElement:_,getFunctionName:D,cloneNode:L,variableDeclaration:M,variableDeclarator:F,exportNamedDeclaration:B,exportSpecifier:j,inherits:R}=e;fa.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};const U=(0,n.environmentVisitor)({CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}});function K(e,t=!0,n=!0,r=!0){let o,p=e.findParent(e=>e.isArrowFunctionExpression()?(null!=o||(o=e),!1):e.isFunction()||e.isProgram()||e.isClassProperty({static:!1})||e.isClassPrivateProperty({static:!1}));const h=p.isClassMethod({kind:"constructor"});if(p.isClassProperty()||p.isClassPrivateProperty())if(o)p=o;else{if(!n)throw e.buildCodeFrameError("Unable to transform arrow inside class property");e.replaceWith(l(i([],w(e.node)),[])),p=e.get("callee"),e=p.get("body")}const{thisPaths:x,argumentsPaths:b,newTargetPaths:k,superProps:N,superCalls:O}=function(e){const t=[],n=[],r=[],i=[],s=[];return e.traverse(W,{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}),{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}}(e);if(h&&O.length>0){if(!n)throw O[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!r)throw O[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");const e=[];p.traverse(U,{allSuperCalls:e});const t=function(e){return $(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return i([S(t)],l(A(),[E(u(t.name))]))})}(p);e.forEach(e=>{const n=u(t);n.loc=e.node.callee.loc,e.get("callee").replaceWith(n)})}if(b.length>0){const e=$(p,"arguments",()=>{const e=()=>u("arguments");return p.scope.path.isProgram()?c(a("===",I("typeof",e()),v("undefined")),p.scope.buildUndefinedNode(),e()):e()});b.forEach(t=>{const n=u(e);n.loc=t.node.loc,t.replaceWith(n)})}if(k.length>0){const e=$(p,"newtarget",()=>T(u("new"),u("target")));k.forEach(t=>{const n=u(e);n.loc=t.node.loc,t.replaceWith(n)})}if(N.length>0){if(!n)throw N[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");N.reduce((e,t)=>e.concat(function(e){if(e.parentPath.isAssignmentExpression()&&"="!==e.parentPath.node.operator){const n=e.parentPath,r=n.node.operator.slice(0,-1),i=n.node.right,a=function(e){return m.includes(e)}(r);if(e.node.computed){const o=e.scope.generateDeclaredUidIdentifier("tmp"),{object:l,property:c}=e.node;n.get("left").replaceWith(y(l,s("=",o,c),!0)),n.get("right").replaceWith(t(a?"=":r,y(l,u(o.name),!0),i))}else{const s=e.node.object,o=e.node.property;n.get("left").replaceWith(y(s,o)),n.get("right").replaceWith(t(a?"=":r,y(s,u(o.name)),i))}return a?n.replaceWith(f(r,n.node.left,n.node.right)):n.node.operator="=",[n.get("left"),n.get("right").get("left")]}if(e.parentPath.isUpdateExpression()){const t=e.parentPath,n=e.scope.generateDeclaredUidIdentifier("tmp"),r=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,i=[s("=",n,y(e.node.object,r?s("=",r,e.node.property):e.node.property,e.node.computed)),s("=",y(e.node.object,r?u(r.name):e.node.property,e.node.computed),a(e.parentPath.node.operator[0],u(n.name),g(1)))];e.parentPath.node.prefix||i.push(u(n.name)),t.replaceWith(P(i));return[t.get("expressions.0.right"),t.get("expressions.1.left")]}return[e];function t(e,t,n){return"="===e?s("=",t,n):a(e,t,n)}}(t)),[]).forEach(e=>{const t=e.node.computed?"":e.get("property").node.name,n=e.parentPath,r=n.isAssignmentExpression({left:e.node}),a=n.isCallExpression({callee:e.node}),o=n.isTaggedTemplateExpression({tag:e.node}),c=function(e,t,n){const r=t?"set":"get";return $(e,`superprop_${r}:${n||""}`,()=>{const r=[];let a;if(n)a=y(A(),u(n));else{const t=e.scope.generateUidIdentifier("prop");r.unshift(t),a=y(A(),u(t.name),!0)}if(t){const t=e.scope.generateUidIdentifier("value");r.push(t),a=s("=",a,u(t.name))}return i(r,a)})}(p,r,t),h=[];if(e.node.computed&&h.push(e.get("property").node),r){const e=n.node.right;h.push(e)}const d=l(u(c),h);a?(n.unshiftContainer("arguments",C()),e.replaceWith(y(d,u("call"))),x.push(n.get("arguments.0"))):r?n.replaceWith(d):o?(e.replaceWith(l(y(d,u("bind"),!1),[C()])),x.push(e.get("arguments.0"))):e.replaceWith(d)})}let _;return(x.length>0||!t)&&(_=function(e,t){return $(e,"this",n=>{if(!t||!V(e))return C();e.traverse(q,{supers:new WeakSet,thisBinding:n})})}(p,h),(t||h&&V(p))&&(x.forEach(e=>{const t=e.isJSX()?d(_):u(_);t.loc=e.node.loc,e.replaceWith(t)}),t||(_=null))),{thisBinding:_,fnPath:e}}function V(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}const q=(0,n.environmentVisitor)({CallExpression(e,{supers:t,thisBinding:n}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,s("=",u(n),u("this"))])))}});function $(e,t,n){const r="binding:"+t;let i=e.getData(r);if(!i){const s=e.scope.generateUidIdentifier(t);i=s.name,e.setData(r,i),e.scope.push({id:s,init:n(i)})}return i}const W=(0,n.environmentVisitor)({ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){"this"===e.node.name&&(e.parentPath.isJSXMemberExpression({object:e.node})||e.parentPath.isJSXOpeningElement({name:e.node}))&&t.push(e)},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let n=e.scope;do{if(n.hasOwnBinding("arguments"))return void n.rename("arguments");if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}});const Y={"ReferencedIdentifier|BindingIdentifier"(e,t){e.node.name===t.name&&(t.needsRename=!0,e.stop())},Scope(e,t){e.scope.hasOwnBinding(t.name)&&e.skip()}};return fa}var ja,Ra={};function Ua(){return ja||(ja=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._guessExecutionStatusRelativeTo=function(e){return m(this,e,new Map)},e._resolve=y,e.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},e.canSwapBetweenExpressionAndStatement=function(e){if("body"!==this.key||!this.parentPath.isArrowFunctionExpression())return!1;if(this.isExpression())return i(e);if(this.isBlockStatement())return s(e);return!1},e.getSource=function(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""},e.isCompletionRecord=function(e){let t=this,n=!0;do{const{type:r,container:i}=t;if(!n&&(t.isFunction()||"StaticBlock"===r))return!!e;if(n=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0},e.isConstantExpression=function(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);return!!e&&e.constant}if(this.isLiteral())return!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get("expressions").every(e=>e.isConstantExpression()));if(this.isUnaryExpression())return"void"===this.node.operator&&this.get("argument").isConstantExpression();if(this.isBinaryExpression()){const{operator:e}=this.node;return"in"!==e&&"instanceof"!==e&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}if(this.isMemberExpression())return!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0});if(this.isCallExpression())return 1===this.node.arguments.length&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral();return!1},e.isInStrictMode=function(){const e=(this.isProgram()?this:this.parentPath).find(e=>{if(e.isProgram({sourceType:"module"}))return!0;if(e.isClass())return!0;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement())return!1;let t;if(e.isFunction())t=e.node.body;else{if(!e.isProgram())return!1;t=e.node}for(const e of t.directives)if("use strict"===e.value.value)return!0;return!1});return!!e},e.isNodeType=function(e){return c(this.type,e)},e.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!i(this.container)&&n.includes(this.key)},e.isStatic=function(){return this.scope.isStatic(this.node)},e.matchesPattern=function(e,t){return p(this.node,e,t)},e.referencesImport=function(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?l(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get("object");return t.isReferencedIdentifier()&&t.referencesImport(e,"*")}return!1}const n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;const r=n.path,i=r.parentPath;if(!i.isImportDeclaration())return!1;if(i.node.source.value!==e)return!1;if(!t)return!0;if(r.isImportDefaultSpecifier()&&"default"===t)return!0;if(r.isImportNamespaceSpecifier()&&"*"===t)return!0;if(r.isImportSpecifier()&&a(r.node.imported,{name:t}))return!0;return!1},e.resolve=function(e,t){return y.call(this,e,t)||this},e.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)};var t=Pr();const{STATEMENT_OR_BLOCK_KEYS:n,VISITOR_KEYS:r,isBlockStatement:i,isExpression:s,isIdentifier:a,isLiteral:o,isStringLiteral:l,isType:c,matchesPattern:p}=t;function u(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function h(e,t){switch(e){case"LogicalExpression":case"AssignmentPattern":return"right"===t;case"ConditionalExpression":case"IfStatement":return"consequent"===t||"alternate"===t;case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return"body"===t;case"ForStatement":return"body"===t||"update"===t;case"SwitchStatement":return"cases"===t;case"TryStatement":return"handler"===t;case"OptionalMemberExpression":return"property"===t;case"OptionalCallExpression":return"arguments"===t;default:return!1}}function d(e,t){for(let n=0;n<t;n++){const t=e[n];if(h(t.parent.type,t.parentKey))return!0}return!1}e.has=function(e){var t;const n=null==(t=this.node)?void 0:t[e];return n&&Array.isArray(n)?!!n.length:!!n},e.is=e.has,e.isnt=function(e){return!this.has(e)},e.equals=function(e,t){return this.node[e]===t};const f=Symbol();function m(e,t,n){const i={this:u(e),target:u(t)};if(i.target.node!==i.this.node)return function(e,t,n){let r,i=n.get(e.node);if(i){if(r=i.get(t.node))return r===f?"unknown":r}else n.set(e.node,i=new Map);i.set(t.node,f);const s=function(e,t,n){if(!t.isFunctionDeclaration())return"before"===m(e,t,n)?"before":"unknown";if(t.parentPath.isExportDeclaration())return"unknown";const r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";const i=r.referencePaths;let s;for(const r of i){if(!!r.find(e=>e.node===t.node))continue;if("callee"!==r.key||!r.parentPath.isCallExpression())return"unknown";const i=m(e,r,n);if(s&&s!==i)return"unknown";s=i}return s}(e,t,n);return i.set(t.node,s),s}(e,i.target,n);const s={target:t.getAncestry(),this:e.getAncestry()};if(s.target.includes(e))return"after";if(s.this.includes(t))return"before";let a;const o={target:0,this:0};for(;!a&&o.this<s.this.length;){const e=s.this[o.this];o.target=s.target.indexOf(e),o.target>=0?a=e:o.this++}if(!a)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(d(s.this,o.this-1)||d(s.target,o.target-1))return"unknown";const l={this:s.this[o.this-1],target:s.target[o.target-1]};if(l.target.listKey&&l.this.listKey&&l.target.container===l.this.container)return l.target.key>l.this.key?"before":"after";const c=r[a.type],p=c.indexOf(l.this.parentKey);return c.indexOf(l.target.parentKey)>p?"before":"after"}function y(e,t){var n;if(null==(n=t)||!n.includes(this))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){const n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){const r=n.path.resolve(e,t);if(this.find(e=>e.node===r.node))return;return r}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){const n=this.toComputedKey();if(!o(n))return;const r=n.value,i=this.get("object").resolve(e,t);if(i.isObjectExpression()){const n=i.get("properties");for(const i of n){if(!i.isProperty())continue;const n=i.get("key");let s=i.isnt("computed")&&n.isIdentifier({name:r});if(s=s||n.isLiteral({value:r}),s)return i.get("value").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+r)){const n=i.get("elements")[r];if(n)return n.resolve(e,t)}}}}}(Ra)),Ra}var Ka,Va={};function qa(){if(Ka)return Va;Ka=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va._getKey=f,Va._getPattern=m,Va.get=function(e,t=!0){!0===t&&(t=this.context);const n=e.split(".");return 1===n.length?f.call(this,e,t):m.call(this,n,t)},Va.getAllNextSiblings=function(){let e=this.key,t=this.getSibling(++e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(++e);return n},Va.getAllPrevSiblings=function(){let e=this.key,t=this.getSibling(--e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(--e);return n},Va.getAssignmentIdentifiers=function(){return n(this.node)},Va.getBindingIdentifierPaths=function(e=!1,t=!1){const n=[this],i=Object.create(null);for(;n.length;){const s=n.shift();if(!s)continue;if(!s.node)continue;const a=r.keys[s.node.type];if(s.isIdentifier())if(e){(i[s.node.name]=i[s.node.name]||[]).push(s)}else i[s.node.name]=s;else{if(s.isExportDeclaration()){const e=s.get("declaration");e.isDeclaration()&&n.push(e);continue}if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(let e=0;e<a.length;e++){const t=a[e],r=s.get(t);Array.isArray(r)?n.push(...r):r.node&&n.push(r)}}}return i},Va.getBindingIdentifiers=function(e){return r(this.node,e)},Va.getCompletionRecords=function(e=!1){return d(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:e}).map(e=>e.path)},Va.getNextSibling=function(){return this.getSibling(this.key+1)},Va.getOpposite=function(){if("left"===this.key)return this.getSibling("right");if("right"===this.key)return this.getSibling("left");return null},Va.getOuterBindingIdentifierPaths=function(e=!1){return this.getBindingIdentifierPaths(e,!0)},Va.getOuterBindingIdentifiers=function(e){return i(this.node,e)},Va.getPrevSibling=function(){return this.getSibling(this.key-1)},Va.getSibling=function(t){return e.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:t}).setContext(this.context)};var e=za(),t=Pr();const{getAssignmentIdentifiers:n,getBindingIdentifiers:r,getOuterBindingIdentifiers:i,numericLiteral:s,unaryExpression:a}=t,o=0,l=1;function c(e,t,n){return e&&t.push(...d(e,n)),t}function p(e){e.forEach(e=>{e.type=l})}function u(e,t){e.forEach(e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(a("void",s(0))):e.path.remove())})}function h(e,t){const n=[];if(t.canHaveBreak){let r=[];for(let i=0;i<e.length;i++){const s=e[i],a=Object.assign({},t,{inCaseClause:!1});s.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?a.shouldPopulateBreak=!0:a.shouldPopulateBreak=!1;const c=d(s,a);if(c.length>0&&c.every(e=>e.type===l)){r.length>0&&c.every(e=>e.path.isBreakStatement({label:null}))?(p(r),n.push(...r),r.some(e=>e.path.isDeclaration())&&(n.push(...c),t.shouldPreserveBreak||u(c,!0)),t.shouldPreserveBreak||u(c,!1)):(n.push(...c),t.shouldPopulateBreak||t.shouldPreserveBreak||u(c,!0));break}if(i===e.length-1)n.push(...c);else{r=[];for(let e=0;e<c.length;e++){const t=c[e];t.type===l&&n.push(t),t.type===o&&r.push(t)}}}}else if(e.length)for(let r=e.length-1;r>=0;r--){const i=d(e[r],t);if(i.length>1||1===i.length&&!i[0].path.isVariableDeclaration()&&!i[0].path.isEmptyStatement()){n.push(...i);break}}return n}function d(e,t){let n=[];if(e.isIfStatement())n=c(e.get("consequent"),n,t),n=c(e.get("alternate"),n,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return c(e.get("body"),n,t);if(e.isProgram()||e.isBlockStatement())return h(e.get("body"),t);if(e.isFunction())return d(e.get("body"),t);if(e.isTryStatement())n=c(e.get("block"),n,t),n=c(e.get("handler"),n,t);else{if(e.isCatchClause())return c(e.get("body"),n,t);if(e.isSwitchStatement())return function(e,t,n){let r=[];for(let i=0;i<e.length;i++){const s=d(e[i],n),a=[],c=[];for(const e of s)e.type===o&&a.push(e),e.type===l&&c.push(e);a.length&&(r=a),t.push(...c)}return t.push(...r),t}(e.get("cases"),n,t);if(e.isSwitchCase())return h(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:t.shouldPreserveBreak});e.isBreakStatement()?n.push(function(e){return{type:l,path:e}}(e)):n.push(function(e){return{type:o,path:e}}(e))}}return n}function f(t,n){const r=this.node,i=r[t];return Array.isArray(i)?i.map((s,a)=>e.default.get({listKey:t,parentPath:this,parent:r,container:i,key:a}).setContext(n)):e.default.get({parentPath:this,parent:r,container:r,key:t}).setContext(n)}function m(e,t){let n=this;for(const r of e)n="."===r?n.parentPath:Array.isArray(n)?n[r]:n.get(r,t);return n}return Va}var $a,Wa,Ya,Ja,Xa,Ha={};function za(){if(Wa)return kr;Wa=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.default=kr.SHOULD_STOP=kr.SHOULD_SKIP=kr.REMOVED=void 0;var e=Or(),t=Wr(),n=no(),r=ui(),i=Pr(),s=i,a=oi(),o=As(),l=function(){if(Cs)return ws;Cs=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.find=function(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null},ws.findParent=function(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null},ws.getAncestry=function(){let e=this;const t=[];do{t.push(e)}while(e=e.parentPath);return t},ws.getDeepestCommonAncestorFrom=function(e,t){if(!e.length)return this;if(1===e.length)return e[0];let n,r,i=1/0;const s=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);return t.length<i&&(i=t.length),t}),a=s[0];e:for(let e=0;e<i;e++){const t=a[e];for(const n of s)if(n[e]!==t)break e;n=e,r=t}if(r)return t?t(r,n,s):r;throw new Error("Couldn't find intersection")},ws.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,n,r){let i;const s=t[e.type];for(const e of r){const t=e[n+1];i?(t.listKey&&i.listKey===t.listKey&&t.key<i.key||s.indexOf(i.parentKey)>s.indexOf(t.parentKey))&&(i=t):i=t}return i})},ws.getFunctionParent=function(){return this.findParent(e=>e.isFunction())},ws.getStatementParent=function(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},ws.inType=function(...e){let t=this;for(;t;){if(e.includes(t.node.type))return!0;t=t.parentPath}return!1},ws.isAncestor=function(e){return e.isDescendant(this)},ws.isDescendant=function(e){return!!this.findParent(t=>t===e)};var e=Pr();const{VISITOR_KEYS:t}=e;return ws}(),c=function(){if(Os)return _s;Os=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s._getTypeAnnotation=E,_s.baseTypeStrictlyMatches=function(e){const t=this.getTypeAnnotation(),n=e.getTypeAnnotation();return!(r(t)||!o(t))&&n.type===t.type},_s.couldBeBaseType=function(e){const t=this.getTypeAnnotation();if(r(t))return!0;if(g(t)){for(const n of t.types)if(r(n)||v(e,n,!0))return!0;return!1}return v(e,t,!0)},_s.getTypeAnnotation=function(){let e=this.getData("typeAnnotation");return null!=e||(e=E.call(this)||n(),(T(e)||f(e))&&(e=e.typeAnnotation),this.setData("typeAnnotation",e)),e},_s.isBaseType=function(e,t){return v(e,this.getTypeAnnotation(),t)},_s.isGenericType=function(e){const t=this.getTypeAnnotation();return!("Array"!==e||!(d(t)||i(t)||y(t)))||(l(t)&&c(t.id,{name:e})||m(t)&&c(t.typeName,{name:e}))};var e=js(),t=Pr();const{anyTypeAnnotation:n,isAnyTypeAnnotation:r,isArrayTypeAnnotation:i,isBooleanTypeAnnotation:s,isEmptyTypeAnnotation:a,isFlowBaseAnnotation:o,isGenericTypeAnnotation:l,isIdentifier:c,isMixedTypeAnnotation:p,isNumberTypeAnnotation:u,isStringTypeAnnotation:h,isTSArrayType:d,isTSTypeAnnotation:f,isTSTypeReference:m,isTupleTypeAnnotation:y,isTypeAnnotation:T,isUnionTypeAnnotation:g,isVoidTypeAnnotation:x,stringTypeAnnotation:S,voidTypeAnnotation:b}=t,P=new WeakSet;function E(){const t=this.node;if(t){if(t.typeAnnotation)return t.typeAnnotation;if(!P.has(t)){P.add(t);try{var r;let n=e[t.type];if(n)return n.call(this,t);if(n=e[this.parentPath.type],null!=(r=n)&&r.validParent)return this.parentPath.getTypeAnnotation()}finally{P.delete(t)}}}else if("init"===this.key&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath,t=e.parentPath;return"left"===e.key&&t.isForInStatement()?S():"left"===e.key&&t.isForOfStatement()?n():b()}}function v(e,t,n){if("string"===e)return h(t);if("number"===e)return u(t);if("boolean"===e)return s(t);if("any"===e)return r(t);if("mixed"===e)return p(t);if("empty"===e)return a(t);if("void"===e)return x(t);if(n)return!1;throw new Error(`Unknown base type ${e}`)}return _s}(),p=ca(),u=ha(),h=Ba(),d=Ua(),f=Qa(),m=f,y=ea(),T=ia(),g=qa(),x=function(){if($a)return Ha;$a=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.addComment=function(e,n,r){t(this.node,e,n,r)},Ha.addComments=function(e,t){n(this.node,e,t)},Ha.shareCommentsWithSiblings=function(){if("string"==typeof this.key)return;const e=this.node;if(!e)return;const t=e.trailingComments,n=e.leadingComments;if(!t&&!n)return;const i=this.getSibling(this.key-1),s=this.getSibling(this.key+1),a=Boolean(i.node),o=Boolean(s.node);a&&(n&&i.addComments("trailing",r(n,i.node.trailingComments)),t&&!o&&i.addComments("trailing",t)),o&&(t&&s.addComments("leading",r(t,s.node.leadingComments)),n&&!a&&s.addComments("leading",n))};var e=Pr();const{addComment:t,addComments:n}=e;function r(e,t){if(null==t||!t.length)return e;const n=new Set(t);return e.filter(e=>!n.has(e))}return Ha}(),S=Zr();const{validate:b}=i,P=t("babel");kr.REMOVED=1,kr.SHOULD_STOP=2,kr.SHOULD_SKIP=4;const E=kr.default=class e{constructor(e,t){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=t,this.hub=e,this.data=null,this.context=null,this.scope=null}get removed(){return(1&this._traverseFlags)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(2&this._traverseFlags)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(4&this._traverseFlags)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:n,parent:r,container:i,listKey:s,key:o}){if(!t&&n&&(t=n.hub),!r)throw new Error("To get a node path the parent needs to exist");const l=i[o],c=a.getOrCreateCachedPaths(r,n);let p=c.get(l);return p||(p=new e(t,r),l&&c.set(l,p)),f.setup.call(p,n,i,s,o),p}getScope(e){return this.isScope()?new r.default(this):e}setData(e,t){return null==this.data&&(this.data=Object.create(null)),this.data[e]=t}getData(e,t){null==this.data&&(this.data=Object.create(null));let n=this.data[e];return void 0===n&&void 0!==t&&(n=this.data[e]=t),n}hasNode(){return null!=this.node}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,n.default)(this.node,e,this.scope,t,this)}set(e,t){b(this.node,e,t),this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let n=t.key;t.inList&&(n=`${t.listKey}[${n}]`),e.unshift(n)}while(t=t.parentPath);return e.join(".")}debug(e){P.enabled&&P(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,o.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},v={findParent:l.findParent,find:l.find,getFunctionParent:l.getFunctionParent,getStatementParent:l.getStatementParent,getEarliestCommonAncestorFrom:l.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:l.getDeepestCommonAncestorFrom,getAncestry:l.getAncestry,isAncestor:l.isAncestor,isDescendant:l.isDescendant,inType:l.inType,getTypeAnnotation:c.getTypeAnnotation,isBaseType:c.isBaseType,couldBeBaseType:c.couldBeBaseType,baseTypeStrictlyMatches:c.baseTypeStrictlyMatches,isGenericType:c.isGenericType,replaceWithMultiple:p.replaceWithMultiple,replaceWithSourceString:p.replaceWithSourceString,replaceWith:p.replaceWith,replaceExpressionWithStatements:p.replaceExpressionWithStatements,replaceInline:p.replaceInline,evaluateTruthy:u.evaluateTruthy,evaluate:u.evaluate,toComputedKey:h.toComputedKey,ensureBlock:h.ensureBlock,unwrapFunctionEnvironment:h.unwrapFunctionEnvironment,arrowFunctionToExpression:h.arrowFunctionToExpression,splitExportDeclaration:h.splitExportDeclaration,ensureFunctionName:h.ensureFunctionName,matchesPattern:d.matchesPattern,isStatic:d.isStatic,isNodeType:d.isNodeType,canHaveVariableDeclarationOrExpression:d.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:d.canSwapBetweenExpressionAndStatement,isCompletionRecord:d.isCompletionRecord,isStatementOrBlock:d.isStatementOrBlock,referencesImport:d.referencesImport,getSource:d.getSource,willIMaybeExecuteBefore:d.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:d._guessExecutionStatusRelativeTo,resolve:d.resolve,isConstantExpression:d.isConstantExpression,isInStrictMode:d.isInStrictMode,isDenylisted:m.isDenylisted,visit:m.visit,skip:m.skip,skipKey:m.skipKey,stop:m.stop,setContext:m.setContext,requeue:m.requeue,requeueComputedKeyAndDecorators:m.requeueComputedKeyAndDecorators,remove:y.remove,insertBefore:T.insertBefore,insertAfter:T.insertAfter,unshiftContainer:T.unshiftContainer,pushContainer:T.pushContainer,getOpposite:g.getOpposite,getCompletionRecords:g.getCompletionRecords,getSibling:g.getSibling,getPrevSibling:g.getPrevSibling,getNextSibling:g.getNextSibling,getAllNextSiblings:g.getAllNextSiblings,getAllPrevSiblings:g.getAllPrevSiblings,get:g.get,getAssignmentIdentifiers:g.getAssignmentIdentifiers,getBindingIdentifiers:g.getBindingIdentifiers,getOuterBindingIdentifiers:g.getOuterBindingIdentifiers,getBindingIdentifierPaths:g.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:g.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:x.shareCommentsWithSiblings,addComment:x.addComment,addComments:x.addComments};Object.assign(E.prototype,v),E.prototype.arrowFunctionToShadowed=h[String("arrowFunctionToShadowed")],Object.assign(E.prototype,{has:d[String("has")],is:d[String("is")],isnt:d[String("isnt")],equals:d[String("equals")],hoist:T[String("hoist")],updateSiblingKeys:T.updateSiblingKeys,call:m.call,isBlacklisted:m[String("isBlacklisted")],setScope:m.setScope,resync:m.resync,popContext:m.popContext,pushContext:m.pushContext,setup:m.setup,setKey:m.setKey}),E.prototype._guessExecutionStatusRelativeToDifferentFunctions=d._guessExecutionStatusRelativeTo,E.prototype._guessExecutionStatusRelativeToDifferentFunctions=d._guessExecutionStatusRelativeTo,Object.assign(E.prototype,{_getTypeAnnotation:c._getTypeAnnotation,_replaceWith:p._replaceWith,_resolve:d._resolve,_call:m._call,_resyncParent:m._resyncParent,_resyncKey:m._resyncKey,_resyncList:m._resyncList,_resyncRemoved:m._resyncRemoved,_getQueueContexts:m._getQueueContexts,_removeFromScope:y._removeFromScope,_callRemovalHooks:y._callRemovalHooks,_remove:y._remove,_markRemoved:y._markRemoved,_assertUnremoved:y._assertUnremoved,_containerInsert:T._containerInsert,_containerInsertBefore:T._containerInsertBefore,_containerInsertAfter:T._containerInsertAfter,_verifyNodeList:T._verifyNodeList,_getKey:g._getKey,_getPattern:g._getPattern});for(const e of s.TYPES){const t=`is${e}`,n=s[t];E.prototype[t]=function(e){return n(this.node,e)},E.prototype[`assert${e}`]=function(t){if(!n(this.node,t))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(E.prototype,S);for(const t of Object.keys(e))"_"!==t[0]&&(s.TYPES.includes(t)||s.TYPES.push(t));return kr}function Ga(){if(Ja)return wr;Ja=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.traverseNode=function(t,r,i,s,a,o,l){const c=n[t.type];if(!c)return!1;const p=new e.default(i,r,s,a);if(l)return(null==o||!o[a.parentKey])&&p.visitQueue([a]);for(const e of c)if((null==o||!o[e])&&p.visit(t,e))return!0;return!1};var e=function(){if(Ya)return Ir;Ya=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.default=void 0;var e=za(),t=Pr(),n=Qa();const{VISITOR_KEYS:r}=t;return Ir.default=class{constructor(e,t,n,r){this.queue=null,this.priorityQueue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const n=r[e.type];if(null==n||!n.length)return!1;for(const t of n)if(e[t])return!0;return!1}create(t,n,r,i){return e.default.get({parentPath:this.parentPath,parent:t,container:n,key:r,listKey:i})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(0===e.length)return!1;const r=[];for(let i=0;i<e.length;i++){const s=e[i];s&&this.shouldVisit(s)&&r.push(this.create(t,e,i,n))}return this.visitQueue(r)}visitSingle(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])}visitQueue(e){this.queue=e,this.priorityQueue=[];const t=new WeakSet;let r=!1,i=0;for(;i<e.length;){const s=e[i];if(i++,n.resync.call(s),0!==s.contexts.length&&s.contexts[s.contexts.length-1]===this||n.pushContext.call(s,this),null===s.key)continue;const{node:a}=s;if(!t.has(a)){if(a&&t.add(a),s.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(let t=0;t<i;t++)n.popContext.call(e[t]);return this.queue=null,r}visit(e,t){const n=e[t];return!!n&&(Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t))}},Ir}();za();var t=Pr();Qa();const{VISITOR_KEYS:n}=t;return wr}function Qa(){if(Xa)return Cr;Xa=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr._call=s,Cr._getQueueContexts=function(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t},Cr._resyncKey=p,Cr._resyncList=u,Cr._resyncParent=c,Cr._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||n._markRemoved.call(this)},Cr.call=i,Cr.isDenylisted=a,Cr.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},Cr.pushContext=function(e){this.contexts.push(e),this.setContext(e)},Cr.requeue=function(e=this){if(e.removed)return;const t=this.contexts;for(const n of t)n.maybeQueue(e)},Cr.requeueComputedKeyAndDecorators=function(){const{context:e,node:t}=this;!r.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key"));if(t.decorators)for(const t of this.get("decorators"))e.maybeQueue(t)},Cr.resync=function(){if(this.removed)return;c.call(this),u.call(this),p.call(this)},Cr.setContext=function(e){null!=this.skipKeys&&(this.skipKeys={});this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts);return l.call(this),this},Cr.setKey=h,Cr.setScope=l,Cr.setup=function(e,t,n,r){this.listKey=n,this.container=t,this.parentPath=e||this.parentPath,h.call(this,r)},Cr.skip=function(){this.shouldSkip=!0},Cr.skipKey=function(e){null==this.skipKeys&&(this.skipKeys={});this.skipKeys[e]=!0},Cr.stop=function(){this._traverseFlags|=t.SHOULD_SKIP|t.SHOULD_STOP},Cr.visit=function(){var t,n;if(!this.node)return!1;if(this.isDenylisted())return!1;if(null!=(t=(n=this.opts).shouldSkip)&&t.call(n,this))return!1;const r=this.context;if(this.shouldSkip||i.call(this,"enter"))return this.debug("Skip..."),this.shouldStop;return o(this,r),this.debug("Recursing into..."),this.shouldStop=(0,e.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),o(this,r),i.call(this,"exit"),this.shouldStop};var e=Ga(),t=za(),n=ea(),r=Pr();function i(e){const t=this.opts;return this.debug(e),!(!this.node||!s.call(this,t[e]))||!!this.node&&s.call(this,null==(n=t[this.node.type])?void 0:n[e]);var n}function s(e){if(!e)return!1;for(const t of e){if(!t)continue;const e=this.node;if(!e)return!0;const n=t.call(this.state,this,this.state);if(n&&"object"==typeof n&&"function"==typeof n.then)throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==e)return!0;if(this._traverseFlags>0)return!0}return!1}function a(){var e;const t=null!=(e=this.opts.denylist)?e:this.opts.blacklist;return null==t?void 0:t.includes(this.node.type)}function o(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function l(){var e,t;if(null!=(e=this.opts)&&e.noScope)return;let n,r=this.parentPath;for((("key"===this.key||"decorators"===this.listKey)&&r.isMethod()||"discriminant"===this.key&&r.isSwitchStatement())&&(r=r.parentPath);r&&!n;){var i;if(null!=(i=r.opts)&&i.noScope)return;n=r.scope,r=r.parentPath}this.scope=this.getScope(n),null==(t=this.scope)||t.init()}function c(){this.parentPath&&(this.parent=this.parentPath.node)}function p(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node)return void h.call(this,e)}else for(const e of Object.keys(this.container))if(this.container[e]===this.node)return void h.call(this,e);this.key=null}}function u(){if(!this.parent||!this.inList)return;const e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function h(e){var t;this.key=e,this.node=this.container[this.key],this.type=null==(t=this.node)?void 0:t.type}return Cr.isBlacklisted=a,Cr}var Za,eo,to={};function no(){return eo||(eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Hub",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"NodePath",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.default}}),e.visitors=e.default=void 0,Qa();var t=ei();e.visitors=t;var n=Pr(),r=oi(),i=Ga(),s=za(),a=ui(),o=(Za||(Za=1,Object.defineProperty(to,"__esModule",{value:!0}),to.default=void 0,to.default=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,n=TypeError){return new n(t)}}),to);const{VISITOR_KEYS:l,removeProperties:c,traverseFast:p}=n;function u(e,n={},r,s,a,o){if(e){if(!n.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!a&&o)throw new Error("visitSelf can only be used when providing a NodePath.");l[e.type]&&(t.explode(n),(0,i.traverseNode)(e,n,r,s,a,void 0,o))}}e.default=u,u.visitors=t,u.verify=t.verify,u.explode=t.explode,u.cheap=function(e,t){p(e,t)},u.node=function(e,t,n,r,s,a){(0,i.traverseNode)(e,t,n,r,s,a)},u.clearNode=function(e,t){c(e,t)},u.removeProperties=function(e,t){return p(e,u.clearNode,t),e},u.hasType=function(e,t,n){return(null==n||!n.includes(e.type))&&(e.type===t||p(e,function(e){return null!=n&&n.includes(e.type)?p.skip:e.type===t?p.stop:void 0}))},u.cache=r}(Ar)),Ar}var ro=x(no()),io=x(la());function so(e){return io.parse(e,{sourceType:"module",plugins:["jsx","typescript","classProperties","dynamicImport","exportDefaultFrom","exportNamespaceFrom","functionBind","nullishCoalescingOperator","objectRestSpread","optionalChaining","decorators-legacy"],allowAwaitOutsideFunction:!0})}const ao={is:e=>vr.isStringLiteral(e),get:e=>e.value},oo={is:e=>vr.isNumericLiteral(e),get:e=>e.value},lo={is:e=>vr.isBooleanLiteral(e),get:e=>e.value},co={is:e=>vr.isNullLiteral(e),get:e=>null},po={is:e=>vr.isIdentifier(e)&&"undefined"===e.name,get(e){}},uo={is:e=>vr.isObjectExpression(e),get:e=>go(e)},ho={is:e=>vr.isClass(e),get:e=>function(e){function t(e){return"static"in e&&!0===e.static}let n=e.body;if(!vr.isClassBody(n))return;const r={};return n.body.forEach(e=>{if(t(e)&&vr.isIdentifier(e.key))if(vr.isMethod(e)||vr.isTSDeclareMethod(e))r[e.key.name]=()=>{};else{const t=To.find(t=>t.is(e.value));t&&(r[e.key.name]=t.get(e.value))}}),r}(e)},fo={is:e=>vr.isArrayExpression(e),get:e=>xo(e)},mo={is:e=>vr.isFunctionExpression(e),get:e=>function(){}},yo={is:e=>vr.isArrowFunctionExpression(e),get:e=>()=>{}},To=[ao,oo,lo,co,po,uo,fo,ho,mo,yo];function go(e){const t={};return e.properties.forEach(e=>{if(vr.isObjectMember(e)&&vr.isIdentifier(e.key))if(vr.isObjectMethod(e))t[e.key.name]=()=>{};else{const n=To.find(t=>t.is(e.value));n&&(t[e.key.name]=n.get(e.value))}}),t}function xo(e){const t=[];return e.elements.forEach(e=>{const n=To.find(t=>t.is(e));n&&t.push(n.get(e))}),t}function So(e){const t=so(e);let n;return ro(t,{Program:{enter(e){const t=e.node,r=function(e){for(const t of e.body)if(vr.isExportDefaultDeclaration(t))return t.declaration;return null}(t);if(r)if(vr.isIdentifier(r)){const{name:e}=r;n=function(e){const t={};for(const n of e.programNode.body){let r=n;if(vr.isExpressionStatement(r)&&(r=r.expression),vr.isAssignmentExpression(r)&&vr.isMemberExpression(r.left)&&vr.isIdentifier(r.left.object)&&r.left.object.name===e.name){const e=To.find(e=>e.is(vr.isAssignmentExpression(r)&&r.right));e&&(t[r.left.property.name]=e.get(r.right))}}return t}({programNode:t,name:e})}else if(vr.isObjectExpression(r))n=go(r);else if(vr.isArrayExpression(r))n=xo(r);else{const e=To.find(e=>e.is(r));e&&(n=e.get(r))}}}}),n}function bo(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")}const Po={javascript:[".ts",".tsx",".js",".jsx"],css:[".less",".sass",".scss",".stylus",".css"]};function Eo(e){const n=Po[e.type];for(const r of n){const n=`${e.fileNameWithoutExt}${r}`,i=bo(t(e.base,n));if(o(i))return{path:i,filename:n}}return null}const vo=/^\[(.+?)\]/;function Ao(e){return o(e)?l(e).filter(n=>{const r=t(e,n),i=c(r),s=i.isDirectory(),a=i.isFile();if(s&&["components","component","utils","util"].includes(n))return!1;if("."===n.charAt(0))return!1;if("_"===n.charAt(0))return!1;if(/\.(test|spec|e2e)\.(j|t)sx?$/.test(n))return!1;if(/\.d\.ts$/.test(n))return!1;if(a){if(!/\.(j|t)sx?$/.test(n))return!1;const e=p(r,"utf-8");try{if(!function(e){const t=so(e);let n=!1;return ro(t,{JSXElement(e){n=!0,e.stop()},JSXFragment(e){n=!0,e.stop()}}),n}(e))return!1}catch(e){throw new Error(`Parse conventional route component ${r} failed, ${e.message}`)}}return!0}):[]}function Co(e,i,s){const{root:a,relDir:o=""}=e,l=t(a,o,s),p=c(l),u=vo.test(s);if(p.isDirectory()){const n=t(o,s),r=Eo({base:t(a,n),fileNameWithoutExt:"_layout",type:"javascript"}),l={path:Io(n),routes:ko({...e,relDir:t(n)}),__isDynamic:u,...r?{component:r.path}:{exact:!0,__toMerge:!0}};i.push(wo(l,e))}else{const a=n(s,r(s));i.push(wo({path:Io(t(o,a)),exact:!0,component:l,__isDynamic:u},e))}return i}function wo(e,n){let r;if(e.component){try{r=So(p(e.component,"utf-8"))}catch(t){throw new Error(`Parse conventional route component ${e.component} failed, ${t.message}`)}e.component=bo(i(t(n.root,".."),e.component)),e.component=`${n.componentPrefix||"@/"}${e.component}`}return{...e,..."object"==typeof r?r:{}}}function Io(e,t){return"/index/index"===(e=`/${e=bo(e).split("/").map(e=>((e=e.replace(vo,":$1")).endsWith("$")&&(e=e.slice(0,-1)+"?"),e)).join("/")}`)&&(e="/"),"/"!==(e=e.replace(/\/index$/,"/"))&&"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function ko(e){const{root:n,relDir:r="",config:i}=e,s=function(e){const t=[],n=[],r=[];return e.forEach(e=>{const{__isDynamic:i,exact:s}=e;delete e.__isDynamic,i?t.push(e):s?n.push(e):r.push(e)}),m(t.length<=1,"We should not have multiple dynamic routes under a directory."),[...n,...r,...t].reduce((e,t)=>(t.__toMerge&&t.routes?e=e.concat(t.routes):e.push(t),e),[])}(Ao(t(n,r)).reduce(Co.bind(null,e),[]));if(!r){const t=Eo({base:n,fileNameWithoutExt:`../${i.singular?"layout":"layouts"}/index`,type:"javascript"});if(t)return[wo({path:"/",component:t.path,routes:s},e)]}return s}function No(t){const n=e.extname(t);if(![".tsx",".ts",".jsx",".js"].includes(n))return!1;try{const e=a.readFileSync(t,"utf-8");return/export\s+default/.test(e)}catch{return!1}}function Oo(e){const t={path:e.path||""};if(void 0!==e.exact&&(t.exact=e.exact),e.component){const n=e.component.replace(/\.(tsx|ts|jsx|js)$/,"");t.component=`dynamic({ loader: () => import('${n}'), loading: LoadingComponent})`}return e.title&&"string"==typeof e.title&&(t.title=`$t({ defaultMessage: "${e.title}" })`),!0===e.keepAlive&&(t.keepAlive=!0),e.authority&&Array.isArray(e.authority)&&(t.authority=e.authority),e.routes&&e.routes.length>0&&(t.routes=e.routes.map(Oo)),t}async function _o(t,n){function r(e,t=2){const n=" ".repeat(t),i=" ".repeat(t+2);let s=`${n}{\n`;if(s+=`${i}path: '${e.path}',\n`,void 0!==e.exact&&null!==e.exact&&(s+=`${i}exact: ${e.exact},\n`),void 0!==e.component&&null!==e.component&&(s+=`${i}component: ${e.component},\n`),void 0!==e.title&&null!==e.title&&(s+=`${i}title: ${e.title},\n`),e.authority&&(s+=`${i}authority: ${JSON.stringify(e.authority)},\n`),e.keepAlive&&(s+=`${i}keepAlive: ${e.keepAlive},\n`),e.routes&&e.routes.length>0){s+=`${i}routes: [\n${e.routes.map(e=>r(e,t+2)).join(",\n")}\n${i}],\n`}return s=s.replace(/,\n$/,"\n"),s+=`${n}}`,s}const i=t.map(e=>r(e)).join(",\n"),s=`\n/* eslint-disable */\n// @ts-nocheck\n/**\n * 自动根据 pages 目录生成路由配置\n * 新增、删除、修改组件 title、keepAlive、authority 属性时,会自动更新路由配置\n * 路由组件只支持默认导出\n */\nimport { dynamic } from '@lemon-fe/vite-plugin-micro-frontend/runtime';\nimport LoadingComponent from '${n.defaultLoadingComponentPath||"@/components/loading"}';\nimport { $t } from '${n.intlPath||"@/utils/intl"}';\n\nexport const routers = [\n${i}\n];\n`;try{const t=e.resolve(process.cwd(),".prettierrc");let n={};if(a.existsSync(t))try{const e=a.readFileSync(t,"utf-8");n=JSON.parse(e)}catch(e){console.warn("⚠️ 读取 prettier 配置失败,使用默认配置:",e)}const r={parser:"typescript",...n};return await h.format(s,r)}catch(e){return console.error("格式化代码失败:",e),s}}function Do(t={}){const{pagesDir:n,outputPath:r,watch:i=!0,ignoreDirs:s=["components","utils","hooks","typings"],routeTemplate:o={}}=t;let l=!1,c=null,p=!1,h="";const d=n||e.resolve(process.cwd(),"src/pages"),f=r||e.resolve(process.cwd(),"src/routes.ts"),m=async()=>{if(!a.existsSync(d))return void console.warn("⚠️ pages 目录不存在:",d);const e=function(e,t){return ko({root:e,componentPrefix:t.pageAliasPrefix,config:{singular:!1}}).map(Oo)}(d,o),t=await _o(e,o);t!==h&&(h=t,a.writeFileSync(f,t),console.log("✅ 路由已生成:",f))},y=()=>{c&&(c.close(),c=null,l=!1)};return{name:"micro-frontend:routes",enforce:"pre",configureServer(e){p||(m(),p=!0),(()=>{if(l||!i)return;if(!a.existsSync(d))return;const e=["**/node_modules/**","**/*.d.ts","**/*.less","**/*.css","**/*.scss","**/*.sass",f,...s.map(e=>`**/${e}/**`)];c=u.watch(d,{ignored:e,persistent:!0,ignoreInitial:!0}),c.on("add",e=>{No(e)&&m()}).on("unlink",e=>{No(e)&&m()}).on("addDir",e=>{m()}).on("unlinkDir",e=>{m()}).on("error",e=>{console.error("❌ 文件监听错误:",e)}),l=!0})(),e.httpServer?.on("close",y)},buildStart(){p||(m(),p=!0)}}}function Lo(t){const{remotes:n,outputPath:r}=t,i=r||e.resolve(process.cwd(),"src/utils/mf.tsx"),s=()=>{const t=function(e){const t=function(e){return e.reduce((e,t)=>(e[t.aliasName||t.remoteName]=t,e),{})}(e),n=JSON.stringify(t,null,2);return"/* eslint-disable */\nimport { lazy, Suspense, type ReactNode, type ComponentType } from 'react';\n\n// 远程模块配置\nconst remotes = __REMOTES_JSON__ as const;\n\ntype RemoteAlias = keyof typeof remotes;\ntype ModuleSpecifier = `${RemoteAlias}/${string}`;\n\n// 多个入口文件之间共享的变量\nconst entryShared = (window as any).__entry_shared__ || {};\n\n// 脚本加载状态: undefined=未加载, Promise=加载中, true=已完成\nconst scriptCache: Record<string, Promise<void> | true | undefined> = {};\n\n/**\n * 获取多入口共享变量(懒初始化单例)\n */\nexport function getEntryShared<T>(key: string, init: () => T): T {\n return (entryShared[key] ??= init()) as T;\n}\n\n/**\n * 安全加载远程组件\n */\nexport function safeRemoteComponent<T extends ComponentType<any>>(opts: {\n moduleSpecifier: ModuleSpecifier;\n fallbackComponent: T;\n loadingElement?: ReactNode;\n}): T {\n const LazyComponent = lazy<T>(() =>\n loadRemoteModule(opts.moduleSpecifier, { default: opts.fallbackComponent }),\n );\n\n return ((props: any) => (\n <Suspense fallback={opts.loadingElement ?? null}>\n <LazyComponent {...props} />\n </Suspense>\n )) as T;\n}\n\n// ============ 内部实现 ============\n\nasync function loadRemoteModule<T>(specifier: ModuleSpecifier, fallback: T): Promise<T> {\n try {\n const slashIndex = specifier.indexOf('/');\n const alias = specifier.slice(0, slashIndex) as RemoteAlias;\n const moduleName = specifier.slice(slashIndex + 1);\n const remote = remotes[alias];\n\n if (!remote) {\n console.error(`[MF] Unknown remote alias: \"${alias}\"`);\n return fallback;\n }\n\n await loadScriptOnce(remote.remoteName, remote.entry);\n\n const container = (window as any)[remote.remoteName];\n const factory = await container.get(`./${moduleName}`);\n return factory();\n } catch (e) {\n return fallback;\n }\n}\n\nasync function loadScriptOnce(name: string, url: string): Promise<void> {\n const cached = scriptCache[name];\n\n if (cached === true) return;\n if (cached) return cached;\n\n const promise = new Promise<void>((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${url}?t=${Date.now()}`;\n script.async = true;\n script.onload = () => resolve();\n script.onerror = reject;\n document.head.appendChild(script);\n }).then(\n () => {\n scriptCache[name] = true;\n },\n e => {\n scriptCache[name] = undefined;\n throw e;\n },\n );\n\n scriptCache[name] = promise;\n return promise;\n}\n\n// ==== Vite Module Federation 动态加载 ===\n\ntype RemoteComponentOptions<P = any> = {\n /** 远程模块加载函数,如 () => import('remoteApp/Component') */\n loader: () => Promise<{ default: ComponentType<P> }>;\n /** 加载失败时的回退组件 */\n fallback?: ComponentType<P>;\n /** 加载中显示的元素 */\n loading?: ReactNode;\n};\n\n/**\n * 创建一个动态加载的远程联邦组件\n * @example\n * const RemoteButton = createRemoteComponent({\n * loader: () => import('remoteApp/Button'),\n * fallback: () => <div>加载失败</div>,\n * loading: <Spin />,\n * });\n */\nexport function createRemoteComponent<P extends object = {}>(\n options: RemoteComponentOptions<P>,\n): ComponentType<P> {\n const { loader, fallback: Fallback, loading = null } = options;\n\n const LazyComponent = lazy(() =>\n loader().catch(error => {\n if (Fallback) {\n return { default: Fallback };\n }\n throw error;\n }),\n );\n\n const RemoteWrapper: React.FC<P> = props => (\n <Suspense fallback={loading}>\n {/* @ts-expect-error: 类型不完全匹配,但实际可以正常渲染 */}\n <LazyComponent {...props} />\n </Suspense>\n );\n\n return RemoteWrapper as ComponentType<P>;\n}\n\n".replace("__REMOTES_JSON__",n)}(n),r=e.dirname(i);if(a.existsSync(r)||a.mkdirSync(r,{recursive:!0}),a.existsSync(i)){if(a.readFileSync(i,"utf-8")===t)return}a.writeFileSync(i,t),console.log("✅ mf.tsx 已生成:",i)};return{name:"micro-frontend:mf-generator",enforce:"pre",configResolved(){s()},buildStart(){s()}}}function Mo(e){return e.replace(/\\/g,"/")}function Fo(t){const n=function(t){const n={},r=[".tsx",".ts"];if(!a.existsSync(t))return n;const i=a.readdirSync(t,{withFileTypes:!0});for(const s of i)if(s.isDirectory()){const r=e.join(t,s.name),i=["index.tsx","index.ts"];let o=null;for(const t of i){const n=e.join(r,t);if(a.existsSync(n)){o=n;break}}if(o){const t=Mo(e.relative(process.cwd(),o));n[`./${s.name}`]=`./${t}`}else console.warn(`⚠️ ${s.name} 目录下没有找到入口文件,已忽略`)}else{const i=e.extname(s.name);if(r.includes(i)){const r=e.join(t,s.name),a=Mo(e.relative(process.cwd(),r));n[`./${e.basename(s.name,i)}`]=`./${a}`}}return n}(e.resolve(process.cwd(),t.exposesDir??"src/exposes"));return{...n,...t.exposes||{}}}function Bo(t){const n=[],r=function(e,t){if(!e||0===e.length)return;const n={};for(const r of e){const{remoteName:e,entry:i}=r;let s;s=i.startsWith("http")?i:t?`${t.endsWith("/")?t.slice(0,-1):t}${i.startsWith("/")?i:`/${i}`}`:{external:`Promise.resolve(window.location.origin + '${i}')`,externalType:"promise"},n[e]=s}return n}(t.remotes,t.devHost),i=Fo(t);return n.push(y({name:t.name,filename:t.filename||"remote.js",exposes:i,shared:t.shared,remotes:r})),t.remotes&&t.remotes.length>0&&n.push(Lo({remotes:t.remotes,outputPath:t.outputPath?e.resolve(process.cwd(),t.outputPath):"src/utils/mf.tsx"})),n}var jo,Ro,Uo,Ko={exports:{}},Vo={};function qo(){if(Ro)return jo;Ro=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return jo=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,i){for(var s,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in s=Object(arguments[l]))t.call(s,c)&&(o[c]=s[c]);if(e){a=e(s);for(var p=0;p<a.length;p++)n.call(s,a[p])&&(o[a[p]]=s[a[p]])}}return o},jo}function $o(){if(Uo)return Vo;Uo=1;var e=qo(),t=60103,n=60106;Vo.Fragment=60107,Vo.StrictMode=60108,Vo.Profiler=60114;var r=60109,i=60110,s=60112;Vo.Suspense=60113;var a=60115,o=60116;if("function"==typeof Symbol&&Symbol.for){var l=Symbol.for;t=l("react.element"),n=l("react.portal"),Vo.Fragment=l("react.fragment"),Vo.StrictMode=l("react.strict_mode"),Vo.Profiler=l("react.profiler"),r=l("react.provider"),i=l("react.context"),s=l("react.forward_ref"),Vo.Suspense=l("react.suspense"),a=l("react.memo"),o=l("react.lazy")}var c="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function d(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||u}function f(){}function m(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||u}d.prototype.isReactComponent={},d.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},d.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},f.prototype=d.prototype;var y=m.prototype=new f;y.constructor=m,e(y,d.prototype),y.isPureReactComponent=!0;var T={current:null},g=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,n,r){var i,s={},a=null,o=null;if(null!=n)for(i in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(a=""+n.key),n)g.call(n,i)&&!x.hasOwnProperty(i)&&(s[i]=n[i]);var l=arguments.length-2;if(1===l)s.children=r;else if(1<l){for(var c=Array(l),p=0;p<l;p++)c[p]=arguments[p+2];s.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===s[i]&&(s[i]=l[i]);return{$$typeof:t,type:e,key:a,ref:o,props:s,_owner:T.current}}function b(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var P=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function v(e,r,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case t:case n:l=!0}}if(l)return a=a(l=e),e=""===s?"."+E(l,0):s,Array.isArray(a)?(i="",null!=e&&(i=e.replace(P,"$&/")+"/"),v(a,r,i,"",function(e){return e})):null!=a&&(b(a)&&(a=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),r.push(a)),1;if(l=0,s=""===s?".":s+":",Array.isArray(e))for(var u=0;u<e.length;u++){var h=s+E(o=e[u],u);l+=v(o,r,i,h,a)}else if(h=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=c&&e[c]||e["@@iterator"])?e:null}(e),"function"==typeof h)for(e=h.call(e),u=0;!(o=e.next()).done;)l+=v(o=o.value,r,i,h=s+E(o,u++),a);else if("object"===o)throw r=""+e,Error(p(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r));return l}function A(e,t,n){if(null==e)return e;var r=[],i=0;return v(e,r,"","",function(e){return t.call(n,e,i++)}),r}function C(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}if(1===e._status)return e._result;throw e._result}var w={current:null};function I(){var e=w.current;if(null===e)throw Error(p(321));return e}var k={ReactCurrentDispatcher:w,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:T,IsSomeRendererActing:{current:!1},assign:e};return Vo.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!b(e))throw Error(p(143));return e}},Vo.Component=d,Vo.PureComponent=m,Vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,Vo.cloneElement=function(n,r,i){if(null==n)throw Error(p(267,n));var s=e({},n.props),a=n.key,o=n.ref,l=n._owner;if(null!=r){if(void 0!==r.ref&&(o=r.ref,l=T.current),void 0!==r.key&&(a=""+r.key),n.type&&n.type.defaultProps)var c=n.type.defaultProps;for(u in r)g.call(r,u)&&!x.hasOwnProperty(u)&&(s[u]=void 0===r[u]&&void 0!==c?c[u]:r[u])}var u=arguments.length-2;if(1===u)s.children=i;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];s.children=c}return{$$typeof:t,type:n.type,key:a,ref:o,props:s,_owner:l}},Vo.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:i,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:r,_context:e},e.Consumer=e},Vo.createElement=S,Vo.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},Vo.createRef=function(){return{current:null}},Vo.forwardRef=function(e){return{$$typeof:s,render:e}},Vo.isValidElement=b,Vo.lazy=function(e){return{$$typeof:o,_payload:{_status:-1,_result:e},_init:C}},Vo.memo=function(e,t){return{$$typeof:a,type:e,compare:void 0===t?null:t}},Vo.useCallback=function(e,t){return I().useCallback(e,t)},Vo.useContext=function(e,t){return I().useContext(e,t)},Vo.useDebugValue=function(){},Vo.useEffect=function(e,t){return I().useEffect(e,t)},Vo.useImperativeHandle=function(e,t,n){return I().useImperativeHandle(e,t,n)},Vo.useLayoutEffect=function(e,t){return I().useLayoutEffect(e,t)},Vo.useMemo=function(e,t){return I().useMemo(e,t)},Vo.useReducer=function(e,t,n){return I().useReducer(e,t,n)},Vo.useRef=function(e){return I().useRef(e)},Vo.useState=function(e){return I().useState(e)},Vo.version="17.0.2",Vo}var Wo,Yo,Jo={};function Xo(){return Wo||(Wo=1,e=Jo,"production"!==process.env.NODE_ENV&&function(){var t=qo(),n=60103,r=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var i=60109,s=60110,a=60112;e.Suspense=60113;var o=60120,l=60115,c=60116,p=60121,u=60122,h=60117,d=60129,f=60131;if("function"==typeof Symbol&&Symbol.for){var m=Symbol.for;n=m("react.element"),r=m("react.portal"),e.Fragment=m("react.fragment"),e.StrictMode=m("react.strict_mode"),e.Profiler=m("react.profiler"),i=m("react.provider"),s=m("react.context"),a=m("react.forward_ref"),e.Suspense=m("react.suspense"),o=m("react.suspense_list"),l=m("react.memo"),c=m("react.lazy"),p=m("react.block"),u=m("react.server.block"),h=m("react.fundamental"),m("react.scope"),m("react.opaque.id"),d=m("react.debug_trace_mode"),m("react.offscreen"),f=m("react.legacy_hidden")}var y="function"==typeof Symbol&&Symbol.iterator;function T(e){if(null===e||"object"!=typeof e)return null;var t=y&&e[y]||e["@@iterator"];return"function"==typeof t?t:null}var g={current:null},x={current:null},S={},b=null;function P(e){b=e}S.setExtraStackFrame=function(e){b=e},S.getCurrentStack=null,S.getStackAddendum=function(){var e="";b&&(e+=b);var t=S.getCurrentStack;return t&&(e+=t()||""),e};var E={ReactCurrentDispatcher:g,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:t};function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];C("warn",e,n)}function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];C("error",e,n)}function C(e,t,n){var r=E.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map(function(e){return""+e});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}E.ReactDebugCurrentFrame=S;var w={};function I(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;w[i]||(A("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),w[i]=!0)}var k={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){I(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){I(e,"replaceState")},enqueueSetState:function(e,t,n,r){I(e,"setState")}},N={};function O(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||k}Object.freeze(N),O.prototype.isReactComponent={},O.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var _={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},D=function(e,t){Object.defineProperty(O.prototype,e,{get:function(){v("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var L in _)_.hasOwnProperty(L)&&D(L,_[L]);function M(){}function F(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||k}M.prototype=O.prototype;var B=F.prototype=new M;function j(e){return e.displayName||"Context"}function R(t){if(null==t)return null;if("number"==typeof t.tag&&A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case r:return"Portal";case e.Profiler:return"Profiler";case e.StrictMode:return"StrictMode";case e.Suspense:return"Suspense";case o:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return j(t)+".Consumer";case i:return j(t._context)+".Provider";case a:return d=t,f=t.render,m="ForwardRef",y=f.displayName||f.name||"",d.displayName||(""!==y?m+"("+y+")":m);case l:return R(t.type);case p:return R(t._render);case c:var n=t,u=n._payload,h=n._init;try{return R(h(u))}catch(e){return null}}var d,f,m,y;return null}B.constructor=F,t(B,O.prototype),B.isPureReactComponent=!0;var U,K,V,q=Object.prototype.hasOwnProperty,$={key:!0,ref:!0,__self:!0,__source:!0};function W(e){if(q.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function Y(e){if(q.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}V={};var J=function(e,t,r,i,s,a,o){var l={$$typeof:n,type:e,key:t,ref:r,props:o,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function X(e,t,n){var r,i={},s=null,a=null,o=null,l=null;if(null!=t)for(r in W(t)&&(a=t.ref,function(e){if("string"==typeof e.ref&&x.current&&e.__self&&x.current.stateNode!==e.__self){var t=R(x.current.type);V[t]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),V[t]=!0)}}(t)),Y(t)&&(s=""+t.key),o=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)q.call(t,r)&&!$.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(c>1){for(var p=Array(c),u=0;u<c;u++)p[u]=arguments[u+2];Object.freeze&&Object.freeze(p),i.children=p}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}if(s||a){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){U||(U=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,d),a&&function(e,t){var n=function(){K||(K=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,d)}return J(e,s,a,o,l,x.current,i)}function H(e,n,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i,s,a=t({},e.props),o=e.key,l=e.ref,c=e._self,p=e._source,u=e._owner;if(null!=n)for(i in W(n)&&(l=n.ref,u=x.current),Y(n)&&(o=""+n.key),e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)q.call(n,i)&&!$.hasOwnProperty(i)&&(void 0===n[i]&&void 0!==s?a[i]=s[i]:a[i]=n[i]);var h=arguments.length-2;if(1===h)a.children=r;else if(h>1){for(var d=Array(h),f=0;f<h;f++)d[f]=arguments[f+2];a.children=d}return J(e.type,o,l,c,p,u,a)}function z(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var G=!1,Q=/\/+/g;function Z(e){return e.replace(Q,"$&/")}function ee(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function te(e,t,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l,c,p,u=!1;if(null===e)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u){var h=e,d=a(h),f=""===s?"."+ee(h,0):s;if(Array.isArray(d)){var m="";null!=f&&(m=Z(f)+"/"),te(d,t,m,"",function(e){return e})}else null!=d&&(z(d)&&(l=d,c=i+(!d.key||h&&h.key===d.key?"":Z(""+d.key)+"/")+f,d=J(l.type,c,l.ref,l._self,l._source,l._owner,l.props)),t.push(d));return 1}var y=0,g=""===s?".":s+":";if(Array.isArray(e))for(var x=0;x<e.length;x++)y+=te(p=e[x],t,i,g+ee(p,x),a);else{var S=T(e);if("function"==typeof S){var b=e;S===b.entries&&(G||v("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G=!0);for(var P,E=S.call(b),A=0;!(P=E.next()).done;)y+=te(p=P.value,t,i,g+ee(p,A++),a)}else if("object"===o){var C=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===C?"object with keys {"+Object.keys(e).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}}return y}function ne(e,t,n){if(null==e)return e;var r=[],i=0;return te(e,r,"","",function(e){return t.call(n,e,i++)}),r}function re(e){if(-1===e._status){var t=(0,e._result)(),n=e;n._status=0,n._result=t,t.then(function(t){if(0===e._status){var n=t.default;void 0===n&&A("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",t);var r=e;r._status=1,r._result=n}},function(t){if(0===e._status){var n=e;n._status=2,n._result=t}})}if(1===e._status)return e._result;throw e._result}function ie(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===e.Profiler||t===d||t===e.StrictMode||t===e.Suspense||t===o||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===c||t.$$typeof===l||t.$$typeof===i||t.$$typeof===s||t.$$typeof===a||t.$$typeof===h||t.$$typeof===p||t[0]===u)}function se(){var e=g.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return e}var ae,oe,le,ce,pe,ue,he,de=0;function fe(){}fe.__reactDisabledLog=!0;var me,ye=E.ReactCurrentDispatcher;function Te(e,t,n){if(void 0===me)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);me=r&&r[1]||""}return"\n"+me+e}var ge,xe=!1,Se="function"==typeof WeakMap?WeakMap:Map;function be(e,n){if(!e||xe)return"";var r,i=ge.get(e);if(void 0!==i)return i;xe=!0;var s,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,s=ye.current,ye.current=null,function(){if(0===de){ae=console.log,oe=console.info,le=console.warn,ce=console.error,pe=console.group,ue=console.groupCollapsed,he=console.groupEnd;var e={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}de++}();try{if(n){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){r=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){r=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),c=r.stack.split("\n"),p=l.length-1,u=c.length-1;p>=1&&u>=0&&l[p]!==c[u];)u--;for(;p>=1&&u>=0;p--,u--)if(l[p]!==c[u]){if(1!==p||1!==u)do{if(p--,--u<0||l[p]!==c[u]){var h="\n"+l[p].replace(" at new "," at ");return"function"==typeof e&&ge.set(e,h),h}}while(p>=1&&u>=0);break}}}finally{xe=!1,ye.current=s,function(){if(0===--de){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},e,{value:ae}),info:t({},e,{value:oe}),warn:t({},e,{value:le}),error:t({},e,{value:ce}),group:t({},e,{value:pe}),groupCollapsed:t({},e,{value:ue}),groupEnd:t({},e,{value:he})})}de<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var d=e?e.displayName||e.name:"",f=d?Te(d):"";return"function"==typeof e&&ge.set(e,f),f}function Pe(e,t,n){return be(e,!1)}function Ee(t,n,r){if(null==t)return"";if("function"==typeof t)return be(t,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(t));if("string"==typeof t)return Te(t);switch(t){case e.Suspense:return Te("Suspense");case o:return Te("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case a:return Pe(t.render);case l:return Ee(t.type,n,r);case p:return Pe(t._render);case c:var i=t,s=i._payload,u=i._init;try{return Ee(u(s),n,r)}catch(e){}}return""}ge=new Se;var ve,Ae={},Ce=E.ReactDebugCurrentFrame;function we(e){if(e){var t=e._owner,n=Ee(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}function Ie(e){if(e){var t=e._owner;P(Ee(e.type,e._source,t?t.type:null))}else P(null)}function ke(){if(x.current){var e=R(x.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ve=!1;var Ne={};function Oe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ke();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Ne[n]){Ne[n]=!0;var r="";e&&e._owner&&e._owner!==x.current&&(r=" It was passed a child from "+R(e._owner.type)+"."),Ie(e),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),Ie(null)}}}function _e(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];z(r)&&Oe(r,t)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var i=T(e);if("function"==typeof i&&i!==e.entries)for(var s,a=i.call(e);!(s=a.next()).done;)z(s.value)&&Oe(s.value,t)}}function De(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==a&&n.$$typeof!==l)return;t=n.propTypes}if(t){var r=R(n);!function(e,t,n,r,i){var s=Function.call.bind(Object.prototype.hasOwnProperty);for(var a in e)if(s(e,a)){var o=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}o=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}!o||o instanceof Error||(we(i),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof o),we(null)),o instanceof Error&&!(o.message in Ae)&&(Ae[o.message]=!0,we(i),A("Failed %s type: %s",n,o.message),we(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||ve||(ve=!0,A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Le(t,r,i){var s,a,o=ie(t);if(!o){var l="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c,p=null!=(s=r)&&void 0!==(a=s.__source)?"\n\nCheck your code at "+a.fileName.replace(/^.*[\\\/]/,"")+":"+a.lineNumber+".":"";l+=p||ke(),null===t?c="null":Array.isArray(t)?c="array":void 0!==t&&t.$$typeof===n?(c="<"+(R(t.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):c=typeof t,A("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,l)}var u=X.apply(this,arguments);if(null==u)return u;if(o)for(var h=2;h<arguments.length;h++)_e(arguments[h],t);return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){Ie(e),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Ie(null);break}}null!==e.ref&&(Ie(e),A("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}(u):De(u),u}var Me=!1;try{var Fe=Object.freeze({});new Map([[Fe,null]]),new Set([Fe])}catch(e){}var Be=Le,je=function(e,t,n){for(var r=H.apply(this,arguments),i=2;i<arguments.length;i++)_e(arguments[i],r.type);return De(r),r},Re=function(e){var t=Le.bind(null,e);return t.type=e,Me||(Me=!0,v("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return v("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},Ue={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!z(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};e.Children=Ue,e.Component=O,e.PureComponent=F,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E,e.cloneElement=je,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&A("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:i,_context:n};var r=!1,a=!1,o=!1,l={$$typeof:s,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(l,{Provider:{get:function(){return a||(a=!0,A("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,A("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),n.Consumer}},displayName:{get:function(){return n.displayName},set:function(e){o||(v("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),o=!0)}}}),n.Consumer=l,n._currentRenderer=null,n._currentRenderer2=null,n},e.createElement=Be,e.createFactory=Re,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){null!=e&&e.$$typeof===l?A("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?A("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&A("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||A("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:a,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,null==e.displayName&&(e.displayName=n)}}),n},e.isValidElement=z,e.lazy=function(e){var t,n,r={$$typeof:c,_payload:{_status:-1,_result:e},_init:re};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){A("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){A("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},e.memo=function(e,t){ie(e)||A("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:l,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,null==e.displayName&&(e.displayName=t)}}),r},e.useCallback=function(e,t){return se().useCallback(e,t)},e.useContext=function(e,t){var n=se();if(void 0!==t&&A("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?A("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&A("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},e.useDebugValue=function(e,t){return se().useDebugValue(e,t)},e.useEffect=function(e,t){return se().useEffect(e,t)},e.useImperativeHandle=function(e,t,n){return se().useImperativeHandle(e,t,n)},e.useLayoutEffect=function(e,t){return se().useLayoutEffect(e,t)},e.useMemo=function(e,t){return se().useMemo(e,t)},e.useReducer=function(e,t,n){return se().useReducer(e,t,n)},e.useRef=function(e){return se().useRef(e)},e.useState=function(e){return se().useState(e)},e.version="17.0.2"}()),Jo;var e}var Ho=(Yo||(Yo=1,"production"===process.env.NODE_ENV?Ko.exports=$o():Ko.exports=Xo()),Ko.exports);class zo extends Ho.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}render(){if(this.state.hasError&&this.state.error){if(function(e){const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Loading chunk")||t.includes("Loading CSS chunk")||"ChunkLoadError"===e.name||t.includes("Cannot find module")||t.includes("Failed to fetch")||t.includes("NetworkError")||t.includes("store")||t.includes("dispatch")||t.includes("reducer")}(this.state.error)&&this.props.LoadingComponent)return Ho.createElement(this.props.LoadingComponent,{error:this.state.error});throw this.state.error}return this.props.children}}function Go(e){const t=e.loading;return function(n){const r=t?Ho.createElement(t):null;return Ho.createElement(zo,{LoadingComponent:t},Ho.createElement(Ho.Suspense,{fallback:r},Ho.createElement(Ho.lazy(e.loader),n)))}}const Qo={pagesDir:"src/pages",outputPath:"src/routes.ts",watch:!0,ignoreDirs:["components","utils","hooks","typings"],routeTemplate:{defaultLoadingComponentPath:"@/components/loading",intlPath:"@/utils/intl"}};function Zo(t){const{appName:n,federation:r,routes:i,htmlTransform:a=!0,qiankun:o}=t,l=[];a&&l.push(T());const c="object"==typeof i?Object.assign(Qo,i):Qo;if(l.push(Do({pagesDir:c.pagesDir?e.resolve(process.cwd(),c.pagesDir):void 0,outputPath:c.outputPath?e.resolve(process.cwd(),c.outputPath):void 0,watch:c.watch,ignoreDirs:c.ignoreDirs,routeTemplate:c.routeTemplate})),!1!==o?.enabled){const e=o?.name||n,t="development"===process.env.NODE_ENV;l.push(s(e,{useDevMode:t}))}return r&&l.push(...Bo(r)),l}export{Go as dynamic,Bo as federationPlugin,ko as getRoutes,T as htmlRemoveFreshPlugin,Lo as mfGeneratorPlugin,Zo as microFrontendPlugins,Do as pagesRoutesPlugin};
|
|
13
|
+
`;return this.replaceWith(p)[0].get("arguments.0")},fa.splitExportDeclaration=function(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(this.isExportNamedDeclaration()&&this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const e=this.get("declaration");if(this.isExportDefaultDeclaration()){const t=e.isFunctionDeclaration()||e.isClassDeclaration(),n=e.isFunctionExpression()||e.isClassExpression(),r=e.isScope()?e.scope.parent:e.scope;let i=e.node.id,s=!1;i?n&&r.hasBinding(i.name)&&(s=!0,i=r.generateUidIdentifier(i.name)):(s=!0,i=r.generateUidIdentifier("default"),(t||n)&&(e.node.id=L(i)));const a=t?e.node:M("var",[F(L(i),e.node)]),o=B(null,[j(L(i),u("default"))]);return this.insertAfter(o),this.replaceWith(a),s&&r.registerDeclaration(this),this}if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const t=e.getOuterBindingIdentifiers(),n=Object.keys(t).map(e=>j(u(e),u(e))),r=B(null,n);return this.insertAfter(r),this.replaceWith(e.node),this},fa.toComputedKey=function(){let e;if(this.isMemberExpression())e=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");e=this.node.key}this.node.computed||h(e)&&(e=v(e.name));return e},fa.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");K(this)};var e=Pr(),t=function(){if(_a)return ma;_a=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.statements=ma.statement=ma.smart=ma.program=ma.expression=ma.default=void 0;var e=Ta(),t=Fa();const n=ma.smart=(0,t.default)(e.smart),r=ma.statement=(0,t.default)(e.statement),i=ma.statements=(0,t.default)(e.statements),s=ma.expression=(0,t.default)(e.expression),a=ma.program=(0,t.default)(e.program);return ma.default=Object.assign(n.bind(void 0),{smart:n,statement:r,statements:i,expression:s,program:a,ast:n.ast}),ma}(),n=ei(),r=Qa();const{arrowFunctionExpression:i,assignmentExpression:s,binaryExpression:a,blockStatement:o,callExpression:l,conditionalExpression:c,expressionStatement:p,identifier:u,isIdentifier:h,jsxIdentifier:d,logicalExpression:f,LOGICAL_OPERATORS:m,memberExpression:y,metaProperty:T,numericLiteral:g,objectExpression:x,restElement:S,returnStatement:b,sequenceExpression:P,spreadElement:E,stringLiteral:v,super:A,thisExpression:C,toExpression:w,unaryExpression:I,toBindingIdentifierName:k,isFunction:N,isAssignmentPattern:O,isRestElement:_,getFunctionName:D,cloneNode:L,variableDeclaration:M,variableDeclarator:F,exportNamedDeclaration:B,exportSpecifier:j,inherits:R}=e;fa.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};const U=(0,n.environmentVisitor)({CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}});function K(e,t=!0,n=!0,r=!0){let o,p=e.findParent(e=>e.isArrowFunctionExpression()?(null!=o||(o=e),!1):e.isFunction()||e.isProgram()||e.isClassProperty({static:!1})||e.isClassPrivateProperty({static:!1}));const h=p.isClassMethod({kind:"constructor"});if(p.isClassProperty()||p.isClassPrivateProperty())if(o)p=o;else{if(!n)throw e.buildCodeFrameError("Unable to transform arrow inside class property");e.replaceWith(l(i([],w(e.node)),[])),p=e.get("callee"),e=p.get("body")}const{thisPaths:x,argumentsPaths:b,newTargetPaths:k,superProps:N,superCalls:O}=function(e){const t=[],n=[],r=[],i=[],s=[];return e.traverse(W,{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}),{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}}(e);if(h&&O.length>0){if(!n)throw O[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!r)throw O[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");const e=[];p.traverse(U,{allSuperCalls:e});const t=function(e){return $(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return i([S(t)],l(A(),[E(u(t.name))]))})}(p);e.forEach(e=>{const n=u(t);n.loc=e.node.callee.loc,e.get("callee").replaceWith(n)})}if(b.length>0){const e=$(p,"arguments",()=>{const e=()=>u("arguments");return p.scope.path.isProgram()?c(a("===",I("typeof",e()),v("undefined")),p.scope.buildUndefinedNode(),e()):e()});b.forEach(t=>{const n=u(e);n.loc=t.node.loc,t.replaceWith(n)})}if(k.length>0){const e=$(p,"newtarget",()=>T(u("new"),u("target")));k.forEach(t=>{const n=u(e);n.loc=t.node.loc,t.replaceWith(n)})}if(N.length>0){if(!n)throw N[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");N.reduce((e,t)=>e.concat(function(e){if(e.parentPath.isAssignmentExpression()&&"="!==e.parentPath.node.operator){const n=e.parentPath,r=n.node.operator.slice(0,-1),i=n.node.right,a=function(e){return m.includes(e)}(r);if(e.node.computed){const o=e.scope.generateDeclaredUidIdentifier("tmp"),{object:l,property:c}=e.node;n.get("left").replaceWith(y(l,s("=",o,c),!0)),n.get("right").replaceWith(t(a?"=":r,y(l,u(o.name),!0),i))}else{const s=e.node.object,o=e.node.property;n.get("left").replaceWith(y(s,o)),n.get("right").replaceWith(t(a?"=":r,y(s,u(o.name)),i))}return a?n.replaceWith(f(r,n.node.left,n.node.right)):n.node.operator="=",[n.get("left"),n.get("right").get("left")]}if(e.parentPath.isUpdateExpression()){const t=e.parentPath,n=e.scope.generateDeclaredUidIdentifier("tmp"),r=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,i=[s("=",n,y(e.node.object,r?s("=",r,e.node.property):e.node.property,e.node.computed)),s("=",y(e.node.object,r?u(r.name):e.node.property,e.node.computed),a(e.parentPath.node.operator[0],u(n.name),g(1)))];e.parentPath.node.prefix||i.push(u(n.name)),t.replaceWith(P(i));return[t.get("expressions.0.right"),t.get("expressions.1.left")]}return[e];function t(e,t,n){return"="===e?s("=",t,n):a(e,t,n)}}(t)),[]).forEach(e=>{const t=e.node.computed?"":e.get("property").node.name,n=e.parentPath,r=n.isAssignmentExpression({left:e.node}),a=n.isCallExpression({callee:e.node}),o=n.isTaggedTemplateExpression({tag:e.node}),c=function(e,t,n){const r=t?"set":"get";return $(e,`superprop_${r}:${n||""}`,()=>{const r=[];let a;if(n)a=y(A(),u(n));else{const t=e.scope.generateUidIdentifier("prop");r.unshift(t),a=y(A(),u(t.name),!0)}if(t){const t=e.scope.generateUidIdentifier("value");r.push(t),a=s("=",a,u(t.name))}return i(r,a)})}(p,r,t),h=[];if(e.node.computed&&h.push(e.get("property").node),r){const e=n.node.right;h.push(e)}const d=l(u(c),h);a?(n.unshiftContainer("arguments",C()),e.replaceWith(y(d,u("call"))),x.push(n.get("arguments.0"))):r?n.replaceWith(d):o?(e.replaceWith(l(y(d,u("bind"),!1),[C()])),x.push(e.get("arguments.0"))):e.replaceWith(d)})}let _;return(x.length>0||!t)&&(_=function(e,t){return $(e,"this",n=>{if(!t||!V(e))return C();e.traverse(q,{supers:new WeakSet,thisBinding:n})})}(p,h),(t||h&&V(p))&&(x.forEach(e=>{const t=e.isJSX()?d(_):u(_);t.loc=e.node.loc,e.replaceWith(t)}),t||(_=null))),{thisBinding:_,fnPath:e}}function V(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}const q=(0,n.environmentVisitor)({CallExpression(e,{supers:t,thisBinding:n}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,s("=",u(n),u("this"))])))}});function $(e,t,n){const r="binding:"+t;let i=e.getData(r);if(!i){const s=e.scope.generateUidIdentifier(t);i=s.name,e.setData(r,i),e.scope.push({id:s,init:n(i)})}return i}const W=(0,n.environmentVisitor)({ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){"this"===e.node.name&&(e.parentPath.isJSXMemberExpression({object:e.node})||e.parentPath.isJSXOpeningElement({name:e.node}))&&t.push(e)},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let n=e.scope;do{if(n.hasOwnBinding("arguments"))return void n.rename("arguments");if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}});const Y={"ReferencedIdentifier|BindingIdentifier"(e,t){e.node.name===t.name&&(t.needsRename=!0,e.stop())},Scope(e,t){e.scope.hasOwnBinding(t.name)&&e.skip()}};return fa}var ja,Ra={};function Ua(){return ja||(ja=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._guessExecutionStatusRelativeTo=function(e){return m(this,e,new Map)},e._resolve=y,e.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},e.canSwapBetweenExpressionAndStatement=function(e){if("body"!==this.key||!this.parentPath.isArrowFunctionExpression())return!1;if(this.isExpression())return i(e);if(this.isBlockStatement())return s(e);return!1},e.getSource=function(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""},e.isCompletionRecord=function(e){let t=this,n=!0;do{const{type:r,container:i}=t;if(!n&&(t.isFunction()||"StaticBlock"===r))return!!e;if(n=!1,Array.isArray(i)&&t.key!==i.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0},e.isConstantExpression=function(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);return!!e&&e.constant}if(this.isLiteral())return!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get("expressions").every(e=>e.isConstantExpression()));if(this.isUnaryExpression())return"void"===this.node.operator&&this.get("argument").isConstantExpression();if(this.isBinaryExpression()){const{operator:e}=this.node;return"in"!==e&&"instanceof"!==e&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}if(this.isMemberExpression())return!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0});if(this.isCallExpression())return 1===this.node.arguments.length&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral();return!1},e.isInStrictMode=function(){const e=(this.isProgram()?this:this.parentPath).find(e=>{if(e.isProgram({sourceType:"module"}))return!0;if(e.isClass())return!0;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement())return!1;let t;if(e.isFunction())t=e.node.body;else{if(!e.isProgram())return!1;t=e.node}for(const e of t.directives)if("use strict"===e.value.value)return!0;return!1});return!!e},e.isNodeType=function(e){return c(this.type,e)},e.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!i(this.container)&&n.includes(this.key)},e.isStatic=function(){return this.scope.isStatic(this.node)},e.matchesPattern=function(e,t){return p(this.node,e,t)},e.referencesImport=function(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?l(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get("object");return t.isReferencedIdentifier()&&t.referencesImport(e,"*")}return!1}const n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;const r=n.path,i=r.parentPath;if(!i.isImportDeclaration())return!1;if(i.node.source.value!==e)return!1;if(!t)return!0;if(r.isImportDefaultSpecifier()&&"default"===t)return!0;if(r.isImportNamespaceSpecifier()&&"*"===t)return!0;if(r.isImportSpecifier()&&a(r.node.imported,{name:t}))return!0;return!1},e.resolve=function(e,t){return y.call(this,e,t)||this},e.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)};var t=Pr();const{STATEMENT_OR_BLOCK_KEYS:n,VISITOR_KEYS:r,isBlockStatement:i,isExpression:s,isIdentifier:a,isLiteral:o,isStringLiteral:l,isType:c,matchesPattern:p}=t;function u(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function h(e,t){switch(e){case"LogicalExpression":case"AssignmentPattern":return"right"===t;case"ConditionalExpression":case"IfStatement":return"consequent"===t||"alternate"===t;case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return"body"===t;case"ForStatement":return"body"===t||"update"===t;case"SwitchStatement":return"cases"===t;case"TryStatement":return"handler"===t;case"OptionalMemberExpression":return"property"===t;case"OptionalCallExpression":return"arguments"===t;default:return!1}}function d(e,t){for(let n=0;n<t;n++){const t=e[n];if(h(t.parent.type,t.parentKey))return!0}return!1}e.has=function(e){var t;const n=null==(t=this.node)?void 0:t[e];return n&&Array.isArray(n)?!!n.length:!!n},e.is=e.has,e.isnt=function(e){return!this.has(e)},e.equals=function(e,t){return this.node[e]===t};const f=Symbol();function m(e,t,n){const i={this:u(e),target:u(t)};if(i.target.node!==i.this.node)return function(e,t,n){let r,i=n.get(e.node);if(i){if(r=i.get(t.node))return r===f?"unknown":r}else n.set(e.node,i=new Map);i.set(t.node,f);const s=function(e,t,n){if(!t.isFunctionDeclaration())return"before"===m(e,t,n)?"before":"unknown";if(t.parentPath.isExportDeclaration())return"unknown";const r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";const i=r.referencePaths;let s;for(const r of i){if(!!r.find(e=>e.node===t.node))continue;if("callee"!==r.key||!r.parentPath.isCallExpression())return"unknown";const i=m(e,r,n);if(s&&s!==i)return"unknown";s=i}return s}(e,t,n);return i.set(t.node,s),s}(e,i.target,n);const s={target:t.getAncestry(),this:e.getAncestry()};if(s.target.includes(e))return"after";if(s.this.includes(t))return"before";let a;const o={target:0,this:0};for(;!a&&o.this<s.this.length;){const e=s.this[o.this];o.target=s.target.indexOf(e),o.target>=0?a=e:o.this++}if(!a)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(d(s.this,o.this-1)||d(s.target,o.target-1))return"unknown";const l={this:s.this[o.this-1],target:s.target[o.target-1]};if(l.target.listKey&&l.this.listKey&&l.target.container===l.this.container)return l.target.key>l.this.key?"before":"after";const c=r[a.type],p=c.indexOf(l.this.parentKey);return c.indexOf(l.target.parentKey)>p?"before":"after"}function y(e,t){var n;if(null==(n=t)||!n.includes(this))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){const n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){const r=n.path.resolve(e,t);if(this.find(e=>e.node===r.node))return;return r}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){const n=this.toComputedKey();if(!o(n))return;const r=n.value,i=this.get("object").resolve(e,t);if(i.isObjectExpression()){const n=i.get("properties");for(const i of n){if(!i.isProperty())continue;const n=i.get("key");let s=i.isnt("computed")&&n.isIdentifier({name:r});if(s=s||n.isLiteral({value:r}),s)return i.get("value").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+r)){const n=i.get("elements")[r];if(n)return n.resolve(e,t)}}}}}(Ra)),Ra}var Ka,Va={};function qa(){if(Ka)return Va;Ka=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va._getKey=f,Va._getPattern=m,Va.get=function(e,t=!0){!0===t&&(t=this.context);const n=e.split(".");return 1===n.length?f.call(this,e,t):m.call(this,n,t)},Va.getAllNextSiblings=function(){let e=this.key,t=this.getSibling(++e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(++e);return n},Va.getAllPrevSiblings=function(){let e=this.key,t=this.getSibling(--e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(--e);return n},Va.getAssignmentIdentifiers=function(){return n(this.node)},Va.getBindingIdentifierPaths=function(e=!1,t=!1){const n=[this],i=Object.create(null);for(;n.length;){const s=n.shift();if(!s)continue;if(!s.node)continue;const a=r.keys[s.node.type];if(s.isIdentifier())if(e){(i[s.node.name]=i[s.node.name]||[]).push(s)}else i[s.node.name]=s;else{if(s.isExportDeclaration()){const e=s.get("declaration");e.isDeclaration()&&n.push(e);continue}if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(let e=0;e<a.length;e++){const t=a[e],r=s.get(t);Array.isArray(r)?n.push(...r):r.node&&n.push(r)}}}return i},Va.getBindingIdentifiers=function(e){return r(this.node,e)},Va.getCompletionRecords=function(e=!1){return d(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:e}).map(e=>e.path)},Va.getNextSibling=function(){return this.getSibling(this.key+1)},Va.getOpposite=function(){if("left"===this.key)return this.getSibling("right");if("right"===this.key)return this.getSibling("left");return null},Va.getOuterBindingIdentifierPaths=function(e=!1){return this.getBindingIdentifierPaths(e,!0)},Va.getOuterBindingIdentifiers=function(e){return i(this.node,e)},Va.getPrevSibling=function(){return this.getSibling(this.key-1)},Va.getSibling=function(t){return e.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:t}).setContext(this.context)};var e=za(),t=Pr();const{getAssignmentIdentifiers:n,getBindingIdentifiers:r,getOuterBindingIdentifiers:i,numericLiteral:s,unaryExpression:a}=t,o=0,l=1;function c(e,t,n){return e&&t.push(...d(e,n)),t}function p(e){e.forEach(e=>{e.type=l})}function u(e,t){e.forEach(e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(a("void",s(0))):e.path.remove())})}function h(e,t){const n=[];if(t.canHaveBreak){let r=[];for(let i=0;i<e.length;i++){const s=e[i],a=Object.assign({},t,{inCaseClause:!1});s.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?a.shouldPopulateBreak=!0:a.shouldPopulateBreak=!1;const c=d(s,a);if(c.length>0&&c.every(e=>e.type===l)){r.length>0&&c.every(e=>e.path.isBreakStatement({label:null}))?(p(r),n.push(...r),r.some(e=>e.path.isDeclaration())&&(n.push(...c),t.shouldPreserveBreak||u(c,!0)),t.shouldPreserveBreak||u(c,!1)):(n.push(...c),t.shouldPopulateBreak||t.shouldPreserveBreak||u(c,!0));break}if(i===e.length-1)n.push(...c);else{r=[];for(let e=0;e<c.length;e++){const t=c[e];t.type===l&&n.push(t),t.type===o&&r.push(t)}}}}else if(e.length)for(let r=e.length-1;r>=0;r--){const i=d(e[r],t);if(i.length>1||1===i.length&&!i[0].path.isVariableDeclaration()&&!i[0].path.isEmptyStatement()){n.push(...i);break}}return n}function d(e,t){let n=[];if(e.isIfStatement())n=c(e.get("consequent"),n,t),n=c(e.get("alternate"),n,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return c(e.get("body"),n,t);if(e.isProgram()||e.isBlockStatement())return h(e.get("body"),t);if(e.isFunction())return d(e.get("body"),t);if(e.isTryStatement())n=c(e.get("block"),n,t),n=c(e.get("handler"),n,t);else{if(e.isCatchClause())return c(e.get("body"),n,t);if(e.isSwitchStatement())return function(e,t,n){let r=[];for(let i=0;i<e.length;i++){const s=d(e[i],n),a=[],c=[];for(const e of s)e.type===o&&a.push(e),e.type===l&&c.push(e);a.length&&(r=a),t.push(...c)}return t.push(...r),t}(e.get("cases"),n,t);if(e.isSwitchCase())return h(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:t.shouldPreserveBreak});e.isBreakStatement()?n.push(function(e){return{type:l,path:e}}(e)):n.push(function(e){return{type:o,path:e}}(e))}}return n}function f(t,n){const r=this.node,i=r[t];return Array.isArray(i)?i.map((s,a)=>e.default.get({listKey:t,parentPath:this,parent:r,container:i,key:a}).setContext(n)):e.default.get({parentPath:this,parent:r,container:r,key:t}).setContext(n)}function m(e,t){let n=this;for(const r of e)n="."===r?n.parentPath:Array.isArray(n)?n[r]:n.get(r,t);return n}return Va}var $a,Wa,Ya,Ja,Xa,Ha={};function za(){if(Wa)return kr;Wa=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.default=kr.SHOULD_STOP=kr.SHOULD_SKIP=kr.REMOVED=void 0;var e=Or(),t=Wr(),n=no(),r=ui(),i=Pr(),s=i,a=oi(),o=As(),l=function(){if(Cs)return ws;Cs=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.find=function(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null},ws.findParent=function(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null},ws.getAncestry=function(){let e=this;const t=[];do{t.push(e)}while(e=e.parentPath);return t},ws.getDeepestCommonAncestorFrom=function(e,t){if(!e.length)return this;if(1===e.length)return e[0];let n,r,i=1/0;const s=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);return t.length<i&&(i=t.length),t}),a=s[0];e:for(let e=0;e<i;e++){const t=a[e];for(const n of s)if(n[e]!==t)break e;n=e,r=t}if(r)return t?t(r,n,s):r;throw new Error("Couldn't find intersection")},ws.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,n,r){let i;const s=t[e.type];for(const e of r){const t=e[n+1];i?(t.listKey&&i.listKey===t.listKey&&t.key<i.key||s.indexOf(i.parentKey)>s.indexOf(t.parentKey))&&(i=t):i=t}return i})},ws.getFunctionParent=function(){return this.findParent(e=>e.isFunction())},ws.getStatementParent=function(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},ws.inType=function(...e){let t=this;for(;t;){if(e.includes(t.node.type))return!0;t=t.parentPath}return!1},ws.isAncestor=function(e){return e.isDescendant(this)},ws.isDescendant=function(e){return!!this.findParent(t=>t===e)};var e=Pr();const{VISITOR_KEYS:t}=e;return ws}(),c=function(){if(Os)return _s;Os=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s._getTypeAnnotation=E,_s.baseTypeStrictlyMatches=function(e){const t=this.getTypeAnnotation(),n=e.getTypeAnnotation();return!(r(t)||!o(t))&&n.type===t.type},_s.couldBeBaseType=function(e){const t=this.getTypeAnnotation();if(r(t))return!0;if(g(t)){for(const n of t.types)if(r(n)||v(e,n,!0))return!0;return!1}return v(e,t,!0)},_s.getTypeAnnotation=function(){let e=this.getData("typeAnnotation");return null!=e||(e=E.call(this)||n(),(T(e)||f(e))&&(e=e.typeAnnotation),this.setData("typeAnnotation",e)),e},_s.isBaseType=function(e,t){return v(e,this.getTypeAnnotation(),t)},_s.isGenericType=function(e){const t=this.getTypeAnnotation();return!("Array"!==e||!(d(t)||i(t)||y(t)))||(l(t)&&c(t.id,{name:e})||m(t)&&c(t.typeName,{name:e}))};var e=js(),t=Pr();const{anyTypeAnnotation:n,isAnyTypeAnnotation:r,isArrayTypeAnnotation:i,isBooleanTypeAnnotation:s,isEmptyTypeAnnotation:a,isFlowBaseAnnotation:o,isGenericTypeAnnotation:l,isIdentifier:c,isMixedTypeAnnotation:p,isNumberTypeAnnotation:u,isStringTypeAnnotation:h,isTSArrayType:d,isTSTypeAnnotation:f,isTSTypeReference:m,isTupleTypeAnnotation:y,isTypeAnnotation:T,isUnionTypeAnnotation:g,isVoidTypeAnnotation:x,stringTypeAnnotation:S,voidTypeAnnotation:b}=t,P=new WeakSet;function E(){const t=this.node;if(t){if(t.typeAnnotation)return t.typeAnnotation;if(!P.has(t)){P.add(t);try{var r;let n=e[t.type];if(n)return n.call(this,t);if(n=e[this.parentPath.type],null!=(r=n)&&r.validParent)return this.parentPath.getTypeAnnotation()}finally{P.delete(t)}}}else if("init"===this.key&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath,t=e.parentPath;return"left"===e.key&&t.isForInStatement()?S():"left"===e.key&&t.isForOfStatement()?n():b()}}function v(e,t,n){if("string"===e)return h(t);if("number"===e)return u(t);if("boolean"===e)return s(t);if("any"===e)return r(t);if("mixed"===e)return p(t);if("empty"===e)return a(t);if("void"===e)return x(t);if(n)return!1;throw new Error(`Unknown base type ${e}`)}return _s}(),p=ca(),u=ha(),h=Ba(),d=Ua(),f=Qa(),m=f,y=ea(),T=ia(),g=qa(),x=function(){if($a)return Ha;$a=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.addComment=function(e,n,r){t(this.node,e,n,r)},Ha.addComments=function(e,t){n(this.node,e,t)},Ha.shareCommentsWithSiblings=function(){if("string"==typeof this.key)return;const e=this.node;if(!e)return;const t=e.trailingComments,n=e.leadingComments;if(!t&&!n)return;const i=this.getSibling(this.key-1),s=this.getSibling(this.key+1),a=Boolean(i.node),o=Boolean(s.node);a&&(n&&i.addComments("trailing",r(n,i.node.trailingComments)),t&&!o&&i.addComments("trailing",t)),o&&(t&&s.addComments("leading",r(t,s.node.leadingComments)),n&&!a&&s.addComments("leading",n))};var e=Pr();const{addComment:t,addComments:n}=e;function r(e,t){if(null==t||!t.length)return e;const n=new Set(t);return e.filter(e=>!n.has(e))}return Ha}(),S=Zr();const{validate:b}=i,P=t("babel");kr.REMOVED=1,kr.SHOULD_STOP=2,kr.SHOULD_SKIP=4;const E=kr.default=class e{constructor(e,t){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=t,this.hub=e,this.data=null,this.context=null,this.scope=null}get removed(){return(1&this._traverseFlags)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(2&this._traverseFlags)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(4&this._traverseFlags)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:n,parent:r,container:i,listKey:s,key:o}){if(!t&&n&&(t=n.hub),!r)throw new Error("To get a node path the parent needs to exist");const l=i[o],c=a.getOrCreateCachedPaths(r,n);let p=c.get(l);return p||(p=new e(t,r),l&&c.set(l,p)),f.setup.call(p,n,i,s,o),p}getScope(e){return this.isScope()?new r.default(this):e}setData(e,t){return null==this.data&&(this.data=Object.create(null)),this.data[e]=t}getData(e,t){null==this.data&&(this.data=Object.create(null));let n=this.data[e];return void 0===n&&void 0!==t&&(n=this.data[e]=t),n}hasNode(){return null!=this.node}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,n.default)(this.node,e,this.scope,t,this)}set(e,t){b(this.node,e,t),this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let n=t.key;t.inList&&(n=`${t.listKey}[${n}]`),e.unshift(n)}while(t=t.parentPath);return e.join(".")}debug(e){P.enabled&&P(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,o.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},v={findParent:l.findParent,find:l.find,getFunctionParent:l.getFunctionParent,getStatementParent:l.getStatementParent,getEarliestCommonAncestorFrom:l.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:l.getDeepestCommonAncestorFrom,getAncestry:l.getAncestry,isAncestor:l.isAncestor,isDescendant:l.isDescendant,inType:l.inType,getTypeAnnotation:c.getTypeAnnotation,isBaseType:c.isBaseType,couldBeBaseType:c.couldBeBaseType,baseTypeStrictlyMatches:c.baseTypeStrictlyMatches,isGenericType:c.isGenericType,replaceWithMultiple:p.replaceWithMultiple,replaceWithSourceString:p.replaceWithSourceString,replaceWith:p.replaceWith,replaceExpressionWithStatements:p.replaceExpressionWithStatements,replaceInline:p.replaceInline,evaluateTruthy:u.evaluateTruthy,evaluate:u.evaluate,toComputedKey:h.toComputedKey,ensureBlock:h.ensureBlock,unwrapFunctionEnvironment:h.unwrapFunctionEnvironment,arrowFunctionToExpression:h.arrowFunctionToExpression,splitExportDeclaration:h.splitExportDeclaration,ensureFunctionName:h.ensureFunctionName,matchesPattern:d.matchesPattern,isStatic:d.isStatic,isNodeType:d.isNodeType,canHaveVariableDeclarationOrExpression:d.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:d.canSwapBetweenExpressionAndStatement,isCompletionRecord:d.isCompletionRecord,isStatementOrBlock:d.isStatementOrBlock,referencesImport:d.referencesImport,getSource:d.getSource,willIMaybeExecuteBefore:d.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:d._guessExecutionStatusRelativeTo,resolve:d.resolve,isConstantExpression:d.isConstantExpression,isInStrictMode:d.isInStrictMode,isDenylisted:m.isDenylisted,visit:m.visit,skip:m.skip,skipKey:m.skipKey,stop:m.stop,setContext:m.setContext,requeue:m.requeue,requeueComputedKeyAndDecorators:m.requeueComputedKeyAndDecorators,remove:y.remove,insertBefore:T.insertBefore,insertAfter:T.insertAfter,unshiftContainer:T.unshiftContainer,pushContainer:T.pushContainer,getOpposite:g.getOpposite,getCompletionRecords:g.getCompletionRecords,getSibling:g.getSibling,getPrevSibling:g.getPrevSibling,getNextSibling:g.getNextSibling,getAllNextSiblings:g.getAllNextSiblings,getAllPrevSiblings:g.getAllPrevSiblings,get:g.get,getAssignmentIdentifiers:g.getAssignmentIdentifiers,getBindingIdentifiers:g.getBindingIdentifiers,getOuterBindingIdentifiers:g.getOuterBindingIdentifiers,getBindingIdentifierPaths:g.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:g.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:x.shareCommentsWithSiblings,addComment:x.addComment,addComments:x.addComments};Object.assign(E.prototype,v),E.prototype.arrowFunctionToShadowed=h[String("arrowFunctionToShadowed")],Object.assign(E.prototype,{has:d[String("has")],is:d[String("is")],isnt:d[String("isnt")],equals:d[String("equals")],hoist:T[String("hoist")],updateSiblingKeys:T.updateSiblingKeys,call:m.call,isBlacklisted:m[String("isBlacklisted")],setScope:m.setScope,resync:m.resync,popContext:m.popContext,pushContext:m.pushContext,setup:m.setup,setKey:m.setKey}),E.prototype._guessExecutionStatusRelativeToDifferentFunctions=d._guessExecutionStatusRelativeTo,E.prototype._guessExecutionStatusRelativeToDifferentFunctions=d._guessExecutionStatusRelativeTo,Object.assign(E.prototype,{_getTypeAnnotation:c._getTypeAnnotation,_replaceWith:p._replaceWith,_resolve:d._resolve,_call:m._call,_resyncParent:m._resyncParent,_resyncKey:m._resyncKey,_resyncList:m._resyncList,_resyncRemoved:m._resyncRemoved,_getQueueContexts:m._getQueueContexts,_removeFromScope:y._removeFromScope,_callRemovalHooks:y._callRemovalHooks,_remove:y._remove,_markRemoved:y._markRemoved,_assertUnremoved:y._assertUnremoved,_containerInsert:T._containerInsert,_containerInsertBefore:T._containerInsertBefore,_containerInsertAfter:T._containerInsertAfter,_verifyNodeList:T._verifyNodeList,_getKey:g._getKey,_getPattern:g._getPattern});for(const e of s.TYPES){const t=`is${e}`,n=s[t];E.prototype[t]=function(e){return n(this.node,e)},E.prototype[`assert${e}`]=function(t){if(!n(this.node,t))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(E.prototype,S);for(const t of Object.keys(e))"_"!==t[0]&&(s.TYPES.includes(t)||s.TYPES.push(t));return kr}function Ga(){if(Ja)return wr;Ja=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.traverseNode=function(t,r,i,s,a,o,l){const c=n[t.type];if(!c)return!1;const p=new e.default(i,r,s,a);if(l)return(null==o||!o[a.parentKey])&&p.visitQueue([a]);for(const e of c)if((null==o||!o[e])&&p.visit(t,e))return!0;return!1};var e=function(){if(Ya)return Ir;Ya=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.default=void 0;var e=za(),t=Pr(),n=Qa();const{VISITOR_KEYS:r}=t;return Ir.default=class{constructor(e,t,n,r){this.queue=null,this.priorityQueue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const n=r[e.type];if(null==n||!n.length)return!1;for(const t of n)if(e[t])return!0;return!1}create(t,n,r,i){return e.default.get({parentPath:this.parentPath,parent:t,container:n,key:r,listKey:i})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(0===e.length)return!1;const r=[];for(let i=0;i<e.length;i++){const s=e[i];s&&this.shouldVisit(s)&&r.push(this.create(t,e,i,n))}return this.visitQueue(r)}visitSingle(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])}visitQueue(e){this.queue=e,this.priorityQueue=[];const t=new WeakSet;let r=!1,i=0;for(;i<e.length;){const s=e[i];if(i++,n.resync.call(s),0!==s.contexts.length&&s.contexts[s.contexts.length-1]===this||n.pushContext.call(s,this),null===s.key)continue;const{node:a}=s;if(!t.has(a)){if(a&&t.add(a),s.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(let t=0;t<i;t++)n.popContext.call(e[t]);return this.queue=null,r}visit(e,t){const n=e[t];return!!n&&(Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t))}},Ir}();za();var t=Pr();Qa();const{VISITOR_KEYS:n}=t;return wr}function Qa(){if(Xa)return Cr;Xa=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr._call=s,Cr._getQueueContexts=function(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t},Cr._resyncKey=p,Cr._resyncList=u,Cr._resyncParent=c,Cr._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||n._markRemoved.call(this)},Cr.call=i,Cr.isDenylisted=a,Cr.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},Cr.pushContext=function(e){this.contexts.push(e),this.setContext(e)},Cr.requeue=function(e=this){if(e.removed)return;const t=this.contexts;for(const n of t)n.maybeQueue(e)},Cr.requeueComputedKeyAndDecorators=function(){const{context:e,node:t}=this;!r.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key"));if(t.decorators)for(const t of this.get("decorators"))e.maybeQueue(t)},Cr.resync=function(){if(this.removed)return;c.call(this),u.call(this),p.call(this)},Cr.setContext=function(e){null!=this.skipKeys&&(this.skipKeys={});this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts);return l.call(this),this},Cr.setKey=h,Cr.setScope=l,Cr.setup=function(e,t,n,r){this.listKey=n,this.container=t,this.parentPath=e||this.parentPath,h.call(this,r)},Cr.skip=function(){this.shouldSkip=!0},Cr.skipKey=function(e){null==this.skipKeys&&(this.skipKeys={});this.skipKeys[e]=!0},Cr.stop=function(){this._traverseFlags|=t.SHOULD_SKIP|t.SHOULD_STOP},Cr.visit=function(){var t,n;if(!this.node)return!1;if(this.isDenylisted())return!1;if(null!=(t=(n=this.opts).shouldSkip)&&t.call(n,this))return!1;const r=this.context;if(this.shouldSkip||i.call(this,"enter"))return this.debug("Skip..."),this.shouldStop;return o(this,r),this.debug("Recursing into..."),this.shouldStop=(0,e.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),o(this,r),i.call(this,"exit"),this.shouldStop};var e=Ga(),t=za(),n=ea(),r=Pr();function i(e){const t=this.opts;return this.debug(e),!(!this.node||!s.call(this,t[e]))||!!this.node&&s.call(this,null==(n=t[this.node.type])?void 0:n[e]);var n}function s(e){if(!e)return!1;for(const t of e){if(!t)continue;const e=this.node;if(!e)return!0;const n=t.call(this.state,this,this.state);if(n&&"object"==typeof n&&"function"==typeof n.then)throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==e)return!0;if(this._traverseFlags>0)return!0}return!1}function a(){var e;const t=null!=(e=this.opts.denylist)?e:this.opts.blacklist;return null==t?void 0:t.includes(this.node.type)}function o(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function l(){var e,t;if(null!=(e=this.opts)&&e.noScope)return;let n,r=this.parentPath;for((("key"===this.key||"decorators"===this.listKey)&&r.isMethod()||"discriminant"===this.key&&r.isSwitchStatement())&&(r=r.parentPath);r&&!n;){var i;if(null!=(i=r.opts)&&i.noScope)return;n=r.scope,r=r.parentPath}this.scope=this.getScope(n),null==(t=this.scope)||t.init()}function c(){this.parentPath&&(this.parent=this.parentPath.node)}function p(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node)return void h.call(this,e)}else for(const e of Object.keys(this.container))if(this.container[e]===this.node)return void h.call(this,e);this.key=null}}function u(){if(!this.parent||!this.inList)return;const e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function h(e){var t;this.key=e,this.node=this.container[this.key],this.type=null==(t=this.node)?void 0:t.type}return Cr.isBlacklisted=a,Cr}var Za,eo,to={};function no(){return eo||(eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Hub",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"NodePath",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.default}}),e.visitors=e.default=void 0,Qa();var t=ei();e.visitors=t;var n=Pr(),r=oi(),i=Ga(),s=za(),a=ui(),o=(Za||(Za=1,Object.defineProperty(to,"__esModule",{value:!0}),to.default=void 0,to.default=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,n=TypeError){return new n(t)}}),to);const{VISITOR_KEYS:l,removeProperties:c,traverseFast:p}=n;function u(e,n={},r,s,a,o){if(e){if(!n.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!a&&o)throw new Error("visitSelf can only be used when providing a NodePath.");l[e.type]&&(t.explode(n),(0,i.traverseNode)(e,n,r,s,a,void 0,o))}}e.default=u,u.visitors=t,u.verify=t.verify,u.explode=t.explode,u.cheap=function(e,t){p(e,t)},u.node=function(e,t,n,r,s,a){(0,i.traverseNode)(e,t,n,r,s,a)},u.clearNode=function(e,t){c(e,t)},u.removeProperties=function(e,t){return p(e,u.clearNode,t),e},u.hasType=function(e,t,n){return(null==n||!n.includes(e.type))&&(e.type===t||p(e,function(e){return null!=n&&n.includes(e.type)?p.skip:e.type===t?p.stop:void 0}))},u.cache=r}(Ar)),Ar}var ro=x(no()),io=x(la());function so(e){return io.parse(e,{sourceType:"module",plugins:["jsx","typescript","classProperties","dynamicImport","exportDefaultFrom","exportNamespaceFrom","functionBind","nullishCoalescingOperator","objectRestSpread","optionalChaining","decorators-legacy"],allowAwaitOutsideFunction:!0})}const ao={is:e=>vr.isStringLiteral(e),get:e=>e.value},oo={is:e=>vr.isNumericLiteral(e),get:e=>e.value},lo={is:e=>vr.isBooleanLiteral(e),get:e=>e.value},co={is:e=>vr.isNullLiteral(e),get:e=>null},po={is:e=>vr.isIdentifier(e)&&"undefined"===e.name,get(e){}},uo={is:e=>vr.isObjectExpression(e),get:e=>go(e)},ho={is:e=>vr.isClass(e),get:e=>function(e){function t(e){return"static"in e&&!0===e.static}let n=e.body;if(!vr.isClassBody(n))return;const r={};return n.body.forEach(e=>{if(t(e)&&vr.isIdentifier(e.key))if(vr.isMethod(e)||vr.isTSDeclareMethod(e))r[e.key.name]=()=>{};else{const t=To.find(t=>t.is(e.value));t&&(r[e.key.name]=t.get(e.value))}}),r}(e)},fo={is:e=>vr.isArrayExpression(e),get:e=>xo(e)},mo={is:e=>vr.isFunctionExpression(e),get:e=>function(){}},yo={is:e=>vr.isArrowFunctionExpression(e),get:e=>()=>{}},To=[ao,oo,lo,co,po,uo,fo,ho,mo,yo];function go(e){const t={};return e.properties.forEach(e=>{if(vr.isObjectMember(e)&&vr.isIdentifier(e.key))if(vr.isObjectMethod(e))t[e.key.name]=()=>{};else{const n=To.find(t=>t.is(e.value));n&&(t[e.key.name]=n.get(e.value))}}),t}function xo(e){const t=[];return e.elements.forEach(e=>{const n=To.find(t=>t.is(e));n&&t.push(n.get(e))}),t}function So(e){const t=so(e);let n;return ro(t,{Program:{enter(e){const t=e.node,r=function(e){for(const t of e.body)if(vr.isExportDefaultDeclaration(t))return t.declaration;return null}(t);if(r)if(vr.isIdentifier(r)){const{name:e}=r;n=function(e){const t={};for(const n of e.programNode.body){let r=n;if(vr.isExpressionStatement(r)&&(r=r.expression),vr.isAssignmentExpression(r)&&vr.isMemberExpression(r.left)&&vr.isIdentifier(r.left.object)&&r.left.object.name===e.name){const e=To.find(e=>e.is(vr.isAssignmentExpression(r)&&r.right));e&&(t[r.left.property.name]=e.get(r.right))}}return t}({programNode:t,name:e})}else if(vr.isObjectExpression(r))n=go(r);else if(vr.isArrayExpression(r))n=xo(r);else{const e=To.find(e=>e.is(r));e&&(n=e.get(r))}}}}),n}function bo(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")}const Po={javascript:[".ts",".tsx",".js",".jsx"],css:[".less",".sass",".scss",".stylus",".css"]};function Eo(e){const n=Po[e.type];for(const r of n){const n=`${e.fileNameWithoutExt}${r}`,i=bo(t(e.base,n));if(o(i))return{path:i,filename:n}}return null}const vo=/^\[(.+?)\]/;function Ao(e){return o(e)?l(e).filter(n=>{const r=t(e,n),i=c(r),s=i.isDirectory(),a=i.isFile();if(s&&["components","component","utils","util"].includes(n))return!1;if("."===n.charAt(0))return!1;if("_"===n.charAt(0))return!1;if(/\.(test|spec|e2e)\.(j|t)sx?$/.test(n))return!1;if(/\.d\.ts$/.test(n))return!1;if(a){if(!/\.(j|t)sx?$/.test(n))return!1;const e=p(r,"utf-8");try{if(!function(e){const t=so(e);let n=!1;return ro(t,{JSXElement(e){n=!0,e.stop()},JSXFragment(e){n=!0,e.stop()}}),n}(e))return!1}catch(e){throw new Error(`Parse conventional route component ${r} failed, ${e.message}`)}}return!0}):[]}function Co(e,i,s){const{root:a,relDir:o=""}=e,l=t(a,o,s),p=c(l),u=vo.test(s);if(p.isDirectory()){const n=t(o,s),r=Eo({base:t(a,n),fileNameWithoutExt:"_layout",type:"javascript"}),l={path:Io(n),routes:ko({...e,relDir:t(n)}),__isDynamic:u,...r?{component:r.path}:{exact:!0,__toMerge:!0}};i.push(wo(l,e))}else{const a=n(s,r(s));i.push(wo({path:Io(t(o,a)),exact:!0,component:l,__isDynamic:u},e))}return i}function wo(e,n){let r;if(e.component){try{r=So(p(e.component,"utf-8"))}catch(t){throw new Error(`Parse conventional route component ${e.component} failed, ${t.message}`)}e.component=bo(i(t(n.root,".."),e.component)),e.component=`${n.componentPrefix||"@/"}${e.component}`}return{...e,..."object"==typeof r?r:{}}}function Io(e,t){return"/index/index"===(e=`/${e=bo(e).split("/").map(e=>((e=e.replace(vo,":$1")).endsWith("$")&&(e=e.slice(0,-1)+"?"),e)).join("/")}`)&&(e="/"),"/"!==(e=e.replace(/\/index$/,"/"))&&"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function ko(e){const{root:n,relDir:r="",config:i}=e,s=function(e){const t=[],n=[],r=[];return e.forEach(e=>{const{__isDynamic:i,exact:s}=e;delete e.__isDynamic,i?t.push(e):s?n.push(e):r.push(e)}),m(t.length<=1,"We should not have multiple dynamic routes under a directory."),[...n,...r,...t].reduce((e,t)=>(t.__toMerge&&t.routes?e=e.concat(t.routes):e.push(t),e),[])}(Ao(t(n,r)).reduce(Co.bind(null,e),[]));if(!r){const t=Eo({base:n,fileNameWithoutExt:`../${i.singular?"layout":"layouts"}/index`,type:"javascript"});if(t)return[wo({path:"/",component:t.path,routes:s},e)]}return s}function No(t){const n=e.extname(t);if(![".tsx",".ts",".jsx",".js"].includes(n))return!1;try{const e=a.readFileSync(t,"utf-8");return/export\s+default/.test(e)}catch{return!1}}function Oo(e){const t={path:e.path||""};if(void 0!==e.exact&&(t.exact=e.exact),e.component){const n=e.component.replace(/\.(tsx|ts|jsx|js)$/,"");t.component=`dynamic({ loader: () => import('${n}'), loading: LoadingComponent})`}return e.title&&"string"==typeof e.title&&(t.title=`$t({ defaultMessage: "${e.title}" })`),!0===e.keepAlive&&(t.keepAlive=!0),e.authority&&Array.isArray(e.authority)&&(t.authority=e.authority),e.routes&&e.routes.length>0&&(t.routes=e.routes.map(Oo)),t}async function _o(t,n){function r(e,t=2){const n=" ".repeat(t),i=" ".repeat(t+2);let s=`${n}{\n`;if(s+=`${i}path: '${e.path}',\n`,void 0!==e.exact&&null!==e.exact&&(s+=`${i}exact: ${e.exact},\n`),void 0!==e.component&&null!==e.component&&(s+=`${i}component: ${e.component},\n`),void 0!==e.title&&null!==e.title&&(s+=`${i}title: ${e.title},\n`),e.authority&&(s+=`${i}authority: ${JSON.stringify(e.authority)},\n`),e.keepAlive&&(s+=`${i}keepAlive: ${e.keepAlive},\n`),e.routes&&e.routes.length>0){s+=`${i}routes: [\n${e.routes.map(e=>r(e,t+2)).join(",\n")}\n${i}],\n`}return s=s.replace(/,\n$/,"\n"),s+=`${n}}`,s}const i=t.map(e=>r(e)).join(",\n"),s=`\n/* eslint-disable */\n// @ts-nocheck\n/**\n * 自动根据 pages 目录生成路由配置\n * 新增、删除、修改组件 title、keepAlive、authority 属性时,会自动更新路由配置\n * 路由组件只支持默认导出\n */\nimport { dynamic } from '@lemon-fe/vite-plugin-micro-frontend/runtime';\nimport LoadingComponent from '${n.defaultLoadingComponentPath||"@/components/loading"}';\nimport { $t } from '${n.intlPath||"@/utils/intl"}';\n\nexport const routers = [\n${i}\n];\n`;try{const t=e.resolve(process.cwd(),".prettierrc");let n={};if(a.existsSync(t))try{const e=a.readFileSync(t,"utf-8");n=JSON.parse(e)}catch(e){console.warn("⚠️ 读取 prettier 配置失败,使用默认配置:",e)}const r={parser:"typescript",...n};return await h.format(s,r)}catch(e){return console.error("格式化代码失败:",e),s}}function Do(t={}){const{pagesDir:n,outputPath:r,watch:i=!0,ignoreDirs:s=["components","utils","hooks","typings"],routeTemplate:o={}}=t;let l=!1,c=null,p=!1,h="";const d=n||e.resolve(process.cwd(),"src/pages"),f=r||e.resolve(process.cwd(),"src/routes.ts"),m=async()=>{if(!a.existsSync(d))return void console.warn("⚠️ pages 目录不存在:",d);const e=function(e,t){return ko({root:e,componentPrefix:t.pageAliasPrefix,config:{singular:!1}}).map(Oo)}(d,o),t=await _o(e,o);t!==h&&(h=t,a.writeFileSync(f,t),console.log("✅ 路由已生成:",f))},y=()=>{c&&(c.close(),c=null,l=!1)};return{name:"micro-frontend:routes",enforce:"pre",configureServer(e){p||(m(),p=!0),(()=>{if(l||!i)return;if(!a.existsSync(d))return;const e=["**/node_modules/**","**/*.d.ts","**/*.less","**/*.css","**/*.scss","**/*.sass",f,...s.map(e=>`**/${e}/**`)];c=u.watch(d,{ignored:e,persistent:!0,ignoreInitial:!0}),c.on("add",e=>{No(e)&&m()}).on("unlink",e=>{No(e)&&m()}).on("addDir",e=>{m()}).on("unlinkDir",e=>{m()}).on("error",e=>{console.error("❌ 文件监听错误:",e)}),l=!0})(),e.httpServer?.on("close",y)},buildStart(){p||(m(),p=!0)}}}function Lo(t){const{remotes:n,outputPath:r}=t,i=r||e.resolve(process.cwd(),"src/utils/mf.tsx"),s=()=>{const t=function(e){const t=function(e){return e.reduce((e,t)=>(e[t.aliasName||t.remoteName]=t,e),{})}(e),n=JSON.stringify(t,null,2);return"/* eslint-disable */\nimport { lazy, Suspense, type ReactNode, type ComponentType } from 'react';\n\n// 远程模块配置\nconst remotes = __REMOTES_JSON__ as const;\n\ntype RemoteAlias = keyof typeof remotes;\ntype ModuleSpecifier = `${RemoteAlias}/${string}`;\n\n// 多个入口文件之间共享的变量\nconst entryShared = (window as any).__entry_shared__ || {};\n\n// 脚本加载状态: undefined=未加载, Promise=加载中, true=已完成\nconst scriptCache: Record<string, Promise<void> | true | undefined> = {};\n\n/**\n * 获取多入口共享变量(懒初始化单例)\n */\nexport function getEntryShared<T>(key: string, init: () => T): T {\n return (entryShared[key] ??= init()) as T;\n}\n\n/**\n * 安全加载远程组件\n */\nexport function safeRemoteComponent<T extends ComponentType<any>>(opts: {\n moduleSpecifier: ModuleSpecifier;\n fallbackComponent: T;\n loadingElement?: ReactNode;\n}): T {\n const LazyComponent = lazy<T>(() =>\n loadRemoteModule(opts.moduleSpecifier, { default: opts.fallbackComponent }),\n );\n\n return ((props: any) => (\n <Suspense fallback={opts.loadingElement ?? null}>\n <LazyComponent {...props} />\n </Suspense>\n )) as T;\n}\n\n// ============ 内部实现 ============\n\nasync function loadRemoteModule<T>(specifier: ModuleSpecifier, fallback: T): Promise<T> {\n try {\n const slashIndex = specifier.indexOf('/');\n const alias = specifier.slice(0, slashIndex) as RemoteAlias;\n const moduleName = specifier.slice(slashIndex + 1);\n const remote = remotes[alias];\n\n if (!remote) {\n console.error(`[MF] Unknown remote alias: \"${alias}\"`);\n return fallback;\n }\n\n await loadScriptOnce(remote.remoteName, remote.entry);\n\n const container = (window as any)[remote.remoteName];\n const factory = await container.get(`./${moduleName}`);\n return factory();\n } catch (e) {\n return fallback;\n }\n}\n\nasync function loadScriptOnce(name: string, url: string): Promise<void> {\n const cached = scriptCache[name];\n\n if (cached === true) return;\n if (cached) return cached;\n\n const promise = new Promise<void>((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${url}?t=${Date.now()}`;\n script.async = true;\n script.onload = () => resolve();\n script.onerror = reject;\n document.head.appendChild(script);\n }).then(\n () => {\n scriptCache[name] = true;\n },\n e => {\n scriptCache[name] = undefined;\n throw e;\n },\n );\n\n scriptCache[name] = promise;\n return promise;\n}\n\n// ==== Vite Module Federation 动态加载 ===\n\ntype RemoteComponentOptions<P = any> = {\n /** 远程模块加载函数,如 () => import('remoteApp/Component') */\n loader: () => Promise<{ default: ComponentType<P> }>;\n /** 加载失败时的回退组件 */\n fallback?: ComponentType<P>;\n /** 加载中显示的元素 */\n loading?: ReactNode;\n};\n\n/**\n * 创建一个动态加载的远程联邦组件\n * @example\n * const RemoteButton = createRemoteComponent({\n * loader: () => import('remoteApp/Button'),\n * fallback: () => <div>加载失败</div>,\n * loading: <Spin />,\n * });\n */\nexport function createRemoteComponent<P extends object = {}>(\n options: RemoteComponentOptions<P>,\n): ComponentType<P> {\n const { loader, fallback: Fallback, loading = null } = options;\n\n const LazyComponent = lazy(() =>\n loader().catch(error => {\n if (Fallback) {\n return { default: Fallback };\n }\n throw error;\n }),\n );\n\n const RemoteWrapper: React.FC<P> = props => (\n <Suspense fallback={loading}>\n {/* @ts-expect-error: 类型不完全匹配,但实际可以正常渲染 */}\n <LazyComponent {...props} />\n </Suspense>\n );\n\n return RemoteWrapper as ComponentType<P>;\n}\n\n".replace("__REMOTES_JSON__",n)}(n),r=e.dirname(i);if(a.existsSync(r)||a.mkdirSync(r,{recursive:!0}),a.existsSync(i)){if(a.readFileSync(i,"utf-8")===t)return}a.writeFileSync(i,t),console.log("✅ mf.tsx 已生成:",i)};return{name:"micro-frontend:mf-generator",enforce:"pre",configResolved(){s()},buildStart(){s()}}}function Mo(e){return e.replace(/\\/g,"/")}function Fo(t){const n=function(t){const n={},r=[".tsx",".ts"];if(!a.existsSync(t))return n;const i=a.readdirSync(t,{withFileTypes:!0});for(const s of i)if(s.isDirectory()){const r=e.join(t,s.name),i=["index.tsx","index.ts"];let o=null;for(const t of i){const n=e.join(r,t);if(a.existsSync(n)){o=n;break}}if(o){const t=Mo(e.relative(process.cwd(),o));n[`./${s.name}`]=`./${t}`}else console.warn(`⚠️ ${s.name} 目录下没有找到入口文件,已忽略`)}else{const i=e.extname(s.name);if(r.includes(i)){const r=e.join(t,s.name),a=Mo(e.relative(process.cwd(),r));n[`./${e.basename(s.name,i)}`]=`./${a}`}}return n}(e.resolve(process.cwd(),t.exposesDir??"src/exposes"));return{...n,...t.exposes||{}}}function Bo(t){const n=[],r=function(e,t){if(!e||0===e.length)return;const n={};for(const r of e){const{remoteName:e,entry:i}=r;let s;s=i.startsWith("http")?i:t?`${t.endsWith("/")?t.slice(0,-1):t}${i.startsWith("/")?i:`/${i}`}`:{external:`Promise.resolve(window.location.origin + '${i}')`,externalType:"promise"},n[e]=s}return n}(t.remotes,t.devHost),i=Fo(t);return n.push(y({name:t.name,filename:t.filename||"remote.js",exposes:i,shared:t.shared,remotes:r})),t.remotes&&t.remotes.length>0&&n.push(Lo({remotes:t.remotes,outputPath:t.outputPath?e.resolve(process.cwd(),t.outputPath):"src/utils/mf.tsx"})),n}var jo,Ro,Uo,Ko={exports:{}},Vo={};function qo(){if(Ro)return jo;Ro=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return jo=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,i){for(var s,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in s=Object(arguments[l]))t.call(s,c)&&(o[c]=s[c]);if(e){a=e(s);for(var p=0;p<a.length;p++)n.call(s,a[p])&&(o[a[p]]=s[a[p]])}}return o},jo}function $o(){if(Uo)return Vo;Uo=1;var e=qo(),t=60103,n=60106;Vo.Fragment=60107,Vo.StrictMode=60108,Vo.Profiler=60114;var r=60109,i=60110,s=60112;Vo.Suspense=60113;var a=60115,o=60116;if("function"==typeof Symbol&&Symbol.for){var l=Symbol.for;t=l("react.element"),n=l("react.portal"),Vo.Fragment=l("react.fragment"),Vo.StrictMode=l("react.strict_mode"),Vo.Profiler=l("react.profiler"),r=l("react.provider"),i=l("react.context"),s=l("react.forward_ref"),Vo.Suspense=l("react.suspense"),a=l("react.memo"),o=l("react.lazy")}var c="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function d(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||u}function f(){}function m(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||u}d.prototype.isReactComponent={},d.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},d.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},f.prototype=d.prototype;var y=m.prototype=new f;y.constructor=m,e(y,d.prototype),y.isPureReactComponent=!0;var T={current:null},g=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,n,r){var i,s={},a=null,o=null;if(null!=n)for(i in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(a=""+n.key),n)g.call(n,i)&&!x.hasOwnProperty(i)&&(s[i]=n[i]);var l=arguments.length-2;if(1===l)s.children=r;else if(1<l){for(var c=Array(l),p=0;p<l;p++)c[p]=arguments[p+2];s.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===s[i]&&(s[i]=l[i]);return{$$typeof:t,type:e,key:a,ref:o,props:s,_owner:T.current}}function b(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var P=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function v(e,r,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case t:case n:l=!0}}if(l)return a=a(l=e),e=""===s?"."+E(l,0):s,Array.isArray(a)?(i="",null!=e&&(i=e.replace(P,"$&/")+"/"),v(a,r,i,"",function(e){return e})):null!=a&&(b(a)&&(a=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),r.push(a)),1;if(l=0,s=""===s?".":s+":",Array.isArray(e))for(var u=0;u<e.length;u++){var h=s+E(o=e[u],u);l+=v(o,r,i,h,a)}else if(h=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=c&&e[c]||e["@@iterator"])?e:null}(e),"function"==typeof h)for(e=h.call(e),u=0;!(o=e.next()).done;)l+=v(o=o.value,r,i,h=s+E(o,u++),a);else if("object"===o)throw r=""+e,Error(p(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r));return l}function A(e,t,n){if(null==e)return e;var r=[],i=0;return v(e,r,"","",function(e){return t.call(n,e,i++)}),r}function C(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}if(1===e._status)return e._result;throw e._result}var w={current:null};function I(){var e=w.current;if(null===e)throw Error(p(321));return e}var k={ReactCurrentDispatcher:w,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:T,IsSomeRendererActing:{current:!1},assign:e};return Vo.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!b(e))throw Error(p(143));return e}},Vo.Component=d,Vo.PureComponent=m,Vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,Vo.cloneElement=function(n,r,i){if(null==n)throw Error(p(267,n));var s=e({},n.props),a=n.key,o=n.ref,l=n._owner;if(null!=r){if(void 0!==r.ref&&(o=r.ref,l=T.current),void 0!==r.key&&(a=""+r.key),n.type&&n.type.defaultProps)var c=n.type.defaultProps;for(u in r)g.call(r,u)&&!x.hasOwnProperty(u)&&(s[u]=void 0===r[u]&&void 0!==c?c[u]:r[u])}var u=arguments.length-2;if(1===u)s.children=i;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];s.children=c}return{$$typeof:t,type:n.type,key:a,ref:o,props:s,_owner:l}},Vo.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:i,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:r,_context:e},e.Consumer=e},Vo.createElement=S,Vo.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},Vo.createRef=function(){return{current:null}},Vo.forwardRef=function(e){return{$$typeof:s,render:e}},Vo.isValidElement=b,Vo.lazy=function(e){return{$$typeof:o,_payload:{_status:-1,_result:e},_init:C}},Vo.memo=function(e,t){return{$$typeof:a,type:e,compare:void 0===t?null:t}},Vo.useCallback=function(e,t){return I().useCallback(e,t)},Vo.useContext=function(e,t){return I().useContext(e,t)},Vo.useDebugValue=function(){},Vo.useEffect=function(e,t){return I().useEffect(e,t)},Vo.useImperativeHandle=function(e,t,n){return I().useImperativeHandle(e,t,n)},Vo.useLayoutEffect=function(e,t){return I().useLayoutEffect(e,t)},Vo.useMemo=function(e,t){return I().useMemo(e,t)},Vo.useReducer=function(e,t,n){return I().useReducer(e,t,n)},Vo.useRef=function(e){return I().useRef(e)},Vo.useState=function(e){return I().useState(e)},Vo.version="17.0.2",Vo}var Wo,Yo,Jo={};function Xo(){return Wo||(Wo=1,e=Jo,"production"!==process.env.NODE_ENV&&function(){var t=qo(),n=60103,r=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var i=60109,s=60110,a=60112;e.Suspense=60113;var o=60120,l=60115,c=60116,p=60121,u=60122,h=60117,d=60129,f=60131;if("function"==typeof Symbol&&Symbol.for){var m=Symbol.for;n=m("react.element"),r=m("react.portal"),e.Fragment=m("react.fragment"),e.StrictMode=m("react.strict_mode"),e.Profiler=m("react.profiler"),i=m("react.provider"),s=m("react.context"),a=m("react.forward_ref"),e.Suspense=m("react.suspense"),o=m("react.suspense_list"),l=m("react.memo"),c=m("react.lazy"),p=m("react.block"),u=m("react.server.block"),h=m("react.fundamental"),m("react.scope"),m("react.opaque.id"),d=m("react.debug_trace_mode"),m("react.offscreen"),f=m("react.legacy_hidden")}var y="function"==typeof Symbol&&Symbol.iterator;function T(e){if(null===e||"object"!=typeof e)return null;var t=y&&e[y]||e["@@iterator"];return"function"==typeof t?t:null}var g={current:null},x={current:null},S={},b=null;function P(e){b=e}S.setExtraStackFrame=function(e){b=e},S.getCurrentStack=null,S.getStackAddendum=function(){var e="";b&&(e+=b);var t=S.getCurrentStack;return t&&(e+=t()||""),e};var E={ReactCurrentDispatcher:g,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:t};function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];C("warn",e,n)}function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];C("error",e,n)}function C(e,t,n){var r=E.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map(function(e){return""+e});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}E.ReactDebugCurrentFrame=S;var w={};function I(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;w[i]||(A("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),w[i]=!0)}var k={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){I(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){I(e,"replaceState")},enqueueSetState:function(e,t,n,r){I(e,"setState")}},N={};function O(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||k}Object.freeze(N),O.prototype.isReactComponent={},O.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var _={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},D=function(e,t){Object.defineProperty(O.prototype,e,{get:function(){v("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var L in _)_.hasOwnProperty(L)&&D(L,_[L]);function M(){}function F(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||k}M.prototype=O.prototype;var B=F.prototype=new M;function j(e){return e.displayName||"Context"}function R(t){if(null==t)return null;if("number"==typeof t.tag&&A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case r:return"Portal";case e.Profiler:return"Profiler";case e.StrictMode:return"StrictMode";case e.Suspense:return"Suspense";case o:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return j(t)+".Consumer";case i:return j(t._context)+".Provider";case a:return d=t,f=t.render,m="ForwardRef",y=f.displayName||f.name||"",d.displayName||(""!==y?m+"("+y+")":m);case l:return R(t.type);case p:return R(t._render);case c:var n=t,u=n._payload,h=n._init;try{return R(h(u))}catch(e){return null}}var d,f,m,y;return null}B.constructor=F,t(B,O.prototype),B.isPureReactComponent=!0;var U,K,V,q=Object.prototype.hasOwnProperty,$={key:!0,ref:!0,__self:!0,__source:!0};function W(e){if(q.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function Y(e){if(q.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}V={};var J=function(e,t,r,i,s,a,o){var l={$$typeof:n,type:e,key:t,ref:r,props:o,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function X(e,t,n){var r,i={},s=null,a=null,o=null,l=null;if(null!=t)for(r in W(t)&&(a=t.ref,function(e){if("string"==typeof e.ref&&x.current&&e.__self&&x.current.stateNode!==e.__self){var t=R(x.current.type);V[t]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),V[t]=!0)}}(t)),Y(t)&&(s=""+t.key),o=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)q.call(t,r)&&!$.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(c>1){for(var p=Array(c),u=0;u<c;u++)p[u]=arguments[u+2];Object.freeze&&Object.freeze(p),i.children=p}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}if(s||a){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){U||(U=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,d),a&&function(e,t){var n=function(){K||(K=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,d)}return J(e,s,a,o,l,x.current,i)}function H(e,n,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i,s,a=t({},e.props),o=e.key,l=e.ref,c=e._self,p=e._source,u=e._owner;if(null!=n)for(i in W(n)&&(l=n.ref,u=x.current),Y(n)&&(o=""+n.key),e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)q.call(n,i)&&!$.hasOwnProperty(i)&&(void 0===n[i]&&void 0!==s?a[i]=s[i]:a[i]=n[i]);var h=arguments.length-2;if(1===h)a.children=r;else if(h>1){for(var d=Array(h),f=0;f<h;f++)d[f]=arguments[f+2];a.children=d}return J(e.type,o,l,c,p,u,a)}function z(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var G=!1,Q=/\/+/g;function Z(e){return e.replace(Q,"$&/")}function ee(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function te(e,t,i,s,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l,c,p,u=!1;if(null===e)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u){var h=e,d=a(h),f=""===s?"."+ee(h,0):s;if(Array.isArray(d)){var m="";null!=f&&(m=Z(f)+"/"),te(d,t,m,"",function(e){return e})}else null!=d&&(z(d)&&(l=d,c=i+(!d.key||h&&h.key===d.key?"":Z(""+d.key)+"/")+f,d=J(l.type,c,l.ref,l._self,l._source,l._owner,l.props)),t.push(d));return 1}var y=0,g=""===s?".":s+":";if(Array.isArray(e))for(var x=0;x<e.length;x++)y+=te(p=e[x],t,i,g+ee(p,x),a);else{var S=T(e);if("function"==typeof S){var b=e;S===b.entries&&(G||v("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G=!0);for(var P,E=S.call(b),A=0;!(P=E.next()).done;)y+=te(p=P.value,t,i,g+ee(p,A++),a)}else if("object"===o){var C=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===C?"object with keys {"+Object.keys(e).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}}return y}function ne(e,t,n){if(null==e)return e;var r=[],i=0;return te(e,r,"","",function(e){return t.call(n,e,i++)}),r}function re(e){if(-1===e._status){var t=(0,e._result)(),n=e;n._status=0,n._result=t,t.then(function(t){if(0===e._status){var n=t.default;void 0===n&&A("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",t);var r=e;r._status=1,r._result=n}},function(t){if(0===e._status){var n=e;n._status=2,n._result=t}})}if(1===e._status)return e._result;throw e._result}function ie(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===e.Profiler||t===d||t===e.StrictMode||t===e.Suspense||t===o||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===c||t.$$typeof===l||t.$$typeof===i||t.$$typeof===s||t.$$typeof===a||t.$$typeof===h||t.$$typeof===p||t[0]===u)}function se(){var e=g.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return e}var ae,oe,le,ce,pe,ue,he,de=0;function fe(){}fe.__reactDisabledLog=!0;var me,ye=E.ReactCurrentDispatcher;function Te(e,t,n){if(void 0===me)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);me=r&&r[1]||""}return"\n"+me+e}var ge,xe=!1,Se="function"==typeof WeakMap?WeakMap:Map;function be(e,n){if(!e||xe)return"";var r,i=ge.get(e);if(void 0!==i)return i;xe=!0;var s,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,s=ye.current,ye.current=null,function(){if(0===de){ae=console.log,oe=console.info,le=console.warn,ce=console.error,pe=console.group,ue=console.groupCollapsed,he=console.groupEnd;var e={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}de++}();try{if(n){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){r=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){r=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),c=r.stack.split("\n"),p=l.length-1,u=c.length-1;p>=1&&u>=0&&l[p]!==c[u];)u--;for(;p>=1&&u>=0;p--,u--)if(l[p]!==c[u]){if(1!==p||1!==u)do{if(p--,--u<0||l[p]!==c[u]){var h="\n"+l[p].replace(" at new "," at ");return"function"==typeof e&&ge.set(e,h),h}}while(p>=1&&u>=0);break}}}finally{xe=!1,ye.current=s,function(){if(0===--de){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},e,{value:ae}),info:t({},e,{value:oe}),warn:t({},e,{value:le}),error:t({},e,{value:ce}),group:t({},e,{value:pe}),groupCollapsed:t({},e,{value:ue}),groupEnd:t({},e,{value:he})})}de<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var d=e?e.displayName||e.name:"",f=d?Te(d):"";return"function"==typeof e&&ge.set(e,f),f}function Pe(e,t,n){return be(e,!1)}function Ee(t,n,r){if(null==t)return"";if("function"==typeof t)return be(t,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(t));if("string"==typeof t)return Te(t);switch(t){case e.Suspense:return Te("Suspense");case o:return Te("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case a:return Pe(t.render);case l:return Ee(t.type,n,r);case p:return Pe(t._render);case c:var i=t,s=i._payload,u=i._init;try{return Ee(u(s),n,r)}catch(e){}}return""}ge=new Se;var ve,Ae={},Ce=E.ReactDebugCurrentFrame;function we(e){if(e){var t=e._owner,n=Ee(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}function Ie(e){if(e){var t=e._owner;P(Ee(e.type,e._source,t?t.type:null))}else P(null)}function ke(){if(x.current){var e=R(x.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ve=!1;var Ne={};function Oe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ke();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Ne[n]){Ne[n]=!0;var r="";e&&e._owner&&e._owner!==x.current&&(r=" It was passed a child from "+R(e._owner.type)+"."),Ie(e),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),Ie(null)}}}function _e(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];z(r)&&Oe(r,t)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var i=T(e);if("function"==typeof i&&i!==e.entries)for(var s,a=i.call(e);!(s=a.next()).done;)z(s.value)&&Oe(s.value,t)}}function De(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==a&&n.$$typeof!==l)return;t=n.propTypes}if(t){var r=R(n);!function(e,t,n,r,i){var s=Function.call.bind(Object.prototype.hasOwnProperty);for(var a in e)if(s(e,a)){var o=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}o=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}!o||o instanceof Error||(we(i),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof o),we(null)),o instanceof Error&&!(o.message in Ae)&&(Ae[o.message]=!0,we(i),A("Failed %s type: %s",n,o.message),we(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||ve||(ve=!0,A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Le(t,r,i){var s,a,o=ie(t);if(!o){var l="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c,p=null!=(s=r)&&void 0!==(a=s.__source)?"\n\nCheck your code at "+a.fileName.replace(/^.*[\\\/]/,"")+":"+a.lineNumber+".":"";l+=p||ke(),null===t?c="null":Array.isArray(t)?c="array":void 0!==t&&t.$$typeof===n?(c="<"+(R(t.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):c=typeof t,A("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,l)}var u=X.apply(this,arguments);if(null==u)return u;if(o)for(var h=2;h<arguments.length;h++)_e(arguments[h],t);return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){Ie(e),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Ie(null);break}}null!==e.ref&&(Ie(e),A("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}(u):De(u),u}var Me=!1;try{var Fe=Object.freeze({});new Map([[Fe,null]]),new Set([Fe])}catch(e){}var Be=Le,je=function(e,t,n){for(var r=H.apply(this,arguments),i=2;i<arguments.length;i++)_e(arguments[i],r.type);return De(r),r},Re=function(e){var t=Le.bind(null,e);return t.type=e,Me||(Me=!0,v("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return v("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},Ue={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!z(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};e.Children=Ue,e.Component=O,e.PureComponent=F,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E,e.cloneElement=je,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&A("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:i,_context:n};var r=!1,a=!1,o=!1,l={$$typeof:s,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(l,{Provider:{get:function(){return a||(a=!0,A("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,A("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),n.Consumer}},displayName:{get:function(){return n.displayName},set:function(e){o||(v("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),o=!0)}}}),n.Consumer=l,n._currentRenderer=null,n._currentRenderer2=null,n},e.createElement=Be,e.createFactory=Re,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){null!=e&&e.$$typeof===l?A("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?A("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&A("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||A("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:a,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,null==e.displayName&&(e.displayName=n)}}),n},e.isValidElement=z,e.lazy=function(e){var t,n,r={$$typeof:c,_payload:{_status:-1,_result:e},_init:re};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){A("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){A("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},e.memo=function(e,t){ie(e)||A("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:l,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,null==e.displayName&&(e.displayName=t)}}),r},e.useCallback=function(e,t){return se().useCallback(e,t)},e.useContext=function(e,t){var n=se();if(void 0!==t&&A("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?A("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&A("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},e.useDebugValue=function(e,t){return se().useDebugValue(e,t)},e.useEffect=function(e,t){return se().useEffect(e,t)},e.useImperativeHandle=function(e,t,n){return se().useImperativeHandle(e,t,n)},e.useLayoutEffect=function(e,t){return se().useLayoutEffect(e,t)},e.useMemo=function(e,t){return se().useMemo(e,t)},e.useReducer=function(e,t,n){return se().useReducer(e,t,n)},e.useRef=function(e){return se().useRef(e)},e.useState=function(e){return se().useState(e)},e.version="17.0.2"}()),Jo;var e}var Ho=(Yo||(Yo=1,"production"===process.env.NODE_ENV?Ko.exports=$o():Ko.exports=Xo()),Ko.exports);class zo extends Ho.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}render(){if(this.state.hasError&&this.state.error){if(function(e){const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Loading chunk")||t.includes("Loading CSS chunk")||"ChunkLoadError"===e.name||t.includes("Cannot find module")||t.includes("Failed to fetch")||t.includes("NetworkError")||t.includes("store")||t.includes("dispatch")||t.includes("reducer")}(this.state.error)&&this.props.LoadingComponent)return Ho.createElement(this.props.LoadingComponent,{error:this.state.error});throw this.state.error}return this.props.children}}function Go(e){const t=Ho.lazy(e.loader),n=e.loading;return function(e){const r=n?Ho.createElement(n):null;return Ho.createElement(zo,{LoadingComponent:n},Ho.createElement(Ho.Suspense,{fallback:r},Ho.createElement(t,e)))}}const Qo={pagesDir:"src/pages",outputPath:"src/routes.ts",watch:!0,ignoreDirs:["components","utils","hooks","typings"],routeTemplate:{defaultLoadingComponentPath:"@/components/loading",intlPath:"@/utils/intl"}};function Zo(t){const{appName:n,federation:r,routes:i,htmlTransform:a=!0,qiankun:o}=t,l=[];a&&l.push(T());const c="object"==typeof i?Object.assign(Qo,i):Qo;if(l.push(Do({pagesDir:c.pagesDir?e.resolve(process.cwd(),c.pagesDir):void 0,outputPath:c.outputPath?e.resolve(process.cwd(),c.outputPath):void 0,watch:c.watch,ignoreDirs:c.ignoreDirs,routeTemplate:c.routeTemplate})),!1!==o?.enabled){const e=o?.name||n,t="development"===process.env.NODE_ENV;l.push(s(e,{useDevMode:t}))}return r&&l.push(...Bo(r)),l}export{Go as dynamic,Bo as federationPlugin,ko as getRoutes,T as htmlRemoveFreshPlugin,Lo as mfGeneratorPlugin,Zo as microFrontendPlugins,Do as pagesRoutesPlugin};
|
|
14
14
|
//# sourceMappingURL=index.js.map
|