gant-core 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var e=require("../utils/index.js");const o={setting:{BASE_CONFIG:{title:{zh_CN:"甘棠软件Core脚手架",en:"Gantsoftwore core framework"},slogan:{zh_CN:"欢迎使用甘棠旗下的软件产品",en:"Welcome to using the software products offered by GantSoftware"},copyright:"Copyright ©2012-{now} Gant Software All rights reserved."},MAIN_CONFIG:{requestTimeout:64e3,loginConfig:{loginPathname:"/login",loginOut:!0},homePath:"/dashboard",headerMenu:!0,navType:"tabs",functionsConfig:{notification:!0,websocket:!0,globalSearch:!0,locale:!0,transformTool:!0,hotKeyTool:!0,fullScreenTool:!0,networkSpeedTool:!0,recordModeTool:!0,debuggerTool:!0,compactMode:!0,drakMode:!0,meettingMode:!0,motionMode:!0,menuCollection:!0,version:!0,autoDetectVersion:!0,indexDbCrypt:!0,agentSuggest:!0,delegate:!0,tools:!0,userCardTypes:{}},fileConfig:{uploadFileSize:20,tusFileSize:100,tusClient:!0}},WATER_MARK_CONFIG:{fontSize:18,lightColor:"#666",darkColor:"#fefefe",alpha:.3,rotate:30,text:"甘棠软件",padding:10,showTime:!1,status:"none"},SYSMGMT_CONFIG:{accountConfig:{genderCodeType:"FW_USER_GENDER"}}}};exports.defineConfig=(t=o)=>e.mergeConfig(o,t);
2
+ "use strict";var e=require("../utils/index.js");const o={setting:{BASE_CONFIG:{title:{zh_CN:"甘棠软件Core脚手架",en:"Gantsoftwore core framework"},slogan:{zh_CN:"欢迎使用甘棠旗下的软件产品",en:"Welcome to using the software products offered by GantSoftware"},copyright:"Copyright ©2012-{now} Gant Software All rights reserved."},MAIN_CONFIG:{requestTimeout:64e3,loginConfig:{loginPathname:"/login",loginOut:!0,loginType:["account"]},homePath:"/dashboard",headerMenu:!0,navType:"tabs",functionsConfig:{notification:!0,websocket:!0,globalSearch:!0,locale:!0,transformTool:!0,hotKeyTool:!0,fullScreenTool:!0,networkSpeedTool:!0,recordModeTool:!0,debuggerTool:!0,compactMode:!0,drakMode:!0,meettingMode:!0,motionMode:!0,menuCollection:!0,version:!0,autoDetectVersion:!0,indexDbCrypt:!0,agentSuggest:!0,delegate:!0,tools:!0,userCardTypes:{}},fileConfig:{uploadFileSize:20,tusFileSize:100,tusClient:!0}},WATER_MARK_CONFIG:{fontSize:18,lightColor:"#666",darkColor:"#fefefe",alpha:.3,rotate:30,text:"甘棠软件",padding:10,showTime:!1,status:"none"},SYSMGMT_CONFIG:{accountConfig:{genderCodeType:"FW_USER_GENDER"}}}};exports.defineConfig=(t=o)=>e.mergeConfig(o,t);
@@ -7,4 +7,4 @@
7
7
  *
8
8
  * MIT Licensed
9
9
  */
10
- const CA=v,xA=y,FA=t,PA=function(){var e;return e=jA?process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",SA.test(e)&&(e=e.slice(0,-1)),e},AA=process.binding("constants"),BA=PA(),MA="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",TA=/XXXXXX/,kA=3,RA=(AA.O_CREAT||AA.fs.O_CREAT)|(AA.O_EXCL||AA.fs.O_EXCL)|(AA.O_RDWR||AA.fs.O_RDWR),IA=AA.EBADF||AA.os.errno.EBADF,LA=AA.ENOENT||AA.os.errno.ENOENT,NA=[];var UA=!1,GA=!1;function WA(e){var t=[],r=null;try{r=FA.randomBytes(e)}catch(t){r=FA.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(MA[r[n]%MA.length]);return t.join("")}function qA(e){return void 0===e}function VA(e,t){return"function"==typeof e?[t||{},e]:qA(e)?[{},t]:[e,t]}function zA(e){if(e.name)return xA.join(e.dir||BA,e.name);if(e.template)return e.template.replace(TA,WA(6));const t=[e.prefix||"tmp-",process.pid,WA(12),e.postfix||""].join("");return xA.join(e.dir||BA,t)}function $A(e,t){var r=VA(e,t),n=r[0],o=r[1],i=n.name?1:n.tries||kA;return isNaN(i)||i<0?o(new Error("Invalid tries")):n.template&&!n.template.match(TA)?o(new Error("Invalid template provided")):void function e(){const t=zA(n);CA.stat(t,(function(r){if(!r)return i-- >0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}()}function KA(e){var t=VA(e)[0],r=t.name?1:t.tries||kA;if(isNaN(r)||r<0)throw new Error("Invalid tries");if(t.template&&!t.template.match(TA))throw new Error("Invalid template provided");do{const e=zA(t);try{CA.statSync(e)}catch(t){return e}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function YA(e){const t=[e];do{for(var r=t.pop(),n=!1,o=CA.readdirSync(r),i=0,a=o.length;i<a;i++){var u=xA.join(r,o[i]);CA.lstatSync(u).isDirectory()?(n||(n=!0,t.push(r)),t.push(u)):CA.unlinkSync(u)}n||CA.rmdirSync(r)}while(0!==t.length)}function HA(e,t,r){const n=QA((function(e){try{0<=e[0]&&CA.closeSync(e[0])}catch(e){if(!(t=e,eB(t,-IA,"EBADF")||ZA(e)))throw e}var t;try{CA.unlinkSync(e[1])}catch(e){if(!ZA(e))throw e}}),[t,e]);return r.keep||NA.unshift(n),n}function JA(e,t){const r=QA(t.unsafeCleanup?YA:CA.rmdirSync.bind(CA),e);return t.keep||NA.unshift(r),r}function QA(e,t){var r=!1;return function n(o){if(!r){const o=NA.indexOf(n);o>=0&&NA.splice(o,1),r=!0,e(t)}o&&o(null)}}function XA(){if(!GA||UA)for(;NA.length;)try{NA[0].call(null)}catch(e){}}function ZA(e){return eB(e,-LA,"ENOENT")}function eB(e,t,r){return e.code==t||e.code==r}const tB=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));0===tB[0]&&(tB[1]<9||9===tB[1]&&tB[2]<5)&&process.addListener("uncaughtException",(function(e){throw GA=!0,XA(),e})),process.addListener("exit",(function(e){e&&(GA=!0),XA()})),EA.tmpdir=BA,EA.dir=function(e,t){var r=VA(e,t),n=r[0],o=r[1];$A(n,(function(e,t){if(e)return o(e);CA.mkdir(t,n.mode||448,(function(e){if(e)return o(e);o(null,t,JA(t,n))}))}))},EA.dirSync=function(e){var t=VA(e)[0];const r=KA(t);return CA.mkdirSync(r,t.mode||448),{name:r,removeCallback:JA(r,t)}},EA.file=function(e,t){var r=VA(e,t),n=r[0],o=r[1];n.postfix=qA(n.postfix)?".tmp":n.postfix,$A(n,(function(e,t){if(e)return o(e);CA.open(t,RA,n.mode||384,(function(e,r){return e?o(e):n.discardDescriptor?CA.close(r,(function(e){if(e){try{CA.unlinkSync(t)}catch(t){ZA(t)||(e=t)}return o(e)}o(null,t,void 0,HA(t,-1,n))})):n.detachDescriptor?o(null,t,r,HA(t,-1,n)):void o(null,t,r,HA(t,r,n))}))}))},EA.fileSync=function(e){var t=VA(e)[0];t.postfix=t.postfix||".tmp";const r=t.discardDescriptor||t.detachDescriptor,n=KA(t);var o=CA.openSync(n,RA,t.mode||384);return t.discardDescriptor&&(CA.closeSync(o),o=void 0),{name:n,fd:o,removeCallback:HA(n,r?-1:o,t)}},EA.tmpName=$A,EA.tmpNameSync=KA,EA.setGracefulCleanup=function(){UA=!0};var rB={},nB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(rB,"__esModule",{value:!0});var oB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to create temporary file for editor")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return nB(t,e),t}(Error);rB.CreateFileError=oB;var iB={},aB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(iB,"__esModule",{value:!0});var uB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed launch editor")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return aB(t,e),t}(Error);iB.LaunchEditorError=uB;var sB={},cB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sB,"__esModule",{value:!0});var lB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to read temporary file")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return cB(t,e),t}(Error);sB.ReadFileError=lB;var fB={},pB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(fB,"__esModule",{value:!0});var dB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to cleanup temporary file")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return pB(t,e),t}(Error);fB.RemoveFileError=dB,Object.defineProperty(dP,"__esModule",{value:!0});var hB=hP,bB=c,vB=v,yB=OA,mB=EA,gB=rB;dP.CreateFileError=gB.CreateFileError;var DB=iB;dP.LaunchEditorError=DB.LaunchEditorError;var _B=sB;dP.ReadFileError=_B.ReadFileError;var wB=fB;dP.RemoveFileError=wB.RemoveFileError,dP.edit=function(e,t){void 0===e&&(e="");var r=new EB(e,t);return r.run(),r.cleanup(),r.text};var OB=dP.editAsync=function(e,t,r){void 0===e&&(e="");var n=new EB(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))},EB=function(){function e(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return e.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var o=e[n];n>0&&" "===o&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=o}return r.length>0&&t.push(r),t},Object.defineProperty(e.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),e.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},e.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},e.prototype.cleanup=function(){this.removeTemporaryFile()},e.prototype.determineEditor=function(){var t=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",r=e.splitStringBySpace(t).map((function(e){return e.replace("\\ "," ")})),n=r.shift();this.editor={args:r,bin:n}},e.prototype.createTemporaryFile=function(){try{this.tempFile=mB.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),vB.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new gB.CreateFileError(e)}},e.prototype.readTemporaryFile=function(){try{var e=vB.readFileSync(this.tempFile);if(0===e.length)this.text="";else{var t=hB.detect(e).toString();yB.encodingExists(t)||(t="utf8"),this.text=yB.decode(e,t)}}catch(e){throw new _B.ReadFileError(e)}},e.prototype.removeTemporaryFile=function(){try{vB.unlinkSync(this.tempFile)}catch(e){throw new wB.RemoveFileError(e)}},e.prototype.launchEditor=function(){try{var e=bB.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new DB.LaunchEditorError(e)}},e.prototype.launchEditorAsync=function(e){var t=this;try{bB.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(r){t.lastExitStatus=r,setImmediate(e)}))}catch(e){throw new DB.LaunchEditorError(e)}},e}();dP.ExternalEditor=EB;class jB extends nP{_run(e){this.done=e,this.editorResult=new Te.Subject;const t=Jv(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));void 0===this.opt.waitUserInput||this.opt.waitUserInput||this.startExternalEditor();const r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(e){let t="",r=this.getQuestion();"answered"===this.status?r+=K.dim("Received"):r+=K.dim("Press <enter> to launch your preferred editor."),e&&(t=K.red(">> ")+e),this.screen.render(r,t)}startExternalEditor(){this.rl.pause(),OB(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}}var SB,CB={exports:{}},xB=Object.prototype.toString,FB=Math.max,PB=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},AB=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==xB.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=FB(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,PB(n,arguments));return Object(o)===o?o:this}return t.apply(e,PB(n,arguments))})),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r},BB=Function.prototype.bind||AB,MB=Error,TB=EvalError,kB=RangeError,RB=ReferenceError,IB=SyntaxError,LB=TypeError,NB=URIError,UB="undefined"!=typeof Symbol&&Symbol,GB=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},WB={__proto__:null,foo:{}},qB=Object,VB=Function.prototype.call,zB=Object.prototype.hasOwnProperty,$B=BB.call(VB,zB),KB=MB,YB=TB,HB=kB,JB=RB,QB=IB,XB=LB,ZB=NB,eM=Function,tM=function(e){try{return eM('"use strict"; return ('+e+").constructor;")()}catch(e){}},rM=Object.getOwnPropertyDescriptor;if(rM)try{rM({},"")}catch(e){rM=null}var nM=function(){throw new XB},oM=rM?function(){try{return nM}catch(e){try{return rM(arguments,"callee").get}catch(e){return nM}}}():nM,iM="function"==typeof UB&&"function"==typeof Symbol&&"symbol"==typeof UB("foo")&&"symbol"==typeof Symbol("bar")&&GB(),aM={__proto__:WB}.foo===WB.foo&&!(WB instanceof qB),uM=Object.getPrototypeOf||(aM?function(e){return e.__proto__}:null),sM={},cM="undefined"!=typeof Uint8Array&&uM?uM(Uint8Array):SB,lM={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?SB:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?SB:ArrayBuffer,"%ArrayIteratorPrototype%":iM&&uM?uM([][Symbol.iterator]()):SB,"%AsyncFromSyncIteratorPrototype%":SB,"%AsyncFunction%":sM,"%AsyncGenerator%":sM,"%AsyncGeneratorFunction%":sM,"%AsyncIteratorPrototype%":sM,"%Atomics%":"undefined"==typeof Atomics?SB:Atomics,"%BigInt%":"undefined"==typeof BigInt?SB:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?SB:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?SB:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?SB:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":KB,"%eval%":eval,"%EvalError%":YB,"%Float32Array%":"undefined"==typeof Float32Array?SB:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?SB:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?SB:FinalizationRegistry,"%Function%":eM,"%GeneratorFunction%":sM,"%Int8Array%":"undefined"==typeof Int8Array?SB:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?SB:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?SB:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":iM&&uM?uM(uM([][Symbol.iterator]())):SB,"%JSON%":"object"==typeof JSON?JSON:SB,"%Map%":"undefined"==typeof Map?SB:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&iM&&uM?uM((new Map)[Symbol.iterator]()):SB,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?SB:Promise,"%Proxy%":"undefined"==typeof Proxy?SB:Proxy,"%RangeError%":HB,"%ReferenceError%":JB,"%Reflect%":"undefined"==typeof Reflect?SB:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?SB:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&iM&&uM?uM((new Set)[Symbol.iterator]()):SB,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?SB:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":iM&&uM?uM(""[Symbol.iterator]()):SB,"%Symbol%":iM?Symbol:SB,"%SyntaxError%":QB,"%ThrowTypeError%":oM,"%TypedArray%":cM,"%TypeError%":XB,"%Uint8Array%":"undefined"==typeof Uint8Array?SB:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?SB:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?SB:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?SB:Uint32Array,"%URIError%":ZB,"%WeakMap%":"undefined"==typeof WeakMap?SB:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?SB:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?SB:WeakSet};if(uM)try{null.error}catch(e){var fM=uM(uM(e));lM["%Error.prototype%"]=fM}var pM,dM,hM=function e(t){var r;if("%AsyncFunction%"===t)r=tM("async function () {}");else if("%GeneratorFunction%"===t)r=tM("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=tM("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&uM&&(r=uM(o.prototype))}return lM[t]=r,r},bM={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vM=BB,yM=$B,mM=vM.call(Function.call,Array.prototype.concat),gM=vM.call(Function.apply,Array.prototype.splice),DM=vM.call(Function.call,String.prototype.replace),_M=vM.call(Function.call,String.prototype.slice),wM=vM.call(Function.call,RegExp.prototype.exec),OM=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,EM=/\\(\\)?/g,jM=function(e,t){var r,n=e;if(yM(bM,n)&&(n="%"+(r=bM[n])[0]+"%"),yM(lM,n)){var o=lM[n];if(o===sM&&(o=hM(n)),void 0===o&&!t)throw new XB("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new QB("intrinsic "+e+" does not exist!")},SM=function(e,t){if("string"!=typeof e||0===e.length)throw new XB("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new XB('"allowMissing" argument must be a boolean');if(null===wM(/^%?[^%]*%?$/,e))throw new QB("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_M(e,0,1),r=_M(e,-1);if("%"===t&&"%"!==r)throw new QB("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new QB("invalid intrinsic syntax, expected opening `%`");var n=[];return DM(e,OM,(function(e,t,r,o){n[n.length]=r?DM(o,EM,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=jM("%"+n+"%",t),i=o.name,a=o.value,u=!1,s=o.alias;s&&(n=s[0],gM(r,mM([0,1],s)));for(var c=1,l=!0;c<r.length;c+=1){var f=r[c],p=_M(f,0,1),d=_M(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new QB("property names with quotes must have matching quotes");if("constructor"!==f&&l||(u=!0),yM(lM,i="%"+(n+="."+f)+"%"))a=lM[i];else if(null!=a){if(!(f in a)){if(!t)throw new XB("base intrinsic for "+e+" exists, but the property is not available.");return}if(rM&&c+1>=r.length){var h=rM(a,f);a=(l=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[f]}else l=yM(a,f),a=a[f];l&&!u&&(lM[i]=a)}}return a};function CM(){if(dM)return pM;dM=1;var e=SM("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return pM=e}var xM=SM("%Object.getOwnPropertyDescriptor%",!0);if(xM)try{xM([],"length")}catch(e){xM=null}var FM=xM,PM=CM(),AM=IB,BM=LB,MM=FM,TM=CM(),kM=function(){return!!TM};kM.hasArrayLengthDefineBug=function(){if(!TM)return null;try{return 1!==TM([],"length",{value:1}).length}catch(e){return!0}};var RM=SM,IM=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new BM("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new BM("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new BM("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new BM("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new BM("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new BM("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],u=!!MM&&MM(e,t);if(PM)PM(e,t,{configurable:null===i&&u?u.configurable:!i,enumerable:null===n&&u?u.enumerable:!n,value:r,writable:null===o&&u?u.writable:!o});else{if(!a&&(n||o||i))throw new AM("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}},LM=kM(),NM=FM,UM=LB,GM=RM("%Math.floor%"),WM=function(e,t){if("function"!=typeof e)throw new UM("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||GM(t)!==t)throw new UM("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in e&&NM){var i=NM(e,"length");i&&!i.configurable&&(n=!1),i&&!i.writable&&(o=!1)}return(n||o||!r)&&(LM?IM(e,"length",t,!0,!0):IM(e,"length",t)),e};!function(e){var t=BB,r=SM,n=WM,o=LB,i=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||t.call(a,i),s=CM(),c=r("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var r=u(t,a,arguments);return n(r,1+c(0,e.length-(arguments.length-1)),!0)};var l=function(){return u(t,i,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l}(CB);var qM=CB.exports,VM=a.Stream,zM=qM;function $M(e,t,r){var n=zM(e||function(e){this.queue(e)}),o=zM(t||function(){this.queue(null)}),i=!1,a=!1,u=[],s=!1,c=new VM;function l(){for(;u.length&&!c.paused;){var e=u.shift();if(null===e)return c.emit("end");c.emit("data",e)}}return c.readable=!0,c.writable=!0,c.paused=!1,c.autoDestroy=!(r&&!1===r.autoDestroy),c.write=function(e){return n(this,e),!c.paused},c.queue=function(e){return s||(null===e&&(s=!0),u.push(e),l()),c},c.push=c.queue,c.on("end",(function(){c.readable=!1,!c.writable&&c.autoDestroy&&process.nextTick((function(){c.destroy()}))})),c.end=function(e){if(!i)return i=!0,arguments.length&&c.write(e),c.writable=!1,o(c),!c.readable&&c.autoDestroy&&c.destroy(),c},c.destroy=function(){if(!a)return a=!0,i=!0,u.length=0,c.writable=!1,c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),l(),c.paused||c.emit("drain"),c},c}var KM=$M;$M.through=$M;var YM=h.getDefaultExportFromCjs(KM);const HM=a;var JM=class extends HM{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#r(e,...t){"function"==typeof this._dest?.[e]&&this._dest[e](...t),"function"==typeof this._src?.[e]&&this._src[e](...t)}get isTTY(){return null!==this.#e?this.#e:this.#t("isTTY",!1)}set isTTY(e){this.#e=e}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return 0===e.indexOf(this._prompt)&&(e=(e=e.slice(this._prompt.length)).replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&0===e.indexOf(this._prompt)&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#r("destroy",...e)}destroySoon(...e){return this.#r("destroySoon",...e)}close(...e){return this.#r("close",...e)}},QM=h.getDefaultExportFromCjs(JM);class XM{constructor(e){this.rl||=m.createInterface(function(e={}){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY){const e=new Error("Prompts can not be meaningfully rendered in non-TTY environments");throw e.isTtyError=!0,e}const r=new QM;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(e)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&"function"==typeof this.activePrompt.close&&this.activePrompt.close(),this.rl.output.end(),this.rl.pause(),this.rl.close()}}var ZM=Dy,eT=j_,tT=vm,rT=Function.prototype,nT=Object.prototype,oT=rT.toString,iT=nT.hasOwnProperty,aT=oT.call(Object);var uT=function(e){if(!tT(e)||"[object Object]"!=ZM(e))return!1;var t=eT(e);if(null===t)return!0;var r=iT.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&oT.call(r)==aT},sT=VD,cT=rj,lT=cm,fT=_y,pT=oj;var dT=function(e,t,r,n){if(!fT(e))return e;for(var o=-1,i=(t=cT(t,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=pT(t[o]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var l=u[s];void 0===(c=n?n(l,s,u):void 0)&&(c=fT(l)?l:lT(t[o+1])?[]:{})}sT(u,s,c),u=u[s]}return e},hT=dT;var bT=function(e,t,r){return null==e?e:hT(e,t,r)};const vT=function(e,t,r){return"function"!=typeof e[t]?Te.of(e):Te.from(Me(e[t])(r).then((r=>(e[t]=r,e))))},yT={isPlainObject:h.getDefaultExportFromCjs(uT),set:h.getDefaultExportFromCjs(bT),get:lj};class mT extends XM{constructor(e,t){super(t),this.prompts=e}run(e,t){yT.isPlainObject(t)?this.answers={...t}:this.answers={},yT.isPlainObject(e)&&(e=Object.values(e).every((e=>yT.isPlainObject(e)&&void 0===e.name))?Object.entries(e).map((([e,t])=>({name:e,...t}))):[e]);const r=Array.isArray(e)?Te.from(e):e;return this.process=r.pipe(Te.concatMap(this.processQuestion.bind(this)),Te.publish()),this.process.connect(),this.process.pipe(Te.reduce(((e,t)=>(yT.set(e,t.name,t.answer),e)),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(e){return this.close(),Promise.reject(e)}processQuestion(e){return e={...e},Te.defer((()=>Te.of(e).pipe(Te.concatMap(this.setDefaultType.bind(this)),Te.concatMap(this.filterIfRunnable.bind(this)),Te.concatMap((()=>vT(e,"message",this.answers))),Te.concatMap((()=>vT(e,"default",this.answers))),Te.concatMap((()=>vT(e,"choices",this.answers))),Te.concatMap(this.fetchAnswer.bind(this)))))}fetchAnswer(e){const t=this.prompts[e.type];return this.activePrompt=new t(e,this.rl,this.answers),Te.defer((()=>Te.from(this.activePrompt.run().then((t=>({name:e.name,answer:t}))))))}setDefaultType(e){return this.prompts[e.type]||(e.type="input"),Te.defer((()=>Te.of(e)))}filterIfRunnable(e){if(!0!==e.askAnswered&&void 0!==yT.get(this.answers,e.name))return Te.empty();if(!1===e.when)return Te.empty();if("function"!=typeof e.when)return Te.of(e);const{answers:t}=this;return Te.defer((()=>Te.from(Me(e.when)(t).then((t=>{if(t)return e}))).pipe(Te.filter((e=>null!=e)))))}}function gT(e){const t=function(r,n){let o;try{o=new mT(t.prompts,e)}catch(e){return Promise.reject(e)}const i=o.run(r,n);return i.ui=o,i};return t.prompts={},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",oP),this.registerPrompt("input",iP),this.registerPrompt("number",aP),this.registerPrompt("confirm",uP),this.registerPrompt("rawlist",sP),this.registerPrompt("expand",cP),this.registerPrompt("checkbox",lP),this.registerPrompt("password",pP),this.registerPrompt("editor",jB)},t.restoreDefaultPrompts(),t}const DT=gT();const _T={prompt:DT,ui:{BottomBar:class extends XM{constructor(e={}){super(e),this.log=YM(this.writeLog.bind(this)),this.bottomBar=e.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return XF(this.rl,this.bottomBar.split("\n").length),this}updateBottomBar(e){return XF(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=e,this.render(),this.rl.output.mute(),this}writeLog(e){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(e.toString())),this.render(),this.rl.output.mute(),this}enforceLF(e){return e.match(/[\r\n]$/)?e:e+"\n"}write(e){const t=e.split(/\n/);this.height=t.length,this.rl.setPrompt(t[t.length-1]),0===this.rl.output.rows&&0===this.rl.output.columns&&JF(this.rl,e.length+this.rl.line.length),this.rl.output.write(e)}},Prompt:mT},createPromptModule:gT,registerPrompt:function(e,t){DT.registerPrompt(e,t)},restoreDefaultPrompts:function(){DT.restoreDefaultPrompts()},Separator:iS};var wT="0.2.1";const OT=process.cwd();exports.createModule=async()=>{const e=await g.loadJSON(y.resolve(OT,"package.json")),t=await _T.prompt([{type:"list",name:"type",message:"请选择一个选项:",default:"react",choices:["vue","react"]},{type:"input",message:"workspaces name",name:"workspaces",validate:function(e){return!(e&&!v.existsSync(y.resolve(OT,e)))||"工作空间不存在"}},{type:"input",message:"package name",name:"name",validate:function(e){return!!e.replace(/\s/g,"")||"姓名不能为空,请重新输入"}},{type:"input",message:"version",name:"version",default:e.version}]),r="vue"===t.type,n=v.readFileSync(y.resolve(__dirname,r?"../../template/template.vue.package.json":"../../template/template.package.json"),"utf-8"),o=h.ejs.compile(n),i=y.resolve(OT,t.workspaces,t.name);v.existsSync(y.resolve(i))||v.mkdirSync(i),c.exec(`cd ${i}`,((e,n,a)=>{e?console.error(`错误: ${e.message}`):a?console.error(`错误: ${a}`):(h.createCwdConfig(i,t.name,r),v.mkdirSync(y.resolve(i,"public")),v.mkdirSync(y.resolve(i,"src")),v.writeFileSync(y.resolve(i,"package.json"),o({...t,coreVersion:`^${wT}`})),v.writeFileSync(y.resolve(i,"tsconfig.json"),'{\n "extends": ["./src/.gant/tsconfig.json"]\n }'),v.writeFileSync(y.resolve(i,"tsconfig.json"),'{\n "extends": ["./src/.gant/tsconfig.json"]\n }'))}))},exports.stringWidthExports=FS;
10
+ const CA=v,xA=y,FA=t,PA=function(){var e;return e=jA?process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",SA.test(e)&&(e=e.slice(0,-1)),e},AA=process.binding("constants"),BA=PA(),MA="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",TA=/XXXXXX/,kA=3,RA=(AA.O_CREAT||AA.fs.O_CREAT)|(AA.O_EXCL||AA.fs.O_EXCL)|(AA.O_RDWR||AA.fs.O_RDWR),IA=AA.EBADF||AA.os.errno.EBADF,LA=AA.ENOENT||AA.os.errno.ENOENT,NA=[];var UA=!1,GA=!1;function WA(e){var t=[],r=null;try{r=FA.randomBytes(e)}catch(t){r=FA.pseudoRandomBytes(e)}for(var n=0;n<e;n++)t.push(MA[r[n]%MA.length]);return t.join("")}function qA(e){return void 0===e}function VA(e,t){return"function"==typeof e?[t||{},e]:qA(e)?[{},t]:[e,t]}function zA(e){if(e.name)return xA.join(e.dir||BA,e.name);if(e.template)return e.template.replace(TA,WA(6));const t=[e.prefix||"tmp-",process.pid,WA(12),e.postfix||""].join("");return xA.join(e.dir||BA,t)}function $A(e,t){var r=VA(e,t),n=r[0],o=r[1],i=n.name?1:n.tries||kA;return isNaN(i)||i<0?o(new Error("Invalid tries")):n.template&&!n.template.match(TA)?o(new Error("Invalid template provided")):void function e(){const t=zA(n);CA.stat(t,(function(r){if(!r)return i-- >0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}()}function KA(e){var t=VA(e)[0],r=t.name?1:t.tries||kA;if(isNaN(r)||r<0)throw new Error("Invalid tries");if(t.template&&!t.template.match(TA))throw new Error("Invalid template provided");do{const e=zA(t);try{CA.statSync(e)}catch(t){return e}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function YA(e){const t=[e];do{for(var r=t.pop(),n=!1,o=CA.readdirSync(r),i=0,a=o.length;i<a;i++){var u=xA.join(r,o[i]);CA.lstatSync(u).isDirectory()?(n||(n=!0,t.push(r)),t.push(u)):CA.unlinkSync(u)}n||CA.rmdirSync(r)}while(0!==t.length)}function HA(e,t,r){const n=QA((function(e){try{0<=e[0]&&CA.closeSync(e[0])}catch(e){if(!(t=e,eB(t,-IA,"EBADF")||ZA(e)))throw e}var t;try{CA.unlinkSync(e[1])}catch(e){if(!ZA(e))throw e}}),[t,e]);return r.keep||NA.unshift(n),n}function JA(e,t){const r=QA(t.unsafeCleanup?YA:CA.rmdirSync.bind(CA),e);return t.keep||NA.unshift(r),r}function QA(e,t){var r=!1;return function n(o){if(!r){const o=NA.indexOf(n);o>=0&&NA.splice(o,1),r=!0,e(t)}o&&o(null)}}function XA(){if(!GA||UA)for(;NA.length;)try{NA[0].call(null)}catch(e){}}function ZA(e){return eB(e,-LA,"ENOENT")}function eB(e,t,r){return e.code==t||e.code==r}const tB=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));0===tB[0]&&(tB[1]<9||9===tB[1]&&tB[2]<5)&&process.addListener("uncaughtException",(function(e){throw GA=!0,XA(),e})),process.addListener("exit",(function(e){e&&(GA=!0),XA()})),EA.tmpdir=BA,EA.dir=function(e,t){var r=VA(e,t),n=r[0],o=r[1];$A(n,(function(e,t){if(e)return o(e);CA.mkdir(t,n.mode||448,(function(e){if(e)return o(e);o(null,t,JA(t,n))}))}))},EA.dirSync=function(e){var t=VA(e)[0];const r=KA(t);return CA.mkdirSync(r,t.mode||448),{name:r,removeCallback:JA(r,t)}},EA.file=function(e,t){var r=VA(e,t),n=r[0],o=r[1];n.postfix=qA(n.postfix)?".tmp":n.postfix,$A(n,(function(e,t){if(e)return o(e);CA.open(t,RA,n.mode||384,(function(e,r){return e?o(e):n.discardDescriptor?CA.close(r,(function(e){if(e){try{CA.unlinkSync(t)}catch(t){ZA(t)||(e=t)}return o(e)}o(null,t,void 0,HA(t,-1,n))})):n.detachDescriptor?o(null,t,r,HA(t,-1,n)):void o(null,t,r,HA(t,r,n))}))}))},EA.fileSync=function(e){var t=VA(e)[0];t.postfix=t.postfix||".tmp";const r=t.discardDescriptor||t.detachDescriptor,n=KA(t);var o=CA.openSync(n,RA,t.mode||384);return t.discardDescriptor&&(CA.closeSync(o),o=void 0),{name:n,fd:o,removeCallback:HA(n,r?-1:o,t)}},EA.tmpName=$A,EA.tmpNameSync=KA,EA.setGracefulCleanup=function(){UA=!0};var rB={},nB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(rB,"__esModule",{value:!0});var oB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to create temporary file for editor")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return nB(t,e),t}(Error);rB.CreateFileError=oB;var iB={},aB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(iB,"__esModule",{value:!0});var uB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed launch editor")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return aB(t,e),t}(Error);iB.LaunchEditorError=uB;var sB={},cB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sB,"__esModule",{value:!0});var lB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to read temporary file")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return cB(t,e),t}(Error);sB.ReadFileError=lB;var fB={},pB=h.commonjsGlobal&&h.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(fB,"__esModule",{value:!0});var dB=function(e){function t(t){var r=this.constructor,n=e.call(this,"Failed to cleanup temporary file")||this;n.originalError=t;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return pB(t,e),t}(Error);fB.RemoveFileError=dB,Object.defineProperty(dP,"__esModule",{value:!0});var hB=hP,bB=c,vB=v,yB=OA,mB=EA,gB=rB;dP.CreateFileError=gB.CreateFileError;var DB=iB;dP.LaunchEditorError=DB.LaunchEditorError;var _B=sB;dP.ReadFileError=_B.ReadFileError;var wB=fB;dP.RemoveFileError=wB.RemoveFileError,dP.edit=function(e,t){void 0===e&&(e="");var r=new EB(e,t);return r.run(),r.cleanup(),r.text};var OB=dP.editAsync=function(e,t,r){void 0===e&&(e="");var n=new EB(e,r);n.runAsync((function(e,r){if(e)setImmediate(t,e,null);else try{n.cleanup(),setImmediate(t,null,r)}catch(e){setImmediate(t,e,null)}}))},EB=function(){function e(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return e.splitStringBySpace=function(e){for(var t=[],r="",n=0;n<e.length;n++){var o=e[n];n>0&&" "===o&&"\\"!==e[n-1]&&r.length>0?(t.push(r),r=""):r+=o}return r.length>0&&t.push(r),t},Object.defineProperty(e.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),e.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},e.prototype.runAsync=function(e){var t=this;try{this.launchEditorAsync((function(){try{t.readTemporaryFile(),setImmediate(e,null,t.text)}catch(t){setImmediate(e,t,null)}}))}catch(t){setImmediate(e,t,null)}},e.prototype.cleanup=function(){this.removeTemporaryFile()},e.prototype.determineEditor=function(){var t=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",r=e.splitStringBySpace(t).map((function(e){return e.replace("\\ "," ")})),n=r.shift();this.editor={args:r,bin:n}},e.prototype.createTemporaryFile=function(){try{this.tempFile=mB.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),vB.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new gB.CreateFileError(e)}},e.prototype.readTemporaryFile=function(){try{var e=vB.readFileSync(this.tempFile);if(0===e.length)this.text="";else{var t=hB.detect(e).toString();yB.encodingExists(t)||(t="utf8"),this.text=yB.decode(e,t)}}catch(e){throw new _B.ReadFileError(e)}},e.prototype.removeTemporaryFile=function(){try{vB.unlinkSync(this.tempFile)}catch(e){throw new wB.RemoveFileError(e)}},e.prototype.launchEditor=function(){try{var e=bB.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new DB.LaunchEditorError(e)}},e.prototype.launchEditorAsync=function(e){var t=this;try{bB.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",(function(r){t.lastExitStatus=r,setImmediate(e)}))}catch(e){throw new DB.LaunchEditorError(e)}},e}();dP.ExternalEditor=EB;class jB extends nP{_run(e){this.done=e,this.editorResult=new Te.Subject;const t=Jv(this.rl);this.lineSubscription=t.line.subscribe(this.startExternalEditor.bind(this));void 0===this.opt.waitUserInput||this.opt.waitUserInput||this.startExternalEditor();const r=this.handleSubmitEvents(this.editorResult);return r.success.forEach(this.onEnd.bind(this)),r.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,this.render(),this}render(e){let t="",r=this.getQuestion();"answered"===this.status?r+=K.dim("Received"):r+=K.dim("Press <enter> to launch your preferred editor."),e&&(t=K.red(">> ")+e),this.screen.render(r,t)}startExternalEditor(){this.rl.pause(),OB(this.currentText,this.endExternalEditor.bind(this),{postfix:this.opt.postfix??".txt"})}endExternalEditor(e,t){this.rl.resume(),e?this.editorResult.error(e):this.editorResult.next(t)}onEnd(e){this.editorResult.unsubscribe(),this.lineSubscription.unsubscribe(),this.answer=e.value,this.status="answered",this.render(),this.screen.done(),this.done(this.answer)}onError(e){this.render(e.isValid)}}var SB,CB={exports:{}},xB=Object.prototype.toString,FB=Math.max,PB=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},AB=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==xB.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),o=FB(0,t.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,PB(n,arguments));return Object(o)===o?o:this}return t.apply(e,PB(n,arguments))})),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r},BB=Function.prototype.bind||AB,MB=Error,TB=EvalError,kB=RangeError,RB=ReferenceError,IB=SyntaxError,LB=TypeError,NB=URIError,UB="undefined"!=typeof Symbol&&Symbol,GB=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},WB={__proto__:null,foo:{}},qB=Object,VB=Function.prototype.call,zB=Object.prototype.hasOwnProperty,$B=BB.call(VB,zB),KB=MB,YB=TB,HB=kB,JB=RB,QB=IB,XB=LB,ZB=NB,eM=Function,tM=function(e){try{return eM('"use strict"; return ('+e+").constructor;")()}catch(e){}},rM=Object.getOwnPropertyDescriptor;if(rM)try{rM({},"")}catch(e){rM=null}var nM=function(){throw new XB},oM=rM?function(){try{return nM}catch(e){try{return rM(arguments,"callee").get}catch(e){return nM}}}():nM,iM="function"==typeof UB&&"function"==typeof Symbol&&"symbol"==typeof UB("foo")&&"symbol"==typeof Symbol("bar")&&GB(),aM={__proto__:WB}.foo===WB.foo&&!(WB instanceof qB),uM=Object.getPrototypeOf||(aM?function(e){return e.__proto__}:null),sM={},cM="undefined"!=typeof Uint8Array&&uM?uM(Uint8Array):SB,lM={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?SB:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?SB:ArrayBuffer,"%ArrayIteratorPrototype%":iM&&uM?uM([][Symbol.iterator]()):SB,"%AsyncFromSyncIteratorPrototype%":SB,"%AsyncFunction%":sM,"%AsyncGenerator%":sM,"%AsyncGeneratorFunction%":sM,"%AsyncIteratorPrototype%":sM,"%Atomics%":"undefined"==typeof Atomics?SB:Atomics,"%BigInt%":"undefined"==typeof BigInt?SB:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?SB:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?SB:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?SB:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":KB,"%eval%":eval,"%EvalError%":YB,"%Float32Array%":"undefined"==typeof Float32Array?SB:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?SB:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?SB:FinalizationRegistry,"%Function%":eM,"%GeneratorFunction%":sM,"%Int8Array%":"undefined"==typeof Int8Array?SB:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?SB:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?SB:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":iM&&uM?uM(uM([][Symbol.iterator]())):SB,"%JSON%":"object"==typeof JSON?JSON:SB,"%Map%":"undefined"==typeof Map?SB:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&iM&&uM?uM((new Map)[Symbol.iterator]()):SB,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?SB:Promise,"%Proxy%":"undefined"==typeof Proxy?SB:Proxy,"%RangeError%":HB,"%ReferenceError%":JB,"%Reflect%":"undefined"==typeof Reflect?SB:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?SB:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&iM&&uM?uM((new Set)[Symbol.iterator]()):SB,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?SB:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":iM&&uM?uM(""[Symbol.iterator]()):SB,"%Symbol%":iM?Symbol:SB,"%SyntaxError%":QB,"%ThrowTypeError%":oM,"%TypedArray%":cM,"%TypeError%":XB,"%Uint8Array%":"undefined"==typeof Uint8Array?SB:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?SB:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?SB:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?SB:Uint32Array,"%URIError%":ZB,"%WeakMap%":"undefined"==typeof WeakMap?SB:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?SB:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?SB:WeakSet};if(uM)try{null.error}catch(e){var fM=uM(uM(e));lM["%Error.prototype%"]=fM}var pM,dM,hM=function e(t){var r;if("%AsyncFunction%"===t)r=tM("async function () {}");else if("%GeneratorFunction%"===t)r=tM("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=tM("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&uM&&(r=uM(o.prototype))}return lM[t]=r,r},bM={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vM=BB,yM=$B,mM=vM.call(Function.call,Array.prototype.concat),gM=vM.call(Function.apply,Array.prototype.splice),DM=vM.call(Function.call,String.prototype.replace),_M=vM.call(Function.call,String.prototype.slice),wM=vM.call(Function.call,RegExp.prototype.exec),OM=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,EM=/\\(\\)?/g,jM=function(e,t){var r,n=e;if(yM(bM,n)&&(n="%"+(r=bM[n])[0]+"%"),yM(lM,n)){var o=lM[n];if(o===sM&&(o=hM(n)),void 0===o&&!t)throw new XB("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new QB("intrinsic "+e+" does not exist!")},SM=function(e,t){if("string"!=typeof e||0===e.length)throw new XB("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new XB('"allowMissing" argument must be a boolean');if(null===wM(/^%?[^%]*%?$/,e))throw new QB("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_M(e,0,1),r=_M(e,-1);if("%"===t&&"%"!==r)throw new QB("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new QB("invalid intrinsic syntax, expected opening `%`");var n=[];return DM(e,OM,(function(e,t,r,o){n[n.length]=r?DM(o,EM,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=jM("%"+n+"%",t),i=o.name,a=o.value,u=!1,s=o.alias;s&&(n=s[0],gM(r,mM([0,1],s)));for(var c=1,l=!0;c<r.length;c+=1){var f=r[c],p=_M(f,0,1),d=_M(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new QB("property names with quotes must have matching quotes");if("constructor"!==f&&l||(u=!0),yM(lM,i="%"+(n+="."+f)+"%"))a=lM[i];else if(null!=a){if(!(f in a)){if(!t)throw new XB("base intrinsic for "+e+" exists, but the property is not available.");return}if(rM&&c+1>=r.length){var h=rM(a,f);a=(l=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[f]}else l=yM(a,f),a=a[f];l&&!u&&(lM[i]=a)}}return a};function CM(){if(dM)return pM;dM=1;var e=SM("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return pM=e}var xM=SM("%Object.getOwnPropertyDescriptor%",!0);if(xM)try{xM([],"length")}catch(e){xM=null}var FM=xM,PM=CM(),AM=IB,BM=LB,MM=FM,TM=CM(),kM=function(){return!!TM};kM.hasArrayLengthDefineBug=function(){if(!TM)return null;try{return 1!==TM([],"length",{value:1}).length}catch(e){return!0}};var RM=SM,IM=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new BM("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new BM("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new BM("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new BM("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new BM("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new BM("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],u=!!MM&&MM(e,t);if(PM)PM(e,t,{configurable:null===i&&u?u.configurable:!i,enumerable:null===n&&u?u.enumerable:!n,value:r,writable:null===o&&u?u.writable:!o});else{if(!a&&(n||o||i))throw new AM("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}},LM=kM(),NM=FM,UM=LB,GM=RM("%Math.floor%"),WM=function(e,t){if("function"!=typeof e)throw new UM("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||GM(t)!==t)throw new UM("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in e&&NM){var i=NM(e,"length");i&&!i.configurable&&(n=!1),i&&!i.writable&&(o=!1)}return(n||o||!r)&&(LM?IM(e,"length",t,!0,!0):IM(e,"length",t)),e};!function(e){var t=BB,r=SM,n=WM,o=LB,i=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||t.call(a,i),s=CM(),c=r("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var r=u(t,a,arguments);return n(r,1+c(0,e.length-(arguments.length-1)),!0)};var l=function(){return u(t,i,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l}(CB);var qM=CB.exports,VM=a.Stream,zM=qM;function $M(e,t,r){var n=zM(e||function(e){this.queue(e)}),o=zM(t||function(){this.queue(null)}),i=!1,a=!1,u=[],s=!1,c=new VM;function l(){for(;u.length&&!c.paused;){var e=u.shift();if(null===e)return c.emit("end");c.emit("data",e)}}return c.readable=!0,c.writable=!0,c.paused=!1,c.autoDestroy=!(r&&!1===r.autoDestroy),c.write=function(e){return n(this,e),!c.paused},c.queue=function(e){return s||(null===e&&(s=!0),u.push(e),l()),c},c.push=c.queue,c.on("end",(function(){c.readable=!1,!c.writable&&c.autoDestroy&&process.nextTick((function(){c.destroy()}))})),c.end=function(e){if(!i)return i=!0,arguments.length&&c.write(e),c.writable=!1,o(c),!c.readable&&c.autoDestroy&&c.destroy(),c},c.destroy=function(){if(!a)return a=!0,i=!0,u.length=0,c.writable=!1,c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),l(),c.paused||c.emit("drain"),c},c}var KM=$M;$M.through=$M;var YM=h.getDefaultExportFromCjs(KM);const HM=a;var JM=class extends HM{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#r(e,...t){"function"==typeof this._dest?.[e]&&this._dest[e](...t),"function"==typeof this._src?.[e]&&this._src[e](...t)}get isTTY(){return null!==this.#e?this.#e:this.#t("isTTY",!1)}set isTTY(e){this.#e=e}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return 0===e.indexOf(this._prompt)&&(e=(e=e.slice(this._prompt.length)).replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&0===e.indexOf(this._prompt)&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#r("destroy",...e)}destroySoon(...e){return this.#r("destroySoon",...e)}close(...e){return this.#r("close",...e)}},QM=h.getDefaultExportFromCjs(JM);class XM{constructor(e){this.rl||=m.createInterface(function(e={}){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY){const e=new Error("Prompts can not be meaningfully rendered in non-TTY environments");throw e.isTtyError=!0,e}const r=new QM;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(e)),this.rl.resume(),this.onForceClose=this.onForceClose.bind(this),process.on("exit",this.onForceClose),this.rl.on("SIGINT",this.onForceClose)}onForceClose(){this.close(),process.kill(process.pid,"SIGINT"),console.log("")}close(){this.rl.removeListener("SIGINT",this.onForceClose),process.removeListener("exit",this.onForceClose),this.rl.output.unmute(),this.activePrompt&&"function"==typeof this.activePrompt.close&&this.activePrompt.close(),this.rl.output.end(),this.rl.pause(),this.rl.close()}}var ZM=Dy,eT=j_,tT=vm,rT=Function.prototype,nT=Object.prototype,oT=rT.toString,iT=nT.hasOwnProperty,aT=oT.call(Object);var uT=function(e){if(!tT(e)||"[object Object]"!=ZM(e))return!1;var t=eT(e);if(null===t)return!0;var r=iT.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&oT.call(r)==aT},sT=VD,cT=rj,lT=cm,fT=_y,pT=oj;var dT=function(e,t,r,n){if(!fT(e))return e;for(var o=-1,i=(t=cT(t,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=pT(t[o]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var l=u[s];void 0===(c=n?n(l,s,u):void 0)&&(c=fT(l)?l:lT(t[o+1])?[]:{})}sT(u,s,c),u=u[s]}return e},hT=dT;var bT=function(e,t,r){return null==e?e:hT(e,t,r)};const vT=function(e,t,r){return"function"!=typeof e[t]?Te.of(e):Te.from(Me(e[t])(r).then((r=>(e[t]=r,e))))},yT={isPlainObject:h.getDefaultExportFromCjs(uT),set:h.getDefaultExportFromCjs(bT),get:lj};class mT extends XM{constructor(e,t){super(t),this.prompts=e}run(e,t){yT.isPlainObject(t)?this.answers={...t}:this.answers={},yT.isPlainObject(e)&&(e=Object.values(e).every((e=>yT.isPlainObject(e)&&void 0===e.name))?Object.entries(e).map((([e,t])=>({name:e,...t}))):[e]);const r=Array.isArray(e)?Te.from(e):e;return this.process=r.pipe(Te.concatMap(this.processQuestion.bind(this)),Te.publish()),this.process.connect(),this.process.pipe(Te.reduce(((e,t)=>(yT.set(e,t.name,t.answer),e)),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(e){return this.close(),Promise.reject(e)}processQuestion(e){return e={...e},Te.defer((()=>Te.of(e).pipe(Te.concatMap(this.setDefaultType.bind(this)),Te.concatMap(this.filterIfRunnable.bind(this)),Te.concatMap((()=>vT(e,"message",this.answers))),Te.concatMap((()=>vT(e,"default",this.answers))),Te.concatMap((()=>vT(e,"choices",this.answers))),Te.concatMap(this.fetchAnswer.bind(this)))))}fetchAnswer(e){const t=this.prompts[e.type];return this.activePrompt=new t(e,this.rl,this.answers),Te.defer((()=>Te.from(this.activePrompt.run().then((t=>({name:e.name,answer:t}))))))}setDefaultType(e){return this.prompts[e.type]||(e.type="input"),Te.defer((()=>Te.of(e)))}filterIfRunnable(e){if(!0!==e.askAnswered&&void 0!==yT.get(this.answers,e.name))return Te.empty();if(!1===e.when)return Te.empty();if("function"!=typeof e.when)return Te.of(e);const{answers:t}=this;return Te.defer((()=>Te.from(Me(e.when)(t).then((t=>{if(t)return e}))).pipe(Te.filter((e=>null!=e)))))}}function gT(e){const t=function(r,n){let o;try{o=new mT(t.prompts,e)}catch(e){return Promise.reject(e)}const i=o.run(r,n);return i.ui=o,i};return t.prompts={},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",oP),this.registerPrompt("input",iP),this.registerPrompt("number",aP),this.registerPrompt("confirm",uP),this.registerPrompt("rawlist",sP),this.registerPrompt("expand",cP),this.registerPrompt("checkbox",lP),this.registerPrompt("password",pP),this.registerPrompt("editor",jB)},t.restoreDefaultPrompts(),t}const DT=gT();const _T={prompt:DT,ui:{BottomBar:class extends XM{constructor(e={}){super(e),this.log=YM(this.writeLog.bind(this)),this.bottomBar=e.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return XF(this.rl,this.bottomBar.split("\n").length),this}updateBottomBar(e){return XF(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=e,this.render(),this.rl.output.mute(),this}writeLog(e){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(e.toString())),this.render(),this.rl.output.mute(),this}enforceLF(e){return e.match(/[\r\n]$/)?e:e+"\n"}write(e){const t=e.split(/\n/);this.height=t.length,this.rl.setPrompt(t[t.length-1]),0===this.rl.output.rows&&0===this.rl.output.columns&&JF(this.rl,e.length+this.rl.line.length),this.rl.output.write(e)}},Prompt:mT},createPromptModule:gT,registerPrompt:function(e,t){DT.registerPrompt(e,t)},restoreDefaultPrompts:function(){DT.restoreDefaultPrompts()},Separator:iS};var wT="0.2.3";const OT=process.cwd();exports.createModule=async()=>{const e=await g.loadJSON(y.resolve(OT,"package.json")),t=await _T.prompt([{type:"list",name:"type",message:"请选择一个选项:",default:"react",choices:["vue","react"]},{type:"input",message:"workspaces name",name:"workspaces",validate:function(e){return!(e&&!v.existsSync(y.resolve(OT,e)))||"工作空间不存在"}},{type:"input",message:"package name",name:"name",validate:function(e){return!!e.replace(/\s/g,"")||"姓名不能为空,请重新输入"}},{type:"input",message:"version",name:"version",default:e.version}]),r="vue"===t.type,n=v.readFileSync(y.resolve(__dirname,r?"../../template/template.vue.package.json":"../../template/template.package.json"),"utf-8"),o=h.ejs.compile(n),i=y.resolve(OT,t.workspaces,t.name);v.existsSync(y.resolve(i))||v.mkdirSync(i),c.exec(`cd ${i}`,((e,n,a)=>{e?console.error(`错误: ${e.message}`):a?console.error(`错误: ${a}`):(h.createCwdConfig(i,t.name,r),v.mkdirSync(y.resolve(i,"public")),v.mkdirSync(y.resolve(i,"src")),v.writeFileSync(y.resolve(i,"package.json"),o({...t,coreVersion:`^${wT}`})),v.writeFileSync(y.resolve(i,"tsconfig.json"),'{\n "extends": ["./src/.gant/tsconfig.json"]\n }'),v.writeFileSync(y.resolve(i,"tsconfig.json"),'{\n "extends": ["./src/.gant/tsconfig.json"]\n }'))}))},exports.stringWidthExports=FS;
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var e=require("fs"),r=require("path"),t=require("prettier");require("esbuild"),require("./getJavascriptfile.js");var i=require("../config/index.js");function n(e,r){return i.isArray(e)&&i.isArray(r)?i.union(e,r):i.isObject(e)&&i.isObject(r)?i.mergeWith(e,r,n):r}exports.copyFolder=function t(i,n){if(e.existsSync(n)||e.mkdirSync(n),!e.existsSync(i))return;e.readdirSync(i).forEach((s=>{const c=r.join(i,s),o=r.join(n,s);e.lstatSync(c).isDirectory()?t(c,o):e.copyFileSync(c,o)}))},exports.generateDir=function(r){e.existsSync(r)&&e.rmdirSync(r,{recursive:!0}),e.mkdirSync(r,{recursive:!0})},exports.getAbsFile=function(e,t){return r.isAbsolute(e)?e:r.join(t,e)},exports.getMpasPageHtml=function(t){if(!t||e.existsSync(t)){return e.readFileSync(r.resolve(__dirname,"../template/index.html"),"utf-8")}return e.readFileSync(t,"utf-8")},exports.getSrcPath=()=>"true"===process.env.SRC?"src/":"./",exports.loadJSON=function(r){const t=e.readFileSync(r,"utf-8");return JSON.parse(t)},exports.mergeConfig=(e,r)=>({...i.mergeWith(e,r,n)}),exports.writeFileToJS=async(r,i)=>{const n=await t.format(i,{semi:!0,singleQuote:!0,parser:"babel-ts"});return e.writeFileSync(r,n,"utf-8")},exports.writeFileToJSON=async(r,i)=>{const n=await t.format(i,{parser:"json"});return e.writeFileSync(r,n,"utf-8")};
2
+ "use strict";var e=require("fs"),r=require("path"),t=require("prettier");require("esbuild"),require("./getJavascriptfile.js");var i=require("../config/index.js");function n(e,r){return i.isArray(e)&&i.isArray(r)?i.union(e,r):i.isObject(e)&&i.isObject(r)?i.mergeWith(e,r,n):r}exports.copyFolder=function t(i,n){if(e.existsSync(n)||e.mkdirSync(n),!e.existsSync(i))return;e.readdirSync(i).forEach((s=>{const c=r.join(i,s),o=r.join(n,s);e.lstatSync(c).isDirectory()?t(c,o):e.copyFileSync(c,o)}))},exports.generateDir=function(r){e.existsSync(r)&&e.rmdirSync(r,{recursive:!0}),e.mkdirSync(r,{recursive:!0})},exports.getAbsFile=function(e,t){return r.isAbsolute(e)?e:r.join(t,e)},exports.getMpasPageHtml=function(t){if(!t||!e.existsSync(t)){return e.readFileSync(r.resolve(__dirname,"../template/index.html"),"utf-8")}return e.readFileSync(t,"utf-8")},exports.getSrcPath=()=>"true"===process.env.SRC?"src/":"./",exports.loadJSON=function(r){const t=e.readFileSync(r,"utf-8");return JSON.parse(t)},exports.mergeConfig=(e,r)=>({...i.mergeWith(e,r,n)}),exports.writeFileToJS=async(r,i)=>{const n=await t.format(i,{semi:!0,singleQuote:!0,parser:"babel-ts"});return e.writeFileSync(r,n,"utf-8")},exports.writeFileToJSON=async(r,i)=>{const n=await t.format(i,{parser:"json"});return e.writeFileSync(r,n,"utf-8")};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var e=require("../../utils/index.js"),t=require("html-webpack-plugin"),s=require("./cssRules.js"),r=require("path"),i=require("webpack"),o=require("../../config/index.js");const a=["name","routes","mpas","packages","microServiceMap","base","customHistoryApiFallback","outputPathDir","define","setting","vue","library","compression","terserOptions","htmlTemplatePath","locales","mfa","publicPathDir"];exports.getDefaultConfig=(l,n)=>{const u=o.omit(n,a);let{base:c="/",routes:p,htmlTemplatePath:m,outputPathDir:d="dist",microServiceMap:g,define:v,setting:h,vue:f}=o.pick(n,a);c=/^\/.*\/$/.test(c)?c:"/";let y=n.entry||{};const b=[];if(o.isEmpty(y)&&(y.index=r.resolve(l,"src/main")),"string"==typeof y.index){const s=e.getMpasPageHtml(m);b.push(new t({templateContent:s,filename:"index.html",chunks:["index"],publicPath:c,base:c})),n.entry=y}const x=s.getCssRules(n.mode);return e.mergeConfig({entry:y,stats:"minimal",devServer:{static:{directory:r.resolve(l,"src/.gant/public"),publicPath:c},compress:!0,historyApiFallback:o.has(n,"customHistoryApiFallback")?n?.customHistoryApiFallback:{index:r.resolve(c,"index.html"),rewrites:[{from:/^\/public\/(.*)$/,to:e=>r.resolve(c,e.match[1])}]}},module:{rules:[...f?[{test:/\.vue$/,loader:require.resolve("vue-loader")}]:[],{test:/\.(ts|tsx)$/,exclude:/node_modules/,use:{loader:require.resolve("swc-loader"),options:{jsc:{parser:{syntax:"typescript",tsx:!0,dynamicImport:!0},transform:{...f?{}:{react:{runtime:"automatic",development:"development"===n.mode,refresh:"development"===n.mode}}}}}}},...x,{test:/\.html$/,use:require.resolve("html-loader")},{test:/\.(png|jpg|gif|woff|woff2|eot|ttf|svg)$/i,use:[{loader:require.resolve("url-loader"),options:{limit:8192,name:"[name][hash].[ext]",outputPath:"assets/"}}]}]},resolve:{extensions:[".tsx",".ts",".js",".jsx",".vue"]},output:{path:r.resolve(l,d),publicPath:c,charset:!0,clean:!0},plugins:[...f?[new(require("vue-loader").VueLoaderPlugin)]:[],...b,new i.ProvidePlugin({React:"react"}),new i.ProgressPlugin,new i.DefinePlugin({GANT_START_TIME:JSON.stringify(global.__gant_start_time),microServiceMap:JSON.stringify(g),BASE:JSON.stringify(c),SETTING:JSON.stringify(h||{}),...o.mapValues(v,(e=>JSON.stringify(e))),process:JSON.stringify({env:process.env})})]},u)};
2
+ "use strict";var e=require("../../utils/index.js"),t=require("html-webpack-plugin"),s=require("./cssRules.js"),r=require("path"),i=require("webpack"),o=require("../../config/index.js");const a=["name","routes","mpas","packages","microServiceMap","base","customHistoryApiFallback","outputPathDir","define","setting","vue","library","compression","terserOptions","htmlTemplatePath","locales","mfa","publicPathDir"];exports.getDefaultConfig=(n,l)=>{const u=o.omit(l,a);let{base:c="/",routes:p,htmlTemplatePath:m,outputPathDir:d="dist",microServiceMap:g,define:h,setting:f,vue:v}=o.pick(l,a);c=/^\/.*\/$/.test(c)?c:"/";let y=l.entry||{};const b=[];if(o.isEmpty(y)&&(y.index=r.resolve(n,"src/main")),"string"==typeof y.index){const s=e.getMpasPageHtml(m);b.push(new t({templateContent:s,filename:"index.html",chunks:["index"],publicPath:c,base:c})),l.entry=y}o.isEmpty(y)||Object.entries(y).forEach((([s,r])=>{if("index"!==s){const r=e.getMpasPageHtml(m.replace("index.",s+"."));console.log("--htmlContent",r),b.push(new t({templateContent:r,filename:`${s}.html`,chunks:[s],publicPath:c,base:c}))}}));const x=s.getCssRules(l.mode);return e.mergeConfig({entry:y,stats:"minimal",devServer:{static:{directory:r.resolve(n,"src/.gant/public"),publicPath:c},compress:!0,historyApiFallback:o.has(l,"customHistoryApiFallback")?l?.customHistoryApiFallback:{index:r.resolve(c,"index.html"),rewrites:[{from:/^\/public\/(.*)$/,to:e=>r.resolve(c,e.match[1])}]}},module:{rules:[...v?[{test:/\.vue$/,loader:require.resolve("vue-loader")}]:[],{test:/\.(ts|tsx)$/,exclude:/node_modules/,use:{loader:require.resolve("swc-loader"),options:{jsc:{parser:{syntax:"typescript",tsx:!0,dynamicImport:!0},transform:{...v?{}:{react:{runtime:"automatic",development:"development"===l.mode,refresh:"development"===l.mode}}}}}}},...x,{test:/\.html$/,use:require.resolve("html-loader")},{test:/\.(png|jpg|gif|woff|woff2|eot|ttf|svg)$/i,use:[{loader:require.resolve("url-loader"),options:{limit:8192,name:"[name][hash].[ext]",outputPath:"assets/"}}]}]},resolve:{extensions:[".tsx",".ts",".js",".jsx",".vue"]},output:{path:r.resolve(n,d),publicPath:c,charset:!0,clean:!0},plugins:[...v?[new(require("vue-loader").VueLoaderPlugin)]:[],...b,new i.ProvidePlugin({React:"react"}),new i.ProgressPlugin,new i.DefinePlugin({GANT_START_TIME:JSON.stringify(global.__gant_start_time),microServiceMap:JSON.stringify(g),BASE:JSON.stringify(c),SETTING:JSON.stringify(f||{}),...o.mapValues(h,(e=>JSON.stringify(e))),process:JSON.stringify({env:process.env})})]},u)};
@@ -1,2 +1,2 @@
1
- import{mapValues as r,toLower as e,isObject as o,pick as t,mergeWith as n,omit as a}from"lodash-es";function i(r,e){(function(r){return"string"==typeof r&&-1!==r.indexOf(".")&&1===parseFloat(r)})(r)&&(r="100%");var o=function(r){return"string"==typeof r&&-1!==r.indexOf("%")}(r);return r=360===e?r:Math.min(e,Math.max(0,parseFloat(r))),o&&(r=parseInt(String(r*e),10)/100),Math.abs(r-e)<1e-6?1:r=360===e?(r<0?r%e+e:r%e)/parseFloat(String(e)):r%e/parseFloat(String(e))}function c(r){return Math.min(1,Math.max(0,r))}function s(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function l(r){return r<=1?"".concat(100*Number(r),"%"):r}function u(r){return 1===r.length?"0"+r:String(r)}function g(r,e,o){return{r:255*i(r,255),g:255*i(e,255),b:255*i(o,255)}}function h(r,e,o){r=i(r,255),e=i(e,255),o=i(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,c=0,s=(t+n)/2;if(t===n)c=0,a=0;else{var l=t-n;switch(c=s>.5?l/(2-t-n):l/(t+n),t){case r:a=(e-o)/l+(e<o?6:0);break;case e:a=(o-r)/l+2;break;case o:a=(r-e)/l+4}a/=6}return{h:a,s:c,l:s}}function d(r,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?r+6*o*(e-r):o<.5?e:o<2/3?r+(e-r)*(2/3-o)*6:r}function f(r,e,o){var t,n,a;if(r=i(r,360),e=i(e,100),o=i(o,100),0===e)n=o,a=o,t=o;else{var c=o<.5?o*(1+e):o+e-o*e,s=2*o-c;t=d(s,c,r+1/3),n=d(s,c,r),a=d(s,c,r-1/3)}return{r:255*t,g:255*n,b:255*a}}function p(r,e,o){r=i(r,255),e=i(e,255),o=i(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,c=t,s=t-n,l=0===t?0:s/t;if(t===n)a=0;else{switch(t){case r:a=(e-o)/s+(e<o?6:0);break;case e:a=(o-r)/s+2;break;case o:a=(r-e)/s+4}a/=6}return{h:a,s:l,v:c}}function b(r,e,o){r=6*i(r,360),e=i(e,100),o=i(o,100);var t=Math.floor(r),n=r-t,a=o*(1-e),c=o*(1-n*e),s=o*(1-(1-n)*e),l=t%6;return{r:255*[o,c,a,a,s,o][l],g:255*[s,o,o,c,a,a][l],b:255*[a,a,s,o,o,c][l]}}function x(r,e,o,t){var n=[u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16))];return t&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function m(r,e,o,t,n){var a=[u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16)),u(y(t))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function v(r,e,o,t){return[u(y(t)),u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16))].join("")}function y(r){return Math.round(255*parseFloat(r)).toString(16)}function S(r){return w(r)/255}function w(r){return parseInt(r,16)}function M(r){return{r:r>>16,g:(65280&r)>>8,b:255&r}}var B={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function H(r){var e={r:0,g:0,b:0},o=1,t=null,n=null,a=null,i=!1,c=!1;return"string"==typeof r&&(r=T(r)),"object"==typeof r&&(R(r.r)&&R(r.g)&&R(r.b)?(e=g(r.r,r.g,r.b),i=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):R(r.h)&&R(r.s)&&R(r.v)?(t=l(r.s),n=l(r.v),e=b(r.h,t,n),i=!0,c="hsv"):R(r.h)&&R(r.s)&&R(r.l)&&(t=l(r.s),a=l(r.l),e=f(r.h,t,a),i=!0,c="hsl"),Object.prototype.hasOwnProperty.call(r,"a")&&(o=r.a)),o=s(o),{ok:i,format:r.format||c,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:o}}var k="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),A="[\\s|\\(]+(".concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")\\s*\\)?"),z="[\\s|\\(]+(".concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")\\s*\\)?"),F={CSS_UNIT:new RegExp(k),rgb:new RegExp("rgb"+A),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+A),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+A),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function T(r){if(0===(r=r.trim().toLowerCase()).length)return!1;var e=!1;if(B[r])r=B[r],e=!0;else if("transparent"===r)return{r:0,g:0,b:0,a:0,format:"name"};var o=F.rgb.exec(r);return o?{r:o[1],g:o[2],b:o[3]}:(o=F.rgba.exec(r))?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=F.hsl.exec(r))?{h:o[1],s:o[2],l:o[3]}:(o=F.hsla.exec(r))?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=F.hsv.exec(r))?{h:o[1],s:o[2],v:o[3]}:(o=F.hsva.exec(r))?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=F.hex8.exec(r))?{r:w(o[1]),g:w(o[2]),b:w(o[3]),a:S(o[4]),format:e?"name":"hex8"}:(o=F.hex6.exec(r))?{r:w(o[1]),g:w(o[2]),b:w(o[3]),format:e?"name":"hex"}:(o=F.hex4.exec(r))?{r:w(o[1]+o[1]),g:w(o[2]+o[2]),b:w(o[3]+o[3]),a:S(o[4]+o[4]),format:e?"name":"hex8"}:!!(o=F.hex3.exec(r))&&{r:w(o[1]+o[1]),g:w(o[2]+o[2]),b:w(o[3]+o[3]),format:e?"name":"hex"}}function R(r){return Boolean(F.CSS_UNIT.exec(String(r)))}var L=function(){function r(e,o){var t;if(void 0===e&&(e=""),void 0===o&&(o={}),e instanceof r)return e;"number"==typeof e&&(e=M(e)),this.originalInput=e;var n=H(e);this.originalInput=e,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(t=o.format)&&void 0!==t?t:n.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return r.prototype.isDark=function(){return this.getBrightness()<128},r.prototype.isLight=function(){return!this.isDark()},r.prototype.getBrightness=function(){var r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},r.prototype.getLuminance=function(){var r=this.toRgb(),e=r.r/255,o=r.g/255,t=r.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},r.prototype.getAlpha=function(){return this.a},r.prototype.setAlpha=function(r){return this.a=s(r),this.roundA=Math.round(100*this.a)/100,this},r.prototype.isMonochrome=function(){return 0===this.toHsl().s},r.prototype.toHsv=function(){var r=p(this.r,this.g,this.b);return{h:360*r.h,s:r.s,v:r.v,a:this.a}},r.prototype.toHsvString=function(){var r=p(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.v);return 1===this.a?"hsv(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsva(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHsl=function(){var r=h(this.r,this.g,this.b);return{h:360*r.h,s:r.s,l:r.l,a:this.a}},r.prototype.toHslString=function(){var r=h(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.l);return 1===this.a?"hsl(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsla(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHex=function(r){return void 0===r&&(r=!1),x(this.r,this.g,this.b,r)},r.prototype.toHexString=function(r){return void 0===r&&(r=!1),"#"+this.toHex(r)},r.prototype.toHex8=function(r){return void 0===r&&(r=!1),m(this.r,this.g,this.b,this.a,r)},r.prototype.toHex8String=function(r){return void 0===r&&(r=!1),"#"+this.toHex8(r)},r.prototype.toHexShortString=function(r){return void 0===r&&(r=!1),1===this.a?this.toHexString(r):this.toHex8String(r)},r.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},r.prototype.toRgbString=function(){var r=Math.round(this.r),e=Math.round(this.g),o=Math.round(this.b);return 1===this.a?"rgb(".concat(r,", ").concat(e,", ").concat(o,")"):"rgba(".concat(r,", ").concat(e,", ").concat(o,", ").concat(this.roundA,")")},r.prototype.toPercentageRgb=function(){var r=function(r){return"".concat(Math.round(100*i(r,255)),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},r.prototype.toPercentageRgbString=function(){var r=function(r){return Math.round(100*i(r,255))};return 1===this.a?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},r.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var r="#"+x(this.r,this.g,this.b,!1),e=0,o=Object.entries(B);e<o.length;e++){var t=o[e],n=t[0];if(r===t[1])return n}return!1},r.prototype.toString=function(r){var e=Boolean(r);r=null!=r?r:this.format;var o=!1,t=this.a<1&&this.a>=0;return e||!t||!r.startsWith("hex")&&"name"!==r?("rgb"===r&&(o=this.toRgbString()),"prgb"===r&&(o=this.toPercentageRgbString()),"hex"!==r&&"hex6"!==r||(o=this.toHexString()),"hex3"===r&&(o=this.toHexString(!0)),"hex4"===r&&(o=this.toHex8String(!0)),"hex8"===r&&(o=this.toHex8String()),"name"===r&&(o=this.toName()),"hsl"===r&&(o=this.toHslString()),"hsv"===r&&(o=this.toHsvString()),o||this.toHexString()):"name"===r&&0===this.a?this.toName():this.toRgbString()},r.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},r.prototype.clone=function(){return new r(this.toString())},r.prototype.lighten=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l+=e/100,o.l=c(o.l),new r(o)},r.prototype.brighten=function(e){void 0===e&&(e=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(-e/100*255))),o.g=Math.max(0,Math.min(255,o.g-Math.round(-e/100*255))),o.b=Math.max(0,Math.min(255,o.b-Math.round(-e/100*255))),new r(o)},r.prototype.darken=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l-=e/100,o.l=c(o.l),new r(o)},r.prototype.tint=function(r){return void 0===r&&(r=10),this.mix("white",r)},r.prototype.shade=function(r){return void 0===r&&(r=10),this.mix("black",r)},r.prototype.desaturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s-=e/100,o.s=c(o.s),new r(o)},r.prototype.saturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s+=e/100,o.s=c(o.s),new r(o)},r.prototype.greyscale=function(){return this.desaturate(100)},r.prototype.spin=function(e){var o=this.toHsl(),t=(o.h+e)%360;return o.h=t<0?360+t:t,new r(o)},r.prototype.mix=function(e,o){void 0===o&&(o=50);var t=this.toRgb(),n=new r(e).toRgb(),a=o/100;return new r({r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b,a:(n.a-t.a)*a+t.a})},r.prototype.analogous=function(e,o){void 0===e&&(e=6),void 0===o&&(o=30);var t=this.toHsl(),n=360/o,a=[this];for(t.h=(t.h-(n*e>>1)+720)%360;--e;)t.h=(t.h+n)%360,a.push(new r(t));return a},r.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new r(e)},r.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var o=this.toHsv(),t=o.h,n=o.s,a=o.v,i=[],c=1/e;e--;)i.push(new r({h:t,s:n,v:a})),a=(a+c)%1;return i},r.prototype.splitcomplement=function(){var e=this.toHsl(),o=e.h;return[this,new r({h:(o+72)%360,s:e.s,l:e.l}),new r({h:(o+216)%360,s:e.s,l:e.l})]},r.prototype.onBackground=function(e){var o=this.toRgb(),t=new r(e).toRgb(),n=o.a+t.a*(1-o.a);return new r({r:(o.r*o.a+t.r*t.a*(1-o.a))/n,g:(o.g*o.a+t.g*t.a*(1-o.a))/n,b:(o.b*o.a+t.b*t.a*(1-o.a))/n,a:n})},r.prototype.triad=function(){return this.polyad(3)},r.prototype.tetrad=function(){return this.polyad(4)},r.prototype.polyad=function(e){for(var o=this.toHsl(),t=o.h,n=[this],a=360/e,i=1;i<e;i++)n.push(new r({h:(t+i*a)%360,s:o.s,l:o.l}));return n},r.prototype.equals=function(e){return this.toRgbString()===new r(e).toRgbString()},r}();function C(r,e){return void 0===r&&(r=""),void 0===e&&(e={}),new L(r,e)}function X(r,e){var o=new L(r),t=new L(e);return(Math.max(o.getLuminance(),t.getLuminance())+.05)/(Math.min(o.getLuminance(),t.getLuminance())+.05)}function D(r,e,o){var t,n;void 0===o&&(o={level:"AA",size:"small"});var a=X(r,e);switch((null!==(t=o.level)&&void 0!==t?t:"AA")+(null!==(n=o.size)&&void 0!==n?n:"small")){case"AAsmall":case"AAAlarge":return a>=4.5;case"AAlarge":return a>=3;case"AAAsmall":return a>=7;default:return!1}}function E(r,e,o){void 0===o&&(o={includeFallbackColors:!1,level:"AA",size:"small"});for(var t=null,n=0,a=o.includeFallbackColors,i=o.level,c=o.size,s=0,l=e;s<l.length;s++){var u=l[s],g=X(r,u);g>n&&(n=g,t=new L(u))}return D(r,t,{level:i,size:c})||!a?t:(o.includeFallbackColors=!1,E(r,["#fff","#000"],o))}function I(r,e){var o=new L(r),t="#"+v(o.r,o.g,o.b,o.a),n=t,a=o.gradientType?"GradientType = 1, ":"";if(e){var i=new L(e);n="#"+v(i.r,i.g,i.b,i.a)}return"progid:DXImageTransform.Microsoft.gradient(".concat(a,"startColorstr=").concat(t,",endColorstr=").concat(n,")")}function W(r,e){var o={r:l(r.r),g:l(r.g),b:l(r.b)};return void 0!==r.a&&(o.a=Number(r.a)),new L(o,e)}function P(){return new L({r:Math.random(),g:Math.random(),b:Math.random()})}function O(r){if(void 0===r&&(r={}),void 0!==r.count&&null!==r.count){var e=r.count,o=[];for(r.count=void 0;e>o.length;)r.count=null,r.seed&&(r.seed+=1),o.push(O(r));return r.count=e,o}var t=function(r,e){var o=G(function(r){var e=parseInt(r,10);if(!Number.isNaN(e)&&e<360&&e>0)return[e,e];if("string"==typeof r){var o=j.find((function(e){return e.name===r}));if(o){var t=N(o);if(t.hueRange)return t.hueRange}var n=new L(r);if(n.isValid){var a=n.toHsv().h;return[a,a]}}return[0,360]}(r),e);o<0&&(o=360+o);return o}(r.hue,r.seed),n=function(r,e){if("monochrome"===e.hue)return 0;if("random"===e.luminosity)return G([0,100],e.seed);var o=$(r).saturationRange,t=o[0],n=o[1];switch(e.luminosity){case"bright":t=55;break;case"dark":t=n-10;break;case"light":n=55}return G([t,n],e.seed)}(t,r),a=function(r,e,o){var t=function(r,e){for(var o=$(r).lowerBounds,t=0;t<o.length-1;t++){var n=o[t][0],a=o[t][1],i=o[t+1][0],c=o[t+1][1];if(e>=n&&e<=i){var s=(c-a)/(i-n);return s*e+(a-s*n)}}return 0}(r,e),n=100;switch(o.luminosity){case"dark":n=t+20;break;case"light":t=(n+t)/2;break;case"random":t=0,n=100}return G([t,n],o.seed)}(t,n,r),i={h:t,s:n,v:a};return void 0!==r.alpha&&(i.a=r.alpha),new L(i)}function $(r){r>=334&&r<=360&&(r-=360);for(var e=0,o=j;e<o.length;e++){var t=N(o[e]);if(t.hueRange&&r>=t.hueRange[0]&&r<=t.hueRange[1])return t}throw Error("Color not found")}function G(r,e){if(void 0===e)return Math.floor(r[0]+Math.random()*(r[1]+1-r[0]));var o=r[1]||1,t=r[0]||0,n=(e=(9301*e+49297)%233280)/233280;return Math.floor(t+n*(o-t))}function N(r){var e=r.lowerBounds[0][0],o=r.lowerBounds[r.lowerBounds.length-1][0],t=r.lowerBounds[r.lowerBounds.length-1][1],n=r.lowerBounds[0][1];return{name:r.name,hueRange:r.hueRange,lowerBounds:r.lowerBounds,saturationRange:[e,o],brightnessRange:[t,n]}}var j=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}],Q=2,q=.16,U=.05,V=.05,_=.15,J=5,K=4,Y=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Z(r){var e=p(r.r,r.g,r.b);return{h:360*e.h,s:e.s,v:e.v}}function rr(r){var e=r.r,o=r.g,t=r.b;return"#".concat(x(e,o,t,!1))}function er(r,e,o){var t;return(t=Math.round(r.h)>=60&&Math.round(r.h)<=240?o?Math.round(r.h)-Q*e:Math.round(r.h)+Q*e:o?Math.round(r.h)+Q*e:Math.round(r.h)-Q*e)<0?t+=360:t>=360&&(t-=360),t}function or(r,e,o){return 0===r.h&&0===r.s?r.s:((t=o?r.s-q*e:e===K?r.s+q:r.s+U*e)>1&&(t=1),o&&e===J&&t>.1&&(t=.1),t<.06&&(t=.06),Number(t.toFixed(2)));var t}function tr(r,e,o){var t;return(t=o?r.v+V*e:r.v-_*e)>1&&(t=1),Number(t.toFixed(2))}function nr(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=[],t=H(r),n=J;n>0;n-=1){var a=Z(t),i=rr(H({h:er(a,n,!0),s:or(a,n,!0),v:tr(a,n,!0)}));o.push(i)}o.push(rr(t));for(var c=1;c<=K;c+=1){var s=Z(t),l=rr(H({h:er(s,c),s:or(s,c),v:tr(s,c)}));o.push(l)}return"dark"===e.theme?Y.map((function(r){var t,n,a,i=r.index,c=r.opacity;return rr((t=H(e.backgroundColor||"#141414"),n=H(o[i]),a=100*c/100,{r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b}))})):o}var ar={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ir={},cr={};Object.keys(ar).forEach((function(r){ir[r]=nr(ar[r]),ir[r].primary=ir[r][5],cr[r]=nr(ar[r],{theme:"dark",backgroundColor:"#141414"}),cr[r].primary=cr[r][5]}));const sr=r=>{const{controlHeight:e}=r;return{controlHeightSM:.75*e,controlHeightXS:.5*e,controlHeightLG:1.25*e}};function lr(r){const{sizeUnit:e,sizeStep:o}=r;return{sizeXXL:e*(o+8),sizeXL:e*(o+4),sizeLG:e*(o+2),sizeMD:e*(o+1),sizeMS:e*o,size:e*o,sizeSM:e*(o-1),sizeXS:e*(o-2),sizeXXS:e*(o-3)}}const ur={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},gr={...ur,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:'microsoft yahei,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontWeight:400,fontSize:12,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacity:1,wireframe:!1,motion:!0,layoutHeaderHeight:50,layoutSiderWidth:200,layoutIconSize:24,layoutNavHeight:40,gradientColors:["rgba(0, 64, 237,0.3)","rgba(0, 229, 237,0.3)"]};function hr(r,e){const o=parseInt(r,16)+e,t=o>255?255:o;return t.toString(16).length>1?t.toString(16):`0${t.toString(16)}`}function dr(r,e){return r=r.indexOf("#")>=0?r.substring(1,r.length):r,e=Math.trunc(255*e/100),`#${hr(r.substring(0,2),e)}${hr(r.substring(2,4),e)}${hr(r.substring(4,6),e)}`}function fr(t,n){if("object"!=typeof t||Array.isArray(t))return;const a={};return r(t,((r,t)=>{const i=n?`--${n}-`+t:"--"+t,c="number"!=typeof r||["lineheight","opacity","weight"].some((r=>e(t).includes(r)))?r:r+"px";if(o(r))return fr(c,t);a[i]=c})),a}const pr=(r,e)=>new L(r).setAlpha(e).toRgbString(),br=(r,e)=>new L(r).darken(e).toHexString(),xr=(r,e)=>new L(r).lighten(e).toHexString(),mr=(r,e)=>new L(r).onBackground(e).toRgbString(),vr=(r,e)=>e.map((e=>mr(e,r)));function yr(r,{generateColorPalettes:e,generateNeutralColorPalettes:o}){const{colorSuccess:t,colorWarning:n,colorError:a,colorInfo:i,colorPrimary:c,colorBgBase:s,colorTextBase:l}=r,u=e(c),g=e(t),h=e(n),d=e(a),f=e(i),p=o(s,l),b=vr(p.colorBgBase,r.gradientColors),x=e(r.colorLink||r.colorInfo);return{...p,gradientColors:b,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:g[1],colorSuccessBgHover:g[2],colorSuccessBorder:g[3],colorSuccessBorderHover:g[4],colorSuccessHover:g[4],colorSuccess:g[6],colorSuccessActive:g[7],colorSuccessTextHover:g[8],colorSuccessText:g[9],colorSuccessTextActive:g[10],colorErrorBg:d[1],colorErrorBgHover:d[2],colorErrorBorder:d[3],colorErrorBorderHover:d[4],colorErrorHover:d[5],colorError:d[6],colorErrorActive:d[7],colorErrorTextHover:d[8],colorErrorText:d[9],colorErrorTextActive:d[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:f[1],colorInfoBgHover:f[2],colorInfoBorder:f[3],colorInfoBorderHover:f[4],colorInfoHover:f[4],colorInfo:f[6],colorInfoActive:f[7],colorInfoTextHover:f[8],colorInfoText:f[9],colorInfoTextActive:f[10],colorLinkHover:x[4],colorLink:x[6],colorLinkActive:x[7],colorBgMask:new L("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}const Sr=r=>{let e=r,o=r,t=r,n=r,a=r,i=r;return r<6&&r>=5?e=r+1:r<16&&r>=6?e=r+2:r>=16&&(e=16),r<7&&r>=5?o=4:r<8&&r>=7?o=5:r<14&&r>=8?o=6:r<16&&r>=14?o=7:r>=16&&(o=8),r<6&&r>=2?t=1:r>=6&&(t=2),r>4&&r<8?i=4:r>=8&&(i=6),n=e>0?e+4:e,a=e>0?e+8:e,{borderRadius:r>16?16:r,borderRadiusXS:t,borderRadiusSM:o,borderRadiusLG:e,borderRadiusXL:n,borderRadiusXXL:a,borderRadiusOuter:i}};function wr(r){const{motionUnit:e,motionBase:o,borderRadius:t,lineWidth:n,opacity:a,layoutHeaderHeight:i}=r;return{motionDurationFast:`${(o+e).toFixed(1)}s`,motionDurationMid:`${(o+2*e).toFixed(1)}s`,motionDurationSlow:`${(o+3*e).toFixed(1)}s`,lineWidthBold:n+1,...Sr(t),opacityImage:a,opacity1:.8*a,opacity2:.6*a}}const Mr=r=>{const e=nr(r);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},Br=(r,e)=>{let o=r||"#fff",t=e||"#000";return o=new L(o).lighten()?o:new L(o).lighten(100).toRgbString(),t=new L(t).isDark()?t:new L(t).darken(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorFill:pr(t,.15),colorFillSecondary:pr(t,.06),colorFillTertiary:pr(t,.04),colorFillQuaternary:pr(t,.02),colorBgLayout:br(o,4),colorBgContainer:br(o,0),colorBgElevated:br(o,0),colorBgSpotlight:pr(t,.85),colorBorder:br(o,15),colorBorderSecondary:br(o,6),colorText:"#333",colorTextSecondary:"#666",colorTextTertiary:"#999",colorTextQuaternary:"#999"}};const Hr=r=>{const e=function(r){const e=new Array(10).fill(null).map(((e,o)=>{const t=r*2.71828**((o-1)/5),n=o>1?Math.floor(t):Math.ceil(t);return 2*Math.floor(n/2)}));return e[1]=r,e.map((r=>({size:r,lineHeight:(r+8)/r})))}(r),o=e.map((r=>r.size)),t=e.map((r=>r.lineHeight));return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:t[1],lineHeightLG:t[2],lineHeightSM:t[0],lineHeightHeading1:t[6],lineHeightHeading2:t[5],lineHeightHeading3:t[4],lineHeightHeading4:t[3],lineHeightHeading5:t[2]}};function kr(r){const e=Object.keys(ur).map((e=>{const o=nr(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...r,...e,...yr(r,{generateColorPalettes:Mr,generateNeutralColorPalettes:Br}),...Hr(r.fontSize),...lr(r),...sr(r),...wr(r)}}const Ar=r=>{const e=nr(r,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},zr=(r,e)=>{let o=r||"#000",t=e||"#fff";return o=new L(o).isDark()?o:new L(o).darken(100).toRgbString(),t=new L(t).isLight()?t:new L(t).lighten(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorText:pr(t,.85),colorTextSecondary:pr(t,.65),colorTextTertiary:pr(t,.35),colorTextQuaternary:pr(t,.35),colorFill:pr(t,.18),colorFillSecondary:pr(t,.12),colorFillTertiary:pr(t,.08),colorFillQuaternary:pr(t,.04),colorBgElevated:xr(o,12),colorBgContainer:xr(o,8),colorBgLayout:xr(o,0),colorBgSpotlight:xr(o,26),colorBorder:xr(o,26),colorBorderSecondary:xr(o,19)}},Fr=(r,e)=>{const o=Object.keys(ur).map((e=>{const o=nr(r[e],{theme:"dark"});return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...e??kr(r),...o,...yr(r,{generateColorPalettes:Ar,generateNeutralColorPalettes:zr})}};function Tr(r){const{sizeUnit:e,sizeStep:o}=r,t=o-2;return{sizeXXL:e*(t+10),sizeXL:e*(t+6),sizeLG:e*(t+2),sizeMD:e*(t+2),sizeMS:e*(t+1),size:e*t,sizeSM:e*t,sizeXS:e*(t-1),sizeXXS:e*(t-1)}}const Rr=(r,e)=>{const o=e??kr(r),t=o.fontSizeSM,n=o.controlHeight-4;return{...o,...Tr(e??r),...Hr(t),controlHeight:n,...sr({...o,controlHeight:n})}},Lr=(r,e)=>{const o=r||"#fff",t=e||"#000";return{colorBgBase:o,colorTextBase:t,colorText:pr(t,.9),colorTextSecondary:pr(t,.8),colorTextTertiary:pr(t,.7),colorTextQuaternary:pr(t,.6),colorFill:pr(t,.3),colorFillSecondary:pr(t,.2),colorFillTertiary:pr(t,.1),colorFillQuaternary:pr(t,.06),colorBgLayout:br(o,6),colorBgContainer:br(o,0),colorBgElevated:br(o,0),colorBgSpotlight:pr(t,1),colorBorder:br(o,30),colorBorderSecondary:br(o,12)}};function Cr(r){return r>=0&&r<=255}function Xr(r,e){const{r:o,g:t,b:n,a:a}=new L(r).toRgb();if(a<1)return r;const{r:i,g:c,b:s}=new L(e).toRgb();for(let r=.01;r<=1;r+=.01){const e=Math.round((o-i*(1-r))/r),a=Math.round((t-c*(1-r))/r),l=Math.round((n-s*(1-r))/r);if(Cr(e)&&Cr(a)&&Cr(l))return new L({r:e,g:a,b:l,a:Math.round(100*r)/100}).toRgbString()}return new L({r:o,g:t,b:n,a:1}).toRgbString()}function Dr(r){const{override:e,...o}=r,t={...e};Object.keys(gr).forEach((r=>{delete t[r]}));const n={...o,...t},a=1200,i=1600;if(!1===n.motion){const r="0s";n.motionDurationFast=r,n.motionDurationMid=r,n.motionDurationSlow=r}return{...n,colorFillContent:n.colorFillSecondary,colorFillContentHover:n.colorFill,colorFillAlter:n.colorFillQuaternary,colorBgContainerDisabled:n.colorFillTertiary,colorBorderBg:n.colorBgContainer,colorSplit:Xr(n.colorBorderSecondary,n.colorBgContainer),colorTextPlaceholder:n.colorTextQuaternary,colorTextDisabled:n.colorTextQuaternary,colorTextHeading:n.colorText,colorTextLabel:n.colorTextSecondary,colorTextDescription:n.colorTextTertiary,colorTextLightSolid:n.colorWhite,colorHighlight:n.colorError,colorBgTextHover:n.colorFillSecondary,colorBgTextActive:n.colorFill,colorIcon:n.colorTextTertiary,colorIconHover:n.colorText,colorErrorOutline:Xr(n.colorErrorBg,n.colorBgContainer),colorWarningOutline:Xr(n.colorWarningBg,n.colorBgContainer),fontSizeIcon:n.fontSizeSM,lineWidthFocus:2*n.lineWidth,lineWidth:n.lineWidth,controlOutlineWidth:2*n.lineWidth,controlInteractiveSize:n.controlHeight/2,controlItemBgHover:n.colorFillTertiary,controlItemBgActive:n.colorPrimaryBg,controlItemBgActiveHover:n.colorPrimaryBgHover,controlItemBgActiveDisabled:n.colorFill,controlTmpOutline:n.colorFillQuaternary,controlOutline:Xr(n.colorPrimaryBg,n.colorBgContainer),lineType:n.lineType,borderRadius:n.borderRadius,borderRadiusXS:n.borderRadiusXS,borderRadiusSM:n.borderRadiusSM,borderRadiusLG:n.borderRadiusLG,fontWeightStrong:700,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:n.sizeXXS,paddingXS:n.sizeXS,paddingSM:n.sizeSM,padding:n.size,paddingMD:n.sizeMD,paddingLG:n.sizeLG,paddingXL:n.sizeXL,paddingContentHorizontalLG:n.sizeLG,paddingContentVerticalLG:n.sizeMS,paddingContentHorizontal:n.sizeMS,paddingContentVertical:n.sizeSM,paddingContentHorizontalSM:n.size,paddingContentVerticalSM:n.sizeXS,marginXXS:n.sizeXXS,marginXS:n.sizeXS,marginSM:n.sizeSM,margin:n.size,marginMD:n.sizeMD,marginLG:n.sizeLG,marginXL:n.sizeXL,marginXXL:n.sizeXXL,boxShadow:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowSecondary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:i,screenXXLMin:i,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.04),\n -3px 0 6px -4px rgba(0, 0, 0, 0.03),\n -9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerUp:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.04),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.03),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.04),\n -3px 0 6px -4px rgba(0, 0, 0, 0.03),\n -9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowTop:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowBottom:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.04),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.03),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.02)\n ",...t}}const Er=(r=gr,e="default")=>{let o=t(r,Object.keys(gr));o=n(gr,o);const i=kr(o),c=a(r,Object.keys(gr));let s;switch(e){case"dark":s=Fr(o,i);break;case"compact":s=Rr(o,i);break;case"meeting":s=function(r,e){const o=e??kr(r),t=Object.keys(ur).map((e=>{const o=nr(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>({...r,...e})),{}),{fontSize:n,colorBgBase:a,colorTextBase:i}=o;return{...o,...t,...Lr(a,i),fontSizeSM:n,fontSize:n+2,fontSizeLG:n+3,fontSizeXL:n+4}}(o,i);break;default:s=i}return Dr({...s,override:c})},Ir=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Wr=Er();export{g as A,h as B,f as C,p as D,b as E,x as F,m as G,v as H,y as I,S as J,w as K,M as L,Ir as P,L as T,Fr as a,Rr as b,fr as c,kr as d,pr as e,Dr as f,Er as g,br as h,xr as i,mr as j,C as k,dr as l,D as m,B as n,E as o,I as p,W as q,X as r,gr as s,Wr as t,P as u,H as v,T as w,R as x,O as y,j as z};
1
+ import{mapValues as r,toLower as e,isObject as o,pick as t,mergeWith as n,omit as a}from"lodash-es";function i(r,e){(function(r){return"string"==typeof r&&-1!==r.indexOf(".")&&1===parseFloat(r)})(r)&&(r="100%");var o=function(r){return"string"==typeof r&&-1!==r.indexOf("%")}(r);return r=360===e?r:Math.min(e,Math.max(0,parseFloat(r))),o&&(r=parseInt(String(r*e),10)/100),Math.abs(r-e)<1e-6?1:r=360===e?(r<0?r%e+e:r%e)/parseFloat(String(e)):r%e/parseFloat(String(e))}function c(r){return Math.min(1,Math.max(0,r))}function s(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function l(r){return r<=1?"".concat(100*Number(r),"%"):r}function u(r){return 1===r.length?"0"+r:String(r)}function g(r,e,o){return{r:255*i(r,255),g:255*i(e,255),b:255*i(o,255)}}function h(r,e,o){r=i(r,255),e=i(e,255),o=i(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,c=0,s=(t+n)/2;if(t===n)c=0,a=0;else{var l=t-n;switch(c=s>.5?l/(2-t-n):l/(t+n),t){case r:a=(e-o)/l+(e<o?6:0);break;case e:a=(o-r)/l+2;break;case o:a=(r-e)/l+4}a/=6}return{h:a,s:c,l:s}}function d(r,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?r+6*o*(e-r):o<.5?e:o<2/3?r+(e-r)*(2/3-o)*6:r}function f(r,e,o){var t,n,a;if(r=i(r,360),e=i(e,100),o=i(o,100),0===e)n=o,a=o,t=o;else{var c=o<.5?o*(1+e):o+e-o*e,s=2*o-c;t=d(s,c,r+1/3),n=d(s,c,r),a=d(s,c,r-1/3)}return{r:255*t,g:255*n,b:255*a}}function p(r,e,o){r=i(r,255),e=i(e,255),o=i(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,c=t,s=t-n,l=0===t?0:s/t;if(t===n)a=0;else{switch(t){case r:a=(e-o)/s+(e<o?6:0);break;case e:a=(o-r)/s+2;break;case o:a=(r-e)/s+4}a/=6}return{h:a,s:l,v:c}}function b(r,e,o){r=6*i(r,360),e=i(e,100),o=i(o,100);var t=Math.floor(r),n=r-t,a=o*(1-e),c=o*(1-n*e),s=o*(1-(1-n)*e),l=t%6;return{r:255*[o,c,a,a,s,o][l],g:255*[s,o,o,c,a,a][l],b:255*[a,a,s,o,o,c][l]}}function x(r,e,o,t){var n=[u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16))];return t&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function m(r,e,o,t,n){var a=[u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16)),u(y(t))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function v(r,e,o,t){return[u(y(t)),u(Math.round(r).toString(16)),u(Math.round(e).toString(16)),u(Math.round(o).toString(16))].join("")}function y(r){return Math.round(255*parseFloat(r)).toString(16)}function S(r){return w(r)/255}function w(r){return parseInt(r,16)}function M(r){return{r:r>>16,g:(65280&r)>>8,b:255&r}}var B={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function H(r){var e={r:0,g:0,b:0},o=1,t=null,n=null,a=null,i=!1,c=!1;return"string"==typeof r&&(r=T(r)),"object"==typeof r&&(R(r.r)&&R(r.g)&&R(r.b)?(e=g(r.r,r.g,r.b),i=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):R(r.h)&&R(r.s)&&R(r.v)?(t=l(r.s),n=l(r.v),e=b(r.h,t,n),i=!0,c="hsv"):R(r.h)&&R(r.s)&&R(r.l)&&(t=l(r.s),a=l(r.l),e=f(r.h,t,a),i=!0,c="hsl"),Object.prototype.hasOwnProperty.call(r,"a")&&(o=r.a)),o=s(o),{ok:i,format:r.format||c,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:o}}var k="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),A="[\\s|\\(]+(".concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")\\s*\\)?"),z="[\\s|\\(]+(".concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")[,|\\s]+(").concat(k,")\\s*\\)?"),F={CSS_UNIT:new RegExp(k),rgb:new RegExp("rgb"+A),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+A),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+A),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function T(r){if(0===(r=r.trim().toLowerCase()).length)return!1;var e=!1;if(B[r])r=B[r],e=!0;else if("transparent"===r)return{r:0,g:0,b:0,a:0,format:"name"};var o=F.rgb.exec(r);return o?{r:o[1],g:o[2],b:o[3]}:(o=F.rgba.exec(r))?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=F.hsl.exec(r))?{h:o[1],s:o[2],l:o[3]}:(o=F.hsla.exec(r))?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=F.hsv.exec(r))?{h:o[1],s:o[2],v:o[3]}:(o=F.hsva.exec(r))?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=F.hex8.exec(r))?{r:w(o[1]),g:w(o[2]),b:w(o[3]),a:S(o[4]),format:e?"name":"hex8"}:(o=F.hex6.exec(r))?{r:w(o[1]),g:w(o[2]),b:w(o[3]),format:e?"name":"hex"}:(o=F.hex4.exec(r))?{r:w(o[1]+o[1]),g:w(o[2]+o[2]),b:w(o[3]+o[3]),a:S(o[4]+o[4]),format:e?"name":"hex8"}:!!(o=F.hex3.exec(r))&&{r:w(o[1]+o[1]),g:w(o[2]+o[2]),b:w(o[3]+o[3]),format:e?"name":"hex"}}function R(r){return Boolean(F.CSS_UNIT.exec(String(r)))}var L=function(){function r(e,o){var t;if(void 0===e&&(e=""),void 0===o&&(o={}),e instanceof r)return e;"number"==typeof e&&(e=M(e)),this.originalInput=e;var n=H(e);this.originalInput=e,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(t=o.format)&&void 0!==t?t:n.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return r.prototype.isDark=function(){return this.getBrightness()<128},r.prototype.isLight=function(){return!this.isDark()},r.prototype.getBrightness=function(){var r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},r.prototype.getLuminance=function(){var r=this.toRgb(),e=r.r/255,o=r.g/255,t=r.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},r.prototype.getAlpha=function(){return this.a},r.prototype.setAlpha=function(r){return this.a=s(r),this.roundA=Math.round(100*this.a)/100,this},r.prototype.isMonochrome=function(){return 0===this.toHsl().s},r.prototype.toHsv=function(){var r=p(this.r,this.g,this.b);return{h:360*r.h,s:r.s,v:r.v,a:this.a}},r.prototype.toHsvString=function(){var r=p(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.v);return 1===this.a?"hsv(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsva(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHsl=function(){var r=h(this.r,this.g,this.b);return{h:360*r.h,s:r.s,l:r.l,a:this.a}},r.prototype.toHslString=function(){var r=h(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.l);return 1===this.a?"hsl(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsla(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHex=function(r){return void 0===r&&(r=!1),x(this.r,this.g,this.b,r)},r.prototype.toHexString=function(r){return void 0===r&&(r=!1),"#"+this.toHex(r)},r.prototype.toHex8=function(r){return void 0===r&&(r=!1),m(this.r,this.g,this.b,this.a,r)},r.prototype.toHex8String=function(r){return void 0===r&&(r=!1),"#"+this.toHex8(r)},r.prototype.toHexShortString=function(r){return void 0===r&&(r=!1),1===this.a?this.toHexString(r):this.toHex8String(r)},r.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},r.prototype.toRgbString=function(){var r=Math.round(this.r),e=Math.round(this.g),o=Math.round(this.b);return 1===this.a?"rgb(".concat(r,", ").concat(e,", ").concat(o,")"):"rgba(".concat(r,", ").concat(e,", ").concat(o,", ").concat(this.roundA,")")},r.prototype.toPercentageRgb=function(){var r=function(r){return"".concat(Math.round(100*i(r,255)),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},r.prototype.toPercentageRgbString=function(){var r=function(r){return Math.round(100*i(r,255))};return 1===this.a?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},r.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var r="#"+x(this.r,this.g,this.b,!1),e=0,o=Object.entries(B);e<o.length;e++){var t=o[e],n=t[0];if(r===t[1])return n}return!1},r.prototype.toString=function(r){var e=Boolean(r);r=null!=r?r:this.format;var o=!1,t=this.a<1&&this.a>=0;return e||!t||!r.startsWith("hex")&&"name"!==r?("rgb"===r&&(o=this.toRgbString()),"prgb"===r&&(o=this.toPercentageRgbString()),"hex"!==r&&"hex6"!==r||(o=this.toHexString()),"hex3"===r&&(o=this.toHexString(!0)),"hex4"===r&&(o=this.toHex8String(!0)),"hex8"===r&&(o=this.toHex8String()),"name"===r&&(o=this.toName()),"hsl"===r&&(o=this.toHslString()),"hsv"===r&&(o=this.toHsvString()),o||this.toHexString()):"name"===r&&0===this.a?this.toName():this.toRgbString()},r.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},r.prototype.clone=function(){return new r(this.toString())},r.prototype.lighten=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l+=e/100,o.l=c(o.l),new r(o)},r.prototype.brighten=function(e){void 0===e&&(e=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(-e/100*255))),o.g=Math.max(0,Math.min(255,o.g-Math.round(-e/100*255))),o.b=Math.max(0,Math.min(255,o.b-Math.round(-e/100*255))),new r(o)},r.prototype.darken=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l-=e/100,o.l=c(o.l),new r(o)},r.prototype.tint=function(r){return void 0===r&&(r=10),this.mix("white",r)},r.prototype.shade=function(r){return void 0===r&&(r=10),this.mix("black",r)},r.prototype.desaturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s-=e/100,o.s=c(o.s),new r(o)},r.prototype.saturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s+=e/100,o.s=c(o.s),new r(o)},r.prototype.greyscale=function(){return this.desaturate(100)},r.prototype.spin=function(e){var o=this.toHsl(),t=(o.h+e)%360;return o.h=t<0?360+t:t,new r(o)},r.prototype.mix=function(e,o){void 0===o&&(o=50);var t=this.toRgb(),n=new r(e).toRgb(),a=o/100;return new r({r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b,a:(n.a-t.a)*a+t.a})},r.prototype.analogous=function(e,o){void 0===e&&(e=6),void 0===o&&(o=30);var t=this.toHsl(),n=360/o,a=[this];for(t.h=(t.h-(n*e>>1)+720)%360;--e;)t.h=(t.h+n)%360,a.push(new r(t));return a},r.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new r(e)},r.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var o=this.toHsv(),t=o.h,n=o.s,a=o.v,i=[],c=1/e;e--;)i.push(new r({h:t,s:n,v:a})),a=(a+c)%1;return i},r.prototype.splitcomplement=function(){var e=this.toHsl(),o=e.h;return[this,new r({h:(o+72)%360,s:e.s,l:e.l}),new r({h:(o+216)%360,s:e.s,l:e.l})]},r.prototype.onBackground=function(e){var o=this.toRgb(),t=new r(e).toRgb(),n=o.a+t.a*(1-o.a);return new r({r:(o.r*o.a+t.r*t.a*(1-o.a))/n,g:(o.g*o.a+t.g*t.a*(1-o.a))/n,b:(o.b*o.a+t.b*t.a*(1-o.a))/n,a:n})},r.prototype.triad=function(){return this.polyad(3)},r.prototype.tetrad=function(){return this.polyad(4)},r.prototype.polyad=function(e){for(var o=this.toHsl(),t=o.h,n=[this],a=360/e,i=1;i<e;i++)n.push(new r({h:(t+i*a)%360,s:o.s,l:o.l}));return n},r.prototype.equals=function(e){return this.toRgbString()===new r(e).toRgbString()},r}();function C(r,e){return void 0===r&&(r=""),void 0===e&&(e={}),new L(r,e)}function X(r,e){var o=new L(r),t=new L(e);return(Math.max(o.getLuminance(),t.getLuminance())+.05)/(Math.min(o.getLuminance(),t.getLuminance())+.05)}function D(r,e,o){var t,n;void 0===o&&(o={level:"AA",size:"small"});var a=X(r,e);switch((null!==(t=o.level)&&void 0!==t?t:"AA")+(null!==(n=o.size)&&void 0!==n?n:"small")){case"AAsmall":case"AAAlarge":return a>=4.5;case"AAlarge":return a>=3;case"AAAsmall":return a>=7;default:return!1}}function E(r,e,o){void 0===o&&(o={includeFallbackColors:!1,level:"AA",size:"small"});for(var t=null,n=0,a=o.includeFallbackColors,i=o.level,c=o.size,s=0,l=e;s<l.length;s++){var u=l[s],g=X(r,u);g>n&&(n=g,t=new L(u))}return D(r,t,{level:i,size:c})||!a?t:(o.includeFallbackColors=!1,E(r,["#fff","#000"],o))}function I(r,e){var o=new L(r),t="#"+v(o.r,o.g,o.b,o.a),n=t,a=o.gradientType?"GradientType = 1, ":"";if(e){var i=new L(e);n="#"+v(i.r,i.g,i.b,i.a)}return"progid:DXImageTransform.Microsoft.gradient(".concat(a,"startColorstr=").concat(t,",endColorstr=").concat(n,")")}function W(r,e){var o={r:l(r.r),g:l(r.g),b:l(r.b)};return void 0!==r.a&&(o.a=Number(r.a)),new L(o,e)}function P(){return new L({r:Math.random(),g:Math.random(),b:Math.random()})}function O(r){if(void 0===r&&(r={}),void 0!==r.count&&null!==r.count){var e=r.count,o=[];for(r.count=void 0;e>o.length;)r.count=null,r.seed&&(r.seed+=1),o.push(O(r));return r.count=e,o}var t=function(r,e){var o=G(function(r){var e=parseInt(r,10);if(!Number.isNaN(e)&&e<360&&e>0)return[e,e];if("string"==typeof r){var o=j.find((function(e){return e.name===r}));if(o){var t=N(o);if(t.hueRange)return t.hueRange}var n=new L(r);if(n.isValid){var a=n.toHsv().h;return[a,a]}}return[0,360]}(r),e);o<0&&(o=360+o);return o}(r.hue,r.seed),n=function(r,e){if("monochrome"===e.hue)return 0;if("random"===e.luminosity)return G([0,100],e.seed);var o=$(r).saturationRange,t=o[0],n=o[1];switch(e.luminosity){case"bright":t=55;break;case"dark":t=n-10;break;case"light":n=55}return G([t,n],e.seed)}(t,r),a=function(r,e,o){var t=function(r,e){for(var o=$(r).lowerBounds,t=0;t<o.length-1;t++){var n=o[t][0],a=o[t][1],i=o[t+1][0],c=o[t+1][1];if(e>=n&&e<=i){var s=(c-a)/(i-n);return s*e+(a-s*n)}}return 0}(r,e),n=100;switch(o.luminosity){case"dark":n=t+20;break;case"light":t=(n+t)/2;break;case"random":t=0,n=100}return G([t,n],o.seed)}(t,n,r),i={h:t,s:n,v:a};return void 0!==r.alpha&&(i.a=r.alpha),new L(i)}function $(r){r>=334&&r<=360&&(r-=360);for(var e=0,o=j;e<o.length;e++){var t=N(o[e]);if(t.hueRange&&r>=t.hueRange[0]&&r<=t.hueRange[1])return t}throw Error("Color not found")}function G(r,e){if(void 0===e)return Math.floor(r[0]+Math.random()*(r[1]+1-r[0]));var o=r[1]||1,t=r[0]||0,n=(e=(9301*e+49297)%233280)/233280;return Math.floor(t+n*(o-t))}function N(r){var e=r.lowerBounds[0][0],o=r.lowerBounds[r.lowerBounds.length-1][0],t=r.lowerBounds[r.lowerBounds.length-1][1],n=r.lowerBounds[0][1];return{name:r.name,hueRange:r.hueRange,lowerBounds:r.lowerBounds,saturationRange:[e,o],brightnessRange:[t,n]}}var j=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}],Q=2,q=.16,U=.05,V=.05,_=.15,J=5,K=4,Y=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Z(r){var e=p(r.r,r.g,r.b);return{h:360*e.h,s:e.s,v:e.v}}function rr(r){var e=r.r,o=r.g,t=r.b;return"#".concat(x(e,o,t,!1))}function er(r,e,o){var t;return(t=Math.round(r.h)>=60&&Math.round(r.h)<=240?o?Math.round(r.h)-Q*e:Math.round(r.h)+Q*e:o?Math.round(r.h)+Q*e:Math.round(r.h)-Q*e)<0?t+=360:t>=360&&(t-=360),t}function or(r,e,o){return 0===r.h&&0===r.s?r.s:((t=o?r.s-q*e:e===K?r.s+q:r.s+U*e)>1&&(t=1),o&&e===J&&t>.1&&(t=.1),t<.06&&(t=.06),Number(t.toFixed(2)));var t}function tr(r,e,o){var t;return(t=o?r.v+V*e:r.v-_*e)>1&&(t=1),Number(t.toFixed(2))}function nr(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=[],t=H(r),n=J;n>0;n-=1){var a=Z(t),i=rr(H({h:er(a,n,!0),s:or(a,n,!0),v:tr(a,n,!0)}));o.push(i)}o.push(rr(t));for(var c=1;c<=K;c+=1){var s=Z(t),l=rr(H({h:er(s,c),s:or(s,c),v:tr(s,c)}));o.push(l)}return"dark"===e.theme?Y.map((function(r){var t,n,a,i=r.index,c=r.opacity;return rr((t=H(e.backgroundColor||"#141414"),n=H(o[i]),a=100*c/100,{r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b}))})):o}var ar={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ir={},cr={};Object.keys(ar).forEach((function(r){ir[r]=nr(ar[r]),ir[r].primary=ir[r][5],cr[r]=nr(ar[r],{theme:"dark",backgroundColor:"#141414"}),cr[r].primary=cr[r][5]}));const sr=r=>{const{controlHeight:e}=r;return{controlHeightSM:.75*e,controlHeightXS:.5*e,controlHeightLG:1.25*e}};function lr(r){const{sizeUnit:e,sizeStep:o}=r;return{sizeXXL:e*(o+8),sizeXL:e*(o+4),sizeLG:e*(o+2),sizeMD:e*(o+1),sizeMS:e*o,size:e*o,sizeSM:e*(o-1),sizeXS:e*(o-2),sizeXXS:e*(o-3)}}const ur={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},gr={...ur,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:'microsoft yahei,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontWeight:400,fontSize:12,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacity:1,wireframe:!1,motion:!0,layoutHeaderHeight:50,layoutSiderWidth:200,layoutIconSize:24,layoutNavHeight:40,gradientColors:["rgba(0, 64, 237,0.3)","rgba(0, 229, 237,0.3)"]};function hr(r,e){const o=parseInt(r,16)+e,t=o>255?255:o;return t.toString(16).length>1?t.toString(16):`0${t.toString(16)}`}function dr(r,e){return r=r.indexOf("#")>=0?r.substring(1,r.length):r,e=Math.trunc(255*e/100),`#${hr(r.substring(0,2),e)}${hr(r.substring(2,4),e)}${hr(r.substring(4,6),e)}`}function fr(t,n){if("object"!=typeof t||Array.isArray(t))return;const a={};return r(t,((r,t)=>{const i=n?`--${n}-`+t:"--"+t,c="number"!=typeof r||["lineheight","opacity","weight"].some((r=>e(t).includes(r)))?r:r+"px";if(o(r))return fr(c,t);a[i]=c})),a}const pr=(r,e)=>new L(r).setAlpha(e).toRgbString(),br=(r,e)=>new L(r).darken(e).toHexString(),xr=(r,e)=>new L(r).lighten(e).toHexString(),mr=(r,e)=>new L(r).onBackground(e).toRgbString(),vr=(r,e)=>e.map((e=>mr(e,r)));function yr(r,{generateColorPalettes:e,generateNeutralColorPalettes:o}){const{colorSuccess:t,colorWarning:n,colorError:a,colorInfo:i,colorPrimary:c,colorBgBase:s,colorTextBase:l}=r,u=e(c),g=e(t),h=e(n),d=e(a),f=e(i),p=o(s,l),b=vr(p.colorBgBase,r.gradientColors),x=e(r.colorLink||r.colorInfo);return{...p,gradientColors:b,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:g[1],colorSuccessBgHover:g[2],colorSuccessBorder:g[3],colorSuccessBorderHover:g[4],colorSuccessHover:g[4],colorSuccess:g[6],colorSuccessActive:g[7],colorSuccessTextHover:g[8],colorSuccessText:g[9],colorSuccessTextActive:g[10],colorErrorBg:d[1],colorErrorBgHover:d[2],colorErrorBorder:d[3],colorErrorBorderHover:d[4],colorErrorHover:d[5],colorError:d[6],colorErrorActive:d[7],colorErrorTextHover:d[8],colorErrorText:d[9],colorErrorTextActive:d[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:f[1],colorInfoBgHover:f[2],colorInfoBorder:f[3],colorInfoBorderHover:f[4],colorInfoHover:f[4],colorInfo:f[6],colorInfoActive:f[7],colorInfoTextHover:f[8],colorInfoText:f[9],colorInfoTextActive:f[10],colorLinkHover:x[4],colorLink:x[6],colorLinkActive:x[7],colorBgMask:new L("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}const Sr=r=>{let e=r,o=r,t=r,n=r,a=r,i=r;return r<6&&r>=5?e=r+1:r<16&&r>=6?e=r+2:r>=16&&(e=16),r<7&&r>=5?o=4:r<8&&r>=7?o=5:r<14&&r>=8?o=6:r<16&&r>=14?o=7:r>=16&&(o=8),r<6&&r>=2?t=1:r>=6&&(t=2),r>4&&r<8?i=4:r>=8&&(i=6),n=e>0?e+4:e,a=e>0?e+8:e,{borderRadius:r>16?16:r,borderRadiusXS:t,borderRadiusSM:o,borderRadiusLG:e,borderRadiusXL:n,borderRadiusXXL:a,borderRadiusOuter:i}};function wr(r){const{motionUnit:e,motionBase:o,borderRadius:t,lineWidth:n,opacity:a,layoutHeaderHeight:i}=r;return{motionDurationFast:`${(o+e).toFixed(1)}s`,motionDurationMid:`${(o+2*e).toFixed(1)}s`,motionDurationSlow:`${(o+3*e).toFixed(1)}s`,lineWidthBold:n+1,...Sr(t),opacityImage:a,opacity1:.8*a,opacity2:.6*a}}const Mr=r=>{const e=nr(r);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},Br=(r,e)=>{let o=r||"#fff",t=e||"#000";return o=new L(o).lighten()?o:new L(o).lighten(100).toRgbString(),t=new L(t).isDark()?t:new L(t).darken(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorFill:pr(t,.15),colorFillSecondary:pr(t,.06),colorFillTertiary:pr(t,.04),colorFillQuaternary:pr(t,.02),colorBgLayout:br(o,4),colorBgContainer:br(o,0),colorBgElevated:br(o,0),colorBgSpotlight:pr(t,.85),colorBorder:br(o,15),colorBorderSecondary:br(o,6),colorText:"#222",colorTextSecondary:"#666",colorTextTertiary:"#999",colorTextQuaternary:"#999"}};const Hr=r=>{const e=function(r){const e=new Array(10).fill(null).map(((e,o)=>{const t=r*2.71828**((o-1)/5),n=o>1?Math.floor(t):Math.ceil(t);return 2*Math.floor(n/2)}));return e[1]=r,e.map((r=>({size:r,lineHeight:(r+8)/r})))}(r),o=e.map((r=>r.size)),t=e.map((r=>r.lineHeight));return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:t[1],lineHeightLG:t[2],lineHeightSM:t[0],lineHeightHeading1:t[6],lineHeightHeading2:t[5],lineHeightHeading3:t[4],lineHeightHeading4:t[3],lineHeightHeading5:t[2]}};function kr(r){const e=Object.keys(ur).map((e=>{const o=nr(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...r,...e,...yr(r,{generateColorPalettes:Mr,generateNeutralColorPalettes:Br}),...Hr(r.fontSize),...lr(r),...sr(r),...wr(r)}}const Ar=r=>{const e=nr(r,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},zr=(r,e)=>{let o=r||"#000",t=e||"#fff";return o=new L(o).isDark()?o:new L(o).darken(100).toRgbString(),t=new L(t).isLight()?t:new L(t).lighten(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorText:pr(t,.85),colorTextSecondary:pr(t,.65),colorTextTertiary:pr(t,.35),colorTextQuaternary:pr(t,.35),colorFill:pr(t,.18),colorFillSecondary:pr(t,.12),colorFillTertiary:pr(t,.08),colorFillQuaternary:pr(t,.04),colorBgElevated:xr(o,12),colorBgContainer:xr(o,8),colorBgLayout:xr(o,0),colorBgSpotlight:xr(o,26),colorBorder:xr(o,26),colorBorderSecondary:xr(o,19)}},Fr=(r,e)=>{const o=Object.keys(ur).map((e=>{const o=nr(r[e],{theme:"dark"});return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...e??kr(r),...o,...yr(r,{generateColorPalettes:Ar,generateNeutralColorPalettes:zr})}};function Tr(r){const{sizeUnit:e,sizeStep:o}=r,t=o-2;return{sizeXXL:e*(t+10),sizeXL:e*(t+6),sizeLG:e*(t+2),sizeMD:e*(t+2),sizeMS:e*(t+1),size:e*t,sizeSM:e*t,sizeXS:e*(t-1),sizeXXS:e*(t-1)}}const Rr=(r,e)=>{const o=e??kr(r),t=o.fontSizeSM,n=o.controlHeight-4;return{...o,...Tr(e??r),...Hr(t),controlHeight:n,...sr({...o,controlHeight:n})}},Lr=(r,e)=>{const o=r||"#fff",t=e||"#000";return{colorBgBase:o,colorTextBase:t,colorText:pr(t,.9),colorTextSecondary:pr(t,.8),colorTextTertiary:pr(t,.7),colorTextQuaternary:pr(t,.6),colorFill:pr(t,.3),colorFillSecondary:pr(t,.2),colorFillTertiary:pr(t,.1),colorFillQuaternary:pr(t,.06),colorBgLayout:br(o,6),colorBgContainer:br(o,0),colorBgElevated:br(o,0),colorBgSpotlight:pr(t,1),colorBorder:br(o,30),colorBorderSecondary:br(o,12)}};function Cr(r){return r>=0&&r<=255}function Xr(r,e){const{r:o,g:t,b:n,a:a}=new L(r).toRgb();if(a<1)return r;const{r:i,g:c,b:s}=new L(e).toRgb();for(let r=.01;r<=1;r+=.01){const e=Math.round((o-i*(1-r))/r),a=Math.round((t-c*(1-r))/r),l=Math.round((n-s*(1-r))/r);if(Cr(e)&&Cr(a)&&Cr(l))return new L({r:e,g:a,b:l,a:Math.round(100*r)/100}).toRgbString()}return new L({r:o,g:t,b:n,a:1}).toRgbString()}function Dr(r){const{override:e,...o}=r,t={...e};Object.keys(gr).forEach((r=>{delete t[r]}));const n={...o,...t},a=1200,i=1600;if(!1===n.motion){const r="0s";n.motionDurationFast=r,n.motionDurationMid=r,n.motionDurationSlow=r}return{...n,colorFillContent:n.colorFillSecondary,colorFillContentHover:n.colorFill,colorFillAlter:n.colorFillQuaternary,colorBgContainerDisabled:n.colorFillTertiary,colorBorderBg:n.colorBgContainer,colorSplit:Xr(n.colorBorderSecondary,n.colorBgContainer),colorTextPlaceholder:n.colorTextQuaternary,colorTextDisabled:n.colorTextQuaternary,colorTextHeading:n.colorText,colorTextLabel:n.colorTextSecondary,colorTextDescription:n.colorTextTertiary,colorTextLightSolid:n.colorWhite,colorHighlight:n.colorError,colorBgTextHover:n.colorFillSecondary,colorBgTextActive:n.colorFill,colorIcon:n.colorTextTertiary,colorIconHover:n.colorText,colorErrorOutline:Xr(n.colorErrorBg,n.colorBgContainer),colorWarningOutline:Xr(n.colorWarningBg,n.colorBgContainer),fontSizeIcon:n.fontSizeSM,lineWidthFocus:2*n.lineWidth,lineWidth:n.lineWidth,controlOutlineWidth:2*n.lineWidth,controlInteractiveSize:n.controlHeight/2,controlItemBgHover:n.colorFillTertiary,controlItemBgActive:n.colorPrimaryBg,controlItemBgActiveHover:n.colorPrimaryBgHover,controlItemBgActiveDisabled:n.colorFill,controlTmpOutline:n.colorFillQuaternary,controlOutline:Xr(n.colorPrimaryBg,n.colorBgContainer),lineType:n.lineType,borderRadius:n.borderRadius,borderRadiusXS:n.borderRadiusXS,borderRadiusSM:n.borderRadiusSM,borderRadiusLG:n.borderRadiusLG,fontWeightStrong:700,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:n.sizeXXS,paddingXS:n.sizeXS,paddingSM:n.sizeSM,padding:n.size,paddingMD:n.sizeMD,paddingLG:n.sizeLG,paddingXL:n.sizeXL,paddingContentHorizontalLG:n.sizeLG,paddingContentVerticalLG:n.sizeMS,paddingContentHorizontal:n.sizeMS,paddingContentVertical:n.sizeSM,paddingContentHorizontalSM:n.size,paddingContentVerticalSM:n.sizeXS,marginXXS:n.sizeXXS,marginXS:n.sizeXS,marginSM:n.sizeSM,margin:n.size,marginMD:n.sizeMD,marginLG:n.sizeLG,marginXL:n.sizeXL,marginXXL:n.sizeXXL,boxShadow:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowSecondary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.04),\n 0 1px 8px -1px rgba(0, 0, 0, 0.03),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:i,screenXXLMin:i,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.04),\n -3px 0 6px -4px rgba(0, 0, 0, 0.03),\n -9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerUp:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.04),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.03),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.04),\n -3px 0 6px -4px rgba(0, 0, 0, 0.03),\n -9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowTop:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.04),\n 3px 0 6px -4px rgba(0, 0, 0, 0.03),\n 9px 0 28px 8px rgba(0, 0, 0, 0.02)\n ",boxShadowTabsOverflowBottom:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.04),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.03),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.02)\n ",...t}}const Er=(r=gr,e="default")=>{let o=t(r,Object.keys(gr));o=n(gr,o);const i=kr(o),c=a(r,Object.keys(gr));let s;switch(e){case"dark":s=Fr(o,i);break;case"compact":s=Rr(o,i);break;case"meeting":s=function(r,e){const o=e??kr(r),t=Object.keys(ur).map((e=>{const o=nr(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>({...r,...e})),{}),{fontSize:n,colorBgBase:a,colorTextBase:i}=o;return{...o,...t,...Lr(a,i),fontSizeSM:n,fontSize:n+2,fontSizeLG:n+3,fontSizeXL:n+4}}(o,i);break;default:s=i}return Dr({...s,override:c})},Ir=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Wr=Er();export{g as A,h as B,f as C,p as D,b as E,x as F,m as G,v as H,y as I,S as J,w as K,M as L,Ir as P,L as T,Fr as a,Rr as b,fr as c,kr as d,pr as e,Dr as f,Er as g,br as h,xr as i,mr as j,C as k,dr as l,D as m,B as n,E as o,I as p,W as q,X as r,gr as s,Wr as t,P as u,H as v,T as w,R as x,O as y,j as z};
2
2
  //# sourceMappingURL=index.js.map