@ikas/storefront 2.0.0-alpha.5 → 2.0.0-alpha.8
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/build/_virtual/index.js_commonjs-proxy.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy10.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy11.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy12.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy13.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy5.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy6.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy7.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy8.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy9.js +1 -1
- package/build/ext/domhandler/lib/index.js +1 -1
- package/build/ext/domhandler/lib/node.js +1 -1
- package/build/ext/html-dom-parser/lib/server/html-to-dom.js +1 -1
- package/build/ikas.js +2 -2
- package/build/models/data/order/index.js +1 -1
- package/build/scripts/generators/api/index.d.ts +2 -2
- package/build/scripts/generators/api/index.js +1 -1
- package/build/scripts/generators/api/info.d.ts +4 -4
- package/build/scripts/generators/api/info.js +1 -1
- package/build/scripts/generators/components/index.d.ts +3 -3
- package/build/scripts/generators/components/index.js +1 -1
- package/build/scripts/generators/config/content.d.ts +3 -1
- package/build/scripts/generators/config/content.js +1 -1
- package/build/scripts/generators/config/index.d.ts +5 -5
- package/build/scripts/generators/config/index.js +1 -1
- package/build/scripts/generators/pages/index.d.ts +3 -3
- package/build/scripts/generators/pages/index.js +1 -1
- package/build/scripts/generators/store/index.d.ts +1 -1
- package/build/scripts/generators/store/index.js +1 -1
- package/build/scripts/generators/theme/index.d.ts +3 -3
- package/build/scripts/generators/theme/index.js +1 -1
- package/build/utils/fs.d.ts +2 -2
- package/build/utils/fs.js +1 -1
- package/package.json +4 -3
- package/build/_virtual/clone.js_commonjs-proxy.js +0 -1
- package/build/_virtual/copy-sync.js_commonjs-proxy.js +0 -1
- package/build/_virtual/copy.js_commonjs-proxy.js +0 -1
- package/build/_virtual/file.js_commonjs-proxy.js +0 -1
- package/build/_virtual/graceful-fs.js_commonjs-proxy.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy14.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy15.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy16.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy17.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy18.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy19.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy20.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy21.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy22.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy23.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy24.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy25.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy26.js +0 -1
- package/build/_virtual/index.js_commonjs-proxy27.js +0 -1
- package/build/_virtual/jsonfile.js_commonjs-proxy.js +0 -1
- package/build/_virtual/legacy-streams.js_commonjs-proxy.js +0 -1
- package/build/_virtual/link.js_commonjs-proxy.js +0 -1
- package/build/_virtual/make-dir.js_commonjs-proxy.js +0 -1
- package/build/_virtual/move-sync.js_commonjs-proxy.js +0 -1
- package/build/_virtual/move.js_commonjs-proxy.js +0 -1
- package/build/_virtual/output-json-sync.js_commonjs-proxy.js +0 -1
- package/build/_virtual/output-json.js_commonjs-proxy.js +0 -1
- package/build/_virtual/polyfills.js_commonjs-proxy.js +0 -1
- package/build/_virtual/rimraf.js_commonjs-proxy.js +0 -1
- package/build/_virtual/stat.js_commonjs-proxy.js +0 -1
- package/build/_virtual/symlink-paths.js_commonjs-proxy.js +0 -1
- package/build/_virtual/symlink-type.js_commonjs-proxy.js +0 -1
- package/build/_virtual/symlink.js_commonjs-proxy.js +0 -1
- package/build/_virtual/utils.js_commonjs-proxy.js +0 -1
- package/build/_virtual/utils.js_commonjs-proxy2.js +0 -1
- package/build/_virtual/utimes.js_commonjs-proxy.js +0 -1
- package/build/ext/fs-extra/ext/jsonfile/index.js +0 -1
- package/build/ext/fs-extra/ext/jsonfile/utils.js +0 -1
- package/build/ext/fs-extra/ext/universalify/index.js +0 -1
- package/build/ext/fs-extra/lib/copy/copy.js +0 -1
- package/build/ext/fs-extra/lib/copy/index.js +0 -1
- package/build/ext/fs-extra/lib/copy-sync/copy-sync.js +0 -1
- package/build/ext/fs-extra/lib/copy-sync/index.js +0 -1
- package/build/ext/fs-extra/lib/empty/index.js +0 -1
- package/build/ext/fs-extra/lib/ensure/file.js +0 -1
- package/build/ext/fs-extra/lib/ensure/index.js +0 -1
- package/build/ext/fs-extra/lib/ensure/link.js +0 -1
- package/build/ext/fs-extra/lib/ensure/symlink-paths.js +0 -1
- package/build/ext/fs-extra/lib/ensure/symlink-type.js +0 -1
- package/build/ext/fs-extra/lib/ensure/symlink.js +0 -1
- package/build/ext/fs-extra/lib/fs/index.js +0 -1
- package/build/ext/fs-extra/lib/index.js +0 -1
- package/build/ext/fs-extra/lib/json/index.js +0 -1
- package/build/ext/fs-extra/lib/json/jsonfile.js +0 -1
- package/build/ext/fs-extra/lib/json/output-json-sync.js +0 -1
- package/build/ext/fs-extra/lib/json/output-json.js +0 -1
- package/build/ext/fs-extra/lib/mkdirs/index.js +0 -1
- package/build/ext/fs-extra/lib/mkdirs/make-dir.js +0 -1
- package/build/ext/fs-extra/lib/mkdirs/utils.js +0 -1
- package/build/ext/fs-extra/lib/move/index.js +0 -1
- package/build/ext/fs-extra/lib/move/move.js +0 -1
- package/build/ext/fs-extra/lib/move-sync/index.js +0 -1
- package/build/ext/fs-extra/lib/move-sync/move-sync.js +0 -1
- package/build/ext/fs-extra/lib/output/index.js +0 -1
- package/build/ext/fs-extra/lib/path-exists/index.js +0 -1
- package/build/ext/fs-extra/lib/remove/index.js +0 -1
- package/build/ext/fs-extra/lib/remove/rimraf.js +0 -1
- package/build/ext/fs-extra/lib/util/stat.js +0 -1
- package/build/ext/fs-extra/lib/util/utimes.js +0 -1
- package/build/ext/graceful-fs/clone.js +0 -1
- package/build/ext/graceful-fs/graceful-fs.js +0 -1
- package/build/ext/graceful-fs/legacy-streams.js +0 -1
- package/build/ext/graceful-fs/polyfills.js +0 -1
package/build/ikas.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import e from"path";import t from"fs";import n from"constants";import r from"stream";import o from"util";import i from"assert";var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){var t={exports:{}};return e(t,t.exports),t.exports}var c=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,u=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="[\\ud800-\\udfff]",p="["+l+"]",d="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",h="\\d+",v="[\\u2700-\\u27bf]",_="[a-z\\xdf-\\xf6\\xf8-\\xff]",y="[^\\ud800-\\udfff"+l+h+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",m="\\ud83c[\\udffb-\\udfff]",g="[^\\ud800-\\udfff]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",O="[\\ud800-\\udbff][\\udc00-\\udfff]",E="[A-Z\\xc0-\\xd6\\xd8-\\xde]",S="(?:"+_+"|"+y+")",w="(?:"+E+"|"+y+")",N="(?:"+d+"|"+m+")"+"?",T="[\\ufe0e\\ufe0f]?"+N+("(?:\\u200d(?:"+[g,b,O].join("|")+")[\\ufe0e\\ufe0f]?"+N+")*"),A="(?:"+[v,b,O].join("|")+")"+T,C="(?:"+[g+d+"?",d,b,O,f].join("|")+")",D=RegExp("['’]","g"),x=RegExp(d,"g"),k=RegExp(m+"(?="+m+")|"+C+T,"g"),I=RegExp([E+"?"+_+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[p,E,"$"].join("|")+")",w+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[p,E+S,"$"].join("|")+")",E+"?"+S+"+(?:['’](?:d|ll|m|re|s|t|ve))?",E+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",h,A].join("|"),"g"),P=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),L=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,j="object"==typeof s&&s&&s.Object===Object&&s,R="object"==typeof self&&self&&self.Object===Object&&self,V=j||R||Function("return this")();var F,U=(F={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(e){return null==F?void 0:F[e]});function B(e){return P.test(e)}function M(e){return B(e)?function(e){return e.match(k)||[]}(e):function(e){return e.split("")}(e)}var G=Object.prototype.toString,q=V.Symbol,K=q?q.prototype:void 0,W=K?K.toString:void 0;function $(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==G.call(e)}(e))return W?W.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function z(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function X(e){return null==e?"":$(e)}var Y,H=(Y=function(e,t,n){return t=t.toLowerCase(),e+(n?Z(X(t).toLowerCase()):t)},function(e){return function(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}(function(e,t,n){return e=X(e),void 0===(t=n?void 0:t)?function(e){return L.test(e)}(e)?function(e){return e.match(I)||[]}(e):function(e){return e.match(c)||[]}(e):e.match(t)||[]}(function(e){return(e=X(e))&&e.replace(u,U).replace(x,"")}(e).replace(D,"")),Y,"")});var J,Z=(J="toUpperCase",function(e){var t=B(e=X(e))?M(e):void 0,n=t?t[0]:e.charAt(0),r=t?z(t,1).join(""):e.slice(1);return n[J]()+r});var Q,ee=(Q=H)&&"object"==typeof Q&&"default"in Q?Q.default:Q;function te(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}function ne(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function re(e,t){const n=[],r=ne(arguments);return r.splice(0,2),ne(e).forEach(((e,o)=>{let i=[];r.forEach((t=>{"function"==typeof t?i=i.concat(t(e)):i.push(t)})),t(e)&&n.push({index:o,replaceWithValue:i})})),n.reverse().forEach((t=>{const n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)})),e}const oe={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class ie extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=te(e);else{e=process.argv.slice(0);const t=process.execArgv.some(fe)?1:2;e.splice(0,t)}e.forEach((e=>this.push(String(e))))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some((e=>oe.optEquals.test(e)))){const e=[];this.forEach((t=>{const n=t.match(oe.optEquals);n?e.push(n[1],n[2]):e.push(t)})),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&re(this,oe.combinedShort,se)}hasCombinedShortOptions(){return this.some((e=>oe.combinedShort.test(e)))}static from(e){const t=new this;return t.load(e),t}}function se(e){return(e=e.slice(1)).split("").map((e=>"-"+e))}function ae(e){return oe.optEquals.test(e)}function ce(e){return(oe.short.test(e)||oe.long.test(e))&&!oe.optEquals.test(e)}function ue(e){return oe.short.test(e)?e.match(oe.short)[1]:function(e){return oe.long.test(e)&&!ae(e)}(e)?e.match(oe.long)[1]:ae(e)?e.match(oe.optEquals)[1].replace(/^--/,""):null}function le(e){return!(ce(e)||oe.combinedShort.test(e)||oe.optEquals.test(e))}function fe(e){return["--eval","-e"].indexOf(e)>-1||e.startsWith("--eval=")}function pe(e){return"object"==typeof e&&null!==e}function de(e){return void 0!==e}function he(e){return"function"==typeof e}var ve={isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isPlainObject:function(e){return null!==e&&"object"==typeof e&&e.constructor===Object},isArrayLike:function(e){return pe(e)&&"number"==typeof e.length},isObject:pe,isDefined:de,isFunction:he,isClass:function(e){return!!he(e)&&/^class /.test(Function.prototype.toString.call(e))},isPrimitive:function(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}},isPromise:function(e){if(e){const t=de(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1},isIterable:function(e){return!(null===e||!de(e))&&("function"==typeof e[Symbol.iterator]||"function"==typeof e[Symbol.asyncIterator])}};class _e{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(const t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||ve.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}}class ye extends Array{validate(e){this.some((e=>!e.name))&&me("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition");let t;this.some((e=>e.type&&"function"!=typeof e.type))&&me("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");this.some((e=>(t=e,ve.isDefined(e.alias)&&ve.isNumber(e.alias))))&&me("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+t.name+" alias is -"+t.alias+"]");this.some((e=>(t=e,ve.isDefined(e.alias)&&1!==e.alias.length)))&&me("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character");this.some((e=>(t=e,"-"===e.alias)))&&me("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"');be(this.map((t=>e?t.name.toLowerCase():t.name)))&&me("INVALID_DEFINITIONS","Two or more option definitions have the same name");be(this.map((t=>e&&ve.isDefined(t.alias)?t.alias.toLowerCase():t.alias)))&&me("INVALID_DEFINITIONS","Two or more option definitions have the same alias");be(this.map((e=>e.defaultOption)))&&me("INVALID_DEFINITIONS","Only one option definition can be the defaultOption");this.some((e=>(t=e,e.isBoolean()&&e.defaultOption)))&&me("INVALID_DEFINITIONS",`A boolean option ["${t.name}"] can not also be the defaultOption.`)}get(e,t){if(ce(e)){if(oe.short.test(e)){const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>ve.isDefined(t.alias)&&t.alias.toLowerCase()===e))}return this.find((e=>e.alias===n))}{const n=ue(e);if(t){const e=n.toLowerCase();return this.find((t=>t.name.toLowerCase()===e))}return this.find((e=>e.name===n))}}return this.find((t=>t.name===e))}getDefault(){return this.find((e=>!0===e.defaultOption))}isGrouped(){return this.some((e=>e.group))}whereGrouped(){return this.filter(ge)}whereNotGrouped(){return this.filter((e=>!ge(e)))}whereDefaultValueSet(){return this.filter((e=>ve.isDefined(e.defaultValue)))}static from(e,t){if(e instanceof this)return e;const n=super.from(te(e),(e=>_e.create(e)));return n.validate(t),n}}function me(e,t){const n=new Error(t);throw n.name=e,n}function ge(e){return te(e.group).some((e=>e))}function be(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(t[r])return!0;ve.isDefined(r)&&(t[r]=!0)}}class Oe{constructor(e,t){this.options=Object.assign({},t),this.definitions=ye.from(e,this.options.caseInsensitive),this.argv=ie.from(this.options.argv),this.argv.hasCombinedShortOptions()&&re(this.argv,oe.combinedShort.test.bind(oe.combinedShort),(e=>(e=e.slice(1)).split("").map((t=>({origArg:`-${e}`,arg:"-"+t})))))}*[Symbol.iterator](){const e=this.definitions;let t,n,r,o,i,s=!1,a=!1;for(let c of this.argv){if(ve.isPlainObject(c)&&(i=c.origArg,c=c.arg),a&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:c,name:"_unknown",value:void 0};continue}if(ce(c))t=e.get(c,this.options.caseInsensitive),n=void 0,t?(n=!!t.isBoolean()||null,o="set"):o="unknown_option";else if(ae(c)){const r=c.match(oe.optEquals);t=e.get(r[1],this.options.caseInsensitive),t?t.isBoolean()?(yield{event:"unknown_value",arg:c,name:"_unknown",value:n,def:t},o="set",n=!0):(o="set",n=r[2]):o="unknown_option"}else le(c)&&(t?(n=c,o="set"):(t=this.definitions.getDefault(),t&&!s?(n=c,o="set"):(o="unknown_value",t=void 0)));r=t?t.name:"_unknown";const u={event:o,arg:c,name:r,value:n,def:t};i&&(u.subArg=c,u.arg=i),yield u,"_unknown"===r&&(a=!0),t&&t.defaultOption&&!t.isMultiple()&&"set"===o&&(s=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&ve.isDefined(n)&&null!==n&&(t=void 0),n=void 0,o=void 0,r=void 0,i=void 0}}}const Ee=new WeakMap;class Se{constructor(e){this.definition=new _e(e),this.state=null,this.resetToDefault()}get(){return Ee.get(this)}set(e){this._set(e,"set")}_set(e,t){const n=this.definition;if(n.isMultiple()){if(null!=e){const r=this.get();"default"===this.state&&(r.length=0),r.push(n.type(e)),this.state=t}}else{if(!n.isMultiple()&&"set"===this.state){const t=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name="ALREADY_SET",t.value=e,t.optionName=n.name,t}null==e?Ee.set(this,e):(Ee.set(this,n.type(e)),this.state=t)}}resetToDefault(){ve.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Ee.set(this,te(this.definition.defaultValue).slice()):Ee.set(this,this.definition.defaultValue):this.definition.isMultiple()?Ee.set(this,[]):Ee.set(this,null),this.state="default"}static create(e){return(e=new _e(e)).isBoolean()?we.create(e):new this(e)}}class we extends Se{set(e){super.set(!0)}static create(e){return new this(e)}}class Ne extends Map{constructor(e){super(),this.definitions=ye.from(e),this.set("_unknown",Se.create({name:"_unknown",multiple:!0}));for(const e of this.definitions.whereDefaultValueSet())this.set(e.name,Se.create(e))}toObject(e){e=e||{};const t={};for(const n of this){const r=e.camelCase&&"_unknown"!==n[0]?ee(n[0]):n[0],o=n[1];("_unknown"!==r||o.get().length)&&(t[r]=o.get())}return e.skipUnknown&&delete t._unknown,t}}class Te extends Ne{toObject(e){const t=super.toObject({skipUnknown:e.skipUnknown}),n=super.toObject(e),r=n._unknown;delete n._unknown;const o={_all:n};return r&&r.length&&(o._unknown=r),this.definitions.whereGrouped().forEach((n=>{const r=e.camelCase?ee(n.name):n.name,i=t[n.name];for(const e of te(n.group))o[e]=o[e]||{},ve.isDefined(i)&&(o[e][r]=i)})),this.definitions.whereNotGrouped().forEach((n=>{const r=e.camelCase?ee(n.name):n.name,i=t[n.name];ve.isDefined(i)&&(o._none||(o._none={}),o._none[r]=i)})),o}}var Ae=function(e,t){(t=t||{}).stopAtFirstUnknown&&(t.partial=!0),e=ye.from(e,t.caseInsensitive);const n=new Oe(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown,caseInsensitive:t.caseInsensitive}),r=new(e.isGrouped()?Te:Ne)(e);for(const e of n){const n=e.subArg||e.arg;if(!t.partial){if("unknown_value"===e.event){const e=new Error(`Unknown value: ${n}`);throw e.name="UNKNOWN_VALUE",e.value=n,e}if("unknown_option"===e.event){const e=new Error(`Unknown option: ${n}`);throw e.name="UNKNOWN_OPTION",e.optionName=n,e}}let o;r.has(e.name)?o=r.get(e.name):(o=Se.create(e.def),r.set(e.name,o)),"_unknown"===e.name?o.set(n):o.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})},Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)};
|
|
2
|
+
import e from"path";import t from"fs";import n from"constants";import r from"stream";import o from"util";import i from"assert";function s(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
5
5
|
|
|
@@ -13,4 +13,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
13
13
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
14
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
15
|
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
-
***************************************************************************** */var De=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},xe=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})},ke=process.cwd,Ie=null,Pe=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ie||(Ie=ke.call(process)),Ie};try{process.cwd()}catch(e){}var Le=process.chdir;process.chdir=function(e){Ie=null,Le.call(process,e)};var je=function(e){n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,o){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?o&&o(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lchmodSync=function(t,r){var o,i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{o=e.fchmodSync(i,r),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return o}}(e);e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,o,i){e.open(t,n.O_SYMLINK,(function(t,n){t?i&&i(t):e.futimes(n,r,o,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,o){var i,s=e.openSync(t,n.O_SYMLINK),a=!0;try{i=e.futimesSync(s,r,o),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===Pe&&(e.rename=(t=e.rename,function(n,r,o){var i=Date.now(),s=0;t(n,r,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){e.stat(r,(function(e,i){e&&"ENOENT"===e.code?t(n,r,a):o(c)}))}),s),void(s<100&&(s+=10));o&&o(c)}))}));var t;function r(t){return t?function(n,r,o){return t.call(e,n,r,(function(e){u(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function o(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!u(e))throw e}}:t}function i(t){return t?function(n,r,o,i){return t.call(e,n,r,o,(function(e){u(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function s(t){return t?function(n,r,o){try{return t.call(e,n,r,o)}catch(e){if(!u(e))throw e}}:t}function a(t){return t?function(n,r,o){function i(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),o&&o.apply(this,arguments)}return"function"==typeof r&&(o=r,r=null),r?t.call(e,n,r,i):t.call(e,n,i)}:t}function c(t){return t?function(n,r){var o=r?t.call(e,n,r):t.call(e,n);return o.uid<0&&(o.uid+=4294967296),o.gid<0&&(o.gid+=4294967296),o}:t}function u(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function n(n,r,o,i,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,p){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,n,r,o,i,s,c);a.apply(this,arguments)}}return t.call(e,n,r,o,i,s,c)}return n.__proto__=t,n}(e.read),e.readSync=(l=e.readSync,function(t,n,r,o,i){for(var s=0;;)try{return l.call(e,t,n,r,o,i)}catch(e){if("EAGAIN"===e.code&&s<10){s++;continue}throw e}});var l};var Re=r.Stream,Ve=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Re.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var i=Object.keys(r),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=r[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){o._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Re.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;i<s;i++){var a=o[i];this[a]=r[a]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Fe=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t};var Ue=a((function(e){var n,r;function a(e,t){Object.defineProperty(e,n,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(n=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(n="___graceful-fs.queue",r="___graceful-fs.previous");var c=function(){};if(o.debuglog?c=o.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(c=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!t[n]){var u=s[n]||[];a(t,u),t.close=function(e){function n(n,r){return e.call(t,n,(function(e){e||p(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(n,r,{value:e}),n}(t.close),t.closeSync=function(e){function n(n){e.apply(t,arguments),p()}return Object.defineProperty(n,r,{value:e}),n}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){c(t[n]),i.equal(t[n].length,0)}))}function l(e){je(e),e.gracefulify=l,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof o&&o.apply(this,arguments),p()):f([e,[n,r,o]])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,o){"function"==typeof r&&(o=r,r=null);return function e(t,r,o,i){return n(t,r,o,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof i&&i.apply(this,arguments),p()):f([e,[t,r,o,i]])}))}(e,t,r,o)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,o){"function"==typeof n&&(o=n,n=null);return function e(t,n,o,i){return r(t,n,o,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),p()):f([e,[t,n,o,i]])}))}(e,t,n,o)});var o=e.readdir;function i(t){return o.apply(e,t)}if(e.readdir=function(e,t,n){var r=[e];"function"!=typeof t?r.push(t):n=t;return r.push((function(e,t){t&&t.sort&&t.sort();!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof n&&n.apply(this,arguments),p()):f([i,[r]])})),i(r)},"v0.8"===process.version.substr(0,4)){var s=Ve(e);h=s.ReadStream,v=s.WriteStream}var a=e.ReadStream;a&&(h.prototype=Object.create(a.prototype),h.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var c=e.WriteStream;c&&(v.prototype=Object.create(c.prototype),v.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var u=h;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var d=v;function h(e,t){return this instanceof h?(a.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function v(e,t){return this instanceof v?(c.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var _=e.open;function y(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,o){return _(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),p()):f([e,[t,n,r,o]])}))}(e,t,n,r)}return e.open=y,e}function f(e){c("ENQUEUE",e[0].name,e[1]),t[n].push(e)}function p(){var e=t[n].shift();e&&(c("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}s[n]||a(s,t[n]),e.exports=l(Fe(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(e.exports=l(t),t.__patched=!0)})),Be=a((function(e,t){const n=De,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof Ue[e]));Object.assign(t,Ue),r.forEach((e=>{t[e]=n(Ue[e])})),t.realpath.native=n(Ue.realpath.native),t.exists=function(e,t){return"function"==typeof t?Ue.exists(e,t):new Promise((t=>Ue.exists(e,t)))},t.read=function(e,t,n,r,o,i){return"function"==typeof i?Ue.read(e,t,n,r,o,i):new Promise(((i,s)=>{Ue.read(e,t,n,r,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},t.write=function(e,t,...n){return"function"==typeof n[n.length-1]?Ue.write(e,t,...n):new Promise(((r,o)=>{Ue.write(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffer:n})}))}))},"function"==typeof Ue.writev&&(t.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?Ue.writev(e,t,...n):new Promise(((r,o)=>{Ue.writev(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffers:n})}))}))})})),Me={checkPath:function(t){if("win32"===process.platform){if(/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=new Error(`Path contains invalid characters: ${t}`);throw e.code="EINVAL",e}}}};const{checkPath:Ge}=Me,qe=e=>"number"==typeof e?e:{mode:511,...e}.mode;var Ke={makeDir:async(e,t)=>(Ge(e),Be.mkdir(e,{mode:qe(t),recursive:!0})),makeDirSync:(e,t)=>(Ge(e),Be.mkdirSync(e,{mode:qe(t),recursive:!0}))};const We=xe,{makeDir:$e,makeDirSync:ze}=Ke,Xe=We($e);var Ye={mkdirs:Xe,mkdirsSync:ze,mkdirp:Xe,mkdirpSync:ze,ensureDir:Xe,ensureDirSync:ze};var He=function(e,t,n,r){Ue.open(e,"r+",((e,o)=>{if(e)return r(e);Ue.futimes(o,t,n,(e=>{Ue.close(o,(t=>{r&&r(e||t)}))}))}))},Je=function(e,t,n){const r=Ue.openSync(e,"r+");return Ue.futimesSync(r,t,n),Ue.closeSync(r)};function Ze(e,t,n){const r=n.dereference?e=>Be.stat(e,{bigint:!0}):e=>Be.lstat(e,{bigint:!0});return Promise.all([r(e),r(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function Qe(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function et(t,n){const r=e.resolve(t).split(e.sep).filter((e=>e)),o=e.resolve(n).split(e.sep).filter((e=>e));return r.reduce(((e,t,n)=>e&&o[n]===t),!0)}function tt(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var nt={checkPaths:function(t,n,r,i,s){o.callbackify(Ze)(t,n,i,((o,i)=>{if(o)return s(o);const{srcStat:a,destStat:c}=i;if(c){if(Qe(a,c)){const o=e.basename(t),i=e.basename(n);return"move"===r&&o!==i&&o.toLowerCase()===i.toLowerCase()?s(null,{srcStat:a,destStat:c,isChangingCase:!0}):s(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!c.isDirectory())return s(new Error(`Cannot overwrite non-directory '${n}' with directory '${t}'.`));if(!a.isDirectory()&&c.isDirectory())return s(new Error(`Cannot overwrite directory '${n}' with non-directory '${t}'.`))}return a.isDirectory()&&et(t,n)?s(new Error(tt(t,n,r))):s(null,{srcStat:a,destStat:c})}))},checkPathsSync:function(t,n,r,o){const{srcStat:i,destStat:s}=function(e,t,n){let r;const o=n.dereference?e=>Be.statSync(e,{bigint:!0}):e=>Be.lstatSync(e,{bigint:!0}),i=o(e);try{r=o(t)}catch(e){if("ENOENT"===e.code)return{srcStat:i,destStat:null};throw e}return{srcStat:i,destStat:r}}(t,n,o);if(s){if(Qe(i,s)){const o=e.basename(t),a=e.basename(n);if("move"===r&&o!==a&&o.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${t}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${t}'.`)}if(i.isDirectory()&&et(t,n))throw new Error(tt(t,n,r));return{srcStat:i,destStat:s}},checkParentPaths:function t(n,r,o,i,s){const a=e.resolve(e.dirname(n)),c=e.resolve(e.dirname(o));if(c===a||c===e.parse(c).root)return s();Be.stat(c,{bigint:!0},((e,a)=>e?"ENOENT"===e.code?s():s(e):Qe(r,a)?s(new Error(tt(n,o,i))):t(n,r,c,i,s)))},checkParentPathsSync:function t(n,r,o,i){const s=e.resolve(e.dirname(n)),a=e.resolve(e.dirname(o));if(a===s||a===e.parse(a).root)return;let c;try{c=Be.statSync(a,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(Qe(r,c))throw new Error(tt(n,o,i));return t(n,r,a,i)},isSrcSubdir:et,areIdentical:Qe};const rt=Ye.mkdirsSync,ot=Je;function it(t,n,r,o){const i=(o.dereference?Ue.statSync:Ue.lstatSync)(n);if(i.isDirectory())return function(e,t,n,r,o){return t?ct(n,r,o):function(e,t,n,r){return Ue.mkdirSync(n),ct(t,n,r),at(n,e)}(e.mode,n,r,o)}(i,t,n,r,o);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return function(e,t,n,r,o){return t?function(e,t,n,r){if(r.overwrite)return Ue.unlinkSync(n),st(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,o):st(e,n,r,o)}(i,t,n,r,o);if(i.isSymbolicLink())return function(t,n,r,o){let i=Ue.readlinkSync(n);o.dereference&&(i=e.resolve(process.cwd(),i));if(t){let t;try{t=Ue.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return Ue.symlinkSync(i,r);throw e}if(o.dereference&&(t=e.resolve(process.cwd(),t)),nt.isSrcSubdir(i,t))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${t}'.`);if(Ue.statSync(r).isDirectory()&&nt.isSrcSubdir(t,i))throw new Error(`Cannot overwrite '${t}' with '${i}'.`);return function(e,t){return Ue.unlinkSync(t),Ue.symlinkSync(e,t)}(i,r)}return Ue.symlinkSync(i,r)}(t,n,r,o);if(i.isSocket())throw new Error(`Cannot copy a socket file: ${n}`);if(i.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${n}`);throw new Error(`Unknown file: ${n}`)}function st(e,t,n,r){return Ue.copyFileSync(t,n),r.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){at(e,128|t)}(n,e);(function(e,t){const n=Ue.statSync(e);ot(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),at(n,e.mode)}function at(e,t){return Ue.chmodSync(e,t)}function ct(t,n,r){Ue.readdirSync(t).forEach((o=>function(t,n,r,o){const i=e.join(n,t),s=e.join(r,t),{destStat:a}=nt.checkPathsSync(i,s,"copy",o);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return it(e,t,n,r)}(a,i,s,o)}(o,t,n,r)))}var ut={copySync:function(t,n,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:o,destStat:i}=nt.checkPathsSync(t,n,"copy",r);return nt.checkParentPathsSync(t,o,n,"copy"),function(t,n,r,o){if(o.filter&&!o.filter(n,r))return;const i=e.dirname(r);Ue.existsSync(i)||rt(i);return it(t,n,r,o)}(i,t,n,r)}};var lt={pathExists:xe((function(e){return Be.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:Be.existsSync};const ft=Ye.mkdirs,pt=lt.pathExists,dt=He;function ht(t,n,r,o,i){const s=e.dirname(r);pt(s,((e,a)=>e?i(e):a?_t(t,n,r,o,i):void ft(s,(e=>e?i(e):_t(t,n,r,o,i)))))}function vt(e,t,n,r,o,i){Promise.resolve(o.filter(n,r)).then((s=>s?e(t,n,r,o,i):i()),(e=>i(e)))}function _t(e,t,n,r,o){(r.dereference?Ue.stat:Ue.lstat)(t,((i,s)=>i?o(i):s.isDirectory()?function(e,t,n,r,o,i){return t?bt(n,r,o,i):function(e,t,n,r,o){Ue.mkdir(n,(i=>{if(i)return o(i);bt(t,n,r,(t=>t?o(t):gt(n,e,o)))}))}(e.mode,n,r,o,i)}(s,e,t,n,r,o):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?function(e,t,n,r,o,i){return t?function(e,t,n,r,o){if(!r.overwrite)return r.errorOnExist?o(new Error(`'${n}' already exists`)):o();Ue.unlink(n,(i=>i?o(i):yt(e,t,n,r,o)))}(e,n,r,o,i):yt(e,n,r,o,i)}(s,e,t,n,r,o):s.isSymbolicLink()?Et(e,t,n,r,o):s.isSocket()?o(new Error(`Cannot copy a socket file: ${t}`)):s.isFIFO()?o(new Error(`Cannot copy a FIFO pipe: ${t}`)):o(new Error(`Unknown file: ${t}`))))}function yt(e,t,n,r,o){Ue.copyFile(t,n,(i=>i?o(i):r.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return gt(e,128|t,n)}(n,e,(o=>o?r(o):mt(e,t,n,r)));return mt(e,t,n,r)}(e.mode,t,n,o):gt(n,e.mode,o)))}function mt(e,t,n,r){!function(e,t,n){Ue.stat(e,((e,r)=>e?n(e):dt(t,r.atime,r.mtime,n)))}(t,n,(t=>t?r(t):gt(n,e,r)))}function gt(e,t,n){return Ue.chmod(e,t,n)}function bt(e,t,n,r){Ue.readdir(e,((o,i)=>o?r(o):Ot(i,e,t,n,r)))}function Ot(t,n,r,o,i){const s=t.pop();return s?function(t,n,r,o,i,s){const a=e.join(r,n),c=e.join(o,n);nt.checkPaths(a,c,"copy",i,((e,n)=>{if(e)return s(e);const{destStat:u}=n;!function(e,t,n,r,o){r.filter?vt(_t,e,t,n,r,o):_t(e,t,n,r,o)}(u,a,c,i,(e=>e?s(e):Ot(t,r,o,i,s)))}))}(t,s,n,r,o,i):i()}function Et(t,n,r,o,i){Ue.readlink(n,((n,s)=>n?i(n):(o.dereference&&(s=e.resolve(process.cwd(),s)),t?void Ue.readlink(r,((n,a)=>n?"EINVAL"===n.code||"UNKNOWN"===n.code?Ue.symlink(s,r,i):i(n):(o.dereference&&(a=e.resolve(process.cwd(),a)),nt.isSrcSubdir(s,a)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`)):t.isDirectory()&&nt.isSrcSubdir(a,s)?i(new Error(`Cannot overwrite '${a}' with '${s}'.`)):function(e,t,n){Ue.unlink(t,(r=>r?n(r):Ue.symlink(e,t,n)))}(s,r,i)))):Ue.symlink(s,r,i))))}var St={copy:De((function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),nt.checkPaths(e,t,"copy",n,((o,i)=>{if(o)return r(o);const{srcStat:s,destStat:a}=i;nt.checkParentPaths(e,s,t,"copy",(o=>o?r(o):n.filter?vt(ht,a,e,t,n,r):ht(a,e,t,n,r)))}))}))};const wt="win32"===process.platform;function Nt(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||Ue[t],e[t+="Sync"]=e[t]||Ue[t]})),e.maxBusyTries=e.maxBusyTries||3}function Tt(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i.strictEqual(typeof n,"function","rimraf: callback function required"),i(t,"rimraf: invalid options argument provided"),i.strictEqual(typeof t,"object","rimraf: options should be object"),Nt(t),At(e,t,(function o(i){if(i){if(("EBUSY"===i.code||"ENOTEMPTY"===i.code||"EPERM"===i.code)&&r<t.maxBusyTries){r++;return setTimeout((()=>At(e,t,o)),100*r)}"ENOENT"===i.code&&(i=null)}n(i)}))}function At(e,t,n){i(e),i(t),i("function"==typeof n),t.lstat(e,((r,o)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&wt?Ct(e,t,r,n):o&&o.isDirectory()?xt(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return wt?Ct(e,t,r,n):xt(e,t,r,n);if("EISDIR"===r.code)return xt(e,t,r,n)}return n(r)}))))}function Ct(e,t,n,r){i(e),i(t),i("function"==typeof r),t.chmod(e,438,(o=>{o?r("ENOENT"===o.code?null:n):t.stat(e,((o,i)=>{o?r("ENOENT"===o.code?null:n):i.isDirectory()?xt(e,t,n,r):t.unlink(e,r)}))}))}function Dt(e,t,n){let r;i(e),i(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?It(e,t,n):t.unlinkSync(e)}function xt(t,n,r,o){i(t),i(n),i("function"==typeof o),n.rmdir(t,(s=>{!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?o(r):o(s):function(t,n,r){i(t),i(n),i("function"==typeof r),n.readdir(t,((o,i)=>{if(o)return r(o);let s,a=i.length;if(0===a)return n.rmdir(t,r);i.forEach((o=>{Tt(e.join(t,o),n,(e=>{if(!s)return e?r(s=e):void(0==--a&&n.rmdir(t,r))}))}))}))}(t,n,o)}))}function kt(e,t){let n;Nt(t=t||{}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i(t,"rimraf: missing options"),i.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&wt&&Dt(e,t,n)}try{n&&n.isDirectory()?It(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return wt?Dt(e,t,n):It(e,t,n);if("EISDIR"!==n.code)throw n;It(e,t,n)}}function It(t,n,r){i(t),i(n);try{n.rmdirSync(t)}catch(o){if("ENOTDIR"===o.code)throw r;if("ENOTEMPTY"===o.code||"EEXIST"===o.code||"EPERM"===o.code)!function(t,n){if(i(t),i(n),n.readdirSync(t).forEach((r=>kt(e.join(t,r),n))),!wt){return n.rmdirSync(t,n)}{const e=Date.now();do{try{return n.rmdirSync(t,n)}catch{}}while(Date.now()-e<500)}}(t,n);else if("ENOENT"!==o.code)throw o}}var Pt=Tt;Tt.sync=kt;var Lt={remove:De((function(e,t){if(Ue.rm)return Ue.rm(e,{recursive:!0,force:!0},t);Pt(e,t)})),removeSync:function(e){if(Ue.rmSync)return Ue.rmSync(e,{recursive:!0,force:!0});Pt.sync(e)}};const jt=xe((async function(t){let n;try{n=await Be.readdir(t)}catch{return Ye.mkdirs(t)}return Promise.all(n.map((n=>Lt.remove(e.join(t,n)))))}));function Rt(t){let n;try{n=Be.readdirSync(t)}catch{return Ye.mkdirsSync(t)}n.forEach((n=>{n=e.join(t,n),Lt.removeSync(n)}))}var Vt={emptyDirSync:Rt,emptydirSync:Rt,emptyDir:jt,emptydir:jt};var Ft={createFile:De((function(t,n){function r(){Ue.writeFile(t,"",(e=>{if(e)return n(e);n()}))}Ue.stat(t,((o,i)=>{if(!o&&i.isFile())return n();const s=e.dirname(t);Ue.stat(s,((e,t)=>{if(e)return"ENOENT"===e.code?Ye.mkdirs(s,(e=>{if(e)return n(e);r()})):n(e);t.isDirectory()?r():Ue.readdir(s,(e=>{if(e)return n(e)}))}))}))})),createFileSync:function(t){let n;try{n=Ue.statSync(t)}catch{}if(n&&n.isFile())return;const r=e.dirname(t);try{Ue.statSync(r).isDirectory()||Ue.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;Ye.mkdirsSync(r)}Ue.writeFileSync(t,"")}};const Ut=De,Bt=lt.pathExists,{areIdentical:Mt}=nt;var Gt={createLink:Ut((function(t,n,r){function o(e,t){Ue.link(e,t,(e=>{if(e)return r(e);r(null)}))}Ue.lstat(n,((i,s)=>{Ue.lstat(t,((i,a)=>{if(i)return i.message=i.message.replace("lstat","ensureLink"),r(i);if(s&&Mt(a,s))return r(null);const c=e.dirname(n);Bt(c,((e,i)=>e?r(e):i?o(t,n):void Ye.mkdirs(c,(e=>{if(e)return r(e);o(t,n)}))))}))}))})),createLinkSync:function(t,n){let r;try{r=Ue.lstatSync(n)}catch{}try{const e=Ue.lstatSync(t);if(r&&Mt(e,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const o=e.dirname(n);return Ue.existsSync(o)||Ye.mkdirsSync(o),Ue.linkSync(t,n)}};const qt=lt.pathExists;var Kt=function(t,n,r){if(e.isAbsolute(t))return Ue.lstat(t,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),r(e)):r(null,{toCwd:t,toDst:t})));{const o=e.dirname(n),i=e.join(o,t);return qt(i,((n,s)=>n?r(n):s?r(null,{toCwd:i,toDst:t}):Ue.lstat(t,(n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:e.relative(o,t)})))))}},Wt=function(t,n){let r;if(e.isAbsolute(t)){if(r=Ue.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}{const o=e.dirname(n),i=e.join(o,t);if(r=Ue.existsSync(i),r)return{toCwd:i,toDst:t};if(r=Ue.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:e.relative(o,t)}}};var $t=function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);Ue.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},zt=function(e,t){let n;if(t)return t;try{n=Ue.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"};const Xt=De,Yt=Ye.mkdirs,Ht=Ye.mkdirsSync,Jt=Kt,Zt=Wt,Qt=$t,en=zt,tn=lt.pathExists,{areIdentical:nn}=nt;function rn(t,n,r,o){Jt(t,n,((i,s)=>{if(i)return o(i);t=s.toDst,Qt(s.toCwd,r,((r,i)=>{if(r)return o(r);const s=e.dirname(n);tn(s,((e,r)=>e?o(e):r?Be.symlink(t,n,i,o):void Yt(s,(e=>{if(e)return o(e);Be.symlink(t,n,i,o)}))))}))}))}var on={createSymlink:Xt((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Be.lstat(t,((o,i)=>{!o&&i.isSymbolicLink()?Promise.all([Be.stat(e),Be.stat(t)]).then((([o,i])=>{if(nn(o,i))return r(null);rn(e,t,n,r)})):rn(e,t,n,r)}))})),createSymlinkSync:function(t,n,r){let o;try{o=Be.lstatSync(n)}catch{}if(o&&o.isSymbolicLink()){const e=Be.statSync(t),r=Be.statSync(n);if(nn(e,r))return}const i=Zt(t,n);t=i.toDst,r=en(i.toCwd,r);const s=e.dirname(n);return Be.existsSync(s)||Ht(s),Be.symlinkSync(t,n,r)}},sn={createFile:Ft.createFile,createFileSync:Ft.createFileSync,ensureFile:Ft.createFile,ensureFileSync:Ft.createFileSync,createLink:Gt.createLink,createLinkSync:Gt.createLinkSync,ensureLink:Gt.createLink,ensureLinkSync:Gt.createLinkSync,createSymlink:on.createSymlink,createSymlinkSync:on.createSymlinkSync,ensureSymlink:on.createSymlink,ensureSymlinkSync:on.createSymlinkSync};var an={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:o}={}){const i=n?t:"";return JSON.stringify(e,r,o).replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}};let cn;try{cn=Ue}catch(e){cn=t}const{stringify:un,stripBom:ln}=an;const fn=xe((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||cn,r=!("throws"in t)||t.throws;let o,i=await De(n.readFile)(e,t);i=ln(i);try{o=JSON.parse(i,t?t.reviver:null)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}return o}));const pn=xe((async function(e,t,n={}){const r=n.fs||cn,o=un(t,n);await De(r.writeFile)(e,o,n)}));const dn={readFile:fn,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||cn,r=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=ln(r),JSON.parse(r,t.reviver)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:pn,writeFileSync:function(e,t,n={}){const r=n.fs||cn,o=un(t,n);return r.writeFileSync(e,o,n)}};var hn={readJson:dn.readFile,readJsonSync:dn.readFileSync,writeJson:dn.writeFile,writeJsonSync:dn.writeFileSync};const vn=lt.pathExists;var _n={outputFile:De((function(t,n,r,o){"function"==typeof r&&(o=r,r="utf8");const i=e.dirname(t);vn(i,((e,s)=>e?o(e):s?Ue.writeFile(t,n,r,o):void Ye.mkdirs(i,(e=>{if(e)return o(e);Ue.writeFile(t,n,r,o)}))))})),outputFileSync:function(t,...n){const r=e.dirname(t);if(Ue.existsSync(r))return Ue.writeFileSync(t,...n);Ye.mkdirsSync(r),Ue.writeFileSync(t,...n)}};const{stringify:yn}=an,{outputFile:mn}=_n;var gn=async function(e,t,n={}){const r=yn(t,n);await mn(e,r,n)};const{stringify:bn}=an,{outputFileSync:On}=_n;var En=function(e,t,n){const r=bn(t,n);On(e,r,n)};const Sn=xe;hn.outputJson=Sn(gn),hn.outputJsonSync=En,hn.outputJSON=hn.outputJson,hn.outputJSONSync=hn.outputJsonSync,hn.writeJSON=hn.writeJson,hn.writeJSONSync=hn.writeJsonSync,hn.readJSON=hn.readJson,hn.readJSONSync=hn.readJsonSync;var wn=hn;const Nn=ut.copySync,Tn=Lt.removeSync,An=Ye.mkdirpSync;function Cn(e,t,n){try{Ue.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){return Nn(e,t,{overwrite:n,errorOnExist:true}),Tn(e)}(e,t,n)}}var Dn={moveSync:function(t,n,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=nt.checkPathsSync(t,n,"move",r);return nt.checkParentPathsSync(t,i,n,"move"),function(t){const n=e.dirname(t);return e.parse(n).root===n}(n)||An(e.dirname(n)),function(e,t,n,r){if(r)return Cn(e,t,n);if(n)return Tn(t),Cn(e,t,n);if(Ue.existsSync(t))throw new Error("dest already exists.");return Cn(e,t,n)}(t,n,o,s)}};const xn=St.copy,kn=Lt.remove,In=Ye.mkdirp,Pn=lt.pathExists;function Ln(e,t,n,r,o){return r?jn(e,t,n,o):n?kn(t,(r=>r?o(r):jn(e,t,n,o))):void Pn(t,((r,i)=>r?o(r):i?o(new Error("dest already exists.")):jn(e,t,n,o)))}function jn(e,t,n,r){Ue.rename(e,t,(o=>o?"EXDEV"!==o.code?r(o):function(e,t,n,r){xn(e,t,{overwrite:n,errorOnExist:!0},(t=>t?r(t):kn(e,r)))}(e,t,n,r):r()))}var Rn={move:De((function(t,n,r,o){"function"==typeof r&&(o=r,r={});const i=r.overwrite||r.clobber||!1;nt.checkPaths(t,n,"move",r,((r,s)=>{if(r)return o(r);const{srcStat:a,isChangingCase:c=!1}=s;nt.checkParentPaths(t,a,n,"move",(r=>r?o(r):function(t){const n=e.dirname(t);return e.parse(n).root===n}(n)?Ln(t,n,i,c,o):void In(e.dirname(n),(e=>e?o(e):Ln(t,n,i,c,o)))))}))}))},Vn={...Be,...ut,...St,...Vt,...sn,...wn,...Ye,...Dn,...Rn,..._n,...lt,...Lt};function Fn(t,n){try{return Vn.readdirSync(t).forEach((function(r){(null==n?void 0:n.includes(r))||Vn.removeSync(e.join(t,r))})),!0}catch(e){return!1}}function Un(t,n,r){var o;try{var i=t,s=function(e){var t=e.split("/");return t.length>1?{dirParts:t.slice(0,t.length-1),filePart:t[t.length-1]}:{filePart:e}}(n);(null===(o=s.dirParts)||void 0===o?void 0:o.length)&&(i=e.join.apply(e,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}([i],s.dirParts)));var a=e.join(i,s.filePart);return Vn.outputFileSync(a,r),!0}catch(e){return console.error(e),!1}}var Bn=[{content:'import { IkasLocalThemeAPI } from "@ikas/storefront/src/pages/api";\n\nexport default IkasLocalThemeAPI.GetComponentDirs.getComponentDirs;\nexport const config = IkasLocalThemeAPI.GetComponentDirs.config;\n',fileName:"getComponentDirs.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront/src/pages/api";\n\nexport default IkasLocalThemeAPI.GetTheme.getTheme;\nexport const config = IkasLocalThemeAPI.GetTheme.config;\n',fileName:"getTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront/src/pages/api";\n\nexport default IkasLocalThemeAPI.UpdateTheme.updateTheme;\nexport const config = IkasLocalThemeAPI.UpdateTheme.config;\n',fileName:"updateTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront/src/pages/api";\n\nexport default IkasLocalThemeAPI.UploadTheme.uploadTheme;\nexport const config = IkasLocalThemeAPI.UploadTheme.config;\n',fileName:"uploadTheme.ts"}],Mn=function(){function t(){}return t.generate=function(){return Fn(e.join(process.cwd(),"src","pages","api")),Bn.reduce((function(e,n){return e&&t.generateAPI(n)}),!0)},t.generateAPI=function(t){return Un(e.join(process.cwd(),"src","pages","api"),t.fileName,t.content)},t}(),Gn="object"==typeof s&&s&&s.Object===Object&&s,qn="object"==typeof self&&self&&self.Object===Object&&self,Kn=Gn||qn||Function("return this")(),Wn=Kn.Symbol,$n=Object.prototype,zn=$n.hasOwnProperty,Xn=$n.toString,Yn=Wn?Wn.toStringTag:void 0;var Hn=function(e){var t=zn.call(e,Yn),n=e[Yn];try{e[Yn]=void 0;var r=!0}catch(e){}var o=Xn.call(e);return r&&(t?e[Yn]=n:delete e[Yn]),o},Jn=Object.prototype.toString;var Zn=function(e){return Jn.call(e)},Qn=Wn?Wn.toStringTag:void 0;var er=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Qn&&Qn in Object(e)?Hn(e):Zn(e)};var tr=function(e){return null!=e&&"object"==typeof e};var nr=function(e){return tr(e)&&"[object Arguments]"==er(e)},rr=Object.prototype;rr.hasOwnProperty,rr.propertyIsEnumerable;nr(function(){return arguments}());var or=function(){return!1};a((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Kn.Buffer:void 0,i=(o?o.isBuffer:void 0)||or;e.exports=i}));var ir=a((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&Gn.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i}));ir&&ir.isTypedArray;var sr=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var ar=function(e){if(!sr(e))return!1;var t=er(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var cr,ur=Kn["__core-js_shared__"],lr=(cr=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||""))?"Symbol(src)_1."+cr:"";var fr=function(e){return!!lr&&lr in e},pr=Function.prototype.toString;var dr=function(e){if(null!=e){try{return pr.call(e)}catch(e){}try{return e+""}catch(e){}}return""},hr=/^\[object .+?Constructor\]$/,vr=Function.prototype,_r=Object.prototype,yr=vr.toString,mr=_r.hasOwnProperty,gr=RegExp("^"+yr.call(mr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var br=function(e){return!(!sr(e)||fr(e))&&(ar(e)?gr:hr).test(dr(e))};var Or=function(e,t){return null==e?void 0:e[t]};var Er=function(e,t){var n=Or(e,t);return br(n)?n:void 0},Sr=Er(Object,"create");var wr=function(){this.__data__=Sr?Sr(null):{},this.size=0};var Nr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Tr=Object.prototype.hasOwnProperty;var Ar=function(e){var t=this.__data__;if(Sr){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Tr.call(t,e)?t[e]:void 0},Cr=Object.prototype.hasOwnProperty;var Dr=function(e){var t=this.__data__;return Sr?void 0!==t[e]:Cr.call(t,e)};var xr=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Sr&&void 0===t?"__lodash_hash_undefined__":t,this};function kr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}kr.prototype.clear=wr,kr.prototype.delete=Nr,kr.prototype.get=Ar,kr.prototype.has=Dr,kr.prototype.set=xr;var Ir=kr;var Pr=function(){this.__data__=[],this.size=0};var Lr=function(e,t){return e===t||e!=e&&t!=t};var jr=function(e,t){for(var n=e.length;n--;)if(Lr(e[n][0],t))return n;return-1},Rr=Array.prototype.splice;var Vr=function(e){var t=this.__data__,n=jr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Rr.call(t,n,1),--this.size,!0)};var Fr=function(e){var t=this.__data__,n=jr(t,e);return n<0?void 0:t[n][1]};var Ur=function(e){return jr(this.__data__,e)>-1};var Br=function(e,t){var n=this.__data__,r=jr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Mr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mr.prototype.clear=Pr,Mr.prototype.delete=Vr,Mr.prototype.get=Fr,Mr.prototype.has=Ur,Mr.prototype.set=Br;var Gr=Mr,qr=Er(Kn,"Map");var Kr=function(){this.size=0,this.__data__={hash:new Ir,map:new(qr||Gr),string:new Ir}};var Wr=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var $r=function(e,t){var n=e.__data__;return Wr(t)?n["string"==typeof t?"string":"hash"]:n.map};var zr=function(e){var t=$r(this,e).delete(e);return this.size-=t?1:0,t};var Xr=function(e){return $r(this,e).get(e)};var Yr=function(e){return $r(this,e).has(e)};var Hr=function(e,t){var n=$r(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Jr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jr.prototype.clear=Kr,Jr.prototype.delete=zr,Jr.prototype.get=Xr,Jr.prototype.has=Yr,Jr.prototype.set=Hr;var Zr=Jr;function Qr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Qr.Cache||Zr),n}Qr.Cache=Zr;var eo=Qr;var to=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,no=/\\(\\)?/g;(function(e){var t=eo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache})((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(to,(function(e,n,r,o){t.push(r?o.replace(no,"$1"):n||e)})),t}));var ro=Wn?Wn.prototype:void 0;ro&&ro.toString;var oo={next:"11.1.2",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0"},io={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2"},so={upgradeDependencies:"yarn upgrade @ikas/storefront",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},ao=function(){function t(){}return t.generate=function(e){return t.generateTsConfig()&&t.generateNextConfig()&&t.generatePackageJson()&&t.generateEnv(e)},t.generateTsConfig=function(){return Un(process.cwd(),"tsconfig.json",'{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}')},t.generateNextConfig=function(){return Un(process.cwd(),"next.config.js",'const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);')},t.generatePackageJson=function(){try{var t=e.join(process.cwd(),"package.json"),n=Vn.readFileSync(t);if(n.length){var r=JSON.parse(n.toString()),o=function(e){var t="dev"===e?io:oo,n="dev"===e?"devDependencies":"dependencies";r[n]&&"object"==typeof r[n]?r[n]=Ce(Ce({},r[n]),t):r[n]=t;var o,i=(o=r[n],Object.keys(o).sort().reduce((function(e,t){return e[t]=o[t],e}),{}));r[n]=i};return o("dev"),o("normal"),r.scripts&&"object"==typeof r.scripts?r.scripts=Ce(Ce({},r.scripts),so):r.scripts=so,Un(t,"",JSON.stringify(r,null,2))}}catch(e){return console.error(e),!1}},t.generateEnv=function(e){var t="dev"===e?"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n":"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";return Un(process.cwd(),".env",t)},t}(),co="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"}}:{};function uo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var o="string"==typeof e?e:co[e];throw"function"==typeof o&&(o=o.apply(null,n)),new Error("[MobX] "+o)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var lo={};function fo(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:lo}var po=Object.assign,ho=Object.getOwnPropertyDescriptor,vo=Object.defineProperty,_o=Object.prototype,yo=[];Object.freeze(yo);var mo={};Object.freeze(mo);var go="undefined"!=typeof Proxy,bo=Object.toString();function Oo(){go||uo("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function Eo(e){"production"!==process.env.NODE_ENV&&ps.verifyProxies&&uo("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function So(){return++ps.mobxGuid}function wo(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var No=function(){};function To(e){return"function"==typeof e}function Ao(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Co(e){return null!==e&&"object"==typeof e}function Do(e){var t;if(!Co(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===bo}function xo(e,t,n){vo(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ko(e,t,n){vo(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Io(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Co(e)&&!0===e[n]}}function Po(e){return e instanceof Map}function Lo(e){return e instanceof Set}var jo=void 0!==Object.getOwnPropertySymbols;var Ro="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:jo?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Vo(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function Fo(e){return null===e?null:"object"==typeof e?""+e:e}function Uo(e,t){return _o.hasOwnProperty.call(e,t)}var Bo=Object.getOwnPropertyDescriptors||function(e){var t={};return Ro(e).forEach((function(n){t[n]=ho(e,n)})),t};function Mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Go(e,t,n){return t&&Mo(e.prototype,t),n&&Mo(e,n),e}function qo(){return qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}function Ko(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Wo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zo(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return $o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Xo=Symbol("mobx-stored-annotations");function Yo(e){return Object.assign((function(t,n){Ho(t,n,e)}),e)}function Ho(e,t,n){(Uo(e,Xo)||xo(e,Xo,qo({},e[Xo])),"production"!==process.env.NODE_ENV&&oi(n)&&!Uo(e[Xo],t))&&uo("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!oi(t)&&Uo(e[Xo],n)){var r=e.constructor.name+".prototype."+n.toString(),o=e[Xo][n].annotationType_;uo("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+o+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overriden by subclass.")}}(e,n,t),oi(n)||(e[Xo][t]=qo({},n,{isDecorator_:!0}))}var Jo=Symbol("mobx administration"),Zo=function(){function e(e){void 0===e&&(e="Atom@"+So()),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Xi.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return ms(this)},t.reportChanged=function(){_s(),gs(this),ys()},t.toString=function(){return this.name_},e}(),Qo=Io("Atom",Zo);function ei(e,t,n){void 0===t&&(t=No),void 0===n&&(n=No);var r,o=new Zo(e);return t!==No&&Gs("onBO",o,t,r),n!==No&&Ms(o,n),o}var ti={identity:function(e,t){return e===t},structural:function(e,t){return Qa(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return Qa(e,t,1)}};function ni(e,t,n){return Zs(e)?e:Array.isArray(e)?Pi.array(e,{name:n}):Do(e)?Pi.object(e,void 0,{name:n}):Po(e)?Pi.map(e,{name:n}):Lo(e)?Pi.set(e,{name:n}):e}function ri(e){return e}function oi(e){return"override"===e.annotationType_}function ii(e,t){return{annotationType_:e,options_:t,make_:si,extend_:ai}}function si(e,t){for(var n,r,o=!1,i=e.target_,s=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;i&&i!==_o;){var a=ho(i,t);if(a){if(i===e.target_||s){var c=ci(e,this,t,a);if(!e.defineProperty_(t,c))return;if(o=!0,s)break}if(i!==e.target_){if(Us(a.value)){o=!0;break}var u=ci(e,this,t,a,!1);vo(i,t,u),o=!0}}i=Object.getPrototypeOf(i)}o?Ua(e,this,t):this.isDecorator_||uo(1,this.annotationType_,e.name_+"."+t.toString())}function ai(e,t,n,r){var o=ci(e,this,t,n);return e.defineProperty_(t,o,r)}function ci(e,t,n,r,o){var i,s,a,c,u;void 0===o&&(o=ps.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||To(i)||uo("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a function value.")}(e,t,n,r);var l,f=r.value;(null==(i=t.options_)?void 0:i.bound)&&(f=f.bind(null!=(l=e.proxy_)?l:e.target_));return{value:Gi(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),f,null!=(c=null==(u=t.options_)?void 0:u.autoAction)&&c),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ui(e,t){return{annotationType_:e,options_:t,make_:li,extend_:fi}}function li(e,t){for(var n=!1,r=e.target_;r&&r!==_o;){var o=ho(r,t);if(o){if(r!==e.target_){if(Hs(o.value)){n=!0;break}var i=pi(e,this,t,o,!1);vo(r,t,i)}else{var s=pi(e,this,t,o);if(!e.defineProperty_(t,s))return}n=!0}r=Object.getPrototypeOf(r)}n?Ua(e,this,t):this.isDecorator_||uo(1,this.annotationType_,e.name_+"."+t.toString())}function fi(e,t,n,r){var o=pi(e,this,t,n);return e.defineProperty_(t,o,r)}function pi(e,t,n,r,o){return void 0===o&&(o=ps.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||To(i)||uo("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a generator function value.")}(e,t,n,r),{value:Xs(r.value),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function di(e,t){return{annotationType_:e,options_:t,make_:hi,extend_:vi}}function hi(e,t){for(var n=e.target_;n&&n!==_o;){var r=ho(n,t);if(r){if(_i(e,this,t,r),!e.defineComputedProperty_(t,qo({},this.options_,{get:r.get,set:r.set})))return;return void Ua(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||uo(1,this.annotationType_,e.name_+"."+t.toString())}function vi(e,t,n,r){return _i(e,this,t,n),e.defineComputedProperty_(t,qo({},this.options_,{get:n.get,set:n.set}),r)}function _i(e,t,n,r){var o=t.annotationType_,i=r.get;"production"===process.env.NODE_ENV||i||uo("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on getter(+setter) properties.")}function yi(e,t){return{annotationType_:e,options_:t,make_:mi,extend_:gi}}function mi(e,t){for(var n=e.target_;n&&n!==_o;){var r=ho(n,t);if(r){var o,i;if(bi(e,this,t,r),!e.defineObservableProperty_(t,r.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:ni))return;return void Ua(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||uo(1,this.annotationType_,e.name_+"."+t.toString())}function gi(e,t,n,r){var o,i;return bi(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:ni,r)}function bi(e,t,n,r){var o=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||uo("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' cannot be used on getter/setter properties")}var Oi={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Ei(e){return e||Oi}Object.freeze(Oi);var Si=yi("observable"),wi=yi("observable.ref",{enhancer:ri}),Ni=yi("observable.shallow",{enhancer:function(e,t,n){return null==e||Fa(e)||Ea(e)||Ca(e)||ka(e)?e:Array.isArray(e)?Pi.array(e,{name:n,deep:!1}):Do(e)?Pi.object(e,void 0,{name:n,deep:!1}):Po(e)?Pi.map(e,{name:n,deep:!1}):Lo(e)?Pi.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&uo("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),Ti=yi("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Zs(e)&&uo("observable.struct should not be used with observable values"),Qa(e,t)?t:e}}),Ai=Yo(Si);function Ci(e){return!0===e.deep?ni:!1===e.deep?ri:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:ni;var t,n,r}function Di(e,t,n){if(!Ao(t))return Zs(e)?e:Do(e)?Pi.object(e,t,n):Array.isArray(e)?Pi.array(e,t):Po(e)?Pi.map(e,t):Lo(e)?Pi.set(e,t):"object"==typeof e&&null!==e?e:Pi.box(e);Ho(e,t,Si)}Object.assign(Di,Ai);var xi,ki,Ii={box:function(e,t){var n=Ei(t);return new zi(e,Ci(n),n.name,!0,n.equals)},array:function(e,t){var n=Ei(t);return(!1===ps.useProxies||!1===n.proxy?Xa:da)(e,Ci(n),n.name)},map:function(e,t){var n=Ei(t);return new Aa(e,Ci(n),n.name)},set:function(e,t){var n=Ei(t);return new xa(e,Ci(n),n.name)},object:function(e,t,n){return qs(!1===ps.useProxies||!1===(null==n?void 0:n.proxy)?ja({},n):function(e,t){var n,r;return Oo(),e=ja(e,t),null!=(r=(n=e[Jo]).proxy_)?r:n.proxy_=new Proxy(e,na)}({},n),e,t)},ref:Yo(wi),shallow:Yo(Ni),deep:Ai,struct:Yo(Ti)},Pi=po(Di,Ii),Li=di("computed"),ji=di("computed.struct",{equals:ti.structural}),Ri=function(e,t){if(Ao(t))return Ho(e,t,Li);if(Do(e))return Yo(di("computed",e));"production"!==process.env.NODE_ENV&&(To(e)||uo("First argument to `computed` should be an expression."),To(t)&&uo("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Do(t)?t:{};return n.get=e,n.name=n.name||e.name||"",new Hi(n)};Object.assign(Ri,Li),Ri.struct=Yo(ji);var Vi,Fi=0,Ui=1,Bi=null!=(xi=null==(ki=ho((function(){}),"name"))?void 0:ki.configurable)&&xi,Mi={value:"action",configurable:!0,writable:!1,enumerable:!1};function Gi(e,t,n,r){function o(){return qi(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(To(t)||uo("`action` can only be invoked on functions"),"string"==typeof e&&e||uo("actions should have valid names, got: '"+e+"'")),o.isMobxAction=!0,Bi&&(Mi.value=e,Object.defineProperty(o,"name",Mi)),o}function qi(e,t,n,r,o){var i=function(e,t,n,r){var o="production"!==process.env.NODE_ENV&&Ts()&&!!e,i=0;if("production"!==process.env.NODE_ENV&&o){i=Date.now();var s=r?Array.from(r):yo;Cs({type:ks,name:e,object:n,arguments:s})}var a=ps.trackingDerivation,c=!t||!a;_s();var u=ps.allowStateChanges;c&&(is(),u=Ki(!0));var l=as(!0),f={runAsAction_:c,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:l,notifySpy_:o,startTime_:i,actionId_:Ui++,parentActionId_:Fi};return Fi=f.actionId_,f}(e,t,r,o);try{return n.apply(r,o)}catch(e){throw i.error_=e,e}finally{!function(e){Fi!==e.actionId_&&uo(30);Fi=e.parentActionId_,void 0!==e.error_&&(ps.suppressReactionErrors=!0);Wi(e.prevAllowStateChanges_),cs(e.prevAllowStateReads_),ys(),e.runAsAction_&&ss(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&xs({time:Date.now()-e.startTime_});ps.suppressReactionErrors=!1}(i)}}function Ki(e){var t=ps.allowStateChanges;return ps.allowStateChanges=e,t}function Wi(e){ps.allowStateChanges=e}Vi=Symbol.toPrimitive;var $i,zi=function(e){function t(t,n,r,o,i){var s;return void 0===r&&(r="ObservableValue@"+So()),void 0===o&&(o=!0),void 0===i&&(i=ti.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=i,s.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&o&&Ts()&&As({type:"create",object:Wo(s),observableKind:"value",debugObjectName:s.name_,newValue:""+s.value_}),s}Ko(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==ps.UNCHANGED){var n=Ts();"production"!==process.env.NODE_ENV&&n&&Cs({type:la,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&xs()}},n.prepareNewValue_=function(e){if(ts(this),ra(this)){var t=ia(this,{object:this,type:la,newValue:e});if(!t)return ps.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ps.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),sa(this)&&ca(this,{type:la,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return oa(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:la,newValue:this.value_,oldValue:void 0}),aa(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Fo(this.get())},n[Vi]=function(){return this.valueOf()},t}(Zo);$i=Symbol.toPrimitive;var Xi,Yi,Hi=function(){function e(e){this.dependenciesState_=Xi.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Xi.UP_TO_DATE_,this.unboundDepsCount_=0,this.mapid_="#"+So(),this.value_=new Zi(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Yi.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||uo(31),this.derivation=e.get,this.name_=e.name||"ComputedValue@"+So(),e.set&&(this.setter_=Gi(this.name_+"-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?ti.structural:ti.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Xi.UP_TO_DATE_)return;e.lowestObserverState_=Xi.POSSIBLY_STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Xi.UP_TO_DATE_&&(t.dependenciesState_=Xi.POSSIBLY_STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Yi.NONE&&bs(t,e),t.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&uo(32,this.name_,this.derivation),0!==ps.inBatch||0!==this.observers_.size||this.keepAlive_){if(ms(this),es(this)){var e=ps.trackingContext;this.keepAlive_&&!e&&(ps.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Xi.STALE_)return;e.lowestObserverState_=Xi.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Xi.POSSIBLY_STALE_?t.dependenciesState_=Xi.STALE_:t.dependenciesState_===Xi.UP_TO_DATE_&&(e.lowestObserverState_=Xi.UP_TO_DATE_)}))}(this),ps.trackingContext=e}}else es(this)&&(this.warnAboutUntrackedRead_(),_s(),this.value_=this.computeValue_(!1),ys());var t=this.value_;if(Qi(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&uo(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else uo(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Xi.NOT_TRACKING_,n=this.computeValue_(!0);"production"!==process.env.NODE_ENV&&Ts()&&As({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:this.value_,newValue:n});var r=t||Qi(e)||Qi(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=Ki(!1);if(e)t=ns(this,this.derivation,this.scope_);else if(!0===ps.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Zi(e)}return Wi(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(rs(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,o=void 0;return function(e,t){void 0===t&&(t=mo);"production"!==process.env.NODE_ENV&&(To(e)||uo("Autorun expects a function as first argument"),Us(e)&&uo("Autorun does not accept actions since actions are untrackable"));var n,r=t&&t.name||e.name||"Autorun@"+So();if(t.scheduler||t.delay){var o=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Bs}(t),i=!1;n=new Es(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed_||n.track(s)})))}),t.onError,t.requiresObservable)}else n=new Es(r,(function(){this.track(s)}),t.onError,t.requiresObservable);function s(){e(n)}return n.schedule_(),n.getDisposer_()}((function(){var i=n.get();if(!r||t){var s=is();e({observableKind:"computed",debugObjectName:n.name_,type:la,object:n,newValue:i,oldValue:o}),ss(s)}r=!1,o=i}))},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(!0===this.requiresReaction_&&uo("[mobx] Computed value "+this.name_+" is read outside a reactive context"),this.isTracing_!==Yi.NONE&&console.log("[mobx.trace] '"+this.name_+"' is being read outside a reactive context. Doing a full recompute"),ps.computedRequiresReaction&&console.warn("[mobx] Computed value "+this.name_+" is being read outside a reactive context. Doing a full recompute"))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Fo(this.get())},t[$i]=function(){return this.valueOf()},e}(),Ji=Io("ComputedValue",Hi);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Xi||(Xi={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Yi||(Yi={}));var Zi=function(e){this.cause=void 0,this.cause=e};function Qi(e){return e instanceof Zi}function es(e){switch(e.dependenciesState_){case Xi.UP_TO_DATE_:return!1;case Xi.NOT_TRACKING_:case Xi.STALE_:return!0;case Xi.POSSIBLY_STALE_:for(var t=as(!0),n=is(),r=e.observing_,o=r.length,i=0;i<o;i++){var s=r[i];if(Ji(s)){if(ps.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return ss(n),cs(t),!0}if(e.dependenciesState_===Xi.STALE_)return ss(n),cs(t),!0}}return us(e),ss(n),cs(t),!1}}function ts(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;ps.allowStateChanges||!t&&"always"!==ps.enforceActions||console.warn("[MobX] "+(ps.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function ns(e,t,n){var r=as(!0);us(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++ps.runId;var o,i=ps.trackingDerivation;if(ps.trackingDerivation=e,ps.inBatch++,!0===ps.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(e){o=new Zi(e)}return ps.inBatch--,ps.trackingDerivation=i,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Xi.UP_TO_DATE_,o=0,i=e.unboundDepsCount_,s=0;s<i;s++){var a=n[s];0===a.diffValue_&&(a.diffValue_=1,o!==s&&(n[o]=a),o++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=o,e.newObserving_=null,i=t.length;for(;i--;){var c=t[i];0===c.diffValue_&&hs(c,e),c.diffValue_=0}for(;o--;){var u=n[o];1===u.diffValue_&&(u.diffValue_=0,ds(u,e))}r!==Xi.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;(ps.reactionRequiresObservable||e.requiresObservable_)&&console.warn("[mobx] Derivation "+e.name_+" is created/updated without reading any observable value")}(e),cs(r),o}function rs(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)hs(t[n],e);e.dependenciesState_=Xi.NOT_TRACKING_}function os(e){var t=is();try{return e()}finally{ss(t)}}function is(){var e=ps.trackingDerivation;return ps.trackingDerivation=null,e}function ss(e){ps.trackingDerivation=e}function as(e){var t=ps.allowStateReads;return ps.allowStateReads=e,t}function cs(e){ps.allowStateReads=e}function us(e){if(e.dependenciesState_!==Xi.UP_TO_DATE_){e.dependenciesState_=Xi.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Xi.UP_TO_DATE_}}var ls=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},fs=!0,ps=function(){var e=fo();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(fs=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ls).version&&(fs=!1),fs?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ls):(setTimeout((function(){uo(35)}),1),new ls)}();function ds(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function hs(e,t){e.observers_.delete(t),0===e.observers_.size&&vs(e)}function vs(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,ps.pendingUnobservations.push(e))}function _s(){ps.inBatch++}function ys(){if(0==--ps.inBatch){Ss();for(var e=ps.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Hi&&n.suspend_())}ps.pendingUnobservations=[]}}function ms(e){!function(e){"production"!==process.env.NODE_ENV&&!ps.allowStateReads&&ps.observableRequiresReaction&&console.warn("[mobx] Observable "+e.name_+" being read outside a reactive context")}(e);var t=ps.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&ps.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&ps.inBatch>0&&vs(e),!1)}function gs(e){e.lowestObserverState_!==Xi.STALE_&&(e.lowestObserverState_=Xi.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Xi.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Yi.NONE&&bs(t,e),t.onBecomeStale_()),t.dependenciesState_=Xi.STALE_})))}function bs(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Yi.BREAK){var n=[];Os(Ks(Ya(e,r)),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Hi?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r}function Os(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return Os(e,t,n+1)})))}var Es=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+So()),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Xi.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.mapid_="#"+So(),this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Yi.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ps.pendingReactions.push(this),Ss())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){_s(),this.isScheduled_=!1;var e=ps.trackingContext;if(ps.trackingContext=this,es(this)){this.isTrackPending_=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending_&&Ts()&&As({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}ps.trackingContext=e,ys()}},t.track=function(e){if(!this.isDisposed_){_s();var t,n=Ts();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),Cs({name:this.name_,type:"reaction"})),this.isRunning_=!0;var r=ps.trackingContext;ps.trackingContext=this;var o=ns(this,e,void 0);ps.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&rs(this),Qi(o)&&this.reportExceptionInDerivation_(o.cause),"production"!==process.env.NODE_ENV&&n&&xs({time:Date.now()-t}),ys()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ps.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";ps.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&Ts()&&As({type:"error",name:this.name_,message:n,error:""+e}),ps.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(_s(),rs(this),ys()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[Jo]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){"production"===process.env.NODE_ENV&&uo("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=Qs(n);if(!o)return uo("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===Yi.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?Yi.BREAK:Yi.LOG}(this,e)},e}();function Ss(){ps.inBatch>0||ps.isRunningReactions||ws()}function ws(){ps.isRunningReactions=!0;for(var e=ps.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}ps.isRunningReactions=!1}var Ns=Io("Reaction",Es);function Ts(){return"production"!==process.env.NODE_ENV&&!!ps.spyListeners.length}function As(e){if("production"!==process.env.NODE_ENV&&ps.spyListeners.length)for(var t=ps.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function Cs(e){"production"!==process.env.NODE_ENV&&As(qo({},e,{spyReportStart:!0}))}var Ds={type:"report-end",spyReportEnd:!0};function xs(e){"production"!==process.env.NODE_ENV&&As(e?qo({},e,{type:"report-end",spyReportEnd:!0}):Ds)}var ks="action",Is=ii(ks),Ps=ii("action.bound",{bound:!0}),Ls=ii("autoAction",{autoAction:!0}),js=ii("autoAction.bound",{autoAction:!0,bound:!0});function Rs(e){return function(t,n){return To(t)?Gi(t.name||"<unnamed action>",t,e):To(n)?Gi(t,n,e):Ao(n)?Ho(t,n,e?Ls:Is):Ao(t)?Yo(ii(e?"autoAction":ks,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&uo("Invalid arguments for `action`"))}}var Vs=Rs(!1);Object.assign(Vs,Is);var Fs=Rs(!0);function Us(e){return To(e)&&!0===e.isMobxAction}Object.assign(Fs,Ls),Vs.bound=Yo(Ps),Fs.bound=Yo(js);var Bs=function(e){return e()};function Ms(e,t,n){return Gs("onBUO",e,t,n)}function Gs(e,t,n,r){var o="function"==typeof r?Ya(t,n):Ya(t),i=To(r)?r:n,s=e+"L";return o[s]?o[s].add(i):o[s]=new Set([i]),function(){var e=o[s];e&&(e.delete(i),0===e.size&&delete o[s])}}function qs(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&uo("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&uo("'extendObservable' expects an object as first argument"),Ca(e)&&uo("'extendObservable' should not be used on maps, use map.merge instead"),Do(t)||uo("'extendObservabe' only accepts plain objects as second argument"),(Zs(t)||Zs(n))&&uo("Extending an object with another observable (object) is not supported"));var o=Bo(t),i=ja(e,r)[Jo];_s();try{Ro(o).forEach((function(e){i.extend_(e,o[e],!n||(!(e in n)||n[e]))}))}finally{ys()}return e}function Ks(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Ks)),n}var Ws=0;function $s(){this.message="FLOW_CANCELLED"}$s.prototype=Object.create(Error.prototype);var zs=ui("flow"),Xs=Object.assign((function(e,t){if(Ao(t))return Ho(e,t,zs);"production"!==process.env.NODE_ENV&&1!==arguments.length&&uo("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",o=function(){var e,t=this,o=arguments,i=++Ws,s=Vs(r+" - runid: "+i+" - init",n).apply(t,o),a=void 0,c=new Promise((function(t,n){var o=0;function c(e){var t;a=void 0;try{t=Vs(r+" - runid: "+i+" - yield "+o++,s.next).call(s,e)}catch(e){return n(e)}l(t)}function u(e){var t;a=void 0;try{t=Vs(r+" - runid: "+i+" - yield "+o++,s.throw).call(s,e)}catch(e){return n(e)}l(t)}function l(e){if(!To(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(c,u);e.then(l,n)}e=n,c(void 0)}));return c.cancel=Vs(r+" - runid: "+i+" - cancel",(function(){try{a&&Ys(a);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(No,No),Ys(n),e(new $s)}catch(t){e(t)}})),c};return o.isMobXFlow=!0,o}),zs);function Ys(e){To(e.cancel)&&e.cancel()}function Hs(e){return!0===(null==e?void 0:e.isMobXFlow)}function Js(e,t){return!!e&&(void 0!==t?"production"!==process.env.NODE_ENV&&(Ca(e)||Ea(e))?uo("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."):!!Fa(e)&&e[Jo].values_.has(t):Fa(e)||!!e[Jo]||Qo(e)||Ns(e)||Ji(e))}function Zs(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&uo("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),Js(e)}function Qs(e){switch(e.length){case 0:return ps.trackingDerivation;case 1:return Ya(e[0]);case 2:return Ya(e[0],e[1])}}function ea(e,t){void 0===t&&(t=void 0),_s();try{return e.apply(t)}finally{ys()}}function ta(e){return e[Jo]}var na={has:function(e,t){return"production"!==process.env.NODE_ENV&&ps.trackingDerivation&&Eo("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),ta(e).has_(t)},get:function(e,t){return ta(e).get_(t)},set:function(e,t,n){var r;return!!Ao(t)&&("production"===process.env.NODE_ENV||ta(e).values_.has(t)||Eo("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=ta(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&Eo("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!Ao(t)&&(null==(n=ta(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&Eo("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=ta(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&ps.trackingDerivation&&Eo("iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead."),ta(e).ownKeys_()},preventExtensions:function(e){uo(13)}};function ra(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function oa(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),wo((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ia(e,t){var n=is();try{for(var r=[].concat(e.interceptors_||[]),o=0,i=r.length;o<i&&((t=r[o](t))&&!t.type&&uo(14),t);o++);return t}finally{ss(n)}}function sa(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function aa(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),wo((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ca(e,t){var n=is(),r=e.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);ss(n)}}function ua(e,t,n){if("production"!==process.env.NODE_ENV&&(Do(e)||Do(Object.getPrototypeOf(e))||uo("'makeAutoObservable' can only be used for classes that don't have a superclass"),Fa(e)&&uo("makeAutoObservable can only be used on objects not already made observable")),Do(e))return qs(e,e,t,n);var r=ja(e,n)[Jo];_s();try{if(e[Ia])for(var o in e[Ia])r.make_(o,e[Ia][o]);else for(var i,s=((i={})[Jo]=1,i[Ia]=1,i.constructor=1,i),a=function(e){s[e]||(s[e]=1,r.make_(e,!t||(!(e in t)||t[e])))},c=e;c&&c!==_o;)Ro(c).forEach(a),c=Object.getPrototypeOf(c)}finally{ys()}return e}var la="update",fa={get:function(e,t){var n=e[Jo];return t===Jo?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?Uo(ha,t)?ha[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Jo];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){uo(15)}},pa=function(){function e(e,t,n,r){this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Zo(e||"ObservableArray@"+So()),this.enhancer_=function(n,r){return t(n,r,e+"[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return oa(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),aa(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||e<0)&&uo("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&uo(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&za(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;ts(this.atom_);var o=this.values_.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=yo),ra(this)){var i=ia(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!i)return yo;t=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_||"production"!==process.env.NODE_ENV){var s=n.length-t;this.updateArrayLength_(o,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var o=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<i.length;a++)this.values_[e+n.length+a]=i[a];return o},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&Ts(),o=sa(this),i=o||r?{observableKind:"array",object:this.proxy_,type:la,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&Cs(i),this.atom_.reportChanged(),o&&ca(this,i),"production"!==process.env.NODE_ENV&&r&&xs()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&Ts(),o=sa(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&Cs(i),this.atom_.reportChanged(),o&&ca(this,i),"production"!==process.env.NODE_ENV&&r&&xs()},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx] Out of bounds read: "+e:"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){ts(this.atom_);var r=n[e];if(ra(this)){var o=ia(this,{type:la,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):uo(17,e,n.length)},e}();function da(e,t,n,r){void 0===n&&(n="ObservableArray@"+So()),void 0===r&&(r=!1),Oo();var o=new pa(n,t,r,!1);ko(o.values_,Jo,o);var i=new Proxy(o.values_,fa);if(o.proxy_=i,e&&e.length){var s=Ki(!0);o.spliceWithArray_(0,0,e),Wi(s)}return i}var ha={clear:function(){return this.splice(0)},replace:function(e){var t=this[Jo];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[Jo];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Jo].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Jo],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Jo].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Jo],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ps.trackingDerivation&&uo(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ps.trackingDerivation&&uo(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Jo],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function va(e,t){"function"==typeof Array.prototype[e]&&(ha[e]=t(e))}function _a(e){return function(){var t=this[Jo];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ya(e){return function(t,n){var r=this,o=this[Jo];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[e]((function(e,o){return t.call(n,e,o,r)}))}}function ma(e){return function(){var t=this,n=this[Jo];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(e,n,r){return o(e,n,r,t)},r[e].apply(r,arguments)}}va("concat",_a),va("flat",_a),va("includes",_a),va("indexOf",_a),va("join",_a),va("lastIndexOf",_a),va("slice",_a),va("toString",_a),va("toLocaleString",_a),va("every",ya),va("filter",ya),va("find",ya),va("findIndex",ya),va("flatMap",ya),va("forEach",ya),va("map",ya),va("some",ya),va("reduce",ma),va("reduceRight",ma);var ga,ba,Oa=Io("ObservableArrayAdministration",pa);function Ea(e){return Co(e)&&Oa(e[Jo])}var Sa={},wa="add";ga=Symbol.iterator,ba=Symbol.toStringTag;var Na,Ta,Aa=function(){function e(e,t,n){void 0===t&&(t=ni),void 0===n&&(n="ObservableMap@"+So()),this.enhancer_=void 0,this.name_=void 0,this[Jo]=Sa,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,To(Map)||uo(18),this.keysAtom_=ei(this.name_+".keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ps.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new zi(this.has_(e),ri,this.name_+"."+Vo(e)+"?",!1);this.hasMap_.set(e,r),Ms(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(ra(this)){var r=ia(this,{type:n?la:wa,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((ts(this.keysAtom_),ra(this))&&!ia(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=Ts(),r=sa(this),o=r||n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&Cs(o),ea((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&ca(this,o),"production"!==process.env.NODE_ENV&&n&&xs(),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ps.UNCHANGED){var r=Ts(),o=sa(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:la,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&Cs(i),n.setNewValue_(t),o&&ca(this,i),"production"!==process.env.NODE_ENV&&r&&xs()}},t.addValue_=function(e,t){var n=this;ts(this.keysAtom_),ea((function(){var r=new zi(t,n.enhancer_,n.name_+"."+Vo(e),!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=Ts(),o=sa(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:wa,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&Cs(i),o&&ca(this,i),"production"!==process.env.NODE_ENV&&r&&xs()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return nc({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:e.get(o)}}})},t.entries=function(){var e=this,t=this.keys();return nc({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,e.get(o)]}}})},t[ga]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=zo(this);!(n=r()).done;){var o=n.value,i=o[0],s=o[1];e.call(t,s,i,this)}},t.merge=function(e){var t=this;return Ca(e)&&(e=new Map(e)),ea((function(){Do(e)?function(e){var t=Object.keys(e);if(!jo)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return _o.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):Po(e)?(e.constructor!==Map&&uo(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&uo(20,e)})),this},t.clear=function(){var e=this;ea((function(){os((function(){for(var t,n=zo(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return ea((function(){for(var n,r=function(e){if(Po(e)||Ca(e))return e;if(Array.isArray(e))return new Map(e);if(Do(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return uo(21,e)}(e),o=new Map,i=!1,s=zo(t.data_.keys());!(n=s()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))i=!0;else{var c=t.data_.get(a);o.set(a,c)}}for(var u,l=zo(r.entries());!(u=l()).done;){var f=u.value,p=f[0],d=f[1],h=t.data_.has(p);if(t.set(p,d),t.data_.has(p)){var v=t.data_.get(p);o.set(p,v),h||(i=!0)}}if(!i)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),y=o.keys(),m=_.next(),g=y.next();!m.done;){if(m.value!==g.value){t.keysAtom_.reportChanged();break}m=_.next(),g=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&uo("`observe` doesn't support fireImmediately=true in combination with maps."),aa(this,e)},t.intercept_=function(e){return oa(this,e)},Go(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:ba,get:function(){return"Map"}}]),e}(),Ca=Io("ObservableMap",Aa);var Da={};Na=Symbol.iterator,Ta=Symbol.toStringTag;var xa=function(){function e(e,t,n){void 0===t&&(t=ni),void 0===n&&(n="ObservableSet@"+So()),this.name_=void 0,this[Jo]=Da,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,To(Set)||uo(22),this.atom_=ei(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;ea((function(){os((function(){for(var t,n=zo(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=zo(this);!(n=r()).done;){var o=n.value;e.call(t,o,o,this)}},t.add=function(e){var t=this;if((ts(this.atom_),ra(this))&&!ia(this,{type:wa,object:this,newValue:e}))return this;if(!this.has(e)){ea((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n="production"!==process.env.NODE_ENV&&Ts(),r=sa(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:wa,object:this,newValue:e}:null;n&&"production"!==process.env.NODE_ENV&&Cs(o),r&&ca(this,o),n&&"production"!==process.env.NODE_ENV&&xs()}return this},t.delete=function(e){var t=this;if(ra(this)&&!ia(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&Ts(),r=sa(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&Cs(o),ea((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&ca(this,o),n&&"production"!==process.env.NODE_ENV&&xs(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return nc({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return nc({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return ka(e)&&(e=new Set(e)),ea((function(){Array.isArray(e)||Lo(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&uo("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&uo("`observe` doesn't support fireImmediately=true in combination with sets."),aa(this,e)},t.intercept_=function(e){return oa(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Na]=function(){return this.values()},Go(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Ta,get:function(){return"Set"}}]),e}(),ka=Io("ObservableSet",xa),Ia=Symbol("mobx-inferred-annotations"),Pa=Object.create(null),La=function(){function e(e,t,n,r,o){void 0===t&&(t=new Map),void 0===r&&(r=Pi),void 0===o&&(o=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=o,this.keysAtom_=new Zo(n+".keys"),this.isPlainObject_=Do(this.target_),"production"===process.env.NODE_ENV||ic(this.defaultAnnotation_)||uo("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&"boolean"!=typeof this.autoBind_&&uo("autoBind must be boolean"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Hi)return n.set(t),!0;if(ra(this)){var r=ia(this,{type:la,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ps.UNCHANGED){var o=sa(this),i="production"!==process.env.NODE_ENV&&Ts(),s=o||i?{type:la,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&Cs(s),n.setNewValue_(t),o&&ca(this,s),"production"!==process.env.NODE_ENV&&i&&xs()}return!0},t.get_=function(e){return ps.trackingDerivation&&!Uo(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),Uo(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ps.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new zi(e in this.target_,ri,this.name_+"."+Vo(e)+"?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Ba(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=oc(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Ba(this,n,e);var o=n.extend_(this,e,t,r);return o&&Ua(this,n,e),o},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Ia])?void 0:t[e];if(n)return n;for(var r=this.target_;r&&r!==_o;){var o=ho(r,e);if(o){n=oc(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&uo(1,"true",e),!this.isPlainObject_){var i=Object.getPrototypeOf(this.target_);Uo(i,Ia)||xo(i,Ia,{}),i[Ia][e]=n}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{_s();var r=this.delete_(e);if(!r)return r;if(ra(this)){var o=ia(this,{object:this.proxy_||this.target_,name:e,type:wa,newValue:t.value});if(!o)return null;var i=o.newValue;t.value!==i&&(t=qo({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else vo(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ys()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{_s();var o=this.delete_(e);if(!o)return o;if(ra(this)){var i=ia(this,{object:this.proxy_||this.target_,name:e,type:wa,newValue:t});if(!i)return null;t=i.newValue}var s=Va(e),a={configurable:!ps.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else vo(this.target_,e,a);var c=new zi(t,n,this.name_+"."+Vo(e),!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{ys()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{_s();var r=this.delete_(e);if(!r)return r;if(ra(this))if(!ia(this,{object:this.proxy_||this.target_,name:e,type:wa,newValue:void 0}))return null;t.name||(t.name=this.name_+"."+Vo(e)),t.context=this.proxy_||this.target_;var o=Va(e),i={configurable:!ps.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,e,i))return!1}else vo(this.target_,e,i);this.values_.set(e,new Hi(t)),this.notifyPropertyAddition_(e,void 0)}finally{ys()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!Uo(this.target_,e))return!0;if(ra(this)&&!ia(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;_s();var o,i=sa(this),s="production"!==process.env.NODE_ENV&&Ts(),a=this.values_.get(e),c=void 0;if(!a&&(i||s))c=null==(o=ho(this.target_,e))?void 0:o.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],a&&(this.values_.delete(e),a instanceof zi&&(c=a.value_),gs(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),i||s){var u={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:e};"production"!==process.env.NODE_ENV&&s&&Cs(u),i&&ca(this,u),"production"!==process.env.NODE_ENV&&s&&xs()}}finally{ys()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&uo("`observe` doesn't support the fire immediately property for observable objects."),aa(this,e)},t.intercept_=function(e){return oa(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,o=sa(this),i="production"!==process.env.NODE_ENV&&Ts();if(o||i){var s=o||i?{type:wa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&Cs(s),o&&ca(this,s),"production"!==process.env.NODE_ENV&&i&&xs()}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ro(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function ja(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Fa(e)&&uo("Options can't be provided for already observable objects."),Uo(e,Jo))return e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||uo("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:(Do(e)?"ObservableObject":e.constructor.name)+"@"+So(),o=new La(e,new Map,Vo(r),function(e){return e?!0===e.deep?Si:!1===e.deep?wi:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return xo(e,Jo,o),e}var Ra=Io("ObservableObjectAdministration",La);function Va(e){return Pa[e]||(Pa[e]={get:function(){return this[Jo].getObservablePropValue_(e)},set:function(t){return this[Jo].setObservablePropValue_(e,t)}})}function Fa(e){return!!Co(e)&&Ra(e[Jo])}function Ua(e,t,n){"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),t.isDecorator_&&delete e.target_[Xo][n]}function Ba(e,t,n){if("production"===process.env.NODE_ENV||ic(t)||uo("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!oi(t)&&Uo(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),o=e.appliedAnnotations_[n].annotationType_;uo("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+o+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overriden by subclass.")}}var Ma,Ga,qa=0,Ka=function(){};Ma=Ka,Ga=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ma.prototype,Ga):void 0!==Ma.prototype.__proto__?Ma.prototype.__proto__=Ga:Ma.prototype=Ga;var Wa=function(e){function t(t,n,r,o){var i;void 0===r&&(r="ObservableArray@"+So()),void 0===o&&(o=!1),i=e.call(this)||this;var s=new pa(r,n,o,!0);if(s.proxy_=Wo(i),ko(Wo(i),Jo,s),t&&t.length){var a=Ki(!0);i.spliceWithArray(0,0,t),Wi(a)}return i}Ko(t,e);var n=t.prototype;return n.concat=function(){this[Jo].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return Ea(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return nc({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},Go(t,[{key:"length",get:function(){return this[Jo].getArrayLength_()},set:function(e){this[Jo].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Ka);function $a(e){vo(Wa.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[Jo].get_(e)},set:function(t){this[Jo].set_(e,t)}}}(e))}function za(e){if(e>qa){for(var t=qa;t<e+100;t++)$a(t);qa=e}}function Xa(e,t,n){return new Wa(e,t,n)}function Ya(e,t){if("object"==typeof e&&null!==e){if(Ea(e))return void 0!==t&&uo(23),e[Jo].atom_;if(ka(e))return e[Jo];if(Ca(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||uo(25,t,Ja(e)),n}if(Fa(e)){if(!t)return uo(26);var r=e[Jo].values_.get(t);return r||uo(27,t,Ja(e)),r}if(Qo(e)||Ji(e)||Ns(e))return e}else if(To(e)&&Ns(e[Jo]))return e[Jo];uo(28)}function Ha(e,t){return e||uo(29),void 0!==t?Ha(Ya(e,t)):Qo(e)||Ji(e)||Ns(e)||Ca(e)||ka(e)?e:e[Jo]?e[Jo]:void uo(24,e)}function Ja(e,t){return(void 0!==t?Ya(e,t):Fa(e)||Ca(e)||ka(e)?Ha(e):Ya(e)).name_}Object.entries(ha).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&xo(Wa.prototype,t,n)})),za(1e3);var Za=_o.toString;function Qa(e,t,n){return void 0===n&&(n=-1),ec(e,t,n)}function ec(e,t,n,r,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;if(!To(i)&&"object"!==i&&"object"!=typeof t)return!1;var s=Za.call(e);if(s!==Za.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=tc(e),t=tc(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var c=e.constructor,u=t.constructor;if(c!==u&&!(To(c)&&c instanceof c&&To(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),o=o||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return o[l]===t;if(r.push(e),o.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!ec(e[l],t[l],n-1,r,o))return!1}else{var f,p=Object.keys(e);if(l=p.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!Uo(t,f=p[l])||!ec(e[f],t[f],n-1,r,o))return!1}return r.pop(),o.pop(),!0}function tc(e){return Ea(e)?e.slice():Po(e)||Ca(e)||Lo(e)||ka(e)?Array.from(e.entries()):e}function nc(e){return e[Symbol.iterator]=rc,e}function rc(){return this}function oc(e,t,n){return e.get?Ri:!e.set&&(To(e.value)?(r=e.value,!(o=null==r?void 0:r.constructor)||"GeneratorFunction"!==o.name&&"GeneratorFunction"!==o.displayName?!Us(e.value)&&(n?Fs.bound:Fs):!Hs(e.value)&&Xs):t);var r,o}function ic(e){return e instanceof Object&&"string"==typeof e.annotationType_&&To(e.make_)&&To(e.extend_)}["Symbol","Map","Set","Symbol"].forEach((function(e){void 0===fo()[e]&&uo("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(ps.spyListeners.push(e),wo((function(){ps.spyListeners=ps.spyListeners.filter((function(t){return t!==e}))})))},extras:{getDebugName:Ja},$mobx:Jo});var sc,ac=function(e){this.id=e.id||Date.now()+"",this.name=e.name||"",this.displayName=e.displayName||"",this.type=e.type||sc.TEXT,this.isRequired=e.isRequired||!1,this.customDataId=e.customDataId||null,this.attributeTypes=e.attributeTypes||null,ua(this)};!function(e){e.TEXT="TEXT",e.RICH_TEXT="RICH_TEXT",e.BOOLEAN="BOOLEAN",e.IMAGE="IMAGE",e.IMAGE_LIST="IMAGE_LIST",e.LINK="LINK",e.LIST_OF_LINK="LIST_OF_LINK",e.PRODUCT_DETAIL="PRODUCT_DETAIL",e.PRODUCT_LIST="PRODUCT_LIST",e.PRODUCT_ATTRIBUTE="PRODUCT_ATTRIBUTE",e.PRODUCT_ATTRIBUTE_LIST="PRODUCT_ATTRIBUTE_LIST",e.BRAND="BRAND",e.BRAND_LIST="BRAND_LIST",e.CATEGORY="CATEGORY",e.CATEGORY_LIST="CATEGORY_LIST",e.COLOR="COLOR",e.CUSTOM="CUSTOM",e.COMPONENT="COMPONENT",e.COMPONENT_LIST="COMPONENT_LIST",e.BLOG="BLOG",e.BLOG_LIST="BLOG_LIST",e.BLOG_CATEGORY="BLOG_CATEGORY",e.BLOG_CATEGORY_LIST="BLOG_CATEGORY_LIST",e.RAFFLE="RAFFLE",e.RAFFLE_LIST="RAFFLE_LIST",e.OBJECT="OBJECT",e.STATIC_LIST="STATIC_LIST",e.DYNAMIC_LIST="DYNAMIC_LIST",e.ENUM="ENUM"}(sc||(sc={}));var cc,uc,lc=function(e){this.id=e.id||"",this.dir=e.dir||"",this.displayName=e.displayName||"",this.props=e.props?e.props.map((function(e){return new ac(e)})):[],this.isHeader=e.isHeader||!1,this.isFooter=e.isFooter||!1,ua(this)},fc=function(){function e(t){var n,r=this;void 0===t&&(t={}),this.customDataId=null,this.id=t.id||"",this.name=t.name||null,this.type=t.type||sc.TEXT,this.isRequired=void 0===t.isRequired||t.isRequired,this.key=t.key||null,this.parent=t.parent||null,this.itemCount=t.itemCount||null,this.attributeTypes=t.attributeTypes||null,this.enumOptions=(null===(n=t.enumOptions)||void 0===n?void 0:n.map((function(e){return new pc(e)})))||null,this.customDataId=t.customDataId||null,this.isRoot=t.isRoot||!1,this.nestedData=t.nestedData?t.nestedData.map((function(t){return new e(Ce(Ce({},t),{parent:r}))})):null,this.type!==sc.STATIC_LIST||this.itemCount||(this.itemCount=1),ua(this)}return e.prototype.toJSON=function(){var e=Ce({},this);return delete e.parent,e},e}(),pc=function(e){void 0===e&&(e={}),this.id=e.id||"",this.displayName=e.displayName||"",this.value=e.value||"",ua(this)},dc=function(e){this.id=e.id||"",this.componentId=e.componentId||"",this.propValues=e.propValues||{},ua(this)},hc=function(e){this.id=e.id||Date.now()+"",this.name=e.name||null,this.type=e.type||cc.INDEX,this.slug=e.slug||null,this.pageTitle=e.pageTitle||null,this.description=e.description||null,this.components=e.components?e.components.map((function(e){return new dc(e)})):[],this.specifications=e.specifications?e.specifications.map((function(e){return new vc(e)})):null,ua(this)},vc=function(e){this.id=e.id||"",this.components=e.components?e.components.map((function(e){return new dc(e)})):[],ua(this)};!function(e){e.INDEX="INDEX",e.CATEGORY="CATEGORY",e.BRAND="BRAND",e.PRODUCT="PRODUCT",e.CUSTOM="CUSTOM",e.ACCOUNT="ACCOUNT",e.ADDRESSES="ADDRESSES",e.ORDERS="ORDERS",e.ORDER_DETAIL="ORDER_DETAIL",e.LOGIN="LOGIN",e.REGISTER="REGISTER",e.FORGOT_PASSWORD="FORGOT_PASSWORD",e.RECOVER_PASSWORD="RECOVER_PASSWORD",e.CART="CART",e.FAVORITE_PRODUCTS="FAVORITE_PRODUCTS",e.SEARCH="SEARCH",e.NOT_FOUND="NOT_FOUND",e.BLOG="BLOG",e.BLOG_INDEX="BLOG_INDEX",e.BLOG_CATEGORY="BLOG_CATEGORY",e.CHECKOUT="CHECKOUT",e.RAFFLE="RAFFLE",e.RAFFLE_DETAIL="RAFFLE_DETAIL",e.RAFFLE_ACCOUNT="RAFFLE_ACCOUNT"}(cc||(cc={}));var _c=new Uint8Array(16);function yc(){if(!uc&&!(uc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uc(_c)}var mc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function gc(e){return"string"==typeof e&&mc.test(e)}for(var bc=[],Oc=0;Oc<256;++Oc)bc.push((Oc+256).toString(16).substr(1));function Ec(e,t,n){var r=(e=e||{}).random||(e.rng||yc)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(bc[e[t+0]]+bc[e[t+1]]+bc[e[t+2]]+bc[e[t+3]]+"-"+bc[e[t+4]]+bc[e[t+5]]+"-"+bc[e[t+6]]+bc[e[t+7]]+"-"+bc[e[t+8]]+bc[e[t+9]]+"-"+bc[e[t+10]]+bc[e[t+11]]+bc[e[t+12]]+bc[e[t+13]]+bc[e[t+14]]+bc[e[t+15]]).toLowerCase();if(!gc(n))throw TypeError("Stringified UUID is invalid");return n}(r)}var Sc,wc=function(e){this.id=e.id||Ec(),this.displayName=e.displayName||"",this.key=e.key||"",this.color=e.color||"",ua(this)},Nc=function(e){this.id=(null==e?void 0:e.id)||null,ua(this)},Tc=function(e){var t;void 0===e&&(e={}),this.colors=e.colors?e.colors.map((function(e){return new wc(e)})):[],this.favicon=(null===(t=e.favicon)||void 0===t?void 0:t.id)?e.favicon:new Nc,this.stockPreference=e.stockPreference||Sc.SHOW_ALL,ua(this)};!function(e){e.HIDE_OUT_OF_STOCK="HIDE_OUT_OF_STOCK",e.SHOW_ALL="SHOW_ALL",e.SHOW_OUT_OF_STOCK_AT_END="SHOW_OUT_OF_STOCK_AT_END"}(Sc||(Sc={}));var Ac,Cc,Dc,xc,kc=function(){function e(e){var t;void 0===e&&(e={}),this.name=e.name||"",this.components=e.components?e.components.map((function(e){return new lc(e)})):[],this.pages=e.pages?e.pages.map((function(e){return new hc(e)})):[],this.settings=e.settings?new Tc(e.settings):new Tc,this.customData=e.customData?null===(t=e.customData)||void 0===t?void 0:t.map((function(e){return new fc(e)})):[],this.createCheckoutData(),ua(this)}return Object.defineProperty(e.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),e.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),t=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new lc({id:"checkout",dir:"",displayName:"",props:[new ac({name:"buttonBgColor",isRequired:!1,type:sc.COLOR}),new ac({name:"buttonTextColor",isRequired:!1,type:sc.COLOR}),new ac({name:"buttonDisabledBgColor",isRequired:!1,type:sc.COLOR}),new ac({name:"buttonDisabledTextColor",isRequired:!1,type:sc.COLOR}),new ac({name:"primaryTextColor",isRequired:!1,type:sc.COLOR}),new ac({name:"secondaryTextColor",isRequired:!1,type:sc.COLOR}),new ac({name:"primaryBgColor",isRequired:!1,type:sc.COLOR}),new ac({name:"secondaryBgColor",isRequired:!1,type:sc.COLOR}),new ac({name:"borderColor",isRequired:!1,type:sc.COLOR}),new ac({name:"cardBgColor",isRequired:!1,type:sc.COLOR}),new ac({name:"errorColor",isRequired:!1,type:sc.COLOR}),new ac({name:"errorLightColor",isRequired:!1,type:sc.COLOR}),new ac({name:"warningColor",isRequired:!1,type:sc.COLOR}),new ac({name:"warningLightColor",isRequired:!1,type:sc.COLOR}),new ac({name:"successColor",isRequired:!1,type:sc.COLOR}),new ac({name:"successLightColor",isRequired:!1,type:sc.COLOR})]}),this.components.push(e)),t||this.pages.push(new hc({id:"checkout",type:cc.CHECKOUT,components:[new dc({componentId:e.id,propValues:{buttonBgColor:Ic,buttonTextColor:Pc,buttonDisabledBgColor:Lc,buttonDisabledTextColor:jc,primaryTextColor:Rc,secondaryTextColor:Vc,primaryBgColor:Fc,secondaryBgColor:Uc,borderColor:Bc,cardBgColor:Mc,errorColor:Gc,errorLightColor:qc,warningColor:Kc,warningLightColor:Wc,successColor:$c,successLightColor:zc}})]}))},e}(),Ic="#272727",Pc="#FFFFFF",Lc="#F7F7F9",jc="#8A8B94",Rc="#272727",Vc="#8A8B94",Fc="#FFFFFF",Uc="#F7F7F9",Bc="#E5E4E9",Mc="#F7F7F9",Gc="#FB4E4E",qc="#FCF3F4",Kc="#FFBC1F",Wc="#FFFAEE",$c="#2DCA73",zc="#F6FFED",Xc=function(){function t(){}return t.generate=function(t){return Un(e.join(process.cwd(),"src","theme.json"),"",JSON.stringify(t,null,2))},t.generateInitialThemeJsonFile=function(){var e=new kc;return e.pages.push(new hc({type:cc.INDEX})),t.generate(e)},t.getTheme=function(){try{var t=e.join(process.cwd(),"src","theme.json"),n=Vn.readFileSync(t);return n.length?JSON.parse(n.toString()):null}catch(e){console.error(e)}},t}(),Yc=function(){function t(){}return t.generate=function(n){return Fn(e.join(process.cwd(),"src","components","__generated__")),t.generateAllComponentImportsFile(n)&&t.generateAllComponentImportsFileForEditor(n)},t.generateAllComponentImportsFileForEditor=function(t){try{var n='import dynamic from "next/dynamic.js";\r\n';n+='import { IkasEditorComponentLoader } from "@ikas/storefront/src/components/page-editor/loader";\r\n',n+="\r\n",n+="const loader = { loading: () => <IkasEditorComponentLoader /> };\r\n",n+="\r\n";var r=t.components.filter((function(e){return"checkout"!==e.id}));return r.filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="const Component"+t+' = dynamic(() => import("../'+e.dir+'"), loader);\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",Un(e.join(process.cwd(),"src","components","__generated__"),"editor.tsx",n)}catch(e){return console.error(e),!1}},t.generateAllComponentImportsFile=function(t){try{var n="",r=t.components.filter((function(e){return"checkout"!==e.id}));return r.filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="import Component"+t+' from "../'+e.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",Un(e.join(process.cwd(),"src","components","__generated__"),"index.tsx",n)}catch(e){return console.error(e),!1}},t}(),Hc=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[cc.PRODUCT,cc.CATEGORY,cc.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[cc.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[cc.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[cc.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[cc.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[cc.FORGOT_PASSWORD]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[cc.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[cc.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[cc.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[cc.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[cc.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[cc.BLOG,cc.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[cc.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[cc.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[cc.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[cc.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[cc.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[cc.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[cc.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[cc.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],Jc=function(){function t(){}return t.generate=function(){Fn(e.join(process.cwd(),"src","pages"),["_app.tsx","_document.tsx","api"]);for(var n=!0,r=0,o=Hc;r<o.length;r++){var i=o[r];n=n&&t.generatePageWithInfo(i)}var s=Hc.find((function(e){return e.isCheckout})),a=Hc.find((function(e){return e.isEditor})),c=!!s&&t.generatePageWithInfo(s),u=!!a&&t.generatePageWithInfo(a);return n&&c&&u},t.generatePageWithInfo=function(t){try{var n="";if(t.isCheckout)n='import { CheckoutPage } from "@ikas/storefront";\n\nexport default CheckoutPage.default;\nexport const getStaticProps = CheckoutPage.getStaticProps;\n';else if(t.isEditor)n='import { EditorPage } from "@ikas/storefront";\nimport Components from "../components/__generated__/editor";\n\nconst PageComponent = EditorPage.default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\nexport const getStaticProps = EditorPage.getStaticProps;\n';else{var r="import { "+t.pageComponentName+' } from "@ikas/storefront";\r\n';n=r+'import Components from "src/components/__generated__/index";\r\n'+("\nconst PageComponent = "+t.pageComponentName+".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n")+(t.isDynamicSSG?"export const getStaticPaths = "+t.pageComponentName+".getStaticPaths;\r\n":"")+(t.isSSR?"export const getServerSideProps = "+t.pageComponentName+".getServerSideProps;\r\n":"export const getStaticProps = "+t.pageComponentName+".getStaticProps;\r\n")}return Un(e.join(process.cwd(),"src","pages"),t.path,n)}catch(e){return console.error(e),!1}},t.generatePageWithType=function(e){var n=Hc.find((function(t){return t.pageTypes.includes(e)}));return!!n&&t.generatePageWithInfo(n)},t}(),Zc=function(){function t(){}return t.generate=function(){return!!Vn.existsSync(e.join(process.cwd(),"src","store","index.ts"))||Un(e.join(process.cwd(),"src","store"),"index.ts",'import { IkasBaseStore } from "@ikas/storefront";\n\nexport default class Store extends IkasBaseStore {\n // Add your own stores here if needed\n // ex: yourStore: YourStore;\n\n constructor() {\n super();\n\n // Init your own stores here\n // ex: this.yourStore = new YourStore();\n }\n}\n')},t}();Dc=[{name:"generate",alias:"g",type:Boolean},{name:"dev",alias:"d",type:Boolean}],(xc=Ae(Dc)).generate&&(Ac=xc.dev?"dev":"prod",(Cc=Xc.getTheme())||Xc.generateInitialThemeJsonFile(),Cc=Xc.getTheme(),Xc.generate(Cc)&&Yc.generate(Cc)&&Jc.generate()&&Mn.generate()&&Zc.generate()&&ao.generate(Ac)?console.log("Project files generated successfully!"):console.log("Project files generate failed!"));
|
|
16
|
+
***************************************************************************** */var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){var t={exports:{}};return e(t,t.exports),t.exports}var p=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,d=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,h="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",v="[\\ud800-\\udfff]",_="["+h+"]",y="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",m="\\d+",g="[\\u2700-\\u27bf]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]",O="[^\\ud800-\\udfff"+h+m+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",E="\\ud83c[\\udffb-\\udfff]",S="[^\\ud800-\\udfff]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",N="[\\ud800-\\udbff][\\udc00-\\udfff]",T="[A-Z\\xc0-\\xd6\\xd8-\\xde]",A="(?:"+b+"|"+O+")",C="(?:"+T+"|"+O+")",x="(?:"+y+"|"+E+")"+"?",D="[\\ufe0e\\ufe0f]?"+x+("(?:\\u200d(?:"+[S,w,N].join("|")+")[\\ufe0e\\ufe0f]?"+x+")*"),k="(?:"+[g,w,N].join("|")+")"+D,P="(?:"+[S+y+"?",y,w,N,v].join("|")+")",I=RegExp("['’]","g"),L=RegExp(y,"g"),j=RegExp(E+"(?="+E+")|"+P+D,"g"),R=RegExp([T+"?"+b+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[_,T,"$"].join("|")+")",C+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[_,T+A,"$"].join("|")+")",T+"?"+A+"+(?:['’](?:d|ll|m|re|s|t|ve))?",T+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",m,k].join("|"),"g"),V=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),F=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U="object"==typeof l&&l&&l.Object===Object&&l,B="object"==typeof self&&self&&self.Object===Object&&self,M=U||B||Function("return this")();var G,q=(G={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(e){return null==G?void 0:G[e]});function K(e){return V.test(e)}function W(e){return K(e)?function(e){return e.match(j)||[]}(e):function(e){return e.split("")}(e)}var $=Object.prototype.toString,z=M.Symbol,X=z?z.prototype:void 0,Y=X?X.toString:void 0;function H(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==$.call(e)}(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function J(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function Z(e){return null==e?"":H(e)}var Q,ee=(Q=function(e,t,n){return t=t.toLowerCase(),e+(n?ne(Z(t).toLowerCase()):t)},function(e){return function(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}(function(e,t,n){return e=Z(e),void 0===(t=n?void 0:t)?function(e){return F.test(e)}(e)?function(e){return e.match(R)||[]}(e):function(e){return e.match(p)||[]}(e):e.match(t)||[]}(function(e){return(e=Z(e))&&e.replace(d,q).replace(L,"")}(e).replace(I,"")),Q,"")});var te,ne=(te="toUpperCase",function(e){var t=K(e=Z(e))?W(e):void 0,n=t?t[0]:e.charAt(0),r=t?J(t,1).join(""):e.slice(1);return n[te]()+r});var re,oe=(re=ee)&&"object"==typeof re&&"default"in re?re.default:re;function ie(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}function se(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function ae(e,t){const n=[],r=se(arguments);return r.splice(0,2),se(e).forEach(((e,o)=>{let i=[];r.forEach((t=>{"function"==typeof t?i=i.concat(t(e)):i.push(t)})),t(e)&&n.push({index:o,replaceWithValue:i})})),n.reverse().forEach((t=>{const n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)})),e}const ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class ue extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=ie(e);else{e=process.argv.slice(0);const t=process.execArgv.some(ve)?1:2;e.splice(0,t)}e.forEach((e=>this.push(String(e))))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some((e=>ce.optEquals.test(e)))){const e=[];this.forEach((t=>{const n=t.match(ce.optEquals);n?e.push(n[1],n[2]):e.push(t)})),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&ae(this,ce.combinedShort,le)}hasCombinedShortOptions(){return this.some((e=>ce.combinedShort.test(e)))}static from(e){const t=new this;return t.load(e),t}}function le(e){return(e=e.slice(1)).split("").map((e=>"-"+e))}function fe(e){return ce.optEquals.test(e)}function pe(e){return(ce.short.test(e)||ce.long.test(e))&&!ce.optEquals.test(e)}function de(e){return ce.short.test(e)?e.match(ce.short)[1]:function(e){return ce.long.test(e)&&!fe(e)}(e)?e.match(ce.long)[1]:fe(e)?e.match(ce.optEquals)[1].replace(/^--/,""):null}function he(e){return!(pe(e)||ce.combinedShort.test(e)||ce.optEquals.test(e))}function ve(e){return["--eval","-e"].indexOf(e)>-1||e.startsWith("--eval=")}function _e(e){return"object"==typeof e&&null!==e}function ye(e){return void 0!==e}function me(e){return"function"==typeof e}var ge={isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isPlainObject:function(e){return null!==e&&"object"==typeof e&&e.constructor===Object},isArrayLike:function(e){return _e(e)&&"number"==typeof e.length},isObject:_e,isDefined:ye,isFunction:me,isClass:function(e){return!!me(e)&&/^class /.test(Function.prototype.toString.call(e))},isPrimitive:function(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}},isPromise:function(e){if(e){const t=ye(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1},isIterable:function(e){return!(null===e||!ye(e))&&("function"==typeof e[Symbol.iterator]||"function"==typeof e[Symbol.asyncIterator])}};class be{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(const t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||ge.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}}class Oe extends Array{validate(e){this.some((e=>!e.name))&&Ee("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition");let t;this.some((e=>e.type&&"function"!=typeof e.type))&&Ee("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");this.some((e=>(t=e,ge.isDefined(e.alias)&&ge.isNumber(e.alias))))&&Ee("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+t.name+" alias is -"+t.alias+"]");this.some((e=>(t=e,ge.isDefined(e.alias)&&1!==e.alias.length)))&&Ee("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character");this.some((e=>(t=e,"-"===e.alias)))&&Ee("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"');we(this.map((t=>e?t.name.toLowerCase():t.name)))&&Ee("INVALID_DEFINITIONS","Two or more option definitions have the same name");we(this.map((t=>e&&ge.isDefined(t.alias)?t.alias.toLowerCase():t.alias)))&&Ee("INVALID_DEFINITIONS","Two or more option definitions have the same alias");we(this.map((e=>e.defaultOption)))&&Ee("INVALID_DEFINITIONS","Only one option definition can be the defaultOption");this.some((e=>(t=e,e.isBoolean()&&e.defaultOption)))&&Ee("INVALID_DEFINITIONS",`A boolean option ["${t.name}"] can not also be the defaultOption.`)}get(e,t){if(pe(e)){if(ce.short.test(e)){const n=de(e);if(t){const e=n.toLowerCase();return this.find((t=>ge.isDefined(t.alias)&&t.alias.toLowerCase()===e))}return this.find((e=>e.alias===n))}{const n=de(e);if(t){const e=n.toLowerCase();return this.find((t=>t.name.toLowerCase()===e))}return this.find((e=>e.name===n))}}return this.find((t=>t.name===e))}getDefault(){return this.find((e=>!0===e.defaultOption))}isGrouped(){return this.some((e=>e.group))}whereGrouped(){return this.filter(Se)}whereNotGrouped(){return this.filter((e=>!Se(e)))}whereDefaultValueSet(){return this.filter((e=>ge.isDefined(e.defaultValue)))}static from(e,t){if(e instanceof this)return e;const n=super.from(ie(e),(e=>be.create(e)));return n.validate(t),n}}function Ee(e,t){const n=new Error(t);throw n.name=e,n}function Se(e){return ie(e.group).some((e=>e))}function we(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(t[r])return!0;ge.isDefined(r)&&(t[r]=!0)}}class Ne{constructor(e,t){this.options=Object.assign({},t),this.definitions=Oe.from(e,this.options.caseInsensitive),this.argv=ue.from(this.options.argv),this.argv.hasCombinedShortOptions()&&ae(this.argv,ce.combinedShort.test.bind(ce.combinedShort),(e=>(e=e.slice(1)).split("").map((t=>({origArg:`-${e}`,arg:"-"+t})))))}*[Symbol.iterator](){const e=this.definitions;let t,n,r,o,i,s=!1,a=!1;for(let c of this.argv){if(ge.isPlainObject(c)&&(i=c.origArg,c=c.arg),a&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:c,name:"_unknown",value:void 0};continue}if(pe(c))t=e.get(c,this.options.caseInsensitive),n=void 0,t?(n=!!t.isBoolean()||null,o="set"):o="unknown_option";else if(fe(c)){const r=c.match(ce.optEquals);t=e.get(r[1],this.options.caseInsensitive),t?t.isBoolean()?(yield{event:"unknown_value",arg:c,name:"_unknown",value:n,def:t},o="set",n=!0):(o="set",n=r[2]):o="unknown_option"}else he(c)&&(t?(n=c,o="set"):(t=this.definitions.getDefault(),t&&!s?(n=c,o="set"):(o="unknown_value",t=void 0)));r=t?t.name:"_unknown";const u={event:o,arg:c,name:r,value:n,def:t};i&&(u.subArg=c,u.arg=i),yield u,"_unknown"===r&&(a=!0),t&&t.defaultOption&&!t.isMultiple()&&"set"===o&&(s=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&ge.isDefined(n)&&null!==n&&(t=void 0),n=void 0,o=void 0,r=void 0,i=void 0}}}const Te=new WeakMap;class Ae{constructor(e){this.definition=new be(e),this.state=null,this.resetToDefault()}get(){return Te.get(this)}set(e){this._set(e,"set")}_set(e,t){const n=this.definition;if(n.isMultiple()){if(null!=e){const r=this.get();"default"===this.state&&(r.length=0),r.push(n.type(e)),this.state=t}}else{if(!n.isMultiple()&&"set"===this.state){const t=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name="ALREADY_SET",t.value=e,t.optionName=n.name,t}null==e?Te.set(this,e):(Te.set(this,n.type(e)),this.state=t)}}resetToDefault(){ge.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Te.set(this,ie(this.definition.defaultValue).slice()):Te.set(this,this.definition.defaultValue):this.definition.isMultiple()?Te.set(this,[]):Te.set(this,null),this.state="default"}static create(e){return(e=new be(e)).isBoolean()?Ce.create(e):new this(e)}}class Ce extends Ae{set(e){super.set(!0)}static create(e){return new this(e)}}class xe extends Map{constructor(e){super(),this.definitions=Oe.from(e),this.set("_unknown",Ae.create({name:"_unknown",multiple:!0}));for(const e of this.definitions.whereDefaultValueSet())this.set(e.name,Ae.create(e))}toObject(e){e=e||{};const t={};for(const n of this){const r=e.camelCase&&"_unknown"!==n[0]?oe(n[0]):n[0],o=n[1];("_unknown"!==r||o.get().length)&&(t[r]=o.get())}return e.skipUnknown&&delete t._unknown,t}}class De extends xe{toObject(e){const t=super.toObject({skipUnknown:e.skipUnknown}),n=super.toObject(e),r=n._unknown;delete n._unknown;const o={_all:n};return r&&r.length&&(o._unknown=r),this.definitions.whereGrouped().forEach((n=>{const r=e.camelCase?oe(n.name):n.name,i=t[n.name];for(const e of ie(n.group))o[e]=o[e]||{},ge.isDefined(i)&&(o[e][r]=i)})),this.definitions.whereNotGrouped().forEach((n=>{const r=e.camelCase?oe(n.name):n.name,i=t[n.name];ge.isDefined(i)&&(o._none||(o._none={}),o._none[r]=i)})),o}}var ke=function(e,t){(t=t||{}).stopAtFirstUnknown&&(t.partial=!0),e=Oe.from(e,t.caseInsensitive);const n=new Ne(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown,caseInsensitive:t.caseInsensitive}),r=new(e.isGrouped()?De:xe)(e);for(const e of n){const n=e.subArg||e.arg;if(!t.partial){if("unknown_value"===e.event){const e=new Error(`Unknown value: ${n}`);throw e.name="UNKNOWN_VALUE",e.value=n,e}if("unknown_option"===e.event){const e=new Error(`Unknown option: ${n}`);throw e.name="UNKNOWN_OPTION",e.optionName=n,e}}let o;r.has(e.name)?o=r.get(e.name):(o=Ae.create(e.def),r.set(e.name,o)),"_unknown"===e.name?o.set(n):o.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})};function Pe(t,n){return c(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,Promise.resolve().then((function(){return eu}))];case 1:return r=o.sent(),r.readdirSync(t).forEach((function(o){(null==n?void 0:n.includes(o))||r.removeSync(e.join(t,o))})),[2,!0];case 2:return o.sent(),[2,!1];case 3:return[2]}}))}))}function Ie(t,n,r){var o;return c(this,void 0,void 0,(function(){var i,s,a,c,l;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,Promise.resolve().then((function(){return eu}))];case 1:return i=u.sent(),s=t,a=function(e){var t=e.split("/");return t.length>1?{dirParts:t.slice(0,t.length-1),filePart:t[t.length-1]}:{filePart:e}}(n),(null===(o=a.dirParts)||void 0===o?void 0:o.length)&&(s=e.join.apply(e,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}([s],a.dirParts))),c=e.join(s,a.filePart),i.outputFileSync(c,r),[2,!0];case 2:return l=u.sent(),console.error(l),[2,!1];case 3:return[2]}}))}))}var Le=[{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetComponentDirs.getComponentDirs;\nexport const config = IkasLocalThemeAPI.GetComponentDirs.config;\n',fileName:"getComponentDirs.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.GetTheme.getTheme;\nexport const config = IkasLocalThemeAPI.GetTheme.config;\n',fileName:"getTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UpdateTheme.updateTheme;\nexport const config = IkasLocalThemeAPI.UpdateTheme.config;\n',fileName:"updateTheme.ts"},{content:'import { IkasLocalThemeAPI } from "@ikas/storefront-utils";\n\nexport default IkasLocalThemeAPI.UploadTheme.uploadTheme;\nexport const config = IkasLocalThemeAPI.UploadTheme.config;\n',fileName:"uploadTheme.ts"}],je=function(){function t(){}return t.generate=function(){return c(this,void 0,void 0,(function(){var n,r,o,i,s;return u(this,(function(a){switch(a.label){case 0:return[4,Pe(e.join(process.cwd(),"src","pages","api"))];case 1:a.sent(),n=!0,r=0,o=Le,a.label=2;case 2:return r<o.length?(i=o[r],(s=n)?[4,t.generateAPI(i)]:[3,4]):[3,6];case 3:s=a.sent(),a.label=4;case 4:n=s,a.label=5;case 5:return r++,[3,2];case 6:return[2,n]}}))}))},t.generateAPI=function(t){return Ie(e.join(process.cwd(),"src","pages","api"),t.fileName,t.content)},t}(),Re="object"==typeof l&&l&&l.Object===Object&&l,Ve="object"==typeof self&&self&&self.Object===Object&&self,Fe=Re||Ve||Function("return this")(),Ue=Fe.Symbol,Be=Object.prototype,Me=Be.hasOwnProperty,Ge=Be.toString,qe=Ue?Ue.toStringTag:void 0;var Ke=function(e){var t=Me.call(e,qe),n=e[qe];try{e[qe]=void 0;var r=!0}catch(e){}var o=Ge.call(e);return r&&(t?e[qe]=n:delete e[qe]),o},We=Object.prototype.toString;var $e=function(e){return We.call(e)},ze=Ue?Ue.toStringTag:void 0;var Xe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ze&&ze in Object(e)?Ke(e):$e(e)};var Ye=function(e){return null!=e&&"object"==typeof e};var He=function(e){return Ye(e)&&"[object Arguments]"==Xe(e)},Je=Object.prototype;Je.hasOwnProperty,Je.propertyIsEnumerable;He(function(){return arguments}());var Ze=function(){return!1};f((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Fe.Buffer:void 0,i=(o?o.isBuffer:void 0)||Ze;e.exports=i}));var Qe=f((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&Re.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i}));Qe&&Qe.isTypedArray;var et=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var tt=function(e){if(!et(e))return!1;var t=Xe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var nt,rt=Fe["__core-js_shared__"],ot=(nt=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||""))?"Symbol(src)_1."+nt:"";var it=function(e){return!!ot&&ot in e},st=Function.prototype.toString;var at=function(e){if(null!=e){try{return st.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ct=/^\[object .+?Constructor\]$/,ut=Function.prototype,lt=Object.prototype,ft=ut.toString,pt=lt.hasOwnProperty,dt=RegExp("^"+ft.call(pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ht=function(e){return!(!et(e)||it(e))&&(tt(e)?dt:ct).test(at(e))};var vt=function(e,t){return null==e?void 0:e[t]};var _t=function(e,t){var n=vt(e,t);return ht(n)?n:void 0},yt=_t(Object,"create");var mt=function(){this.__data__=yt?yt(null):{},this.size=0};var gt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},bt=Object.prototype.hasOwnProperty;var Ot=function(e){var t=this.__data__;if(yt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(t,e)?t[e]:void 0},Et=Object.prototype.hasOwnProperty;var St=function(e){var t=this.__data__;return yt?void 0!==t[e]:Et.call(t,e)};var wt=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yt&&void 0===t?"__lodash_hash_undefined__":t,this};function Nt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nt.prototype.clear=mt,Nt.prototype.delete=gt,Nt.prototype.get=Ot,Nt.prototype.has=St,Nt.prototype.set=wt;var Tt=Nt;var At=function(){this.__data__=[],this.size=0};var Ct=function(e,t){return e===t||e!=e&&t!=t};var xt=function(e,t){for(var n=e.length;n--;)if(Ct(e[n][0],t))return n;return-1},Dt=Array.prototype.splice;var kt=function(e){var t=this.__data__,n=xt(t,e);return!(n<0)&&(n==t.length-1?t.pop():Dt.call(t,n,1),--this.size,!0)};var Pt=function(e){var t=this.__data__,n=xt(t,e);return n<0?void 0:t[n][1]};var It=function(e){return xt(this.__data__,e)>-1};var Lt=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function jt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jt.prototype.clear=At,jt.prototype.delete=kt,jt.prototype.get=Pt,jt.prototype.has=It,jt.prototype.set=Lt;var Rt=jt,Vt=_t(Fe,"Map");var Ft=function(){this.size=0,this.__data__={hash:new Tt,map:new(Vt||Rt),string:new Tt}};var Ut=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Bt=function(e,t){var n=e.__data__;return Ut(t)?n["string"==typeof t?"string":"hash"]:n.map};var Mt=function(e){var t=Bt(this,e).delete(e);return this.size-=t?1:0,t};var Gt=function(e){return Bt(this,e).get(e)};var qt=function(e){return Bt(this,e).has(e)};var Kt=function(e,t){var n=Bt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Wt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wt.prototype.clear=Ft,Wt.prototype.delete=Mt,Wt.prototype.get=Gt,Wt.prototype.has=qt,Wt.prototype.set=Kt;var $t=Wt;function zt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(zt.Cache||$t),n}zt.Cache=$t;var Xt=zt;var Yt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/\\(\\)?/g;(function(e){var t=Xt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache})((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Yt,(function(e,n,r,o){t.push(r?o.replace(Ht,"$1"):n||e)})),t}));var Jt=Ue?Ue.prototype:void 0;Jt&&Jt.toString;var Zt={next:"12.0.4",react:"17.0.2","react-dom":"17.0.2",mobx:"^6.1.3","mobx-react-lite":"^3.1.5","next-transpile-modules":"^9.0.0","@ikas/storefront-utils":"^2.0.0-alpha.1"},Qt={"@types/node":"^14.14.6","@types/react":"^16.9.55","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0",eslint:"^6.6.0","eslint-config-react-app":"^5.2.1","eslint-loader":"3.0.3","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.1","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.19.0","eslint-plugin-react-hooks":"^1.6.1",sass:"^1.43.4",typescript:"^4.5.2","fs-extra":"^10.0.0"},en={upgradeDependencies:"yarn upgrade @ikas/storefront",dev:"next dev -p 3333",build:"next build",start:"next start",generate:"ikas --generate","prettier:all":"npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"},tn=function(){function t(){}return t.generate=function(e){return c(this,void 0,void 0,(function(){var n,r,o;return u(this,(function(i){switch(i.label){case 0:return[4,t.generateTsConfig()];case 1:return(o=i.sent())?[4,t.generateNextConfig()]:[3,3];case 2:o=i.sent(),i.label=3;case 3:return(r=o)?[4,t.generatePackageJson()]:[3,5];case 4:r=i.sent(),i.label=5;case 5:return(n=r)?[4,t.generateEnv(e)]:[3,7];case 6:n=i.sent(),i.label=7;case 7:return[2,n]}}))}))},t.generateTsConfig=function(){return Ie(process.cwd(),"tsconfig.json",'{\n "compilerOptions": {\n "target": "esnext",\n "lib": [\n "dom",\n "dom.iterable",\n "esnext"\n ],\n "allowJs": true,\n "skipLibCheck": true,\n "strict": true,\n "forceConsistentCasingInFileNames": true,\n "experimentalDecorators": true,\n "noEmit": true,\n "esModuleInterop": true,\n "module": "esnext",\n "moduleResolution": "node",\n "resolveJsonModule": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "baseUrl": ".",\n "useUnknownInCatchVariables": false,\n "incremental": true\n },\n "typeRoots": [\n "./node_modules/@types"\n ],\n "include": [\n "next-env.d.ts",\n "**/*.ts",\n "**/*.tsx",\n "**/typings/global.d.ts",\n ],\n "exclude": [\n "node_modules",\n "./src/pages/api",\n ]\n}')},t.generateNextConfig=function(){return Ie(process.cwd(),"next.config.js",'const withTM = require("next-transpile-modules")(["@ikas/storefront"]);\n\nconst config = {\n i18n: {\n defaultLocale: "en",\n locales: ["en"],\n localeDetection: false,\n },\n basePath: process.env.NEXTJS_BASE_PATH || "",\n\n images: {\n deviceSizes: [\n 180,\n 360,\n 540,\n 720,\n 900,\n 1080,\n 1296,\n 1512,\n 1728,\n 1950,\n 2560,\n 3840,\n ],\n },\n\n webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {\n if (!isServer) {\n config.resolve.fallback.fs = false;\n }\n return config;\n },\n};\n\nmodule.exports = withTM(config);')},t.generatePackageJson=function(){return c(this,void 0,void 0,(function(){var t,n,r,o,i,s;return u(this,(function(c){switch(c.label){case 0:return c.trys.push([0,4,,5]),[4,Promise.resolve().then((function(){return eu}))];case 1:return t=c.sent(),n=e.join(process.cwd(),"package.json"),(r=t.readFileSync(n)).length?(o=JSON.parse(r.toString()),(i=function(e){var t="dev"===e?Qt:Zt,n="dev"===e?"devDependencies":"dependencies";o[n]&&"object"==typeof o[n]?o[n]=a(a({},o[n]),t):o[n]=t;var r,i=(r=o[n],Object.keys(r).sort().reduce((function(e,t){return e[t]=r[t],e}),{}));o[n]=i})("dev"),i("normal"),o.scripts&&"object"==typeof o.scripts?o.scripts=a(a({},o.scripts),en):o.scripts=en,[4,Ie(n,"",JSON.stringify(o,null,2))]):[3,3];case 2:return[2,c.sent()];case 3:return[3,5];case 4:return s=c.sent(),console.error(s),[2,!1];case 5:return[2]}}))}))},t.generateEnv=function(e){var t="dev"===e?"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.dev\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.dev\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.dev/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.dev/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.dev/api/sf/graphql\n":"NEXT_PUBLIC_ENV=local\nNEXT_PUBLIC_BASE_URL=https://api.myikas.com\nNEXT_PUBLIC_IMG_HOST=cdn.myikas.com\nNEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/\nNEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql\nNEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql\n";return Ie(process.cwd(),".env",t)},t}(),nn="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"}}:{};function rn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var o="string"==typeof e?e:nn[e];throw"function"==typeof o&&(o=o.apply(null,n)),new Error("[MobX] "+o)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var on={};function sn(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:on}var an=Object.assign,cn=Object.getOwnPropertyDescriptor,un=Object.defineProperty,ln=Object.prototype,fn=[];Object.freeze(fn);var pn={};Object.freeze(pn);var dn="undefined"!=typeof Proxy,hn=Object.toString();function vn(){dn||rn("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function _n(e){"production"!==process.env.NODE_ENV&&so.verifyProxies&&rn("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function yn(){return++so.mobxGuid}function mn(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var gn=function(){};function bn(e){return"function"==typeof e}function On(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function En(e){return null!==e&&"object"==typeof e}function Sn(e){var t;if(!En(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===hn}function wn(e,t,n){un(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Nn(e,t,n){un(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Tn(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return En(e)&&!0===e[n]}}function An(e){return e instanceof Map}function Cn(e){return e instanceof Set}var xn=void 0!==Object.getOwnPropertySymbols;var Dn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:xn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function kn(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function Pn(e){return null===e?null:"object"==typeof e?""+e:e}function In(e,t){return ln.hasOwnProperty.call(e,t)}var Ln=Object.getOwnPropertyDescriptors||function(e){var t={};return Dn(e).forEach((function(n){t[n]=cn(e,n)})),t};function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rn(e,t,n){return t&&jn(e.prototype,t),n&&jn(e,n),e}function Vn(){return Vn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vn.apply(this,arguments)}function Fn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Un(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Gn=Symbol("mobx-stored-annotations");function qn(e){return Object.assign((function(t,n){Kn(t,n,e)}),e)}function Kn(e,t,n){(In(e,Gn)||wn(e,Gn,Vn({},e[Gn])),"production"!==process.env.NODE_ENV&&Zn(n)&&!In(e[Gn],t))&&rn("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Zn(t)&&In(e[Gn],n)){var r=e.constructor.name+".prototype."+n.toString(),o=e[Gn][n].annotationType_;rn("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+o+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overriden by subclass.")}}(e,n,t),Zn(n)||(e[Gn][t]=Vn({},n,{isDecorator_:!0}))}var Wn=Symbol("mobx administration"),$n=function(){function e(e){void 0===e&&(e="Atom@"+yn()),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gr.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return po(this)},t.reportChanged=function(){lo(),ho(this),fo()},t.toString=function(){return this.name_},e}(),zn=Tn("Atom",$n);function Xn(e,t,n){void 0===t&&(t=gn),void 0===n&&(n=gn);var r,o=new $n(e);return t!==gn&&Vo("onBO",o,t,r),n!==gn&&Ro(o,n),o}var Yn={identity:function(e,t){return e===t},structural:function(e,t){return Xi(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return Xi(e,t,1)}};function Hn(e,t,n){return zo(e)?e:Array.isArray(e)?Ar.array(e,{name:n}):Sn(e)?Ar.object(e,void 0,{name:n}):An(e)?Ar.map(e,{name:n}):Cn(e)?Ar.set(e,{name:n}):e}function Jn(e){return e}function Zn(e){return"override"===e.annotationType_}function Qn(e,t){return{annotationType_:e,options_:t,make_:er,extend_:tr}}function er(e,t){for(var n,r,o=!1,i=e.target_,s=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;i&&i!==ln;){var a=cn(i,t);if(a){if(i===e.target_||s){var c=nr(e,this,t,a);if(!e.defineProperty_(t,c))return;if(o=!0,s)break}if(i!==e.target_){if(Lo(a.value)){o=!0;break}var u=nr(e,this,t,a,!1);un(i,t,u),o=!0}}i=Object.getPrototypeOf(i)}o?Li(e,this,t):this.isDecorator_||rn(1,this.annotationType_,e.name_+"."+t.toString())}function tr(e,t,n,r){var o=nr(e,this,t,n);return e.defineProperty_(t,o,r)}function nr(e,t,n,r,o){var i,s,a,c,u;void 0===o&&(o=so.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||bn(i)||rn("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a function value.")}(e,t,n,r);var l,f=r.value;(null==(i=t.options_)?void 0:i.bound)&&(f=f.bind(null!=(l=e.proxy_)?l:e.target_));return{value:Rr(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),f,null!=(c=null==(u=t.options_)?void 0:u.autoAction)&&c),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function rr(e,t){return{annotationType_:e,options_:t,make_:or,extend_:ir}}function or(e,t){for(var n=!1,r=e.target_;r&&r!==ln;){var o=cn(r,t);if(o){if(r!==e.target_){if(Wo(o.value)){n=!0;break}var i=sr(e,this,t,o,!1);un(r,t,i)}else{var s=sr(e,this,t,o);if(!e.defineProperty_(t,s))return}n=!0}r=Object.getPrototypeOf(r)}n?Li(e,this,t):this.isDecorator_||rn(1,this.annotationType_,e.name_+"."+t.toString())}function ir(e,t,n,r){var o=sr(e,this,t,n);return e.defineProperty_(t,o,r)}function sr(e,t,n,r,o){return void 0===o&&(o=so.safeDescriptors),function(e,t,n,r){var o=t.annotationType_,i=r.value;"production"===process.env.NODE_ENV||bn(i)||rn("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on properties with a generator function value.")}(e,t,n,r),{value:qo(r.value),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ar(e,t){return{annotationType_:e,options_:t,make_:cr,extend_:ur}}function cr(e,t){for(var n=e.target_;n&&n!==ln;){var r=cn(n,t);if(r){if(lr(e,this,t,r),!e.defineComputedProperty_(t,Vn({},this.options_,{get:r.get,set:r.set})))return;return void Li(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||rn(1,this.annotationType_,e.name_+"."+t.toString())}function ur(e,t,n,r){return lr(e,this,t,n),e.defineComputedProperty_(t,Vn({},this.options_,{get:n.get,set:n.set}),r)}function lr(e,t,n,r){var o=t.annotationType_,i=r.get;"production"===process.env.NODE_ENV||i||rn("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' can only be used on getter(+setter) properties.")}function fr(e,t){return{annotationType_:e,options_:t,make_:pr,extend_:dr}}function pr(e,t){for(var n=e.target_;n&&n!==ln;){var r=cn(n,t);if(r){var o,i;if(hr(e,this,t,r),!e.defineObservableProperty_(t,r.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:Hn))return;return void Li(e,this,t)}n=Object.getPrototypeOf(n)}this.isDecorator_||rn(1,this.annotationType_,e.name_+"."+t.toString())}function dr(e,t,n,r){var o,i;return hr(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:Hn,r)}function hr(e,t,n,r){var o=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||rn("Cannot apply '"+o+"' to '"+e.name_+"."+n.toString()+"':\n'"+o+"' cannot be used on getter/setter properties")}var vr={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function _r(e){return e||vr}Object.freeze(vr);var yr=fr("observable"),mr=fr("observable.ref",{enhancer:Jn}),gr=fr("observable.shallow",{enhancer:function(e,t,n){return null==e||Ii(e)||yi(e)||Si(e)||Ti(e)?e:Array.isArray(e)?Ar.array(e,{name:n,deep:!1}):Sn(e)?Ar.object(e,void 0,{name:n,deep:!1}):An(e)?Ar.map(e,{name:n,deep:!1}):Cn(e)?Ar.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&rn("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),br=fr("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&zo(e)&&rn("observable.struct should not be used with observable values"),Xi(e,t)?t:e}}),Or=qn(yr);function Er(e){return!0===e.deep?Hn:!1===e.deep?Jn:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:Hn;var t,n,r}function Sr(e,t,n){if(!On(t))return zo(e)?e:Sn(e)?Ar.object(e,t,n):Array.isArray(e)?Ar.array(e,t):An(e)?Ar.map(e,t):Cn(e)?Ar.set(e,t):"object"==typeof e&&null!==e?e:Ar.box(e);Kn(e,t,yr)}Object.assign(Sr,Or);var wr,Nr,Tr={box:function(e,t){var n=_r(t);return new Mr(e,Er(n),n.name,!0,n.equals)},array:function(e,t){var n=_r(t);return(!1===so.useProxies||!1===n.proxy?qi:ci)(e,Er(n),n.name)},map:function(e,t){var n=_r(t);return new Ei(e,Er(n),n.name)},set:function(e,t){var n=_r(t);return new Ni(e,Er(n),n.name)},object:function(e,t,n){return Fo(!1===so.useProxies||!1===(null==n?void 0:n.proxy)?Di({},n):function(e,t){var n,r;return vn(),e=Di(e,t),null!=(r=(n=e[Wn]).proxy_)?r:n.proxy_=new Proxy(e,Jo)}({},n),e,t)},ref:qn(mr),shallow:qn(gr),deep:Or,struct:qn(br)},Ar=an(Sr,Tr),Cr=ar("computed"),xr=ar("computed.struct",{equals:Yn.structural}),Dr=function(e,t){if(On(t))return Kn(e,t,Cr);if(Sn(e))return qn(ar("computed",e));"production"!==process.env.NODE_ENV&&(bn(e)||rn("First argument to `computed` should be an expression."),bn(t)&&rn("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Sn(t)?t:{};return n.get=e,n.name=n.name||e.name||"",new Kr(n)};Object.assign(Dr,Cr),Dr.struct=qn(xr);var kr,Pr=0,Ir=1,Lr=null!=(wr=null==(Nr=cn((function(){}),"name"))?void 0:Nr.configurable)&&wr,jr={value:"action",configurable:!0,writable:!1,enumerable:!1};function Rr(e,t,n,r){function o(){return Vr(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(bn(t)||rn("`action` can only be invoked on functions"),"string"==typeof e&&e||rn("actions should have valid names, got: '"+e+"'")),o.isMobxAction=!0,Lr&&(jr.value=e,Object.defineProperty(o,"name",jr)),o}function Vr(e,t,n,r,o){var i=function(e,t,n,r){var o="production"!==process.env.NODE_ENV&&Oo()&&!!e,i=0;if("production"!==process.env.NODE_ENV&&o){i=Date.now();var s=r?Array.from(r):fn;So({type:To,name:e,object:n,arguments:s})}var a=so.trackingDerivation,c=!t||!a;lo();var u=so.allowStateChanges;c&&(Qr(),u=Fr(!0));var l=to(!0),f={runAsAction_:c,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:l,notifySpy_:o,startTime_:i,actionId_:Ir++,parentActionId_:Pr};return Pr=f.actionId_,f}(e,t,r,o);try{return n.apply(r,o)}catch(e){throw i.error_=e,e}finally{!function(e){Pr!==e.actionId_&&rn(30);Pr=e.parentActionId_,void 0!==e.error_&&(so.suppressReactionErrors=!0);Ur(e.prevAllowStateChanges_),no(e.prevAllowStateReads_),fo(),e.runAsAction_&&eo(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&No({time:Date.now()-e.startTime_});so.suppressReactionErrors=!1}(i)}}function Fr(e){var t=so.allowStateChanges;return so.allowStateChanges=e,t}function Ur(e){so.allowStateChanges=e}kr=Symbol.toPrimitive;var Br,Mr=function(e){function t(t,n,r,o,i){var s;return void 0===r&&(r="ObservableValue@"+yn()),void 0===o&&(o=!0),void 0===i&&(i=Yn.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=i,s.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&o&&Oo()&&Eo({type:"create",object:Un(s),observableKind:"value",debugObjectName:s.name_,newValue:""+s.value_}),s}Fn(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==so.UNCHANGED){var n=Oo();"production"!==process.env.NODE_ENV&&n&&So({type:ii,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&No()}},n.prepareNewValue_=function(e){if(Yr(this),Zo(this)){var t=ei(this,{object:this,type:ii,newValue:e});if(!t)return so.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?so.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),ti(this)&&ri(this,{type:ii,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Qo(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ii,newValue:this.value_,oldValue:void 0}),ni(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Pn(this.get())},n[kr]=function(){return this.valueOf()},t}($n);Br=Symbol.toPrimitive;var Gr,qr,Kr=function(){function e(e){this.dependenciesState_=Gr.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gr.UP_TO_DATE_,this.unboundDepsCount_=0,this.mapid_="#"+yn(),this.value_=new $r(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=qr.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||rn(31),this.derivation=e.get,this.name_=e.name||"ComputedValue@"+yn(),e.set&&(this.setter_=Rr(this.name_+"-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Yn.structural:Yn.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Gr.UP_TO_DATE_)return;e.lowestObserverState_=Gr.POSSIBLY_STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Gr.UP_TO_DATE_&&(t.dependenciesState_=Gr.POSSIBLY_STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==qr.NONE&&vo(t,e),t.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&rn(32,this.name_,this.derivation),0!==so.inBatch||0!==this.observers_.size||this.keepAlive_){if(po(this),Xr(this)){var e=so.trackingContext;this.keepAlive_&&!e&&(so.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Gr.STALE_)return;e.lowestObserverState_=Gr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Gr.POSSIBLY_STALE_?t.dependenciesState_=Gr.STALE_:t.dependenciesState_===Gr.UP_TO_DATE_&&(e.lowestObserverState_=Gr.UP_TO_DATE_)}))}(this),so.trackingContext=e}}else Xr(this)&&(this.warnAboutUntrackedRead_(),lo(),this.value_=this.computeValue_(!1),fo());var t=this.value_;if(zr(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&rn(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else rn(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Gr.NOT_TRACKING_,n=this.computeValue_(!0);"production"!==process.env.NODE_ENV&&Oo()&&Eo({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:this.value_,newValue:n});var r=t||zr(e)||zr(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=Fr(!1);if(e)t=Hr(this,this.derivation,this.scope_);else if(!0===so.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new $r(e)}return Ur(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(Jr(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,o=void 0;return function(e,t){void 0===t&&(t=pn);"production"!==process.env.NODE_ENV&&(bn(e)||rn("Autorun expects a function as first argument"),Lo(e)&&rn("Autorun does not accept actions since actions are untrackable"));var n,r=t&&t.name||e.name||"Autorun@"+yn();if(t.scheduler||t.delay){var o=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:jo}(t),i=!1;n=new yo(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed_||n.track(s)})))}),t.onError,t.requiresObservable)}else n=new yo(r,(function(){this.track(s)}),t.onError,t.requiresObservable);function s(){e(n)}return n.schedule_(),n.getDisposer_()}((function(){var i=n.get();if(!r||t){var s=Qr();e({observableKind:"computed",debugObjectName:n.name_,type:ii,object:n,newValue:i,oldValue:o}),eo(s)}r=!1,o=i}))},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(!0===this.requiresReaction_&&rn("[mobx] Computed value "+this.name_+" is read outside a reactive context"),this.isTracing_!==qr.NONE&&console.log("[mobx.trace] '"+this.name_+"' is being read outside a reactive context. Doing a full recompute"),so.computedRequiresReaction&&console.warn("[mobx] Computed value "+this.name_+" is being read outside a reactive context. Doing a full recompute"))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Pn(this.get())},t[Br]=function(){return this.valueOf()},e}(),Wr=Tn("ComputedValue",Kr);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Gr||(Gr={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(qr||(qr={}));var $r=function(e){this.cause=void 0,this.cause=e};function zr(e){return e instanceof $r}function Xr(e){switch(e.dependenciesState_){case Gr.UP_TO_DATE_:return!1;case Gr.NOT_TRACKING_:case Gr.STALE_:return!0;case Gr.POSSIBLY_STALE_:for(var t=to(!0),n=Qr(),r=e.observing_,o=r.length,i=0;i<o;i++){var s=r[i];if(Wr(s)){if(so.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return eo(n),no(t),!0}if(e.dependenciesState_===Gr.STALE_)return eo(n),no(t),!0}}return ro(e),eo(n),no(t),!1}}function Yr(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;so.allowStateChanges||!t&&"always"!==so.enforceActions||console.warn("[MobX] "+(so.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Hr(e,t,n){var r=to(!0);ro(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++so.runId;var o,i=so.trackingDerivation;if(so.trackingDerivation=e,so.inBatch++,!0===so.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(e){o=new $r(e)}return so.inBatch--,so.trackingDerivation=i,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Gr.UP_TO_DATE_,o=0,i=e.unboundDepsCount_,s=0;s<i;s++){var a=n[s];0===a.diffValue_&&(a.diffValue_=1,o!==s&&(n[o]=a),o++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=o,e.newObserving_=null,i=t.length;for(;i--;){var c=t[i];0===c.diffValue_&&co(c,e),c.diffValue_=0}for(;o--;){var u=n[o];1===u.diffValue_&&(u.diffValue_=0,ao(u,e))}r!==Gr.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;(so.reactionRequiresObservable||e.requiresObservable_)&&console.warn("[mobx] Derivation "+e.name_+" is created/updated without reading any observable value")}(e),no(r),o}function Jr(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)co(t[n],e);e.dependenciesState_=Gr.NOT_TRACKING_}function Zr(e){var t=Qr();try{return e()}finally{eo(t)}}function Qr(){var e=so.trackingDerivation;return so.trackingDerivation=null,e}function eo(e){so.trackingDerivation=e}function to(e){var t=so.allowStateReads;return so.allowStateReads=e,t}function no(e){so.allowStateReads=e}function ro(e){if(e.dependenciesState_!==Gr.UP_TO_DATE_){e.dependenciesState_=Gr.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Gr.UP_TO_DATE_}}var oo=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},io=!0,so=function(){var e=sn();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(io=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new oo).version&&(io=!1),io?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new oo):(setTimeout((function(){rn(35)}),1),new oo)}();function ao(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function co(e,t){e.observers_.delete(t),0===e.observers_.size&&uo(e)}function uo(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,so.pendingUnobservations.push(e))}function lo(){so.inBatch++}function fo(){if(0==--so.inBatch){mo();for(var e=so.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Kr&&n.suspend_())}so.pendingUnobservations=[]}}function po(e){!function(e){"production"!==process.env.NODE_ENV&&!so.allowStateReads&&so.observableRequiresReaction&&console.warn("[mobx] Observable "+e.name_+" being read outside a reactive context")}(e);var t=so.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&so.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&so.inBatch>0&&uo(e),!1)}function ho(e){e.lowestObserverState_!==Gr.STALE_&&(e.lowestObserverState_=Gr.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Gr.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==qr.NONE&&vo(t,e),t.onBecomeStale_()),t.dependenciesState_=Gr.STALE_})))}function vo(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===qr.BREAK){var n=[];_o(Uo(Ki(e,r)),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Kr?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r}function _o(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return _o(e,t,n+1)})))}var yo=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+yn()),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Gr.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.mapid_="#"+yn(),this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=qr.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,so.pendingReactions.push(this),mo())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){lo(),this.isScheduled_=!1;var e=so.trackingContext;if(so.trackingContext=this,Xr(this)){this.isTrackPending_=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending_&&Oo()&&Eo({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}so.trackingContext=e,fo()}},t.track=function(e){if(!this.isDisposed_){lo();var t,n=Oo();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),So({name:this.name_,type:"reaction"})),this.isRunning_=!0;var r=so.trackingContext;so.trackingContext=this;var o=Hr(this,e,void 0);so.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Jr(this),zr(o)&&this.reportExceptionInDerivation_(o.cause),"production"!==process.env.NODE_ENV&&n&&No({time:Date.now()-t}),fo()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(so.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";so.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&Oo()&&Eo({type:"error",name:this.name_,message:n,error:""+e}),so.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(lo(),Jr(this),fo()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[Wn]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){"production"===process.env.NODE_ENV&&rn("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=Xo(n);if(!o)return rn("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===qr.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?qr.BREAK:qr.LOG}(this,e)},e}();function mo(){so.inBatch>0||so.isRunningReactions||go()}function go(){so.isRunningReactions=!0;for(var e=so.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}so.isRunningReactions=!1}var bo=Tn("Reaction",yo);function Oo(){return"production"!==process.env.NODE_ENV&&!!so.spyListeners.length}function Eo(e){if("production"!==process.env.NODE_ENV&&so.spyListeners.length)for(var t=so.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function So(e){"production"!==process.env.NODE_ENV&&Eo(Vn({},e,{spyReportStart:!0}))}var wo={type:"report-end",spyReportEnd:!0};function No(e){"production"!==process.env.NODE_ENV&&Eo(e?Vn({},e,{type:"report-end",spyReportEnd:!0}):wo)}var To="action",Ao=Qn(To),Co=Qn("action.bound",{bound:!0}),xo=Qn("autoAction",{autoAction:!0}),Do=Qn("autoAction.bound",{autoAction:!0,bound:!0});function ko(e){return function(t,n){return bn(t)?Rr(t.name||"<unnamed action>",t,e):bn(n)?Rr(t,n,e):On(n)?Kn(t,n,e?xo:Ao):On(t)?qn(Qn(e?"autoAction":To,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&rn("Invalid arguments for `action`"))}}var Po=ko(!1);Object.assign(Po,Ao);var Io=ko(!0);function Lo(e){return bn(e)&&!0===e.isMobxAction}Object.assign(Io,xo),Po.bound=qn(Co),Io.bound=qn(Do);var jo=function(e){return e()};function Ro(e,t,n){return Vo("onBUO",e,t,n)}function Vo(e,t,n,r){var o="function"==typeof r?Ki(t,n):Ki(t),i=bn(r)?r:n,s=e+"L";return o[s]?o[s].add(i):o[s]=new Set([i]),function(){var e=o[s];e&&(e.delete(i),0===e.size&&delete o[s])}}function Fo(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&rn("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&rn("'extendObservable' expects an object as first argument"),Si(e)&&rn("'extendObservable' should not be used on maps, use map.merge instead"),Sn(t)||rn("'extendObservabe' only accepts plain objects as second argument"),(zo(t)||zo(n))&&rn("Extending an object with another observable (object) is not supported"));var o=Ln(t),i=Di(e,r)[Wn];lo();try{Dn(o).forEach((function(e){i.extend_(e,o[e],!n||(!(e in n)||n[e]))}))}finally{fo()}return e}function Uo(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Uo)),n}var Bo=0;function Mo(){this.message="FLOW_CANCELLED"}Mo.prototype=Object.create(Error.prototype);var Go=rr("flow"),qo=Object.assign((function(e,t){if(On(t))return Kn(e,t,Go);"production"!==process.env.NODE_ENV&&1!==arguments.length&&rn("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",o=function(){var e,t=this,o=arguments,i=++Bo,s=Po(r+" - runid: "+i+" - init",n).apply(t,o),a=void 0,c=new Promise((function(t,n){var o=0;function c(e){var t;a=void 0;try{t=Po(r+" - runid: "+i+" - yield "+o++,s.next).call(s,e)}catch(e){return n(e)}l(t)}function u(e){var t;a=void 0;try{t=Po(r+" - runid: "+i+" - yield "+o++,s.throw).call(s,e)}catch(e){return n(e)}l(t)}function l(e){if(!bn(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(c,u);e.then(l,n)}e=n,c(void 0)}));return c.cancel=Po(r+" - runid: "+i+" - cancel",(function(){try{a&&Ko(a);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(gn,gn),Ko(n),e(new Mo)}catch(t){e(t)}})),c};return o.isMobXFlow=!0,o}),Go);function Ko(e){bn(e.cancel)&&e.cancel()}function Wo(e){return!0===(null==e?void 0:e.isMobXFlow)}function $o(e,t){return!!e&&(void 0!==t?"production"!==process.env.NODE_ENV&&(Si(e)||yi(e))?rn("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."):!!Ii(e)&&e[Wn].values_.has(t):Ii(e)||!!e[Wn]||zn(e)||bo(e)||Wr(e))}function zo(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&rn("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),$o(e)}function Xo(e){switch(e.length){case 0:return so.trackingDerivation;case 1:return Ki(e[0]);case 2:return Ki(e[0],e[1])}}function Yo(e,t){void 0===t&&(t=void 0),lo();try{return e.apply(t)}finally{fo()}}function Ho(e){return e[Wn]}var Jo={has:function(e,t){return"production"!==process.env.NODE_ENV&&so.trackingDerivation&&_n("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Ho(e).has_(t)},get:function(e,t){return Ho(e).get_(t)},set:function(e,t,n){var r;return!!On(t)&&("production"===process.env.NODE_ENV||Ho(e).values_.has(t)||_n("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=Ho(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&_n("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!On(t)&&(null==(n=Ho(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&_n("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=Ho(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&so.trackingDerivation&&_n("iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead."),Ho(e).ownKeys_()},preventExtensions:function(e){rn(13)}};function Zo(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Qo(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),mn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ei(e,t){var n=Qr();try{for(var r=[].concat(e.interceptors_||[]),o=0,i=r.length;o<i&&((t=r[o](t))&&!t.type&&rn(14),t);o++);return t}finally{eo(n)}}function ti(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function ni(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),mn((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ri(e,t){var n=Qr(),r=e.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);eo(n)}}function oi(e,t,n){if("production"!==process.env.NODE_ENV&&(Sn(e)||Sn(Object.getPrototypeOf(e))||rn("'makeAutoObservable' can only be used for classes that don't have a superclass"),Ii(e)&&rn("makeAutoObservable can only be used on objects not already made observable")),Sn(e))return Fo(e,e,t,n);var r=Di(e,n)[Wn];lo();try{if(e[Ai])for(var o in e[Ai])r.make_(o,e[Ai][o]);else for(var i,s=((i={})[Wn]=1,i[Ai]=1,i.constructor=1,i),a=function(e){s[e]||(s[e]=1,r.make_(e,!t||(!(e in t)||t[e])))},c=e;c&&c!==ln;)Dn(c).forEach(a),c=Object.getPrototypeOf(c)}finally{fo()}return e}var ii="update",si={get:function(e,t){var n=e[Wn];return t===Wn?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?In(ui,t)?ui[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Wn];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){rn(15)}},ai=function(){function e(e,t,n,r){this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new $n(e||"ObservableArray@"+yn()),this.enhancer_=function(n,r){return t(n,r,e+"[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Qo(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ni(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||e<0)&&rn("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&rn(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Gi(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Yr(this.atom_);var o=this.values_.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=fn),Zo(this)){var i=ei(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!i)return fn;t=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_||"production"!==process.env.NODE_ENV){var s=n.length-t;this.updateArrayLength_(o,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var o=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<i.length;a++)this.values_[e+n.length+a]=i[a];return o},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&Oo(),o=ti(this),i=o||r?{observableKind:"array",object:this.proxy_,type:ii,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&So(i),this.atom_.reportChanged(),o&&ri(this,i),"production"!==process.env.NODE_ENV&&r&&No()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&Oo(),o=ti(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&So(i),this.atom_.reportChanged(),o&&ri(this,i),"production"!==process.env.NODE_ENV&&r&&No()},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx] Out of bounds read: "+e:"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){Yr(this.atom_);var r=n[e];if(Zo(this)){var o=ei(this,{type:ii,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):rn(17,e,n.length)},e}();function ci(e,t,n,r){void 0===n&&(n="ObservableArray@"+yn()),void 0===r&&(r=!1),vn();var o=new ai(n,t,r,!1);Nn(o.values_,Wn,o);var i=new Proxy(o.values_,si);if(o.proxy_=i,e&&e.length){var s=Fr(!0);o.spliceWithArray_(0,0,e),Ur(s)}return i}var ui={clear:function(){return this.splice(0)},replace:function(e){var t=this[Wn];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[Wn];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Wn].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Wn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Wn].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Wn],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return so.trackingDerivation&&rn(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){so.trackingDerivation&&rn(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Wn],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function li(e,t){"function"==typeof Array.prototype[e]&&(ui[e]=t(e))}function fi(e){return function(){var t=this[Wn];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function pi(e){return function(t,n){var r=this,o=this[Wn];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[e]((function(e,o){return t.call(n,e,o,r)}))}}function di(e){return function(){var t=this,n=this[Wn];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(e,n,r){return o(e,n,r,t)},r[e].apply(r,arguments)}}li("concat",fi),li("flat",fi),li("includes",fi),li("indexOf",fi),li("join",fi),li("lastIndexOf",fi),li("slice",fi),li("toString",fi),li("toLocaleString",fi),li("every",pi),li("filter",pi),li("find",pi),li("findIndex",pi),li("flatMap",pi),li("forEach",pi),li("map",pi),li("some",pi),li("reduce",di),li("reduceRight",di);var hi,vi,_i=Tn("ObservableArrayAdministration",ai);function yi(e){return En(e)&&_i(e[Wn])}var mi={},gi="add";hi=Symbol.iterator,vi=Symbol.toStringTag;var bi,Oi,Ei=function(){function e(e,t,n){void 0===t&&(t=Hn),void 0===n&&(n="ObservableMap@"+yn()),this.enhancer_=void 0,this.name_=void 0,this[Wn]=mi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,bn(Map)||rn(18),this.keysAtom_=Xn(this.name_+".keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!so.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Mr(this.has_(e),Jn,this.name_+"."+kn(e)+"?",!1);this.hasMap_.set(e,r),Ro(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Zo(this)){var r=ei(this,{type:n?ii:gi,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Yr(this.keysAtom_),Zo(this))&&!ei(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=Oo(),r=ti(this),o=r||n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&So(o),Yo((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&ri(this,o),"production"!==process.env.NODE_ENV&&n&&No(),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==so.UNCHANGED){var r=Oo(),o=ti(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:ii,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&So(i),n.setNewValue_(t),o&&ri(this,i),"production"!==process.env.NODE_ENV&&r&&No()}},t.addValue_=function(e,t){var n=this;Yr(this.keysAtom_),Yo((function(){var r=new Mr(t,n.enhancer_,n.name_+"."+kn(e),!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=Oo(),o=ti(this),i=o||r?{observableKind:"map",debugObjectName:this.name_,type:gi,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&So(i),o&&ri(this,i),"production"!==process.env.NODE_ENV&&r&&No()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return Ji({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:e.get(o)}}})},t.entries=function(){var e=this,t=this.keys();return Ji({next:function(){var n=t.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,e.get(o)]}}})},t[hi]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=Mn(this);!(n=r()).done;){var o=n.value,i=o[0],s=o[1];e.call(t,s,i,this)}},t.merge=function(e){var t=this;return Si(e)&&(e=new Map(e)),Yo((function(){Sn(e)?function(e){var t=Object.keys(e);if(!xn)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return ln.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):An(e)?(e.constructor!==Map&&rn(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&rn(20,e)})),this},t.clear=function(){var e=this;Yo((function(){Zr((function(){for(var t,n=Mn(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return Yo((function(){for(var n,r=function(e){if(An(e)||Si(e))return e;if(Array.isArray(e))return new Map(e);if(Sn(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return rn(21,e)}(e),o=new Map,i=!1,s=Mn(t.data_.keys());!(n=s()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))i=!0;else{var c=t.data_.get(a);o.set(a,c)}}for(var u,l=Mn(r.entries());!(u=l()).done;){var f=u.value,p=f[0],d=f[1],h=t.data_.has(p);if(t.set(p,d),t.data_.has(p)){var v=t.data_.get(p);o.set(p,v),h||(i=!0)}}if(!i)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),y=o.keys(),m=_.next(),g=y.next();!m.done;){if(m.value!==g.value){t.keysAtom_.reportChanged();break}m=_.next(),g=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&rn("`observe` doesn't support fireImmediately=true in combination with maps."),ni(this,e)},t.intercept_=function(e){return Qo(this,e)},Rn(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:vi,get:function(){return"Map"}}]),e}(),Si=Tn("ObservableMap",Ei);var wi={};bi=Symbol.iterator,Oi=Symbol.toStringTag;var Ni=function(){function e(e,t,n){void 0===t&&(t=Hn),void 0===n&&(n="ObservableSet@"+yn()),this.name_=void 0,this[Wn]=wi,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,bn(Set)||rn(22),this.atom_=Xn(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Yo((function(){Zr((function(){for(var t,n=Mn(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=Mn(this);!(n=r()).done;){var o=n.value;e.call(t,o,o,this)}},t.add=function(e){var t=this;if((Yr(this.atom_),Zo(this))&&!ei(this,{type:gi,object:this,newValue:e}))return this;if(!this.has(e)){Yo((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n="production"!==process.env.NODE_ENV&&Oo(),r=ti(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:gi,object:this,newValue:e}:null;n&&"production"!==process.env.NODE_ENV&&So(o),r&&ri(this,o),n&&"production"!==process.env.NODE_ENV&&No()}return this},t.delete=function(e){var t=this;if(Zo(this)&&!ei(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&Oo(),r=ti(this),o=r||n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&So(o),Yo((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&ri(this,o),n&&"production"!==process.env.NODE_ENV&&No(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Ji({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return Ji({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return Ti(e)&&(e=new Set(e)),Yo((function(){Array.isArray(e)||Cn(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&rn("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&rn("`observe` doesn't support fireImmediately=true in combination with sets."),ni(this,e)},t.intercept_=function(e){return Qo(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[bi]=function(){return this.values()},Rn(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Oi,get:function(){return"Set"}}]),e}(),Ti=Tn("ObservableSet",Ni),Ai=Symbol("mobx-inferred-annotations"),Ci=Object.create(null),xi=function(){function e(e,t,n,r,o){void 0===t&&(t=new Map),void 0===r&&(r=Ar),void 0===o&&(o=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=o,this.keysAtom_=new $n(n+".keys"),this.isPlainObject_=Sn(this.target_),"production"===process.env.NODE_ENV||es(this.defaultAnnotation_)||rn("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&"boolean"!=typeof this.autoBind_&&rn("autoBind must be boolean"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Kr)return n.set(t),!0;if(Zo(this)){var r=ei(this,{type:ii,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==so.UNCHANGED){var o=ti(this),i="production"!==process.env.NODE_ENV&&Oo(),s=o||i?{type:ii,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&So(s),n.setNewValue_(t),o&&ri(this,s),"production"!==process.env.NODE_ENV&&i&&No()}return!0},t.get_=function(e){return so.trackingDerivation&&!In(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),In(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!so.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Mr(e in this.target_,Jn,this.name_+"."+kn(e)+"?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(ji(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=Qi(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);ji(this,n,e);var o=n.extend_(this,e,t,r);return o&&Li(this,n,e),o},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Ai])?void 0:t[e];if(n)return n;for(var r=this.target_;r&&r!==ln;){var o=cn(r,e);if(o){n=Qi(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&rn(1,"true",e),!this.isPlainObject_){var i=Object.getPrototypeOf(this.target_);In(i,Ai)||wn(i,Ai,{}),i[Ai][e]=n}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{lo();var r=this.delete_(e);if(!r)return r;if(Zo(this)){var o=ei(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:t.value});if(!o)return null;var i=o.newValue;t.value!==i&&(t=Vn({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else un(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{fo()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{lo();var o=this.delete_(e);if(!o)return o;if(Zo(this)){var i=ei(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:t});if(!i)return null;t=i.newValue}var s=Pi(e),a={configurable:!so.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else un(this.target_,e,a);var c=new Mr(t,n,this.name_+"."+kn(e),!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{fo()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{lo();var r=this.delete_(e);if(!r)return r;if(Zo(this))if(!ei(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:void 0}))return null;t.name||(t.name=this.name_+"."+kn(e)),t.context=this.proxy_||this.target_;var o=Pi(e),i={configurable:!so.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,e,i))return!1}else un(this.target_,e,i);this.values_.set(e,new Kr(t)),this.notifyPropertyAddition_(e,void 0)}finally{fo()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!In(this.target_,e))return!0;if(Zo(this)&&!ei(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;lo();var o,i=ti(this),s="production"!==process.env.NODE_ENV&&Oo(),a=this.values_.get(e),c=void 0;if(!a&&(i||s))c=null==(o=cn(this.target_,e))?void 0:o.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],a&&(this.values_.delete(e),a instanceof Mr&&(c=a.value_),ho(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),i||s){var u={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:e};"production"!==process.env.NODE_ENV&&s&&So(u),i&&ri(this,u),"production"!==process.env.NODE_ENV&&s&&No()}}finally{fo()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&rn("`observe` doesn't support the fire immediately property for observable objects."),ni(this,e)},t.intercept_=function(e){return Qo(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,o=ti(this),i="production"!==process.env.NODE_ENV&&Oo();if(o||i){var s=o||i?{type:gi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&So(s),o&&ri(this,s),"production"!==process.env.NODE_ENV&&i&&No()}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Dn(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Di(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Ii(e)&&rn("Options can't be provided for already observable objects."),In(e,Wn))return e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||rn("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:(Sn(e)?"ObservableObject":e.constructor.name)+"@"+yn(),o=new xi(e,new Map,kn(r),function(e){return e?!0===e.deep?yr:!1===e.deep?mr:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return wn(e,Wn,o),e}var ki=Tn("ObservableObjectAdministration",xi);function Pi(e){return Ci[e]||(Ci[e]={get:function(){return this[Wn].getObservablePropValue_(e)},set:function(t){return this[Wn].setObservablePropValue_(e,t)}})}function Ii(e){return!!En(e)&&ki(e[Wn])}function Li(e,t,n){"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),t.isDecorator_&&delete e.target_[Gn][n]}function ji(e,t,n){if("production"===process.env.NODE_ENV||es(t)||rn("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Zn(t)&&In(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),o=e.appliedAnnotations_[n].annotationType_;rn("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+o+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overriden by subclass.")}}var Ri,Vi,Fi=0,Ui=function(){};Ri=Ui,Vi=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ri.prototype,Vi):void 0!==Ri.prototype.__proto__?Ri.prototype.__proto__=Vi:Ri.prototype=Vi;var Bi=function(e){function t(t,n,r,o){var i;void 0===r&&(r="ObservableArray@"+yn()),void 0===o&&(o=!1),i=e.call(this)||this;var s=new ai(r,n,o,!0);if(s.proxy_=Un(i),Nn(Un(i),Wn,s),t&&t.length){var a=Fr(!0);i.spliceWithArray(0,0,t),Ur(a)}return i}Fn(t,e);var n=t.prototype;return n.concat=function(){this[Wn].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return yi(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return Ji({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},Rn(t,[{key:"length",get:function(){return this[Wn].getArrayLength_()},set:function(e){this[Wn].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Ui);function Mi(e){un(Bi.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[Wn].get_(e)},set:function(t){this[Wn].set_(e,t)}}}(e))}function Gi(e){if(e>Fi){for(var t=Fi;t<e+100;t++)Mi(t);Fi=e}}function qi(e,t,n){return new Bi(e,t,n)}function Ki(e,t){if("object"==typeof e&&null!==e){if(yi(e))return void 0!==t&&rn(23),e[Wn].atom_;if(Ti(e))return e[Wn];if(Si(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||rn(25,t,$i(e)),n}if(Ii(e)){if(!t)return rn(26);var r=e[Wn].values_.get(t);return r||rn(27,t,$i(e)),r}if(zn(e)||Wr(e)||bo(e))return e}else if(bn(e)&&bo(e[Wn]))return e[Wn];rn(28)}function Wi(e,t){return e||rn(29),void 0!==t?Wi(Ki(e,t)):zn(e)||Wr(e)||bo(e)||Si(e)||Ti(e)?e:e[Wn]?e[Wn]:void rn(24,e)}function $i(e,t){return(void 0!==t?Ki(e,t):Ii(e)||Si(e)||Ti(e)?Wi(e):Ki(e)).name_}Object.entries(ui).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&wn(Bi.prototype,t,n)})),Gi(1e3);var zi=ln.toString;function Xi(e,t,n){return void 0===n&&(n=-1),Yi(e,t,n)}function Yi(e,t,n,r,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;if(!bn(i)&&"object"!==i&&"object"!=typeof t)return!1;var s=zi.call(e);if(s!==zi.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Hi(e),t=Hi(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var c=e.constructor,u=t.constructor;if(c!==u&&!(bn(c)&&c instanceof c&&bn(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),o=o||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return o[l]===t;if(r.push(e),o.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!Yi(e[l],t[l],n-1,r,o))return!1}else{var f,p=Object.keys(e);if(l=p.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!In(t,f=p[l])||!Yi(e[f],t[f],n-1,r,o))return!1}return r.pop(),o.pop(),!0}function Hi(e){return yi(e)?e.slice():An(e)||Si(e)||Cn(e)||Ti(e)?Array.from(e.entries()):e}function Ji(e){return e[Symbol.iterator]=Zi,e}function Zi(){return this}function Qi(e,t,n){return e.get?Dr:!e.set&&(bn(e.value)?(r=e.value,!(o=null==r?void 0:r.constructor)||"GeneratorFunction"!==o.name&&"GeneratorFunction"!==o.displayName?!Lo(e.value)&&(n?Io.bound:Io):!Wo(e.value)&&qo):t);var r,o}function es(e){return e instanceof Object&&"string"==typeof e.annotationType_&&bn(e.make_)&&bn(e.extend_)}["Symbol","Map","Set","Symbol"].forEach((function(e){void 0===sn()[e]&&rn("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(so.spyListeners.push(e),mn((function(){so.spyListeners=so.spyListeners.filter((function(t){return t!==e}))})))},extras:{getDebugName:$i},$mobx:Wn});var ts,ns=function(e){this.id=e.id||Date.now()+"",this.name=e.name||"",this.displayName=e.displayName||"",this.type=e.type||ts.TEXT,this.isRequired=e.isRequired||!1,this.customDataId=e.customDataId||null,this.attributeTypes=e.attributeTypes||null,oi(this)};!function(e){e.TEXT="TEXT",e.RICH_TEXT="RICH_TEXT",e.BOOLEAN="BOOLEAN",e.IMAGE="IMAGE",e.IMAGE_LIST="IMAGE_LIST",e.LINK="LINK",e.LIST_OF_LINK="LIST_OF_LINK",e.PRODUCT_DETAIL="PRODUCT_DETAIL",e.PRODUCT_LIST="PRODUCT_LIST",e.PRODUCT_ATTRIBUTE="PRODUCT_ATTRIBUTE",e.PRODUCT_ATTRIBUTE_LIST="PRODUCT_ATTRIBUTE_LIST",e.BRAND="BRAND",e.BRAND_LIST="BRAND_LIST",e.CATEGORY="CATEGORY",e.CATEGORY_LIST="CATEGORY_LIST",e.COLOR="COLOR",e.CUSTOM="CUSTOM",e.COMPONENT="COMPONENT",e.COMPONENT_LIST="COMPONENT_LIST",e.BLOG="BLOG",e.BLOG_LIST="BLOG_LIST",e.BLOG_CATEGORY="BLOG_CATEGORY",e.BLOG_CATEGORY_LIST="BLOG_CATEGORY_LIST",e.RAFFLE="RAFFLE",e.RAFFLE_LIST="RAFFLE_LIST",e.OBJECT="OBJECT",e.STATIC_LIST="STATIC_LIST",e.DYNAMIC_LIST="DYNAMIC_LIST",e.ENUM="ENUM"}(ts||(ts={}));var rs,os,is=function(e){this.id=e.id||"",this.dir=e.dir||"",this.displayName=e.displayName||"",this.props=e.props?e.props.map((function(e){return new ns(e)})):[],this.isHeader=e.isHeader||!1,this.isFooter=e.isFooter||!1,oi(this)},ss=function(){function e(t){var n,r=this;void 0===t&&(t={}),this.customDataId=null,this.id=t.id||"",this.name=t.name||null,this.type=t.type||ts.TEXT,this.isRequired=void 0===t.isRequired||t.isRequired,this.key=t.key||null,this.parent=t.parent||null,this.itemCount=t.itemCount||null,this.attributeTypes=t.attributeTypes||null,this.enumOptions=(null===(n=t.enumOptions)||void 0===n?void 0:n.map((function(e){return new as(e)})))||null,this.customDataId=t.customDataId||null,this.isRoot=t.isRoot||!1,this.nestedData=t.nestedData?t.nestedData.map((function(t){return new e(a(a({},t),{parent:r}))})):null,this.type!==ts.STATIC_LIST||this.itemCount||(this.itemCount=1),oi(this)}return e.prototype.toJSON=function(){var e=a({},this);return delete e.parent,e},e}(),as=function(e){void 0===e&&(e={}),this.id=e.id||"",this.displayName=e.displayName||"",this.value=e.value||"",oi(this)},cs=function(e){this.id=e.id||"",this.componentId=e.componentId||"",this.propValues=e.propValues||{},oi(this)},us=function(e){this.id=e.id||Date.now()+"",this.name=e.name||null,this.type=e.type||rs.INDEX,this.slug=e.slug||null,this.pageTitle=e.pageTitle||null,this.description=e.description||null,this.components=e.components?e.components.map((function(e){return new cs(e)})):[],this.specifications=e.specifications?e.specifications.map((function(e){return new ls(e)})):null,oi(this)},ls=function(e){this.id=e.id||"",this.components=e.components?e.components.map((function(e){return new cs(e)})):[],oi(this)};!function(e){e.INDEX="INDEX",e.CATEGORY="CATEGORY",e.BRAND="BRAND",e.PRODUCT="PRODUCT",e.CUSTOM="CUSTOM",e.ACCOUNT="ACCOUNT",e.ADDRESSES="ADDRESSES",e.ORDERS="ORDERS",e.ORDER_DETAIL="ORDER_DETAIL",e.LOGIN="LOGIN",e.REGISTER="REGISTER",e.FORGOT_PASSWORD="FORGOT_PASSWORD",e.RECOVER_PASSWORD="RECOVER_PASSWORD",e.CART="CART",e.FAVORITE_PRODUCTS="FAVORITE_PRODUCTS",e.SEARCH="SEARCH",e.NOT_FOUND="NOT_FOUND",e.BLOG="BLOG",e.BLOG_INDEX="BLOG_INDEX",e.BLOG_CATEGORY="BLOG_CATEGORY",e.CHECKOUT="CHECKOUT",e.RAFFLE="RAFFLE",e.RAFFLE_DETAIL="RAFFLE_DETAIL",e.RAFFLE_ACCOUNT="RAFFLE_ACCOUNT"}(rs||(rs={}));var fs=new Uint8Array(16);function ps(){if(!os&&!(os="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return os(fs)}var ds=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function hs(e){return"string"==typeof e&&ds.test(e)}for(var vs=[],_s=0;_s<256;++_s)vs.push((_s+256).toString(16).substr(1));function ys(e,t,n){var r=(e=e||{}).random||(e.rng||ps)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(vs[e[t+0]]+vs[e[t+1]]+vs[e[t+2]]+vs[e[t+3]]+"-"+vs[e[t+4]]+vs[e[t+5]]+"-"+vs[e[t+6]]+vs[e[t+7]]+"-"+vs[e[t+8]]+vs[e[t+9]]+"-"+vs[e[t+10]]+vs[e[t+11]]+vs[e[t+12]]+vs[e[t+13]]+vs[e[t+14]]+vs[e[t+15]]).toLowerCase();if(!hs(n))throw TypeError("Stringified UUID is invalid");return n}(r)}var ms,gs=function(e){this.id=e.id||ys(),this.displayName=e.displayName||"",this.key=e.key||"",this.color=e.color||"",oi(this)},bs=function(e){this.id=(null==e?void 0:e.id)||null,oi(this)},Os=function(e){var t;void 0===e&&(e={}),this.colors=e.colors?e.colors.map((function(e){return new gs(e)})):[],this.favicon=(null===(t=e.favicon)||void 0===t?void 0:t.id)?e.favicon:new bs,this.stockPreference=e.stockPreference||ms.SHOW_ALL,oi(this)};!function(e){e.HIDE_OUT_OF_STOCK="HIDE_OUT_OF_STOCK",e.SHOW_ALL="SHOW_ALL",e.SHOW_OUT_OF_STOCK_AT_END="SHOW_OUT_OF_STOCK_AT_END"}(ms||(ms={}));var Es,Ss,ws=function(){function e(e){var t;void 0===e&&(e={}),this.name=e.name||"",this.components=e.components?e.components.map((function(e){return new is(e)})):[],this.pages=e.pages?e.pages.map((function(e){return new us(e)})):[],this.settings=e.settings?new Os(e.settings):new Os,this.customData=e.customData?null===(t=e.customData)||void 0===t?void 0:t.map((function(e){return new ss(e)})):[],this.createCheckoutData(),oi(this)}return Object.defineProperty(e.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),e.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),t=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new is({id:"checkout",dir:"",displayName:"",props:[new ns({name:"buttonBgColor",isRequired:!1,type:ts.COLOR}),new ns({name:"buttonTextColor",isRequired:!1,type:ts.COLOR}),new ns({name:"buttonDisabledBgColor",isRequired:!1,type:ts.COLOR}),new ns({name:"buttonDisabledTextColor",isRequired:!1,type:ts.COLOR}),new ns({name:"primaryTextColor",isRequired:!1,type:ts.COLOR}),new ns({name:"secondaryTextColor",isRequired:!1,type:ts.COLOR}),new ns({name:"primaryBgColor",isRequired:!1,type:ts.COLOR}),new ns({name:"secondaryBgColor",isRequired:!1,type:ts.COLOR}),new ns({name:"borderColor",isRequired:!1,type:ts.COLOR}),new ns({name:"cardBgColor",isRequired:!1,type:ts.COLOR}),new ns({name:"errorColor",isRequired:!1,type:ts.COLOR}),new ns({name:"errorLightColor",isRequired:!1,type:ts.COLOR}),new ns({name:"warningColor",isRequired:!1,type:ts.COLOR}),new ns({name:"warningLightColor",isRequired:!1,type:ts.COLOR}),new ns({name:"successColor",isRequired:!1,type:ts.COLOR}),new ns({name:"successLightColor",isRequired:!1,type:ts.COLOR})]}),this.components.push(e)),t||this.pages.push(new us({id:"checkout",type:rs.CHECKOUT,components:[new cs({componentId:e.id,propValues:{buttonBgColor:Ns,buttonTextColor:Ts,buttonDisabledBgColor:As,buttonDisabledTextColor:Cs,primaryTextColor:xs,secondaryTextColor:Ds,primaryBgColor:ks,secondaryBgColor:Ps,borderColor:Is,cardBgColor:Ls,errorColor:js,errorLightColor:Rs,warningColor:Vs,warningLightColor:Fs,successColor:Us,successLightColor:Bs}})]}))},e}(),Ns="#272727",Ts="#FFFFFF",As="#F7F7F9",Cs="#8A8B94",xs="#272727",Ds="#8A8B94",ks="#FFFFFF",Ps="#F7F7F9",Is="#E5E4E9",Ls="#F7F7F9",js="#FB4E4E",Rs="#FCF3F4",Vs="#FFBC1F",Fs="#FFFAEE",Us="#2DCA73",Bs="#F6FFED",Ms=function(){function t(){}return t.generate=function(t){return Ie(e.join(process.cwd(),"src","theme.json"),"",JSON.stringify(t,null,2))},t.generateInitialThemeJsonFile=function(){var e=new ws;return e.pages.push(new us({type:rs.INDEX})),t.generate(e)},t.getTheme=function(){return c(this,void 0,void 0,(function(){var t,n,r,o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Promise.resolve().then((function(){return eu}))];case 1:return t=i.sent(),n=e.join(process.cwd(),"src","theme.json"),[2,(r=t.readFileSync(n)).length?JSON.parse(r.toString()):null];case 2:return o=i.sent(),console.error(o),[3,3];case 3:return[2]}}))}))},t}(),Gs=function(){function t(){}return t.generate=function(n){return c(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return[4,Pe(e.join(process.cwd(),"src","components","__generated__"))];case 1:return o.sent(),[4,t.generateAllComponentImportsFile(n)];case 2:return(r=o.sent())?[4,t.generateAllComponentImportsFileForEditor(n)]:[3,4];case 3:r=o.sent(),o.label=4;case 4:return[2,r]}}))}))},t.generateAllComponentImportsFileForEditor=function(t){return c(this,void 0,void 0,(function(){var n,r,o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="const loader = { loading: () => <IkasEditorComponentLoader /> };\r\n",n+="\r\n",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="const Component"+t+' = dynamic(() => import("../'+e.dir+'"), loader);\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ie(e.join(process.cwd(),"src","components","__generated__"),"editor.tsx",n)];case 1:return[2,i.sent()];case 2:return o=i.sent(),console.error(o),[2,!1];case 3:return[2]}}))}))},t.generateAllComponentImportsFile=function(t){return c(this,void 0,void 0,(function(){var n,r,o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n="",(r=t.components.filter((function(e){return"checkout"!==e.id}))).filter((function(e){return"checkout"!==e.id})).forEach((function(e,t){n+="import Component"+t+' from "../'+e.dir+'";\r\n'})),n+="\r\n",n+="\nconst Components = {\n "+r.map((function(e,t){return'"'+e.id+'": Component'+t}))+"\n};\n",n+="\r\n",n+="export default Components;",[4,Ie(e.join(process.cwd(),"src","components","__generated__"),"index.tsx",n)];case 1:return[2,i.sent()];case 2:return o=i.sent(),console.error(o),[2,!1];case 3:return[2]}}))}))},t}(),qs=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[rs.PRODUCT,rs.CATEGORY,rs.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[rs.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[rs.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[rs.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[rs.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[rs.FORGOT_PASSWORD]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[rs.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[rs.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[rs.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[rs.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[rs.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[rs.BLOG,rs.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[rs.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[rs.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[rs.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[rs.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[rs.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[rs.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[rs.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[rs.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],Ks=function(){function t(){}return t.generate=function(){return c(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,l,f,p,d;return u(this,(function(u){switch(u.label){case 0:return[4,Pe(e.join(process.cwd(),"src","pages"),["_app.tsx","_document.tsx","api"])];case 1:u.sent(),n=!0,r=0,o=qs,u.label=2;case 2:return r<o.length?(i=o[r],(s=n)?[4,t.generatePageWithInfo(i)]:[3,4]):[3,6];case 3:s=u.sent(),u.label=4;case 4:n=s,u.label=5;case 5:return r++,[3,2];case 6:return a=qs.find((function(e){return e.isCheckout})),c=qs.find((function(e){return e.isEditor})),a?[4,t.generatePageWithInfo(a)]:[3,8];case 7:return f=u.sent(),[3,9];case 8:f=!1,u.label=9;case 9:return l=f,c?[4,t.generatePageWithInfo(c)]:[3,11];case 10:return d=u.sent(),[3,12];case 11:d=!1,u.label=12;case 12:return p=d,[2,n&&l&&p]}}))}))},t.generatePageWithInfo=function(t){return c(this,void 0,void 0,(function(){var n,r,o,i,s,a;return u(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),n="",t.isCheckout?n='import { CheckoutPage } from "@ikas/storefront";\n\nexport default CheckoutPage.default;\nexport const getStaticProps = CheckoutPage.getStaticProps;\n':t.isEditor?n='import { EditorPage } from "@ikas/storefront";\nimport Components from "../components/__generated__/editor";\n\nconst PageComponent = EditorPage.default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\nexport const getStaticProps = EditorPage.getStaticProps;\n':(r="import { "+t.pageComponentName+' } from "@ikas/storefront";\r\n','import Components from "src/components/__generated__/index";\r\n',o="\nconst PageComponent = "+t.pageComponentName+".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n",i=t.isDynamicSSG?"export const getStaticPaths = "+t.pageComponentName+".getStaticPaths;\r\n":"",s=t.isSSR?"export const getServerSideProps = "+t.pageComponentName+".getServerSideProps;\r\n":"export const getStaticProps = "+t.pageComponentName+".getStaticProps;\r\n",n=r+'import Components from "src/components/__generated__/index";\r\n'+o+i+s),[4,Ie(e.join(process.cwd(),"src","pages"),t.path,n)];case 1:return[2,c.sent()];case 2:return a=c.sent(),console.error(a),[2,!1];case 3:return[2]}}))}))},t.generatePageWithType=function(e){return c(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return(n=qs.find((function(t){return t.pageTypes.includes(e)})))?[4,t.generatePageWithInfo(n)]:[3,2];case 1:return[2,r.sent()];case 2:return[2,!1]}}))}))},t}(),Ws=function(){function t(){}return t.generate=function(){return c(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return eu}))];case 1:return t=n.sent(),t.existsSync(e.join(process.cwd(),"src","store","index.ts"))?[3,3]:[4,Ie(e.join(process.cwd(),"src","store"),"index.ts",'import { IkasBaseStore } from "@ikas/storefront";\n\nexport default class Store extends IkasBaseStore {\n // Add your own stores here if needed\n // ex: yourStore: YourStore;\n\n constructor() {\n super();\n\n // Init your own stores here\n // ex: this.yourStore = new YourStore();\n }\n}\n')];case 2:return[2,n.sent()];case 3:return[2,!0]}}))}))},t}();Es=[{name:"generate",alias:"g",type:Boolean},{name:"dev",alias:"d",type:Boolean}],(Ss=ke(Es)).generate&&(function(e){return c(this,void 0,void 0,(function(){var t,n,r,o,i,s;return u(this,(function(a){switch(a.label){case 0:return[4,Ms.getTheme()];case 1:return(t=a.sent())?[3,3]:[4,Ms.generateInitialThemeJsonFile()];case 2:a.sent(),a.label=3;case 3:return[4,Ms.getTheme()];case 4:return t=a.sent(),[4,Ms.generate(t)];case 5:return(s=a.sent())?[4,Gs.generate(t)]:[3,7];case 6:s=a.sent(),a.label=7;case 7:return(i=s)?[4,Ks.generate()]:[3,9];case 8:i=a.sent(),a.label=9;case 9:return(o=i)?[4,je.generate()]:[3,11];case 10:o=a.sent(),a.label=11;case 11:return(r=o)?[4,Ws.generate()]:[3,13];case 12:r=a.sent(),a.label=13;case 13:return(n=r)?[4,tn.generate(e)]:[3,15];case 14:n=a.sent(),a.label=15;case 15:return[2,n]}}))}))}(Ss.dev?"dev":"prod")?console.log("Project files generated successfully!"):console.log("Project files generate failed!"));var $s=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},zs=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})},Xs=process.cwd,Ys=null,Hs=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ys||(Ys=Xs.call(process)),Ys};try{process.cwd()}catch(e){}var Js=process.chdir;process.chdir=function(e){Ys=null,Js.call(process,e)};var Zs=function(e){n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,o){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?o&&o(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lchmodSync=function(t,r){var o,i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{o=e.fchmodSync(i,r),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return o}}(e);e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,o,i){e.open(t,n.O_SYMLINK,(function(t,n){t?i&&i(t):e.futimes(n,r,o,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,o){var i,s=e.openSync(t,n.O_SYMLINK),a=!0;try{i=e.futimesSync(s,r,o),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===Hs&&(e.rename=(t=e.rename,function(n,r,o){var i=Date.now(),s=0;t(n,r,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){e.stat(r,(function(e,i){e&&"ENOENT"===e.code?t(n,r,a):o(c)}))}),s),void(s<100&&(s+=10));o&&o(c)}))}));var t;function r(t){return t?function(n,r,o){return t.call(e,n,r,(function(e){u(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function o(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!u(e))throw e}}:t}function i(t){return t?function(n,r,o,i){return t.call(e,n,r,o,(function(e){u(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function s(t){return t?function(n,r,o){try{return t.call(e,n,r,o)}catch(e){if(!u(e))throw e}}:t}function a(t){return t?function(n,r,o){function i(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),o&&o.apply(this,arguments)}return"function"==typeof r&&(o=r,r=null),r?t.call(e,n,r,i):t.call(e,n,i)}:t}function c(t){return t?function(n,r){var o=r?t.call(e,n,r):t.call(e,n);return o.uid<0&&(o.uid+=4294967296),o.gid<0&&(o.gid+=4294967296),o}:t}function u(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function n(n,r,o,i,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,p){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,n,r,o,i,s,c);a.apply(this,arguments)}}return t.call(e,n,r,o,i,s,c)}return n.__proto__=t,n}(e.read),e.readSync=(l=e.readSync,function(t,n,r,o,i){for(var s=0;;)try{return l.call(e,t,n,r,o,i)}catch(e){if("EAGAIN"===e.code&&s<10){s++;continue}throw e}});var l};var Qs=r.Stream,ea=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Qs.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var i=Object.keys(r),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=r[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){o._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);Qs.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;i<s;i++){var a=o[i];this[a]=r[a]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var ta=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t};var na=f((function(e){var n,r;function s(e,t){Object.defineProperty(e,n,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(n=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(n="___graceful-fs.queue",r="___graceful-fs.previous");var a=function(){};if(o.debuglog?a=o.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(a=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!t[n]){var c=l[n]||[];s(t,c),t.close=function(e){function n(n,r){return e.call(t,n,(function(e){e||p(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(n,r,{value:e}),n}(t.close),t.closeSync=function(e){function n(n){e.apply(t,arguments),p()}return Object.defineProperty(n,r,{value:e}),n}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){a(t[n]),i.equal(t[n].length,0)}))}function u(e){Zs(e),e.gracefulify=u,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof o&&o.apply(this,arguments),p()):f([e,[n,r,o]])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,o){"function"==typeof r&&(o=r,r=null);return function e(t,r,o,i){return n(t,r,o,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof i&&i.apply(this,arguments),p()):f([e,[t,r,o,i]])}))}(e,t,r,o)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,o){"function"==typeof n&&(o=n,n=null);return function e(t,n,o,i){return r(t,n,o,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),p()):f([e,[t,n,o,i]])}))}(e,t,n,o)});var o=e.readdir;function i(t){return o.apply(e,t)}if(e.readdir=function(e,t,n){var r=[e];"function"!=typeof t?r.push(t):n=t;return r.push((function(e,t){t&&t.sort&&t.sort();!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof n&&n.apply(this,arguments),p()):f([i,[r]])})),i(r)},"v0.8"===process.version.substr(0,4)){var s=ea(e);h=s.ReadStream,v=s.WriteStream}var a=e.ReadStream;a&&(h.prototype=Object.create(a.prototype),h.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var c=e.WriteStream;c&&(v.prototype=Object.create(c.prototype),v.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var l=h;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var d=v;function h(e,t){return this instanceof h?(a.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function v(e,t){return this instanceof v?(c.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var _=e.open;function y(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,o){return _(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),p()):f([e,[t,n,r,o]])}))}(e,t,n,r)}return e.open=y,e}function f(e){a("ENQUEUE",e[0].name,e[1]),t[n].push(e)}function p(){var e=t[n].shift();e&&(a("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}l[n]||s(l,t[n]),e.exports=u(ta(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(e.exports=u(t),t.__patched=!0)})),ra=f((function(e,t){const n=$s,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof na[e]));Object.assign(t,na),r.forEach((e=>{t[e]=n(na[e])})),t.realpath.native=n(na.realpath.native),t.exists=function(e,t){return"function"==typeof t?na.exists(e,t):new Promise((t=>na.exists(e,t)))},t.read=function(e,t,n,r,o,i){return"function"==typeof i?na.read(e,t,n,r,o,i):new Promise(((i,s)=>{na.read(e,t,n,r,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},t.write=function(e,t,...n){return"function"==typeof n[n.length-1]?na.write(e,t,...n):new Promise(((r,o)=>{na.write(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffer:n})}))}))},"function"==typeof na.writev&&(t.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?na.writev(e,t,...n):new Promise(((r,o)=>{na.writev(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffers:n})}))}))})})),oa={checkPath:function(t){if("win32"===process.platform){if(/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=new Error(`Path contains invalid characters: ${t}`);throw e.code="EINVAL",e}}}};const{checkPath:ia}=oa,sa=e=>"number"==typeof e?e:{mode:511,...e}.mode;var aa={makeDir:async(e,t)=>(ia(e),ra.mkdir(e,{mode:sa(t),recursive:!0})),makeDirSync:(e,t)=>(ia(e),ra.mkdirSync(e,{mode:sa(t),recursive:!0}))};const ca=zs,{makeDir:ua,makeDirSync:la}=aa,fa=ca(ua);var pa={mkdirs:fa,mkdirsSync:la,mkdirp:fa,mkdirpSync:la,ensureDir:fa,ensureDirSync:la};var da=function(e,t,n,r){na.open(e,"r+",((e,o)=>{if(e)return r(e);na.futimes(o,t,n,(e=>{na.close(o,(t=>{r&&r(e||t)}))}))}))},ha=function(e,t,n){const r=na.openSync(e,"r+");return na.futimesSync(r,t,n),na.closeSync(r)};function va(e,t,n){const r=n.dereference?e=>ra.stat(e,{bigint:!0}):e=>ra.lstat(e,{bigint:!0});return Promise.all([r(e),r(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function _a(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function ya(t,n){const r=e.resolve(t).split(e.sep).filter((e=>e)),o=e.resolve(n).split(e.sep).filter((e=>e));return r.reduce(((e,t,n)=>e&&o[n]===t),!0)}function ma(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var ga={checkPaths:function(t,n,r,i,s){o.callbackify(va)(t,n,i,((o,i)=>{if(o)return s(o);const{srcStat:a,destStat:c}=i;if(c){if(_a(a,c)){const o=e.basename(t),i=e.basename(n);return"move"===r&&o!==i&&o.toLowerCase()===i.toLowerCase()?s(null,{srcStat:a,destStat:c,isChangingCase:!0}):s(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!c.isDirectory())return s(new Error(`Cannot overwrite non-directory '${n}' with directory '${t}'.`));if(!a.isDirectory()&&c.isDirectory())return s(new Error(`Cannot overwrite directory '${n}' with non-directory '${t}'.`))}return a.isDirectory()&&ya(t,n)?s(new Error(ma(t,n,r))):s(null,{srcStat:a,destStat:c})}))},checkPathsSync:function(t,n,r,o){const{srcStat:i,destStat:s}=function(e,t,n){let r;const o=n.dereference?e=>ra.statSync(e,{bigint:!0}):e=>ra.lstatSync(e,{bigint:!0}),i=o(e);try{r=o(t)}catch(e){if("ENOENT"===e.code)return{srcStat:i,destStat:null};throw e}return{srcStat:i,destStat:r}}(t,n,o);if(s){if(_a(i,s)){const o=e.basename(t),a=e.basename(n);if("move"===r&&o!==a&&o.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${t}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${t}'.`)}if(i.isDirectory()&&ya(t,n))throw new Error(ma(t,n,r));return{srcStat:i,destStat:s}},checkParentPaths:function t(n,r,o,i,s){const a=e.resolve(e.dirname(n)),c=e.resolve(e.dirname(o));if(c===a||c===e.parse(c).root)return s();ra.stat(c,{bigint:!0},((e,a)=>e?"ENOENT"===e.code?s():s(e):_a(r,a)?s(new Error(ma(n,o,i))):t(n,r,c,i,s)))},checkParentPathsSync:function t(n,r,o,i){const s=e.resolve(e.dirname(n)),a=e.resolve(e.dirname(o));if(a===s||a===e.parse(a).root)return;let c;try{c=ra.statSync(a,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(_a(r,c))throw new Error(ma(n,o,i));return t(n,r,a,i)},isSrcSubdir:ya,areIdentical:_a};const ba=pa.mkdirsSync,Oa=ha;function Ea(t,n,r,o){const i=(o.dereference?na.statSync:na.lstatSync)(n);if(i.isDirectory())return function(e,t,n,r,o){return t?Na(n,r,o):function(e,t,n,r){return na.mkdirSync(n),Na(t,n,r),wa(n,e)}(e.mode,n,r,o)}(i,t,n,r,o);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return function(e,t,n,r,o){return t?function(e,t,n,r){if(r.overwrite)return na.unlinkSync(n),Sa(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,o):Sa(e,n,r,o)}(i,t,n,r,o);if(i.isSymbolicLink())return function(t,n,r,o){let i=na.readlinkSync(n);o.dereference&&(i=e.resolve(process.cwd(),i));if(t){let t;try{t=na.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return na.symlinkSync(i,r);throw e}if(o.dereference&&(t=e.resolve(process.cwd(),t)),ga.isSrcSubdir(i,t))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${t}'.`);if(na.statSync(r).isDirectory()&&ga.isSrcSubdir(t,i))throw new Error(`Cannot overwrite '${t}' with '${i}'.`);return function(e,t){return na.unlinkSync(t),na.symlinkSync(e,t)}(i,r)}return na.symlinkSync(i,r)}(t,n,r,o);if(i.isSocket())throw new Error(`Cannot copy a socket file: ${n}`);if(i.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${n}`);throw new Error(`Unknown file: ${n}`)}function Sa(e,t,n,r){return na.copyFileSync(t,n),r.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){wa(e,128|t)}(n,e);(function(e,t){const n=na.statSync(e);Oa(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),wa(n,e.mode)}function wa(e,t){return na.chmodSync(e,t)}function Na(t,n,r){na.readdirSync(t).forEach((o=>function(t,n,r,o){const i=e.join(n,t),s=e.join(r,t),{destStat:a}=ga.checkPathsSync(i,s,"copy",o);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return Ea(e,t,n,r)}(a,i,s,o)}(o,t,n,r)))}var Ta={copySync:function(t,n,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:o,destStat:i}=ga.checkPathsSync(t,n,"copy",r);return ga.checkParentPathsSync(t,o,n,"copy"),function(t,n,r,o){if(o.filter&&!o.filter(n,r))return;const i=e.dirname(r);na.existsSync(i)||ba(i);return Ea(t,n,r,o)}(i,t,n,r)}};var Aa={pathExists:zs((function(e){return ra.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:ra.existsSync};const Ca=pa.mkdirs,xa=Aa.pathExists,Da=da;function ka(t,n,r,o,i){const s=e.dirname(r);xa(s,((e,a)=>e?i(e):a?Ia(t,n,r,o,i):void Ca(s,(e=>e?i(e):Ia(t,n,r,o,i)))))}function Pa(e,t,n,r,o,i){Promise.resolve(o.filter(n,r)).then((s=>s?e(t,n,r,o,i):i()),(e=>i(e)))}function Ia(e,t,n,r,o){(r.dereference?na.stat:na.lstat)(t,((i,s)=>i?o(i):s.isDirectory()?function(e,t,n,r,o,i){return t?Va(n,r,o,i):function(e,t,n,r,o){na.mkdir(n,(i=>{if(i)return o(i);Va(t,n,r,(t=>t?o(t):Ra(n,e,o)))}))}(e.mode,n,r,o,i)}(s,e,t,n,r,o):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?function(e,t,n,r,o,i){return t?function(e,t,n,r,o){if(!r.overwrite)return r.errorOnExist?o(new Error(`'${n}' already exists`)):o();na.unlink(n,(i=>i?o(i):La(e,t,n,r,o)))}(e,n,r,o,i):La(e,n,r,o,i)}(s,e,t,n,r,o):s.isSymbolicLink()?Ua(e,t,n,r,o):s.isSocket()?o(new Error(`Cannot copy a socket file: ${t}`)):s.isFIFO()?o(new Error(`Cannot copy a FIFO pipe: ${t}`)):o(new Error(`Unknown file: ${t}`))))}function La(e,t,n,r,o){na.copyFile(t,n,(i=>i?o(i):r.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return Ra(e,128|t,n)}(n,e,(o=>o?r(o):ja(e,t,n,r)));return ja(e,t,n,r)}(e.mode,t,n,o):Ra(n,e.mode,o)))}function ja(e,t,n,r){!function(e,t,n){na.stat(e,((e,r)=>e?n(e):Da(t,r.atime,r.mtime,n)))}(t,n,(t=>t?r(t):Ra(n,e,r)))}function Ra(e,t,n){return na.chmod(e,t,n)}function Va(e,t,n,r){na.readdir(e,((o,i)=>o?r(o):Fa(i,e,t,n,r)))}function Fa(t,n,r,o,i){const s=t.pop();return s?function(t,n,r,o,i,s){const a=e.join(r,n),c=e.join(o,n);ga.checkPaths(a,c,"copy",i,((e,n)=>{if(e)return s(e);const{destStat:u}=n;!function(e,t,n,r,o){r.filter?Pa(Ia,e,t,n,r,o):Ia(e,t,n,r,o)}(u,a,c,i,(e=>e?s(e):Fa(t,r,o,i,s)))}))}(t,s,n,r,o,i):i()}function Ua(t,n,r,o,i){na.readlink(n,((n,s)=>n?i(n):(o.dereference&&(s=e.resolve(process.cwd(),s)),t?void na.readlink(r,((n,a)=>n?"EINVAL"===n.code||"UNKNOWN"===n.code?na.symlink(s,r,i):i(n):(o.dereference&&(a=e.resolve(process.cwd(),a)),ga.isSrcSubdir(s,a)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`)):t.isDirectory()&&ga.isSrcSubdir(a,s)?i(new Error(`Cannot overwrite '${a}' with '${s}'.`)):function(e,t,n){na.unlink(t,(r=>r?n(r):na.symlink(e,t,n)))}(s,r,i)))):na.symlink(s,r,i))))}var Ba={copy:$s((function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),ga.checkPaths(e,t,"copy",n,((o,i)=>{if(o)return r(o);const{srcStat:s,destStat:a}=i;ga.checkParentPaths(e,s,t,"copy",(o=>o?r(o):n.filter?Pa(ka,a,e,t,n,r):ka(a,e,t,n,r)))}))}))};const Ma="win32"===process.platform;function Ga(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||na[t],e[t+="Sync"]=e[t]||na[t]})),e.maxBusyTries=e.maxBusyTries||3}function qa(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i.strictEqual(typeof n,"function","rimraf: callback function required"),i(t,"rimraf: invalid options argument provided"),i.strictEqual(typeof t,"object","rimraf: options should be object"),Ga(t),Ka(e,t,(function o(i){if(i){if(("EBUSY"===i.code||"ENOTEMPTY"===i.code||"EPERM"===i.code)&&r<t.maxBusyTries){r++;return setTimeout((()=>Ka(e,t,o)),100*r)}"ENOENT"===i.code&&(i=null)}n(i)}))}function Ka(e,t,n){i(e),i(t),i("function"==typeof n),t.lstat(e,((r,o)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&Ma?Wa(e,t,r,n):o&&o.isDirectory()?za(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return Ma?Wa(e,t,r,n):za(e,t,r,n);if("EISDIR"===r.code)return za(e,t,r,n)}return n(r)}))))}function Wa(e,t,n,r){i(e),i(t),i("function"==typeof r),t.chmod(e,438,(o=>{o?r("ENOENT"===o.code?null:n):t.stat(e,((o,i)=>{o?r("ENOENT"===o.code?null:n):i.isDirectory()?za(e,t,n,r):t.unlink(e,r)}))}))}function $a(e,t,n){let r;i(e),i(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?Ya(e,t,n):t.unlinkSync(e)}function za(t,n,r,o){i(t),i(n),i("function"==typeof o),n.rmdir(t,(s=>{!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?o(r):o(s):function(t,n,r){i(t),i(n),i("function"==typeof r),n.readdir(t,((o,i)=>{if(o)return r(o);let s,a=i.length;if(0===a)return n.rmdir(t,r);i.forEach((o=>{qa(e.join(t,o),n,(e=>{if(!s)return e?r(s=e):void(0==--a&&n.rmdir(t,r))}))}))}))}(t,n,o)}))}function Xa(e,t){let n;Ga(t=t||{}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i(t,"rimraf: missing options"),i.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&Ma&&$a(e,t,n)}try{n&&n.isDirectory()?Ya(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return Ma?$a(e,t,n):Ya(e,t,n);if("EISDIR"!==n.code)throw n;Ya(e,t,n)}}function Ya(t,n,r){i(t),i(n);try{n.rmdirSync(t)}catch(o){if("ENOTDIR"===o.code)throw r;if("ENOTEMPTY"===o.code||"EEXIST"===o.code||"EPERM"===o.code)!function(t,n){if(i(t),i(n),n.readdirSync(t).forEach((r=>Xa(e.join(t,r),n))),!Ma){return n.rmdirSync(t,n)}{const e=Date.now();do{try{return n.rmdirSync(t,n)}catch{}}while(Date.now()-e<500)}}(t,n);else if("ENOENT"!==o.code)throw o}}var Ha=qa;qa.sync=Xa;var Ja={remove:$s((function(e,t){if(na.rm)return na.rm(e,{recursive:!0,force:!0},t);Ha(e,t)})),removeSync:function(e){if(na.rmSync)return na.rmSync(e,{recursive:!0,force:!0});Ha.sync(e)}};const Za=zs((async function(t){let n;try{n=await ra.readdir(t)}catch{return pa.mkdirs(t)}return Promise.all(n.map((n=>Ja.remove(e.join(t,n)))))}));function Qa(t){let n;try{n=ra.readdirSync(t)}catch{return pa.mkdirsSync(t)}n.forEach((n=>{n=e.join(t,n),Ja.removeSync(n)}))}var ec={emptyDirSync:Qa,emptydirSync:Qa,emptyDir:Za,emptydir:Za};var tc={createFile:$s((function(t,n){function r(){na.writeFile(t,"",(e=>{if(e)return n(e);n()}))}na.stat(t,((o,i)=>{if(!o&&i.isFile())return n();const s=e.dirname(t);na.stat(s,((e,t)=>{if(e)return"ENOENT"===e.code?pa.mkdirs(s,(e=>{if(e)return n(e);r()})):n(e);t.isDirectory()?r():na.readdir(s,(e=>{if(e)return n(e)}))}))}))})),createFileSync:function(t){let n;try{n=na.statSync(t)}catch{}if(n&&n.isFile())return;const r=e.dirname(t);try{na.statSync(r).isDirectory()||na.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;pa.mkdirsSync(r)}na.writeFileSync(t,"")}};const nc=$s,rc=Aa.pathExists,{areIdentical:oc}=ga;var ic={createLink:nc((function(t,n,r){function o(e,t){na.link(e,t,(e=>{if(e)return r(e);r(null)}))}na.lstat(n,((i,s)=>{na.lstat(t,((i,a)=>{if(i)return i.message=i.message.replace("lstat","ensureLink"),r(i);if(s&&oc(a,s))return r(null);const c=e.dirname(n);rc(c,((e,i)=>e?r(e):i?o(t,n):void pa.mkdirs(c,(e=>{if(e)return r(e);o(t,n)}))))}))}))})),createLinkSync:function(t,n){let r;try{r=na.lstatSync(n)}catch{}try{const e=na.lstatSync(t);if(r&&oc(e,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const o=e.dirname(n);return na.existsSync(o)||pa.mkdirsSync(o),na.linkSync(t,n)}};const sc=Aa.pathExists;var ac=function(t,n,r){if(e.isAbsolute(t))return na.lstat(t,(e=>e?(e.message=e.message.replace("lstat","ensureSymlink"),r(e)):r(null,{toCwd:t,toDst:t})));{const o=e.dirname(n),i=e.join(o,t);return sc(i,((n,s)=>n?r(n):s?r(null,{toCwd:i,toDst:t}):na.lstat(t,(n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:e.relative(o,t)})))))}},cc=function(t,n){let r;if(e.isAbsolute(t)){if(r=na.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}{const o=e.dirname(n),i=e.join(o,t);if(r=na.existsSync(i),r)return{toCwd:i,toDst:t};if(r=na.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:e.relative(o,t)}}};var uc=function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);na.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},lc=function(e,t){let n;if(t)return t;try{n=na.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"};const fc=$s,pc=pa.mkdirs,dc=pa.mkdirsSync,hc=ac,vc=cc,_c=uc,yc=lc,mc=Aa.pathExists,{areIdentical:gc}=ga;function bc(t,n,r,o){hc(t,n,((i,s)=>{if(i)return o(i);t=s.toDst,_c(s.toCwd,r,((r,i)=>{if(r)return o(r);const s=e.dirname(n);mc(s,((e,r)=>e?o(e):r?ra.symlink(t,n,i,o):void pc(s,(e=>{if(e)return o(e);ra.symlink(t,n,i,o)}))))}))}))}var Oc={createSymlink:fc((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,ra.lstat(t,((o,i)=>{!o&&i.isSymbolicLink()?Promise.all([ra.stat(e),ra.stat(t)]).then((([o,i])=>{if(gc(o,i))return r(null);bc(e,t,n,r)})):bc(e,t,n,r)}))})),createSymlinkSync:function(t,n,r){let o;try{o=ra.lstatSync(n)}catch{}if(o&&o.isSymbolicLink()){const e=ra.statSync(t),r=ra.statSync(n);if(gc(e,r))return}const i=vc(t,n);t=i.toDst,r=yc(i.toCwd,r);const s=e.dirname(n);return ra.existsSync(s)||dc(s),ra.symlinkSync(t,n,r)}},Ec={createFile:tc.createFile,createFileSync:tc.createFileSync,ensureFile:tc.createFile,ensureFileSync:tc.createFileSync,createLink:ic.createLink,createLinkSync:ic.createLinkSync,ensureLink:ic.createLink,ensureLinkSync:ic.createLinkSync,createSymlink:Oc.createSymlink,createSymlinkSync:Oc.createSymlinkSync,ensureSymlink:Oc.createSymlink,ensureSymlinkSync:Oc.createSymlinkSync};var Sc={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:o}={}){const i=n?t:"";return JSON.stringify(e,r,o).replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}};let wc;try{wc=na}catch(e){wc=t}const{stringify:Nc,stripBom:Tc}=Sc;const Ac=zs((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||wc,r=!("throws"in t)||t.throws;let o,i=await $s(n.readFile)(e,t);i=Tc(i);try{o=JSON.parse(i,t?t.reviver:null)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}return o}));const Cc=zs((async function(e,t,n={}){const r=n.fs||wc,o=Nc(t,n);await $s(r.writeFile)(e,o,n)}));const xc={readFile:Ac,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||wc,r=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=Tc(r),JSON.parse(r,t.reviver)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:Cc,writeFileSync:function(e,t,n={}){const r=n.fs||wc,o=Nc(t,n);return r.writeFileSync(e,o,n)}};var Dc={readJson:xc.readFile,readJsonSync:xc.readFileSync,writeJson:xc.writeFile,writeJsonSync:xc.writeFileSync};const kc=Aa.pathExists;var Pc={outputFile:$s((function(t,n,r,o){"function"==typeof r&&(o=r,r="utf8");const i=e.dirname(t);kc(i,((e,s)=>e?o(e):s?na.writeFile(t,n,r,o):void pa.mkdirs(i,(e=>{if(e)return o(e);na.writeFile(t,n,r,o)}))))})),outputFileSync:function(t,...n){const r=e.dirname(t);if(na.existsSync(r))return na.writeFileSync(t,...n);pa.mkdirsSync(r),na.writeFileSync(t,...n)}};const{stringify:Ic}=Sc,{outputFile:Lc}=Pc;var jc=async function(e,t,n={}){const r=Ic(t,n);await Lc(e,r,n)};const{stringify:Rc}=Sc,{outputFileSync:Vc}=Pc;var Fc=function(e,t,n){const r=Rc(t,n);Vc(e,r,n)};const Uc=zs;Dc.outputJson=Uc(jc),Dc.outputJsonSync=Fc,Dc.outputJSON=Dc.outputJson,Dc.outputJSONSync=Dc.outputJsonSync,Dc.writeJSON=Dc.writeJson,Dc.writeJSONSync=Dc.writeJsonSync,Dc.readJSON=Dc.readJson,Dc.readJSONSync=Dc.readJsonSync;var Bc=Dc;const Mc=Ta.copySync,Gc=Ja.removeSync,qc=pa.mkdirpSync;function Kc(e,t,n){try{na.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){return Mc(e,t,{overwrite:n,errorOnExist:true}),Gc(e)}(e,t,n)}}var Wc={moveSync:function(t,n,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=ga.checkPathsSync(t,n,"move",r);return ga.checkParentPathsSync(t,i,n,"move"),function(t){const n=e.dirname(t);return e.parse(n).root===n}(n)||qc(e.dirname(n)),function(e,t,n,r){if(r)return Kc(e,t,n);if(n)return Gc(t),Kc(e,t,n);if(na.existsSync(t))throw new Error("dest already exists.");return Kc(e,t,n)}(t,n,o,s)}};const $c=Ba.copy,zc=Ja.remove,Xc=pa.mkdirp,Yc=Aa.pathExists;function Hc(e,t,n,r,o){return r?Jc(e,t,n,o):n?zc(t,(r=>r?o(r):Jc(e,t,n,o))):void Yc(t,((r,i)=>r?o(r):i?o(new Error("dest already exists.")):Jc(e,t,n,o)))}function Jc(e,t,n,r){na.rename(e,t,(o=>o?"EXDEV"!==o.code?r(o):function(e,t,n,r){$c(e,t,{overwrite:n,errorOnExist:!0},(t=>t?r(t):zc(e,r)))}(e,t,n,r):r()))}var Zc={move:$s((function(t,n,r,o){"function"==typeof r&&(o=r,r={});const i=r.overwrite||r.clobber||!1;ga.checkPaths(t,n,"move",r,((r,s)=>{if(r)return o(r);const{srcStat:a,isChangingCase:c=!1}=s;ga.checkParentPaths(t,a,n,"move",(r=>r?o(r):function(t){const n=e.dirname(t);return e.parse(n).root===n}(n)?Hc(t,n,i,c,o):void Xc(e.dirname(n),(e=>e?o(e):Hc(t,n,i,c,o)))))}))}))},Qc={...ra,...Ta,...Ba,...ec,...Ec,...Bc,...pa,...Wc,...Zc,...Pc,...Aa,...Ja},eu=Object.freeze(s({__proto__:null,default:Qc},[Qc]));
|