@ttmg/cli 0.0.12-beta.5 → 0.0.12-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
7
7
|
*
|
|
8
8
|
* MIT Licensed
|
|
9
|
-
*/(),o=process.binding("constants"),i=n(),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=/XXXXXX/,c=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),l=o.EBADF||o.os.errno.EBADF,f=o.ENOENT||o.os.errno.ENOENT,d=[];var p=!1,v=!1;function y(e){var t=[],n=null;try{n=r.randomBytes(e)}catch(t){n=r.pseudoRandomBytes(e)}for(var o=0;o<e;o++)t.push(u[n[o]%62]);return t.join("")}function m(e){return void 0===e}function D(e,t){return"function"==typeof e?[t||{},e]:m(e)?[{},t]:[e,t]}function g(e){if(e.name)return t.join(e.dir||i,e.name);if(e.template)return e.template.replace(a,y(6));const r=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return t.join(e.dir||i,r)}function w(t,r){var n=D(t,r),o=n[0],i=n[1],u=o.name?1:o.tries||3;return isNaN(u)||u<0?i(new Error("Invalid tries")):o.template&&!o.template.match(a)?i(new Error("Invalid template provided")):void function t(){const r=g(o);e.stat(r,function(e){if(!e)return u-- >0?t():i(new Error("Could not get a unique tmp filename, max tries reached "+r));i(null,r)})}()}function _(t){var r=D(t)[0],n=r.name?1:r.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(a))throw new Error("Invalid template provided");do{const t=g(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function O(r){const n=[r];do{for(var o=n.pop(),i=!1,u=e.readdirSync(o),a=0,c=u.length;a<c;a++){var s=t.join(o,u[a]);e.lstatSync(s).isDirectory()?(i||(i=!0,n.push(o)),n.push(s)):e.unlinkSync(s)}i||e.rmdirSync(o)}while(0!==n.length)}function S(t,r,n){const o=P(function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!(r=e,F(r,-l,"EBADF")||x(e)))throw e}var r;try{e.unlinkSync(t[1])}catch(e){if(!x(e))throw e}},[r,t]);return n.keep||d.unshift(o),o}function E(t,r){const n=P(r.unsafeCleanup?O:e.rmdirSync.bind(e),t);return r.keep||d.unshift(n),n}function P(e,t){var r=!1;return function n(o){if(!r){const o=d.indexOf(n);o>=0&&d.splice(o,1),r=!0,e(t)}o&&o(null)}}function C(){if(!v||p)for(;d.length;)try{d[0].call(null)}catch(e){}}function x(e){return F(e,-f,"ENOENT")}function F(e,t,r){return e.code==t||e.code==r}const j=process.versions.node.split(".").map(function(e){return parseInt(e,10)});return 0===j[0]&&(j[1]<9||9===j[1]&&j[2]<5)&&process.addListener("uncaughtException",function(e){throw v=!0,C(),e}),process.addListener("exit",function(e){e&&(v=!0),C()}),Lr.tmpdir=i,Lr.dir=function(t,r){var n=D(t,r),o=n[0],i=n[1];w(o,function(t,r){if(t)return i(t);e.mkdir(r,o.mode||448,function(e){if(e)return i(e);i(null,r,E(r,o))})})},Lr.dirSync=function(t){var r=D(t)[0];const n=_(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:E(n,r)}},Lr.file=function(t,r){var n=D(t,r),o=n[0],i=n[1];o.postfix=m(o.postfix)?".tmp":o.postfix,w(o,function(t,r){if(t)return i(t);e.open(r,c,o.mode||384,function(t,n){return t?i(t):o.discardDescriptor?e.close(n,function(t){if(t){try{e.unlinkSync(r)}catch(e){x(e)||(t=e)}return i(t)}i(null,r,void 0,S(r,-1,o))}):o.detachDescriptor?i(null,r,n,S(r,-1,o)):void i(null,r,n,S(r,n,o))})})},Lr.fileSync=function(t){var r=D(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,o=_(r);var i=e.openSync(o,c,r.mode||384);return r.discardDescriptor&&(e.closeSync(i),i=void 0),{name:o,fd:i,removeCallback:S(o,n?-1:i,r)}},Lr.tmpName=w,Lr.tmpNameSync=_,Lr.setGracefulCleanup=function(){p=!0},Lr}var Ur,Nr={};var $r,qr={};var zr,Wr={};var Vr,Gr,Kr,Yr={};function Hr(){if(Gr)return Ct;Gr=1,Object.defineProperty(Ct,"__esModule",{value:!0});var e=function(){if($t)return xt;$t=1;var e=s,t=jt(),r=Mt(),n=It(),o=Ut(),i=zt(),u=xt,a=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new n.sjis,new n.big5,new n.euc_jp,new n.euc_kr,new n.gb_18030,new i.ISO_2022_JP,new i.ISO_2022_KR,new i.ISO_2022_CN,new o.ISO_8859_1,new o.ISO_8859_2,new o.ISO_8859_5,new o.ISO_8859_6,new o.ISO_8859_7,new o.ISO_8859_8,new o.ISO_8859_9,new o.windows_1251,new o.windows_1256,new o.KOI8_R];return xt.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var o=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){o=!0;break}var i={fByteStats:r,fC1Bytes:o,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},u=a.map(function(e){return e.match(i)}).filter(function(e){return!!e}).sort(function(e,t){return t.confidence-e.confidence});return t&&!0===t.returnAllMatches?u:u.length>0?u[0].name:null},xt.detectFile=function(t,r,n){var o;"function"==typeof r&&(n=r,r=void 0);var i=function(t,i){if(o&&e.closeSync(o),t)return n(t,null);n(null,u.detect(i,r))};if(r&&r.sampleSize)return o=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(o,sample,0,r.sampleSize,null,function(e){i(e,sample)});e.readFile(t,i)},xt.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),o=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,o,0,r.sampleSize),e.closeSync(n),u.detect(o,r)}return u.detect(e.readFileSync(t),r)},xt.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detect(e,t)},xt.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFile(e,t,r)},xt.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFileSync(e,t)},xt}(),t=f,r=s,n=Mr(),o=Rr(),i=function(){if(Ur)return Nr;Ur=1;var e=Nr&&Nr.__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(Nr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Nr.CreateFileError=t,Nr}();Ct.CreateFileError=i.CreateFileError;var u=function(){if($r)return qr;$r=1;var e=qr&&qr.__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(qr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return qr.LaunchEditorError=t,qr}();Ct.LaunchEditorError=u.LaunchEditorError;var a=function(){if(zr)return Wr;zr=1;var e=Wr&&Wr.__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(Wr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Wr.ReadFileError=t,Wr}();Ct.ReadFileError=a.ReadFileError;var c=function(){if(Vr)return Yr;Vr=1;var e=Yr&&Yr.__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(Yr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Yr.RemoveFileError=t,Yr}();Ct.RemoveFileError=c.RemoveFileError,Ct.edit=function(e,t){void 0===e&&(e="");var r=new l(e,t);return r.run(),r.cleanup(),r.text},Ct.editAsync=function(e,t,r){void 0===e&&(e="");var n=new l(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)}})};var l=function(){function s(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return s.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(s.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),s.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},s.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)}},s.prototype.cleanup=function(){this.removeTemporaryFile()},s.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",t=s.splitStringBySpace(e).map(function(e){return e.replace("\\ "," ")}),r=t.shift();this.editor={args:t,bin:r}},s.prototype.createTemporaryFile=function(){try{this.tempFile=o.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),r.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new i.CreateFileError(e)}},s.prototype.readTemporaryFile=function(){try{var t=r.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var o=e.detect(t).toString();n.encodingExists(o)||(o="utf8"),this.text=n.decode(t,o)}}catch(e){throw new a.ReadFileError(e)}},s.prototype.removeTemporaryFile=function(){try{r.unlinkSync(this.tempFile)}catch(e){throw new c.RemoveFileError(e)}},s.prototype.launchEditor=function(){try{var e=t.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new u.LaunchEditorError(e)}},s.prototype.launchEditorAsync=function(e){var r=this;try{t.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",function(t){r.lastExitStatus=t,setImmediate(e)})}catch(e){throw new u.LaunchEditorError(e)}},s}();return Ct.ExternalEditor=l,Ct}function Jr(){if(Kr)return Pt;Kr=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=Hr(),t=gt(),r={validationFailureMode:"keep"};return Pt.default=(0,t.createPrompt)((n,o)=>{const{waitForUseInput:i=!0,file:{postfix:u=n.postfix??".txt",...a}={},validate:c=()=>!0}=n,s=(0,t.makeTheme)(r,n.theme),[l,f]=(0,t.useState)("idle"),[d="",p]=(0,t.useState)(n.default),[h,b]=(0,t.useState)(),v=(0,t.usePrefix)({status:l,theme:s});function y(t){t.pause();(0,e.editAsync)(d,(e,r)=>{(async(e,r)=>{if(t.resume(),e)b(e.toString());else{f("loading");const e=await c(r);!0===e?(b(void 0),f("done"),o(r)):("clear"===s.validationFailureMode?p(n.default):p(r),b(e||"You must provide a valid value"),f("idle"))}})(e,r)},{postfix:u,...a})}(0,t.useEffect)(e=>{i||y(e)},[]),(0,t.useKeypress)((e,r)=>{"idle"===l&&(0,t.isEnterKey)(e)&&y(r)});const m=s.style.message(n.message,l);let D="";if("loading"===l)D=s.style.help("Received");else if("idle"===l){const e=s.style.key("enter");D=s.style.help(`Press ${e} to launch your preferred editor.`)}let g="";return h&&(g=s.style.error(h)),[[v,m,D].filter(Boolean).join(" "),g]}),Pt}var Qr,Xr={};function Zr(){if(Qr)return Xr;Qr=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=gt();function t(e,t){let r=!1!==t;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function r(e){return e?"Yes":"No"}return Xr.default=(0,e.createPrompt)((n,o)=>{const{transformer:i=r}=n,[u,a]=(0,e.useState)("idle"),[c,s]=(0,e.useState)(""),l=(0,e.makeTheme)(n.theme),f=(0,e.usePrefix)({status:u,theme:l});(0,e.useKeypress)((u,l)=>{if((0,e.isEnterKey)(u)){const e=t(c,n.default);s(i(e)),a("done"),o(e)}else if("tab"===u.name){const e=r(!t(c,n.default));l.clearLine(0),l.write(e),s(e)}else s(l.line)});let d=c,p="";"done"===u?d=l.style.answer(c):p=` ${l.style.defaultAnswer(!1===n.default?"y/N":"Y/n")}`;return`${f} ${l.style.message(n.message,u)}${p} ${d}`}),Xr}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=gt(),t={validationFailureMode:"keep"};return tn.default=(0,e.createPrompt)((r,n)=>{const{required:o,validate:i=()=>!0,prefill:u="tab"}=r,a=(0,e.makeTheme)(t,r.theme),[c,s]=(0,e.useState)("idle"),[l="",f]=(0,e.useState)(r.default),[d,p]=(0,e.useState)(),[h,b]=(0,e.useState)(""),v=(0,e.usePrefix)({status:c,theme:a});(0,e.useKeypress)(async(t,r)=>{if("idle"===c)if((0,e.isEnterKey)(t)){const e=h||l;s("loading");const t=o&&!e?"You must provide a value":await i(e);!0===t?(b(e),s("done"),n(e)):("clear"===a.validationFailureMode?b(""):r.write(h),p(t||"You must provide a valid value"),s("idle"))}else(0,e.isBackspaceKey)(t)&&!h?f(void 0):"tab"!==t.name||h?(b(r.line),p(void 0)):(f(void 0),r.clearLine(0),r.write(l),b(l))}),(0,e.useEffect)(e=>{"editable"===u&&l&&(e.write(l),b(l))},[]);const y=a.style.message(r.message,c);let m,D=h;"function"==typeof r.transformer?D=r.transformer(h,{isFinal:"done"===c}):"done"===c&&(D=a.style.answer(h)),l&&"done"!==c&&!h&&(m=a.style.defaultAnswer(l));let g="";return d&&(g=a.style.error(d)),[[v,y,m,D].filter(e=>void 0!==e).join(" "),g]}),tn}var nn,on={};function un(){if(nn)return on;nn=1,Object.defineProperty(on,"__esModule",{value:!0});const e=gt();function t(e,{min:t,max:r,step:n}){return null!=e&&!Number.isNaN(e)&&(e<t||e>r?`Value must be between ${t} and ${r}`:!("any"!==n&&!function(e,t,r){const n=e*Math.pow(10,6),o=t*Math.pow(10,6),i=r*Math.pow(10,6);return(n-(Number.isFinite(r)?i:0))%o===0}(e,n,t))||`Value must be a multiple of ${n}${Number.isFinite(t)?` starting from ${t}`:""}`)}return on.default=(0,e.createPrompt)((r,n)=>{const{validate:o=()=>!0,min:i=-1/0,max:u=1/0,step:a=1,required:c=!1}=r,s=(0,e.makeTheme)(r.theme),[l,f]=(0,e.useState)("idle"),[d,p]=(0,e.useState)(""),h=!0===t(r.default,{min:i,max:u,step:a})?r.default?.toString():void 0,[b="",v]=(0,e.useState)(h),[y,m]=(0,e.useState)(),D=(0,e.usePrefix)({status:l,theme:s});(0,e.useKeypress)(async(r,s)=>{if("idle"===l)if((0,e.isEnterKey)(r)){const e=d||b,r=""===e?void 0:Number(e);f("loading");let l=!0;(c||null!=r)&&(l=t(r,{min:i,max:u,step:a})),!0===l&&(l=await o(r)),!0===l?(p(String(r??"")),f("done"),n(r)):(s.write(d),m(l||"You must provide a valid numeric value"),f("idle"))}else(0,e.isBackspaceKey)(r)&&!d?v(void 0):"tab"!==r.name||d?(p(s.line),m(void 0)):(v(void 0),s.clearLine(0),s.write(b),p(b))});const g=s.style.message(r.message,l);let w,_=d;"done"===l&&(_=s.style.answer(d)),b&&"done"!==l&&!d&&(w=s.style.defaultAnswer(b));let O="";return y&&(O=s.style.error(y)),[[D,g,w,_].filter(e=>void 0!==e).join(" "),O]}),on}var an,cn={};function sn(){return an||(an=1,function(e){var t=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J());const o={key:"h",name:"Help, list all options",value:void 0};e.default=(0,r.createPrompt)((e,t)=>{const{default:i="h"}=e,u=(0,r.useMemo)(()=>function(e){return e.map(e=>{if(r.Separator.isSeparator(e))return e;const t="name"in e?e.name:String(e.value);return{value:"value"in e?e.value:t,name:t,key:e.key.toLowerCase()}})}(e.choices),[e.choices]),[a,c]=(0,r.useState)("idle"),[s,l]=(0,r.useState)(""),[f,d]=(0,r.useState)(e.expanded??!1),[p,h]=(0,r.useState)(),b=(0,r.makeTheme)(e.theme),v=(0,r.usePrefix)({theme:b,status:a});(0,r.useKeypress)((e,o)=>{if((0,r.isEnterKey)(e)){const e=(s||i).toLowerCase();if("h"!==e||f){const o=u.find(t=>!r.Separator.isSeparator(t)&&t.key===e);o?(c("done"),l(e),t(o.value)):h(""===s?"Please input a value":`"${n.default.red(s)}" isn't an available option`)}else d(!0)}else l(o.line),h(void 0)});const y=b.style.message(e.message,a);if("done"===a){const e=u.find(e=>!r.Separator.isSeparator(e)&&e.key===s.toLowerCase());return`${v} ${y} ${b.style.answer(e.name)}`}const m=f?u:[...u,o];let D="",g=m.map(e=>r.Separator.isSeparator(e)?"":e.key===i?e.key.toUpperCase():e.key).join("");g=` ${b.style.defaultAnswer(g)}`,f&&(g="",D=m.map(e=>{if(r.Separator.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===s.toLowerCase()?b.style.highlight(t):t}).join("\n"));let w="";const _=u.find(e=>!r.Separator.isSeparator(e)&&e.key===s.toLowerCase());_&&(w=`${n.default.cyan(">>")} ${_.name}`);let O="";return p&&(O=b.style.error(p)),[`${v} ${y}${g} ${s}`,[D,w,O].filter(Boolean).join("\n")]});var i=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return i.Separator}})}(cn)),cn}var ln,fn={};function dn(){return ln||(ln=1,function(e){var t=fn&&fn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o=/\d+/;function i(e){return null!=e&&!r.Separator.isSeparator(e)}function u(e,t){let r;const n=t.filter(i);if(o.test(e)){r=n[Number.parseInt(e,10)-1]}else r=n.find(t=>t.key===e);return r?[r,t.indexOf(r)]:[void 0,void 0]}e.default=(0,r.createPrompt)((e,t)=>{const{loop:o=!0}=e,a=(0,r.useMemo)(()=>function(e){let t=0;return e.map(e=>{if(r.Separator.isSeparator(e))return e;if(t+=1,"string"==typeof e)return{value:e,name:e,short:e,key:String(t)};const n=e.name??String(e.value);return{value:e.value,name:n,short:e.short??n,key:e.key??String(t)}})}(e.choices),[e.choices]),[c,s]=(0,r.useState)("idle"),[l,f]=(0,r.useState)(""),[d,p]=(0,r.useState)(),h=(0,r.makeTheme)(e.theme),b=(0,r.usePrefix)({status:c,theme:h}),v=(0,r.useMemo)(()=>{const e=a.findIndex(i),t=a.findLastIndex(i);if(-1===e)throw new r.ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[a]);(0,r.useKeypress)((e,c)=>{if((0,r.isEnterKey)(e)){const[e]=u(l,a);i(e)?(f(e.short),s("done"),t(e.value)):p(""===l?"Please input a value":`"${n.default.red(l)}" isn't an available option`)}else if("up"===e.name||"down"===e.name){c.clearLine(0);const[t,r]=u(l,a);if(t){if(o||"up"===e.name&&r!==v.first||"down"===e.name&&r!==v.last){const t="up"===e.name?-1:1;let n=r;do{n=(n+t+a.length)%a.length}while(!i(a[n]));f(a[n].key)}}else{const t="down"===e.name?a.find(i):a.findLast(i);f(t.key)}}else f(c.line),p(void 0)});const y=h.style.message(e.message,c);if("done"===c)return`${b} ${y} ${h.style.answer(l)}`;const m=a.map(e=>{if(r.Separator.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===l.toLowerCase()?h.style.highlight(t):t}).join("\n");let D="";return d&&(D=h.style.error(d)),[`${b} ${y} ${l}`,[m,D].filter(Boolean).join("\n")]});var a=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return a.Separator}})}(fn)),fn}var pn,hn={};function bn(){if(pn)return hn;pn=1;var e=hn&&hn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});const t=gt(),r=e(ft());return hn.default=(0,t.createPrompt)((e,n)=>{const{validate:o=()=>!0}=e,i=(0,t.makeTheme)(e.theme),[u,a]=(0,t.useState)("idle"),[c,s]=(0,t.useState)(),[l,f]=(0,t.useState)(""),d=(0,t.usePrefix)({status:u,theme:i});(0,t.useKeypress)(async(e,r)=>{if("idle"===u)if((0,t.isEnterKey)(e)){const e=l;a("loading");const t=await o(e);!0===t?(f(e),a("done"),n(e)):(r.write(l),s(t||"You must provide a valid value"),a("idle"))}else f(r.line),s(void 0)});const p=i.style.message(e.message,u);let h,b="";if(e.mask){b=("string"==typeof e.mask?e.mask:"*").repeat(l.length)}else"done"!==u&&(h=`${i.style.help("[input is masked]")}${r.default.cursorHide}`);"done"===u&&(b=i.style.answer(b));let v="";return c&&(v=i.style.error(c)),[[d,p,e.mask?b:h].join(" "),v]}),hn}var vn,yn={};function mn(){return vn||(vn=1,function(e){var t=yn&&yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o={icon:{cursor:t(re()).default.pointer},style:{disabled:e=>n.default.dim(`- ${e}`),searchTerm:e=>n.default.cyan(e),description:e=>n.default.cyan(e)},helpMode:"auto"};function i(e){return!r.Separator.isSeparator(e)&&!e.disabled}e.default=(0,r.createPrompt)((e,t)=>{const{pageSize:n=7,validate:u=()=>!0}=e,a=(0,r.makeTheme)(o,e.theme),c=(0,r.useRef)(!0),[s,l]=(0,r.useState)("loading"),[f,d]=(0,r.useState)(""),[p,h]=(0,r.useState)([]),[b,v]=(0,r.useState)(),y=(0,r.usePrefix)({status:s,theme:a}),m=(0,r.useMemo)(()=>({first:p.findIndex(i),last:p.findLastIndex(i)}),[p]),[D=m.first,g]=(0,r.useState)();(0,r.useEffect)(()=>{const t=new AbortController;l("loading"),v(void 0);return(async()=>{try{const n=await e.source(f||void 0,{signal:t.signal});t.signal.aborted||(g(void 0),v(void 0),h(n.map(e=>{if(r.Separator.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})),l("idle"))}catch(e){!t.signal.aborted&&e instanceof Error&&v(e.message)}})(),()=>{t.abort()}},[f]);const w=p[D];(0,r.useKeypress)(async(e,n)=>{if((0,r.isEnterKey)(e))if(w){l("loading");const e=await u(w.value);l("idle"),!0===e?(l("done"),t(w.value)):w.name===f?v(e||"You must provide a valid value"):(n.write(w.name),d(w.name))}else n.write(f);else if("tab"===e.name&&w)n.clearLine(0),n.write(w.name),d(w.name);else if("loading"===s||"up"!==e.name&&"down"!==e.name)d(n.line);else if(n.clearLine(0),"up"===e.name&&D!==m.first||"down"===e.name&&D!==m.last){const t="up"===e.name?-1:1;let r=D;do{r=(r+t+p.length)%p.length}while(!i(p[r]));g(r)}});const _=a.style.message(e.message,s);D>0&&(c.current=!1);let O="";p.length>1&&("always"===a.helpMode||"auto"===a.helpMode&&c.current)&&(O=p.length>n?`\n${a.style.help("(Use arrow keys to reveal more choices)")}`:`\n${a.style.help("(Use arrow keys)")}`);const S=(0,r.usePagination)({items:p,active:D,renderItem({item:e,isActive:t}){if(r.Separator.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return a.style.disabled(`${e.name} ${t}`)}return(t?a.style.highlight:e=>e)(`${t?a.icon.cursor:" "} ${e.name}`)},pageSize:n,loop:!1});let E,P;if(b?E=a.style.error(b):0===p.length&&""!==f&&"idle"===s&&(E=a.style.error("No results found")),"done"===s&&w){const e=w.short;return`${y} ${_} ${a.style.answer(e)}`}P=a.style.searchTerm(f);const C=w?.description?`\n${a.style.description(w.description)}`:"";return[[y,_,P].filter(Boolean).join(" "),`${E??S}${O}${C}`]});var u=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return u.Separator}})}(yn)),yn}var Dn,gn,wn={};function _n(){return Dn||(Dn=1,function(e){var t=wn&&wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o=t(re()),i=t(ft()),u={icon:{cursor:o.default.pointer},style:{disabled:e=>n.default.dim(`- ${e}`),description:e=>n.default.cyan(e)},helpMode:"auto",indexMode:"hidden"};function a(e){return!r.Separator.isSeparator(e)&&!e.disabled}e.default=(0,r.createPrompt)((e,t)=>{const{loop:n=!0,pageSize:o=7}=e,c=(0,r.useRef)(!0),s=(0,r.makeTheme)(u,e.theme),[l,f]=(0,r.useState)("idle"),d=(0,r.usePrefix)({status:l,theme:s}),p=(0,r.useRef)(),h=(0,r.useMemo)(()=>e.choices.map(e=>{if(r.Separator.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n}),[e.choices]),b=(0,r.useMemo)(()=>{const e=h.findIndex(a),t=h.findLastIndex(a);if(-1===e)throw new r.ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[h]),v=(0,r.useMemo)(()=>"default"in e?h.findIndex(t=>a(t)&&t.value===e.default):-1,[e.default,h]),[y,m]=(0,r.useState)(-1===v?b.first:v),D=h[y];(0,r.useKeypress)((e,o)=>{if(clearTimeout(p.current),(0,r.isEnterKey)(e))f("done"),t(D.value);else if((0,r.isUpKey)(e)||(0,r.isDownKey)(e)){if(o.clearLine(0),n||(0,r.isUpKey)(e)&&y!==b.first||(0,r.isDownKey)(e)&&y!==b.last){const t=(0,r.isUpKey)(e)?-1:1;let n=y;do{n=(n+t+h.length)%h.length}while(!a(h[n]));m(n)}}else if((0,r.isNumberKey)(e)&&!Number.isNaN(Number(o.line))){const e=Number(o.line)-1,t=h[e];null!=t&&a(t)&&m(e),p.current=setTimeout(()=>{o.clearLine(0)},700)}else if((0,r.isBackspaceKey)(e))o.clearLine(0);else{const e=o.line.toLowerCase(),t=h.findIndex(t=>!(r.Separator.isSeparator(t)||!a(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&m(t),p.current=setTimeout(()=>{o.clearLine(0)},700)}}),(0,r.useEffect)(()=>()=>{clearTimeout(p.current)},[]);const g=s.style.message(e.message,l);let w="",_="";("always"===s.helpMode||"auto"===s.helpMode&&c.current)&&(c.current=!1,h.length>o?_=`\n${s.style.help(`(${e.instructions?.pager??"Use arrow keys to reveal more choices"})`)}`:w=s.style.help(`(${e.instructions?.navigation??"Use arrow keys"})`));const O=(0,r.usePagination)({items:h,active:y,renderItem({item:e,isActive:t,index:n}){if(r.Separator.isSeparator(e))return` ${e.separator}`;const o="number"===s.indexMode?`${n+1}. `:"";if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return s.style.disabled(`${o}${e.name} ${t}`)}return(t?s.style.highlight:e=>e)(`${t?s.icon.cursor:" "} ${o}${e.name}`)},pageSize:o,loop:n});if("done"===l)return`${d} ${g} ${s.style.answer(D.short)}`;const S=D.description?`\n${s.style.description(D.description)}`:"";return`${[d,g,w].filter(Boolean).join(" ")}\n${O}${_}${S}${i.default.cursorHide}`});var c=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return c.Separator}})}(wn)),wn}function On(){return gn||(gn=1,function(e){var t=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.select=e.search=e.password=e.rawlist=e.expand=e.number=e.input=e.confirm=e.editor=e.Separator=e.checkbox=void 0;var r=wt();Object.defineProperty(e,"checkbox",{enumerable:!0,get:function(){return t(r).default}}),Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return r.Separator}});var n=Jr();Object.defineProperty(e,"editor",{enumerable:!0,get:function(){return t(n).default}});var o=Zr();Object.defineProperty(e,"confirm",{enumerable:!0,get:function(){return t(o).default}});var i=rn();Object.defineProperty(e,"input",{enumerable:!0,get:function(){return t(i).default}});var u=un();Object.defineProperty(e,"number",{enumerable:!0,get:function(){return t(u).default}});var a=sn();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return t(a).default}});var c=dn();Object.defineProperty(e,"rawlist",{enumerable:!0,get:function(){return t(c).default}});var s=bn();Object.defineProperty(e,"password",{enumerable:!0,get:function(){return t(s).default}});var l=mn();Object.defineProperty(e,"search",{enumerable:!0,get:function(){return t(l).default}});var f=_n();Object.defineProperty(e,"select",{enumerable:!0,get:function(){return t(f).default}})}(F)),F}var Sn,En={},Pn={},Cn={},xn={},Fn={};function jn(){if(Sn)return Fn;return Sn=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.isFunction=void 0,Fn.isFunction=function(e){return"function"==typeof e},Fn}var Bn,An,Mn={},kn={},Tn={};function In(){if(Bn)return Tn;return Bn=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.createErrorClass=void 0,Tn.createErrorClass=function(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t},Tn}function Ln(){if(An)return kn;An=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.UnsubscriptionError=void 0;var e=In();return kn.UnsubscriptionError=e.createErrorClass(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),kn}var Rn,Un,Nn={};function $n(){if(Rn)return Nn;return Rn=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.arrRemove=void 0,Nn.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}},Nn}function qn(){if(Un)return Mn;Un=1;var e=Mn&&Mn.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=Mn&&Mn.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Mn&&Mn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.isSubscription=Mn.EMPTY_SUBSCRIPTION=Mn.Subscription=void 0;var n=jn(),o=Ln(),i=$n(),u=function(){function u(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return u.prototype.unsubscribe=function(){var i,u,c,s,l;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var d=e(f),p=d.next();!p.done;p=d.next()){p.value.remove(this)}}catch(e){i={error:e}}finally{try{p&&!p.done&&(u=d.return)&&u.call(d)}finally{if(i)throw i.error}}else f.remove(this);var h=this.initialTeardown;if(n.isFunction(h))try{h()}catch(e){l=e instanceof o.UnsubscriptionError?e.errors:[e]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var v=e(b),y=v.next();!y.done;y=v.next()){var m=y.value;try{a(m)}catch(e){l=null!=l?l:[],e instanceof o.UnsubscriptionError?l=r(r([],t(l)),t(e.errors)):l.push(e)}}}catch(e){c={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(c)throw c.error}}}if(l)throw new o.UnsubscriptionError(l)}},u.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)a(e);else{if(e instanceof u){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}},u.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},u.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},u.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&i.arrRemove(t,e)},u.prototype.remove=function(e){var t=this._finalizers;t&&i.arrRemove(t,e),e instanceof u&&e._removeParent(this)},u.EMPTY=function(){var e=new u;return e.closed=!0,e}(),u}();function a(e){n.isFunction(e)?e():e.unsubscribe()}return Mn.Subscription=u,Mn.EMPTY_SUBSCRIPTION=u.EMPTY,Mn.isSubscription=function(e){return e instanceof u||e&&"closed"in e&&n.isFunction(e.remove)&&n.isFunction(e.add)&&n.isFunction(e.unsubscribe)},Mn}var zn,Wn={};function Vn(){return zn||(zn=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.config=void 0,Wn.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}),Wn}var Gn,Kn,Yn={},Hn={};function Jn(){return Gn||(Gn=1,function(e){var t=Hn&&Hn.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(n,o){for(var i=[],u=2;u<arguments.length;u++)i[u-2]=arguments[u];var a=e.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,r([n,o],t(i))):setTimeout.apply(void 0,r([n,o],t(i)))},clearTimeout:function(t){var r=e.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0}}(Hn)),Hn}function Qn(){if(Kn)return Yn;Kn=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.reportUnhandledError=void 0;var e=Vn(),t=Jn();return Yn.reportUnhandledError=function(r){t.timeoutProvider.setTimeout(function(){var t=e.config.onUnhandledError;if(!t)throw r;t(r)})},Yn}var Xn,Zn={};function eo(){if(Xn)return Zn;return Xn=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.noop=void 0,Zn.noop=function(){},Zn}var to,ro={};function no(){if(to)return ro;function e(e,t,r){return{kind:e,value:t,error:r}}return to=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.createNotification=ro.nextNotification=ro.errorNotification=ro.COMPLETE_NOTIFICATION=void 0,ro.COMPLETE_NOTIFICATION=e("C",void 0,void 0),ro.errorNotification=function(t){return e("E",void 0,t)},ro.nextNotification=function(t){return e("N",t,void 0)},ro.createNotification=e,ro}var oo,io,uo={};function ao(){if(oo)return uo;oo=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.captureError=uo.errorContext=void 0;var e=Vn(),t=null;return uo.errorContext=function(r){if(e.config.useDeprecatedSynchronousErrorHandling){var n=!t;if(n&&(t={errorThrown:!1,error:null}),r(),n){var o=t,i=o.errorThrown,u=o.error;if(t=null,i)throw u}}else r()},uo.captureError=function(r){e.config.useDeprecatedSynchronousErrorHandling&&t&&(t.errorThrown=!0,t.error=r)},uo}function co(){return io||(io=1,function(e){var t=xn&&xn.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var r=jn(),n=qn(),o=Vn(),i=Qn(),u=eo(),a=no(),c=Jn(),s=ao(),l=function(r){function o(t){var o=r.call(this)||this;return o.isStopped=!1,t?(o.destination=t,n.isSubscription(t)&&t.add(o)):o.destination=e.EMPTY_OBSERVER,o}return t(o,r),o.create=function(e,t,r){return new h(e,t,r)},o.prototype.next=function(e){this.isStopped?v(a.nextNotification(e),this):this._next(e)},o.prototype.error=function(e){this.isStopped?v(a.errorNotification(e),this):(this.isStopped=!0,this._error(e))},o.prototype.complete=function(){this.isStopped?v(a.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(e){this.destination.next(e)},o.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(n.Subscription);e.Subscriber=l;var f=Function.prototype.bind;function d(e,t){return f.call(e,t)}var p=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),h=function(e){function n(t,n,i){var u,a,c=e.call(this)||this;r.isFunction(t)||!t?u={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=i?i:void 0}:c&&o.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},u={next:t.next&&d(t.next,a),error:t.error&&d(t.error,a),complete:t.complete&&d(t.complete,a)}):u=t;return c.destination=new p(u),c}return t(n,e),n}(l);function b(e){o.config.useDeprecatedSynchronousErrorHandling?s.captureError(e):i.reportUnhandledError(e)}function v(e,t){var r=o.config.onStoppedNotification;r&&c.timeoutProvider.setTimeout(function(){return r(e,t)})}e.SafeSubscriber=h,e.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}}(xn)),xn}var so,lo={};function fo(){return so||(so=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.observable=void 0,lo.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"),lo}var po,ho,bo,vo={},yo={};function mo(){if(po)return yo;return po=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.identity=void 0,yo.identity=function(e){return e},yo}function Do(){if(ho)return vo;ho=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.pipeFromArray=vo.pipe=void 0;var e=mo();function t(t){return 0===t.length?e.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}return vo.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t(e)},vo.pipeFromArray=t,vo}function go(){if(bo)return Cn;bo=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.Observable=void 0;var e=co(),t=qn(),r=fo(),n=Do(),o=Vn(),i=jn(),u=ao(),a=function(){function o(e){e&&(this._subscribe=e)}return o.prototype.lift=function(e){var t=new o;return t.source=this,t.operator=e,t},o.prototype.subscribe=function(r,n,o){var a,c=this,s=(a=r)&&a instanceof e.Subscriber||function(e){return e&&i.isFunction(e.next)&&i.isFunction(e.error)&&i.isFunction(e.complete)}(a)&&t.isSubscription(a)?r:new e.SafeSubscriber(r,n,o);return u.errorContext(function(){var e=c,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?c._subscribe(s):c._trySubscribe(s))}),s},o.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},o.prototype.forEach=function(t,r){var n=this;return new(r=c(r))(function(r,o){var i=new e.SafeSubscriber({next:function(e){try{t(e)}catch(e){o(e),i.unsubscribe()}},error:o,complete:r});n.subscribe(i)})},o.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},o.prototype[r.observable]=function(){return this},o.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.pipeFromArray(e)(this)},o.prototype.toPromise=function(e){var t=this;return new(e=c(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},o.create=function(e){return new o(e)},o}();function c(e){var t;return null!==(t=null!=e?e:o.config.Promise)&&void 0!==t?t:Promise}return Cn.Observable=a,Cn}var wo,_o={},Oo={},So={};function Eo(){if(wo)return So;wo=1,Object.defineProperty(So,"__esModule",{value:!0}),So.operate=So.hasLift=void 0;var e=jn();function t(t){return e.isFunction(null==t?void 0:t.lift)}return So.hasLift=t,So.operate=function(e){return function(r){if(t(r))return r.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}},So}var Po,Co,xo,Fo={};function jo(){if(Po)return Fo;Po=1;var e=Fo&&Fo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.OperatorSubscriber=Fo.createOperatorSubscriber=void 0;var t=co();Fo.createOperatorSubscriber=function(e,t,n,o,i){return new r(e,t,n,o,i)};var r=function(t){function r(e,r,n,o,i,u){var a=t.call(this,e)||this;return a.onFinalize=i,a.shouldUnsubscribe=u,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return e(r,t),r.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},r}(t.Subscriber);return Fo.OperatorSubscriber=r,Fo}function Bo(){if(Co)return Oo;Co=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.refCount=void 0;var e=Eo(),t=jo();return Oo.refCount=function(){return e.operate(function(e,r){var n=null;e._refCount++;var o=t.createOperatorSubscriber(r,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var t=e._connection,o=n;n=null,!t||o&&t!==o||t.unsubscribe(),r.unsubscribe()}});e.subscribe(o),o.closed||(n=e.connect())})},Oo}function Ao(){if(xo)return _o;xo=1;var e=_o&&_o.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(_o,"__esModule",{value:!0}),_o.ConnectableObservable=void 0;var t=go(),r=qn(),n=Bo(),o=jo(),i=Eo(),u=function(t){function u(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,i.hasLift(e)&&(n.lift=e.lift),n}return e(u,t),u.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},u.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},u.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},u.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new r.Subscription;var n=this.getSubject();t.add(this.source.subscribe(o.createOperatorSubscriber(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=r.Subscription.EMPTY)}return t},u.prototype.refCount=function(){return n.refCount()(this)},u}(t.Observable);return _o.ConnectableObservable=u,_o}var Mo,ko={},To={};function Io(){return Mo||(Mo=1,e=To,Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}),To;var e}var Lo,Ro,Uo={};function No(){return Lo||(Lo=1,function(e){var t=Uo&&Uo.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Uo&&Uo.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrameProvider=void 0;var n=qn();e.animationFrameProvider={schedule:function(t){var r=requestAnimationFrame,o=cancelAnimationFrame,i=e.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,o=i.cancelAnimationFrame);var u=r(function(e){o=void 0,t(e)});return new n.Subscription(function(){return null==o?void 0:o(u)})},requestAnimationFrame:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=e.animationFrameProvider.delegate;return((null==i?void 0:i.requestAnimationFrame)||requestAnimationFrame).apply(void 0,r([],t(n)))},cancelAnimationFrame:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=e.animationFrameProvider.delegate;return((null==i?void 0:i.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,r([],t(n)))},delegate:void 0}}(Uo)),Uo}function $o(){if(Ro)return ko;Ro=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.animationFrames=void 0;var e=go(),t=Io(),r=No();function n(n){return new e.Observable(function(e){var o=n||t.performanceTimestampProvider,i=o.now(),u=0,a=function(){e.closed||(u=r.animationFrameProvider.requestAnimationFrame(function(t){u=0;var r=o.now();e.next({timestamp:n?r:t,elapsed:r-i}),a()}))};return a(),function(){u&&r.animationFrameProvider.cancelAnimationFrame(u)}})}ko.animationFrames=function(e){return e?n(e):o};var o=n();return ko}var qo,zo,Wo={},Vo={};function Go(){if(qo)return Vo;qo=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.ObjectUnsubscribedError=void 0;var e=In();return Vo.ObjectUnsubscribedError=e.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Vo}function Ko(){if(zo)return Wo;zo=1;var e=Wo&&Wo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),t=Wo&&Wo.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.AnonymousSubject=Wo.Subject=void 0;var r=go(),n=qn(),o=Go(),i=$n(),u=ao(),a=function(a){function s(){var e=a.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(s,a),s.prototype.lift=function(e){var t=new c(this,this);return t.operator=e,t},s.prototype._throwIfClosed=function(){if(this.closed)throw new o.ObjectUnsubscribedError},s.prototype.next=function(e){var r=this;u.errorContext(function(){var n,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=t(r.currentObservers),u=i.next();!u.done;u=i.next()){u.value.next(e)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}})},s.prototype.error=function(e){var t=this;u.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},s.prototype.complete=function(){var e=this;u.errorContext(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},s.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(s.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),s.prototype._trySubscribe=function(e){return this._throwIfClosed(),a.prototype._trySubscribe.call(this,e)},s.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},s.prototype._innerSubscribe=function(e){var t=this,r=this,o=r.hasError,u=r.isStopped,a=r.observers;return o||u?n.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(e),new n.Subscription(function(){t.currentObservers=null,i.arrRemove(a,e)}))},s.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},s.prototype.asObservable=function(){var e=new r.Observable;return e.source=this,e},s.create=function(e,t){return new c(e,t)},s}(r.Observable);Wo.Subject=a;var c=function(t){function r(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return e(r,t),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:n.EMPTY_SUBSCRIPTION},r}(a);return Wo.AnonymousSubject=c,Wo}var Yo,Ho={};function Jo(){if(Yo)return Ho;Yo=1;var e=Ho&&Ho.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.BehaviorSubject=void 0;var t=function(t){function r(e){var r=t.call(this)||this;return r._value=e,r}return e(r,t),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},r.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},r.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},r}(Ko().Subject);return Ho.BehaviorSubject=t,Ho}var Qo,Xo,Zo={},ei={};function ti(){return Qo||(Qo=1,e=ei,Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}),ei;var e}function ri(){if(Xo)return Zo;Xo=1;var e=Zo&&Zo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.ReplaySubject=void 0;var t=Ko(),r=ti(),n=function(t){function n(e,n,o){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===o&&(o=r.dateTimestampProvider);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return e(n,t),n.prototype.next=function(e){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,u=r._timestampProvider,a=r._windowTime;n||(o.push(e),!i&&o.push(u.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},n.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},n.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var u=r.now(),a=0,c=1;c<n.length&&n[c]<=u;c+=2)a=c;a&&n.splice(0,a+1)}},n}(t.Subject);return Zo.ReplaySubject=n,Zo}var ni,oi={};function ii(){if(ni)return oi;ni=1;var e=oi&&oi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(oi,"__esModule",{value:!0}),oi.AsyncSubject=void 0;var t=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}return e(r,t),r.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,o=t._value,i=t.thrownError,u=t.isStopped,a=t._isComplete;r?e.error(i):(u||a)&&(n&&e.next(o),e.complete())},r.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},r.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))},r}(Ko().Subject);return oi.AsyncSubject=t,oi}var ui,ai={},ci={},si={},li={};function fi(){if(ui)return li;ui=1;var e=li&&li.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(li,"__esModule",{value:!0}),li.Action=void 0;var t=function(t){function r(e,r){return t.call(this)||this}return e(r,t),r.prototype.schedule=function(e,t){return this},r}(qn().Subscription);return li.Action=t,li}var di,pi,hi={};function bi(){return di||(di=1,function(e){var t=hi&&hi.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=hi&&hi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(n,o){for(var i=[],u=2;u<arguments.length;u++)i[u-2]=arguments[u];var a=e.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,r([n,o],t(i))):setInterval.apply(void 0,r([n,o],t(i)))},clearInterval:function(t){var r=e.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(t)},delegate:void 0}}(hi)),hi}function vi(){if(pi)return si;pi=1;var e=si&&si.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(si,"__esModule",{value:!0}),si.AsyncAction=void 0;var t=fi(),r=bi(),n=$n(),o=function(t){function o(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return e(o,t),o.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},o.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),r.intervalProvider.setInterval(e.flush.bind(e,this),n)},o.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&r.intervalProvider.clearInterval(t)},o.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},o.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},o.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,o=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,n.arrRemove(o,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},o}(t.Action);return si.AsyncAction=o,si}var yi,mi,Di,gi={},wi={};function _i(){if(yi)return wi;yi=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.TestTools=wi.Immediate=void 0;var e,t=1,r={};function n(e){return e in r&&(delete r[e],!0)}return wi.Immediate={setImmediate:function(o){var i=t++;return r[i]=!0,e||(e=Promise.resolve()),e.then(function(){return n(i)&&o()}),i},clearImmediate:function(e){n(e)}},wi.TestTools={pending:function(){return Object.keys(r).length}},wi}function Oi(){return mi||(mi=1,function(e){var t=gi&&gi.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=gi&&gi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.immediateProvider=void 0;var n=_i(),o=n.Immediate.setImmediate,i=n.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var u=e.immediateProvider.delegate;return((null==u?void 0:u.setImmediate)||o).apply(void 0,r([],t(n)))},clearImmediate:function(t){var r=e.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||i)(t)},delegate:void 0}}(gi)),gi}function Si(){if(Di)return ci;Di=1;var e=ci&&ci.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ci,"__esModule",{value:!0}),ci.AsapAction=void 0;var t=vi(),r=Oi(),n=function(t){function n(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(n,t),n.prototype.requestAsyncId=function(e,n,o){return void 0===o&&(o=0),null!==o&&o>0?t.prototype.requestAsyncId.call(this,e,n,o):(e.actions.push(this),e._scheduled||(e._scheduled=r.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},n.prototype.recycleAsyncId=function(e,n,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,o);var u=e.actions;null!=n&&(null===(i=u[u.length-1])||void 0===i?void 0:i.id)!==n&&(r.immediateProvider.clearImmediate(n),e._scheduled===n&&(e._scheduled=void 0))},n}(t.AsyncAction);return ci.AsapAction=n,ci}var Ei,Pi,Ci,xi,Fi={},ji={},Bi={};function Ai(){if(Ei)return Bi;Ei=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Scheduler=void 0;var e=ti(),t=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},t.now=e.dateTimestampProvider.now,t}();return Bi.Scheduler=t,Bi}function Mi(){if(Pi)return ji;Pi=1;var e=ji&&ji.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ji,"__esModule",{value:!0}),ji.AsyncScheduler=void 0;var t=Ai(),r=function(r){function n(e,n){void 0===n&&(n=t.Scheduler.now);var o=r.call(this,e,n)||this;return o.actions=[],o._active=!1,o}return e(n,r),n.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},n}(t.Scheduler);return ji.AsyncScheduler=r,ji}function ki(){if(Ci)return Fi;Ci=1;var e=Fi&&Fi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.AsapScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(Mi().AsyncScheduler);return Fi.AsapScheduler=t,Fi}function Ti(){return xi||(xi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var t=Si(),r=ki();e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(ai)),ai}var Ii,Li={};function Ri(){return Ii||(Ii=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=vi(),r=Mi();e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(Li)),Li}var Ui,Ni={},$i={};function qi(){if(Ui)return $i;Ui=1;var e=$i&&$i.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($i,"__esModule",{value:!0}),$i.QueueAction=void 0;var t=function(t){function r(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(r,t),r.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},r.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},r.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},r}(vi().AsyncAction);return $i.QueueAction=t,$i}var zi,Wi,Vi={};function Gi(){if(zi)return Vi;zi=1;var e=Vi&&Vi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.QueueScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(Mi().AsyncScheduler);return Vi.QueueScheduler=t,Vi}function Ki(){return Wi||(Wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=qi(),r=Gi();e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(Ni)),Ni}var Yi,Hi={},Ji={};function Qi(){if(Yi)return Ji;Yi=1;var e=Ji&&Ji.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.AnimationFrameAction=void 0;var t=vi(),r=No(),n=function(t){function n(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(n,t),n.prototype.requestAsyncId=function(e,n,o){return void 0===o&&(o=0),null!==o&&o>0?t.prototype.requestAsyncId.call(this,e,n,o):(e.actions.push(this),e._scheduled||(e._scheduled=r.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},n.prototype.recycleAsyncId=function(e,n,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,o);var u=e.actions;null!=n&&n===e._scheduled&&(null===(i=u[u.length-1])||void 0===i?void 0:i.id)!==n&&(r.animationFrameProvider.cancelAnimationFrame(n),e._scheduled=void 0)},n}(t.AsyncAction);return Ji.AnimationFrameAction=n,Ji}var Xi,Zi,eu={};function tu(){if(Xi)return eu;Xi=1;var e=eu&&eu.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(eu,"__esModule",{value:!0}),eu.AnimationFrameScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(Mi().AsyncScheduler);return eu.AnimationFrameScheduler=t,eu}function ru(){return Zi||(Zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=Qi(),r=tu();e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(Hi)),Hi}var nu,ou={};function iu(){if(nu)return ou;nu=1;var e=ou&&ou.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ou,"__esModule",{value:!0}),ou.VirtualAction=ou.VirtualTimeScheduler=void 0;var t=vi(),r=qn(),n=function(t){function r(e,r){void 0===e&&(e=o),void 0===r&&(r=1/0);var n=t.call(this,e,function(){return n.frame})||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return e(r,t),r.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},r.frameTimeFactor=10,r}(Mi().AsyncScheduler);ou.VirtualTimeScheduler=n;var o=function(t){function n(e,r,n){void 0===n&&(n=e.index+=1);var o=t.call(this,e,r)||this;return o.scheduler=e,o.work=r,o.index=n,o.active=!0,o.index=e.index=n,o}return e(n,t),n.prototype.schedule=function(e,o){if(void 0===o&&(o=0),Number.isFinite(o)){if(!this.id)return t.prototype.schedule.call(this,e,o);this.active=!1;var i=new n(this.scheduler,this.work);return this.add(i),i.schedule(e,o)}return r.Subscription.EMPTY},n.prototype.requestAsyncId=function(e,t,r){void 0===r&&(r=0),this.delay=e.frame+r;var o=e.actions;return o.push(this),o.sort(n.sortActions),1},n.prototype.recycleAsyncId=function(e,t,r){},n.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},n.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},n}(t.AsyncAction);return ou.VirtualAction=o,ou}var uu,au={},cu={};function su(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=go();e.EMPTY=new t.Observable(function(e){return e.complete()}),e.empty=function(r){return r?function(e){return new t.Observable(function(t){return e.schedule(function(){return t.complete()})})}(r):e.EMPTY}}(cu)),cu}var lu,fu,du={},pu={},hu={};function bu(){if(lu)return hu;lu=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.isScheduler=void 0;var e=jn();return hu.isScheduler=function(t){return t&&e.isFunction(t.schedule)},hu}function vu(){if(fu)return pu;fu=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.popNumber=pu.popScheduler=pu.popResultSelector=void 0;var e=jn(),t=bu();function r(e){return e[e.length-1]}return pu.popResultSelector=function(t){return e.isFunction(r(t))?t.pop():void 0},pu.popScheduler=function(e){return t.isScheduler(r(e))?e.pop():void 0},pu.popNumber=function(e,t){return"number"==typeof r(e)?e.pop():t},pu}var yu,mu={},Du={},gu={},wu={},_u={};function Ou(){return yu||(yu=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.isArrayLike=void 0,_u.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}),_u}var Su,Eu={};function Pu(){if(Su)return Eu;Su=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.isPromise=void 0;var e=jn();return Eu.isPromise=function(t){return e.isFunction(null==t?void 0:t.then)},Eu}var Cu,xu={};function Fu(){if(Cu)return xu;Cu=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.isInteropObservable=void 0;var e=fo(),t=jn();return xu.isInteropObservable=function(r){return t.isFunction(r[e.observable])},xu}var ju,Bu={};function Au(){if(ju)return Bu;ju=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.isAsyncIterable=void 0;var e=jn();return Bu.isAsyncIterable=function(t){return Symbol.asyncIterator&&e.isFunction(null==t?void 0:t[Symbol.asyncIterator])},Bu}var Mu,ku={};function Tu(){if(Mu)return ku;return Mu=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createInvalidObservableTypeError=void 0,ku.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")},ku}var Iu,Lu,Ru={},Uu={};function Nu(){if(Iu)return Uu;function e(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}return Iu=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.iterator=Uu.getSymbolIterator=void 0,Uu.getSymbolIterator=e,Uu.iterator=e(),Uu}function $u(){if(Lu)return Ru;Lu=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.isIterable=void 0;var e=Nu(),t=jn();return Ru.isIterable=function(r){return t.isFunction(null==r?void 0:r[e.iterator])},Ru}var qu,zu,Wu={};function Vu(){if(qu)return Wu;qu=1;var e=Wu&&Wu.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},t=Wu&&Wu.__await||function(e){return this instanceof t?(this.v=e,this):new t(e)},r=Wu&&Wu.__asyncGenerator||function(e,r,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,i=n.apply(e,r||[]),u=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){i[e]&&(o[e]=function(t){return new Promise(function(r,n){u.push([e,t,r,n])>1||c(e,t)})})}function c(e,r){try{(n=i[e](r)).value instanceof t?Promise.resolve(n.value.v).then(s,l):f(u[0][2],n)}catch(e){f(u[0][3],e)}var n}function s(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),u.shift(),u.length&&c(u[0][0],u[0][1])}};Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.isReadableStreamLike=Wu.readableStreamLikeToAsyncGenerator=void 0;var n=jn();return Wu.readableStreamLikeToAsyncGenerator=function(n){return r(this,arguments,function(){var r,o,i;return e(this,function(e){switch(e.label){case 0:r=n.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,t(r.read())];case 3:return o=e.sent(),i=o.value,o.done?[4,t(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,t(i)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})},Wu.isReadableStreamLike=function(e){return n.isFunction(null==e?void 0:e.getReader)},Wu}function Gu(){if(zu)return wu;zu=1;var e=wu&&wu.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function u(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(u,a)}c((n=n.apply(e,t||[])).next())})},t=wu&&wu.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},r=wu&&wu.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof n?n(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}},n=wu&&wu.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wu,"__esModule",{value:!0}),wu.fromReadableStreamLike=wu.fromAsyncIterable=wu.fromIterable=wu.fromPromise=wu.fromArrayLike=wu.fromInteropObservable=wu.innerFrom=void 0;var o=Ou(),i=Pu(),u=go(),a=Fu(),c=Au(),s=Tu(),l=$u(),f=Vu(),d=jn(),p=Qn(),h=fo();function b(e){return new u.Observable(function(t){var r=e[h.observable]();if(d.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function v(e){return new u.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function y(e){return new u.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,p.reportUnhandledError)})}function m(e){return new u.Observable(function(t){var r,o;try{for(var i=n(e),u=i.next();!u.done;u=i.next()){var a=u.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}t.complete()})}function D(n){return new u.Observable(function(o){(function(n,o){var i,u,a,c;return e(this,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:t.trys.push([0,5,6,11]),i=r(n),t.label=1;case 1:return[4,i.next()];case 2:if((u=t.sent()).done)return[3,4];if(e=u.value,o.next(e),o.closed)return[2];t.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=t.sent(),a={error:s},[3,11];case 6:return t.trys.push([6,,9,10]),u&&!u.done&&(c=i.return)?[4,c.call(i)]:[3,8];case 7:t.sent(),t.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return o.complete(),[2]}})})})(n,o).catch(function(e){return o.error(e)})})}function g(e){return D(f.readableStreamLikeToAsyncGenerator(e))}return wu.innerFrom=function(e){if(e instanceof u.Observable)return e;if(null!=e){if(a.isInteropObservable(e))return b(e);if(o.isArrayLike(e))return v(e);if(i.isPromise(e))return y(e);if(c.isAsyncIterable(e))return D(e);if(l.isIterable(e))return m(e);if(f.isReadableStreamLike(e))return g(e)}throw s.createInvalidObservableTypeError(e)},wu.fromInteropObservable=b,wu.fromArrayLike=v,wu.fromPromise=y,wu.fromIterable=m,wu.fromAsyncIterable=D,wu.fromReadableStreamLike=g,wu}var Ku,Yu,Hu={},Ju={};function Qu(){if(Ku)return Ju;return Ku=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.executeSchedule=void 0,Ju.executeSchedule=function(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i},Ju}function Xu(){if(Yu)return Hu;Yu=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.observeOn=void 0;var e=Qu(),t=Eo(),r=jo();return Hu.observeOn=function(n,o){return void 0===o&&(o=0),t.operate(function(t,i){t.subscribe(r.createOperatorSubscriber(i,function(t){return e.executeSchedule(i,n,function(){return i.next(t)},o)},function(){return e.executeSchedule(i,n,function(){return i.complete()},o)},function(t){return e.executeSchedule(i,n,function(){return i.error(t)},o)}))})},Hu}var Zu,ea,ta={};function ra(){if(Zu)return ta;Zu=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.subscribeOn=void 0;var e=Eo();return ta.subscribeOn=function(t,r){return void 0===r&&(r=0),e.operate(function(e,n){n.add(t.schedule(function(){return e.subscribe(n)},r))})},ta}function na(){if(ea)return gu;ea=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.scheduleObservable=void 0;var e=Gu(),t=Xu(),r=ra();return gu.scheduleObservable=function(n,o){return e.innerFrom(n).pipe(r.subscribeOn(o),t.observeOn(o))},gu}var oa,ia={};function ua(){if(oa)return ia;oa=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.schedulePromise=void 0;var e=Gu(),t=Xu(),r=ra();return ia.schedulePromise=function(n,o){return e.innerFrom(n).pipe(r.subscribeOn(o),t.observeOn(o))},ia}var aa,ca={};function sa(){if(aa)return ca;aa=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.scheduleArray=void 0;var e=go();return ca.scheduleArray=function(t,r){return new e.Observable(function(e){var n=0;return r.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})},ca}var la,fa={};function da(){if(la)return fa;la=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.scheduleIterable=void 0;var e=go(),t=Nu(),r=jn(),n=Qu();return fa.scheduleIterable=function(o,i){return new e.Observable(function(e){var u;return n.executeSchedule(e,i,function(){u=o[t.iterator](),n.executeSchedule(e,i,function(){var t,r,n;try{r=(t=u.next()).value,n=t.done}catch(t){return void e.error(t)}n?e.complete():e.next(r)},0,!0)}),function(){return r.isFunction(null==u?void 0:u.return)&&u.return()}})},fa}var pa,ha={};function ba(){if(pa)return ha;pa=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.scheduleAsyncIterable=void 0;var e=go(),t=Qu();return ha.scheduleAsyncIterable=function(r,n){if(!r)throw new Error("Iterable cannot be null");return new e.Observable(function(e){t.executeSchedule(e,n,function(){var o=r[Symbol.asyncIterator]();t.executeSchedule(e,n,function(){o.next().then(function(t){t.done?e.complete():e.next(t.value)})},0,!0)})})},ha}var va,ya,ma,Da,ga={};function wa(){if(va)return ga;va=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.scheduleReadableStreamLike=void 0;var e=ba(),t=Vu();return ga.scheduleReadableStreamLike=function(r,n){return e.scheduleAsyncIterable(t.readableStreamLikeToAsyncGenerator(r),n)},ga}function _a(){if(ya)return Du;ya=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.scheduled=void 0;var e=na(),t=ua(),r=sa(),n=da(),o=ba(),i=Fu(),u=Pu(),a=Ou(),c=$u(),s=Au(),l=Tu(),f=Vu(),d=wa();return Du.scheduled=function(p,h){if(null!=p){if(i.isInteropObservable(p))return e.scheduleObservable(p,h);if(a.isArrayLike(p))return r.scheduleArray(p,h);if(u.isPromise(p))return t.schedulePromise(p,h);if(s.isAsyncIterable(p))return o.scheduleAsyncIterable(p,h);if(c.isIterable(p))return n.scheduleIterable(p,h);if(f.isReadableStreamLike(p))return d.scheduleReadableStreamLike(p,h)}throw l.createInvalidObservableTypeError(p)},Du}function Oa(){if(ma)return mu;ma=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.from=void 0;var e=_a(),t=Gu();return mu.from=function(r,n){return n?e.scheduled(r,n):t.innerFrom(r)},mu}function Sa(){if(Da)return du;Da=1,Object.defineProperty(du,"__esModule",{value:!0}),du.of=void 0;var e=vu(),t=Oa();return du.of=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.popScheduler(r);return t.from(r,o)},du}var Ea,Pa,Ca={};function xa(){if(Ea)return Ca;Ea=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.throwError=void 0;var e=go(),t=jn();return Ca.throwError=function(r,n){var o=t.isFunction(r)?r:function(){return r},i=function(e){return e.error(o())};return new e.Observable(n?function(e){return n.schedule(i,0,e)}:i)},Ca}function Fa(){return Pa||(Pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t,r=su(),n=Sa(),o=xa(),i=jn();(t=e.NotificationKind||(e.NotificationKind={})).NEXT="N",t.ERROR="E",t.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return a(this,e)},e.prototype.do=function(e,t,r){var n=this,o=n.kind,i=n.value,u=n.error;return"N"===o?null==e?void 0:e(i):"E"===o?null==t?void 0:t(u):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return i.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,i=e.value,u=e.error,a="N"===t?n.of(i):"E"===t?o.throwError(function(){return u}):"C"===t?r.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function a(e,t){var r,n,o,i=e,u=i.kind,a=i.value,c=i.error;if("string"!=typeof u)throw new TypeError('Invalid notification, missing "kind"');"N"===u?null===(r=t.next)||void 0===r||r.call(t,a):"E"===u?null===(n=t.error)||void 0===n||n.call(t,c):null===(o=t.complete)||void 0===o||o.call(t)}e.Notification=u,e.observeNotification=a}(au)),au}var ja,Ba={};function Aa(){if(ja)return Ba;ja=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.isObservable=void 0;var e=go(),t=jn();return Ba.isObservable=function(r){return!!r&&(r instanceof e.Observable||t.isFunction(r.lift)&&t.isFunction(r.subscribe))},Ba}var Ma,ka,Ta={},Ia={};function La(){if(Ma)return Ia;Ma=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.EmptyError=void 0;var e=In();return Ia.EmptyError=e.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Ia}function Ra(){if(ka)return Ta;ka=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.lastValueFrom=void 0;var e=La();return Ta.lastValueFrom=function(t,r){var n="object"==typeof r;return new Promise(function(o,i){var u,a=!1;t.subscribe({next:function(e){u=e,a=!0},error:i,complete:function(){a?o(u):n?o(r.defaultValue):i(new e.EmptyError)}})})},Ta}var Ua,Na={};function $a(){if(Ua)return Na;Ua=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.firstValueFrom=void 0;var e=La(),t=co();return Na.firstValueFrom=function(r,n){var o="object"==typeof n;return new Promise(function(i,u){var a=new t.SafeSubscriber({next:function(e){i(e),a.unsubscribe()},error:u,complete:function(){o?i(n.defaultValue):u(new e.EmptyError)}});r.subscribe(a)})},Na}var qa,za={};function Wa(){if(qa)return za;qa=1,Object.defineProperty(za,"__esModule",{value:!0}),za.ArgumentOutOfRangeError=void 0;var e=In();return za.ArgumentOutOfRangeError=e.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),za}var Va,Ga={};function Ka(){if(Va)return Ga;Va=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.NotFoundError=void 0;var e=In();return Ga.NotFoundError=e.createErrorClass(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}),Ga}var Ya,Ha={};function Ja(){if(Ya)return Ha;Ya=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.SequenceError=void 0;var e=In();return Ha.SequenceError=e.createErrorClass(function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}),Ha}var Qa,Xa,Za={},ec={};function tc(){if(Qa)return ec;return Qa=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.isValidDate=void 0,ec.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},ec}function rc(){return Xa||(Xa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=Ri(),r=tc(),n=Eo(),o=Gu(),i=In(),u=jo(),a=Qu();function c(t){throw new e.TimeoutError(t)}e.TimeoutError=i.createErrorClass(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}),e.timeout=function(e,i){var s=r.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,l=s.first,f=s.each,d=s.with,p=void 0===d?c:d,h=s.scheduler,b=void 0===h?null!=i?i:t.asyncScheduler:h,v=s.meta,y=void 0===v?null:v;if(null==l&&null==f)throw new TypeError("No timeout provided.");return n.operate(function(e,t){var r,n,i=null,c=0,s=function(e){n=a.executeSchedule(t,b,function(){try{r.unsubscribe(),o.innerFrom(p({meta:y,lastValue:i,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};r=e.subscribe(u.createOperatorSubscriber(t,function(e){null==n||n.unsubscribe(),c++,t.next(i=e),f>0&&s(f)},void 0,void 0,function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null})),!c&&s(null!=l?"number"==typeof l?l:+l-b.now():f)})}}(Za)),Za}var nc,oc,ic,uc,ac={},cc={},sc={},lc={};function fc(){if(nc)return lc;nc=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.map=void 0;var e=Eo(),t=jo();return lc.map=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){o.next(r.call(n,e,i++))}))})},lc}function dc(){if(oc)return sc;oc=1;var e=sc&&sc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=sc&&sc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(sc,"__esModule",{value:!0}),sc.mapOneOrManyArgs=void 0;var r=fc(),n=Array.isArray;return sc.mapOneOrManyArgs=function(o){return r.map(function(r){return function(r,o){return n(o)?r.apply(void 0,t([],e(o))):r(o)}(o,r)})},sc}function pc(){if(ic)return cc;ic=1;var e=cc&&cc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=cc&&cc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(cc,"__esModule",{value:!0}),cc.bindCallbackInternals=void 0;var r=bu(),n=go(),o=ra(),i=dc(),u=Xu(),a=ii();return cc.bindCallbackInternals=function c(s,l,f,d){if(f){if(!r.isScheduler(f))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return c(s,l,d).apply(this,e).pipe(i.mapOneOrManyArgs(f))};d=f}return d?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return c(s,l).apply(this,e).pipe(o.subscribeOn(d),u.observeOn(d))}:function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=new a.AsyncSubject,c=!0;return new n.Observable(function(n){var i=u.subscribe(n);if(c){c=!1;var a=!1,f=!1;l.apply(r,t(t([],e(o)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(s){var r=e.shift();if(null!=r)return void u.error(r)}u.next(1<e.length?e:e[0]),f=!0,a&&u.complete()}])),f&&u.complete(),a=!0}return i})}},cc}function hc(){if(uc)return ac;uc=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.bindCallback=void 0;var e=pc();return ac.bindCallback=function(t,r,n){return e.bindCallbackInternals(!1,t,r,n)},ac}var bc,vc={};function yc(){if(bc)return vc;bc=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.bindNodeCallback=void 0;var e=pc();return vc.bindNodeCallback=function(t,r,n){return e.bindCallbackInternals(!0,t,r,n)},vc}var mc,Dc={},gc={};function wc(){if(mc)return gc;mc=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.argsArgArrayOrObject=void 0;var e=Array.isArray,t=Object.getPrototypeOf,r=Object.prototype,n=Object.keys;return gc.argsArgArrayOrObject=function(o){if(1===o.length){var i=o[0];if(e(i))return{args:i,keys:null};if((a=i)&&"object"==typeof a&&t(a)===r){var u=n(i);return{args:u.map(function(e){return i[e]}),keys:u}}}var a;return{args:o,keys:null}},gc}var _c,Oc,Sc={};function Ec(){if(_c)return Sc;return _c=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.createObject=void 0,Sc.createObject=function(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})},Sc}function Pc(){if(Oc)return Dc;Oc=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.combineLatestInit=Dc.combineLatest=void 0;var e=go(),t=wc(),r=Oa(),n=mo(),o=dc(),i=vu(),u=Ec(),a=jo(),c=Qu();function s(e,t,o){return void 0===o&&(o=n.identity),function(n){l(t,function(){for(var i=e.length,u=new Array(i),c=i,s=i,f=function(i){l(t,function(){var l=r.from(e[i],t),f=!1;l.subscribe(a.createOperatorSubscriber(n,function(e){u[i]=e,f||(f=!0,s--),s||n.next(o(u.slice()))},function(){--c||n.complete()}))},n)},d=0;d<i;d++)f(d)},n)}}function l(e,t,r){e?c.executeSchedule(r,e,t):t()}return Dc.combineLatest=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var l=i.popScheduler(a),f=i.popResultSelector(a),d=t.argsArgArrayOrObject(a),p=d.args,h=d.keys;if(0===p.length)return r.from([],l);var b=new e.Observable(s(p,l,h?function(e){return u.createObject(h,e)}:n.identity));return f?b.pipe(o.mapOneOrManyArgs(f)):b},Dc.combineLatestInit=s,Dc}var Cc,xc,Fc,jc,Bc,Ac={},Mc={},kc={},Tc={},Ic={};function Lc(){if(Cc)return Ic;Cc=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.mergeInternals=void 0;var e=Gu(),t=Qu(),r=jo();return Ic.mergeInternals=function(n,o,i,u,a,c,s,l){var f=[],d=0,p=0,h=!1,b=function(){!h||f.length||d||o.complete()},v=function(e){return d<u?y(e):f.push(e)},y=function(n){c&&o.next(n),d++;var l=!1;e.innerFrom(i(n,p++)).subscribe(r.createOperatorSubscriber(o,function(e){null==a||a(e),c?v(e):o.next(e)},function(){l=!0},void 0,function(){if(l)try{d--;for(var e=function(){var e=f.shift();s?t.executeSchedule(o,s,function(){return y(e)}):y(e)};f.length&&d<u;)e();b()}catch(e){o.error(e)}}))};return n.subscribe(r.createOperatorSubscriber(o,v,function(){h=!0,b()})),function(){null==l||l()}},Ic}function Rc(){if(xc)return Tc;xc=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.mergeMap=void 0;var e=fc(),t=Gu(),r=Eo(),n=Lc(),o=jn();return Tc.mergeMap=function i(u,a,c){return void 0===c&&(c=1/0),o.isFunction(a)?i(function(r,n){return e.map(function(e,t){return a(r,e,n,t)})(t.innerFrom(u(r,n)))},c):("number"==typeof a&&(c=a),r.operate(function(e,t){return n.mergeInternals(e,t,u,c)}))},Tc}function Uc(){if(Fc)return kc;Fc=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.mergeAll=void 0;var e=Rc(),t=mo();return kc.mergeAll=function(r){return void 0===r&&(r=1/0),e.mergeMap(t.identity,r)},kc}function Nc(){if(jc)return Mc;jc=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.concatAll=void 0;var e=Uc();return Mc.concatAll=function(){return e.mergeAll(1)},Mc}function $c(){if(Bc)return Ac;Bc=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.concat=void 0;var e=Nc(),t=vu(),r=Oa();return Ac.concat=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.concatAll()(r.from(n,t.popScheduler(n)))},Ac}var qc,zc,Wc={},Vc={};function Gc(){if(qc)return Vc;qc=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.defer=void 0;var e=go(),t=Gu();return Vc.defer=function(r){return new e.Observable(function(e){t.innerFrom(r()).subscribe(e)})},Vc}function Kc(){if(zc)return Wc;zc=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.connectable=void 0;var e=Ko(),t=go(),r=Gc(),n={connector:function(){return new e.Subject},resetOnDisconnect:!0};return Wc.connectable=function(e,o){void 0===o&&(o=n);var i=null,u=o.connector,a=o.resetOnDisconnect,c=void 0===a||a,s=u(),l=new t.Observable(function(e){return s.subscribe(e)});return l.connect=function(){return i&&!i.closed||(i=r.defer(function(){return e}).subscribe(s),c&&i.add(function(){return s=u()})),i},l},Wc}var Yc,Hc={};function Jc(){if(Yc)return Hc;Yc=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.forkJoin=void 0;var e=go(),t=wc(),r=Gu(),n=vu(),o=jo(),i=dc(),u=Ec();return Hc.forkJoin=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var s=n.popResultSelector(a),l=t.argsArgArrayOrObject(a),f=l.args,d=l.keys,p=new e.Observable(function(e){var t=f.length;if(t)for(var n=new Array(t),i=t,a=t,c=function(t){var c=!1;r.innerFrom(f[t]).subscribe(o.createOperatorSubscriber(e,function(e){c||(c=!0,a--),n[t]=e},function(){return i--},void 0,function(){i&&c||(a||e.next(d?u.createObject(d,n):n),e.complete())}))},s=0;s<t;s++)c(s);else e.complete()});return s?p.pipe(i.mapOneOrManyArgs(s)):p},Hc}var Qc,Xc={};function Zc(){if(Qc)return Xc;Qc=1;var e=Xc&&Xc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.fromEvent=void 0;var t=Gu(),r=go(),n=Rc(),o=Ou(),i=jn(),u=dc(),a=["addListener","removeListener"],c=["addEventListener","removeEventListener"],s=["on","off"];function l(e,t){return function(r){return function(n){return e[r](t,n)}}}return Xc.fromEvent=function f(d,p,h,b){if(i.isFunction(h)&&(b=h,h=void 0),b)return f(d,p,h).pipe(u.mapOneOrManyArgs(b));var v=e(function(e){return i.isFunction(e.addEventListener)&&i.isFunction(e.removeEventListener)}(d)?c.map(function(e){return function(t){return d[e](p,t,h)}}):function(e){return i.isFunction(e.addListener)&&i.isFunction(e.removeListener)}(d)?a.map(l(d,p)):function(e){return i.isFunction(e.on)&&i.isFunction(e.off)}(d)?s.map(l(d,p)):[],2),y=v[0],m=v[1];if(!y&&o.isArrayLike(d))return n.mergeMap(function(e){return f(e,p,h)})(t.innerFrom(d));if(!y)throw new TypeError("Invalid event target");return new r.Observable(function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return y(t),function(){return m(t)}})},Xc}var es,ts={};function rs(){if(es)return ts;es=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.fromEventPattern=void 0;var e=go(),t=jn(),r=dc();return ts.fromEventPattern=function n(o,i,u){return u?n(o,i).pipe(r.mapOneOrManyArgs(u)):new e.Observable(function(e){var r=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},n=o(r);return t.isFunction(i)?function(){return i(r,n)}:void 0})},ts}var ns,os={};function is(){if(ns)return os;ns=1;var e=os&&os.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(os,"__esModule",{value:!0}),os.generate=void 0;var t=mo(),r=bu(),n=Gc(),o=da();return os.generate=function(i,u,a,c,s){var l,f,d,p;function h(){var t;return e(this,function(e){switch(e.label){case 0:t=p,e.label=1;case 1:return u&&!u(t)?[3,4]:[4,d(t)];case 2:e.sent(),e.label=3;case 3:return t=a(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(p=(l=i).initialState,u=l.condition,a=l.iterate,f=l.resultSelector,d=void 0===f?t.identity:f,s=l.scheduler):(p=i,!c||r.isScheduler(c)?(d=t.identity,s=c):d=c),n.defer(s?function(){return o.scheduleIterable(h(),s)}:h)},os}var us,as={};function cs(){if(us)return as;us=1,Object.defineProperty(as,"__esModule",{value:!0}),as.iif=void 0;var e=Gc();return as.iif=function(t,r,n){return e.defer(function(){return t()?r:n})},as}var ss,ls,fs={},ds={};function ps(){if(ss)return ds;ss=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.timer=void 0;var e=go(),t=Ri(),r=bu(),n=tc();return ds.timer=function(o,i,u){void 0===o&&(o=0),void 0===u&&(u=t.async);var a=-1;return null!=i&&(r.isScheduler(i)?u=i:a=i),new e.Observable(function(e){var t=n.isValidDate(o)?+o-u.now():o;t<0&&(t=0);var r=0;return u.schedule(function(){e.closed||(e.next(r++),0<=a?this.schedule(void 0,a):e.complete())},t)})},ds}function hs(){if(ls)return fs;ls=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.interval=void 0;var e=Ri(),t=ps();return fs.interval=function(r,n){return void 0===r&&(r=0),void 0===n&&(n=e.asyncScheduler),r<0&&(r=0),t.timer(r,r,n)},fs}var bs,vs={};function ys(){if(bs)return vs;bs=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.merge=void 0;var e=Uc(),t=Gu(),r=su(),n=vu(),o=Oa();return vs.merge=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];var a=n.popScheduler(i),c=n.popNumber(i,1/0),s=i;return s.length?1===s.length?t.innerFrom(s[0]):e.mergeAll(c)(o.from(s,a)):r.EMPTY},vs}var ms,Ds={};function gs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var t=go(),r=eo();e.NEVER=new t.Observable(r.noop),e.never=function(){return e.NEVER}}(Ds)),Ds}var ws,_s,Os={},Ss={};function Es(){if(ws)return Ss;ws=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.argsOrArgArray=void 0;var e=Array.isArray;return Ss.argsOrArgArray=function(t){return 1===t.length&&e(t[0])?t[0]:t},Ss}function Ps(){if(_s)return Os;_s=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.onErrorResumeNext=void 0;var e=go(),t=Es(),r=jo(),n=eo(),o=Gu();return Os.onErrorResumeNext=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];var a=t.argsOrArgArray(i);return new e.Observable(function(e){var t=0,i=function(){if(t<a.length){var u=void 0;try{u=o.innerFrom(a[t++])}catch(e){return void i()}var c=new r.OperatorSubscriber(e,void 0,n.noop,n.noop);u.subscribe(c),c.add(i)}else e.complete()};i()})},Os}var Cs,xs={};function Fs(){if(Cs)return xs;Cs=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.pairs=void 0;var e=Oa();return xs.pairs=function(t,r){return e.from(Object.entries(t),r)},xs}var js,Bs={},As={};function Ms(){if(js)return As;return js=1,Object.defineProperty(As,"__esModule",{value:!0}),As.not=void 0,As.not=function(e,t){return function(r,n){return!e.call(t,r,n)}},As}var ks,Ts,Is={};function Ls(){if(ks)return Is;ks=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.filter=void 0;var e=Eo(),t=jo();return Is.filter=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){return r.call(n,e,i++)&&o.next(e)}))})},Is}function Rs(){if(Ts)return Bs;Ts=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.partition=void 0;var e=Ms(),t=Ls(),r=Gu();return Bs.partition=function(n,o,i){return[t.filter(o,i)(r.innerFrom(n)),t.filter(e.not(o,i))(r.innerFrom(n))]},Bs}var Us,Ns={};function $s(){if(Us)return Ns;Us=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.raceInit=Ns.race=void 0;var e=go(),t=Gu(),r=Es(),n=jo();function o(e){return function(r){for(var o=[],i=function(i){o.push(t.innerFrom(e[i]).subscribe(n.createOperatorSubscriber(r,function(e){if(o){for(var t=0;t<o.length;t++)t!==i&&o[t].unsubscribe();o=null}r.next(e)})))},u=0;o&&!r.closed&&u<e.length;u++)i(u)}}return Ns.race=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return 1===(n=r.argsOrArgArray(n)).length?t.innerFrom(n[0]):new e.Observable(o(n))},Ns.raceInit=o,Ns}var qs,zs={};function Ws(){if(qs)return zs;qs=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.range=void 0;var e=go(),t=su();return zs.range=function(r,n,o){if(null==n&&(n=r,r=0),n<=0)return t.EMPTY;var i=n+r;return new e.Observable(o?function(e){var t=r;return o.schedule(function(){t<i?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<i&&!e.closed;)e.next(t++);e.complete()})},zs}var Vs,Gs={};function Ks(){if(Vs)return Gs;Vs=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.using=void 0;var e=go(),t=Gu(),r=su();return Gs.using=function(n,o){return new e.Observable(function(e){var i=n(),u=o(i);return(u?t.innerFrom(u):r.EMPTY).subscribe(e),function(){i&&i.unsubscribe()}})},Gs}var Ys,Hs={};function Js(){if(Ys)return Hs;Ys=1;var e=Hs&&Hs.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Hs&&Hs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.zip=void 0;var r=go(),n=Gu(),o=Es(),i=su(),u=jo(),a=vu();return Hs.zip=function(){for(var c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];var l=a.popResultSelector(c),f=o.argsOrArgArray(c);return f.length?new r.Observable(function(r){var o=f.map(function(){return[]}),i=f.map(function(){return!1});r.add(function(){o=i=null});for(var a=function(a){n.innerFrom(f[a]).subscribe(u.createOperatorSubscriber(r,function(n){if(o[a].push(n),o.every(function(e){return e.length})){var u=o.map(function(e){return e.shift()});r.next(l?l.apply(void 0,t([],e(u))):u),o.some(function(e,t){return!e.length&&i[t]})&&r.complete()}},function(){i[a]=!0,!o[a].length&&r.complete()}))},c=0;!r.closed&&c<f.length;c++)a(c);return function(){o=i=null}}):i.EMPTY},Hs}var Qs,Xs={};function Zs(){return Qs||(Qs=1,Object.defineProperty(Xs,"__esModule",{value:!0})),Xs}var el,tl={};function rl(){if(el)return tl;el=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.audit=void 0;var e=Eo(),t=Gu(),r=jo();return tl.audit=function(n){return e.operate(function(e,o){var i=!1,u=null,a=null,c=!1,s=function(){if(null==a||a.unsubscribe(),a=null,i){i=!1;var e=u;u=null,o.next(e)}c&&o.complete()},l=function(){a=null,c&&o.complete()};e.subscribe(r.createOperatorSubscriber(o,function(e){i=!0,u=e,a||t.innerFrom(n(e)).subscribe(a=r.createOperatorSubscriber(o,s,l))},function(){c=!0,(!i||!a||a.closed)&&o.complete()}))})},tl}var nl,ol={};function il(){if(nl)return ol;nl=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.auditTime=void 0;var e=Ri(),t=rl(),r=ps();return ol.auditTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.audit(function(){return r.timer(n,o)})},ol}var ul,al={};function cl(){if(ul)return al;ul=1,Object.defineProperty(al,"__esModule",{value:!0}),al.buffer=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return al.buffer=function(o){return e.operate(function(e,i){var u=[];return e.subscribe(r.createOperatorSubscriber(i,function(e){return u.push(e)},function(){i.next(u),i.complete()})),n.innerFrom(o).subscribe(r.createOperatorSubscriber(i,function(){var e=u;u=[],i.next(e)},t.noop)),function(){u=null}})},al}var sl,ll={};function fl(){if(sl)return ll;sl=1;var e=ll&&ll.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ll,"__esModule",{value:!0}),ll.bufferCount=void 0;var t=Eo(),r=jo(),n=$n();return ll.bufferCount=function(o,i){return void 0===i&&(i=null),i=null!=i?i:o,t.operate(function(t,u){var a=[],c=0;t.subscribe(r.createOperatorSubscriber(u,function(t){var r,s,l,f,d=null;c++%i===0&&a.push([]);try{for(var p=e(a),h=p.next();!h.done;h=p.next()){(y=h.value).push(t),o<=y.length&&(d=null!=d?d:[]).push(y)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(r)throw r.error}}if(d)try{for(var b=e(d),v=b.next();!v.done;v=b.next()){var y=v.value;n.arrRemove(a,y),u.next(y)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=b.return)&&f.call(b)}finally{if(l)throw l.error}}},function(){var t,r;try{for(var n=e(a),o=n.next();!o.done;o=n.next()){var i=o.value;u.next(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}u.complete()},void 0,function(){a=null}))})},ll}var dl,pl={};function hl(){if(dl)return pl;dl=1;var e=pl&&pl.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(pl,"__esModule",{value:!0}),pl.bufferTime=void 0;var t=qn(),r=Eo(),n=jo(),o=$n(),i=Ri(),u=vu(),a=Qu();return pl.bufferTime=function(c){for(var s,l,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=null!==(s=u.popScheduler(f))&&void 0!==s?s:i.asyncScheduler,h=null!==(l=f[0])&&void 0!==l?l:null,b=f[1]||1/0;return r.operate(function(r,i){var u=[],s=!1,l=function(e){var t=e.buffer;e.subs.unsubscribe(),o.arrRemove(u,e),i.next(t),s&&f()},f=function(){if(u){var e=new t.Subscription;i.add(e);var r={buffer:[],subs:e};u.push(r),a.executeSchedule(e,p,function(){return l(r)},c)}};null!==h&&h>=0?a.executeSchedule(i,p,f,h,!0):s=!0,f();var d=n.createOperatorSubscriber(i,function(t){var r,n,o=u.slice();try{for(var i=e(o),a=i.next();!a.done;a=i.next()){var c=a.value,s=c.buffer;s.push(t),b<=s.length&&l(c)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},function(){for(;null==u?void 0:u.length;)i.next(u.shift().buffer);null==d||d.unsubscribe(),i.complete(),i.unsubscribe()},void 0,function(){return u=null});r.subscribe(d)})},pl}var bl,vl={};function yl(){if(bl)return vl;bl=1;var e=vl&&vl.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(vl,"__esModule",{value:!0}),vl.bufferToggle=void 0;var t=qn(),r=Eo(),n=Gu(),o=jo(),i=eo(),u=$n();return vl.bufferToggle=function(a,c){return r.operate(function(r,s){var l=[];n.innerFrom(a).subscribe(o.createOperatorSubscriber(s,function(e){var r=[];l.push(r);var a=new t.Subscription;a.add(n.innerFrom(c(e)).subscribe(o.createOperatorSubscriber(s,function(){u.arrRemove(l,r),s.next(r),a.unsubscribe()},i.noop)))},i.noop)),r.subscribe(o.createOperatorSubscriber(s,function(t){var r,n;try{for(var o=e(l),i=o.next();!i.done;i=o.next()){i.value.push(t)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},function(){for(;l.length>0;)s.next(l.shift());s.complete()}))})},vl}var ml,Dl={};function gl(){if(ml)return Dl;ml=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.bufferWhen=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return Dl.bufferWhen=function(o){return e.operate(function(e,i){var u=null,a=null,c=function(){null==a||a.unsubscribe();var e=u;u=[],e&&i.next(e),n.innerFrom(o()).subscribe(a=r.createOperatorSubscriber(i,c,t.noop))};c(),e.subscribe(r.createOperatorSubscriber(i,function(e){return null==u?void 0:u.push(e)},function(){u&&i.next(u),i.complete()},void 0,function(){return u=a=null}))})},Dl}var wl,_l={};function Ol(){if(wl)return _l;wl=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.catchError=void 0;var e=Gu(),t=jo(),r=Eo();return _l.catchError=function n(o){return r.operate(function(r,i){var u,a=null,c=!1;a=r.subscribe(t.createOperatorSubscriber(i,void 0,void 0,function(t){u=e.innerFrom(o(t,n(o)(r))),a?(a.unsubscribe(),a=null,u.subscribe(i)):c=!0})),c&&(a.unsubscribe(),a=null,u.subscribe(i))})},_l}var Sl,El,Pl,Cl,xl,Fl,jl={},Bl={},Al={},Ml={},kl={},Tl={};function Il(){if(Sl)return Tl;Sl=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.scanInternals=void 0;var e=jo();return Tl.scanInternals=function(t,r,n,o,i){return function(u,a){var c=n,s=r,l=0;u.subscribe(e.createOperatorSubscriber(a,function(e){var r=l++;s=c?t(s,e,r):(c=!0,e),o&&a.next(s)},i&&function(){c&&a.next(s),a.complete()}))}},Tl}function Ll(){if(El)return kl;El=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.reduce=void 0;var e=Il(),t=Eo();return kl.reduce=function(r,n){return t.operate(e.scanInternals(r,n,arguments.length>=2,!1,!0))},kl}function Rl(){if(Pl)return Ml;Pl=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.toArray=void 0;var e=Ll(),t=Eo(),r=function(e,t){return e.push(t),e};return Ml.toArray=function(){return t.operate(function(t,n){e.reduce(r,[])(t).subscribe(n)})},Ml}function Ul(){if(Cl)return Al;Cl=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.joinAllInternals=void 0;var e=mo(),t=dc(),r=Do(),n=Rc(),o=Rl();return Al.joinAllInternals=function(i,u){return r.pipe(o.toArray(),n.mergeMap(function(e){return i(e)}),u?t.mapOneOrManyArgs(u):e.identity)},Al}function Nl(){if(xl)return Bl;xl=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.combineLatestAll=void 0;var e=Pc(),t=Ul();return Bl.combineLatestAll=function(r){return t.joinAllInternals(e.combineLatest,r)},Bl}function $l(){if(Fl)return jl;Fl=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.combineAll=void 0;var e=Nl();return jl.combineAll=e.combineLatestAll,jl}var ql,zl,Wl={},Vl={};function Gl(){if(ql)return Vl;ql=1;var e=Vl&&Vl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Vl&&Vl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.combineLatest=void 0;var r=Pc(),n=Eo(),o=Es(),i=dc(),u=Do(),a=vu();return Vl.combineLatest=function c(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var f=a.popResultSelector(s);return f?u.pipe(c.apply(void 0,t([],e(s))),i.mapOneOrManyArgs(f)):n.operate(function(n,i){r.combineLatestInit(t([n],e(o.argsOrArgArray(s))))(i)})},Vl}function Kl(){if(zl)return Wl;zl=1;var e=Wl&&Wl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Wl&&Wl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.combineLatestWith=void 0;var r=Gl();return Wl.combineLatestWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.combineLatest.apply(void 0,t([],e(n)))},Wl}var Yl,Hl={};function Jl(){if(Yl)return Hl;Yl=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.concatMap=void 0;var e=Rc(),t=jn();return Hl.concatMap=function(r,n){return t.isFunction(n)?e.mergeMap(r,n,1):e.mergeMap(r,1)},Hl}var Ql,Xl={};function Zl(){if(Ql)return Xl;Ql=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.concatMapTo=void 0;var e=Jl(),t=jn();return Xl.concatMapTo=function(r,n){return t.isFunction(n)?e.concatMap(function(){return r},n):e.concatMap(function(){return r})},Xl}var ef,tf,rf={},nf={};function of(){if(ef)return nf;ef=1;var e=nf&&nf.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=nf&&nf.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(nf,"__esModule",{value:!0}),nf.concat=void 0;var r=Eo(),n=Nc(),o=vu(),i=Oa();return nf.concat=function(){for(var u=[],a=0;a<arguments.length;a++)u[a]=arguments[a];var c=o.popScheduler(u);return r.operate(function(r,o){n.concatAll()(i.from(t([r],e(u)),c)).subscribe(o)})},nf}function uf(){if(tf)return rf;tf=1;var e=rf&&rf.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=rf&&rf.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(rf,"__esModule",{value:!0}),rf.concatWith=void 0;var r=of();return rf.concatWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.concat.apply(void 0,t([],e(n)))},rf}var af,cf,sf={},lf={};function ff(){if(af)return lf;af=1,Object.defineProperty(lf,"__esModule",{value:!0}),lf.fromSubscribable=void 0;var e=go();return lf.fromSubscribable=function(t){return new e.Observable(function(e){return t.subscribe(e)})},lf}function df(){if(cf)return sf;cf=1,Object.defineProperty(sf,"__esModule",{value:!0}),sf.connect=void 0;var e=Ko(),t=Gu(),r=Eo(),n=ff(),o={connector:function(){return new e.Subject}};return sf.connect=function(e,i){void 0===i&&(i=o);var u=i.connector;return r.operate(function(r,o){var i=u();t.innerFrom(e(n.fromSubscribable(i))).subscribe(o),o.add(r.subscribe(i))})},sf}var pf,hf={};function bf(){if(pf)return hf;pf=1,Object.defineProperty(hf,"__esModule",{value:!0}),hf.count=void 0;var e=Ll();return hf.count=function(t){return e.reduce(function(e,r,n){return!t||t(r,n)?e+1:e},0)},hf}var vf,yf={};function mf(){if(vf)return yf;vf=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.debounce=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return yf.debounce=function(o){return e.operate(function(e,i){var u=!1,a=null,c=null,s=function(){if(null==c||c.unsubscribe(),c=null,u){u=!1;var e=a;a=null,i.next(e)}};e.subscribe(r.createOperatorSubscriber(i,function(e){null==c||c.unsubscribe(),u=!0,a=e,c=r.createOperatorSubscriber(i,s,t.noop),n.innerFrom(o(e)).subscribe(c)},function(){s(),i.complete()},void 0,function(){a=c=null}))})},yf}var Df,gf={};function wf(){if(Df)return gf;Df=1,Object.defineProperty(gf,"__esModule",{value:!0}),gf.debounceTime=void 0;var e=Ri(),t=Eo(),r=jo();return gf.debounceTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.operate(function(e,t){var i=null,u=null,a=null,c=function(){if(i){i.unsubscribe(),i=null;var e=u;u=null,t.next(e)}};function s(){var e=a+n,r=o.now();if(r<e)return i=this.schedule(void 0,e-r),void t.add(i);c()}e.subscribe(r.createOperatorSubscriber(t,function(e){u=e,a=o.now(),i||(i=o.schedule(s,n),t.add(i))},function(){c(),t.complete()},void 0,function(){u=i=null}))})},gf}var _f,Of={};function Sf(){if(_f)return Of;_f=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.defaultIfEmpty=void 0;var e=Eo(),t=jo();return Of.defaultIfEmpty=function(r){return e.operate(function(e,n){var o=!1;e.subscribe(t.createOperatorSubscriber(n,function(e){o=!0,n.next(e)},function(){o||n.next(r),n.complete()}))})},Of}var Ef,Pf={},Cf={},xf={};function Ff(){if(Ef)return xf;Ef=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.take=void 0;var e=su(),t=Eo(),r=jo();return xf.take=function(n){return n<=0?function(){return e.EMPTY}:t.operate(function(e,t){var o=0;e.subscribe(r.createOperatorSubscriber(t,function(e){++o<=n&&(t.next(e),n<=o&&t.complete())}))})},xf}var jf,Bf={};function Af(){if(jf)return Bf;jf=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.ignoreElements=void 0;var e=Eo(),t=jo(),r=eo();return Bf.ignoreElements=function(){return e.operate(function(e,n){e.subscribe(t.createOperatorSubscriber(n,r.noop))})},Bf}var Mf,kf,Tf,If={};function Lf(){if(Mf)return If;Mf=1,Object.defineProperty(If,"__esModule",{value:!0}),If.mapTo=void 0;var e=fc();return If.mapTo=function(t){return e.map(function(){return t})},If}function Rf(){if(kf)return Cf;kf=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.delayWhen=void 0;var e=$c(),t=Ff(),r=Af(),n=Lf(),o=Rc(),i=Gu();return Cf.delayWhen=function u(a,c){return c?function(n){return e.concat(c.pipe(t.take(1),r.ignoreElements()),n.pipe(u(a)))}:o.mergeMap(function(e,r){return i.innerFrom(a(e,r)).pipe(t.take(1),n.mapTo(e))})},Cf}function Uf(){if(Tf)return Pf;Tf=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.delay=void 0;var e=Ri(),t=Rf(),r=ps();return Pf.delay=function(n,o){void 0===o&&(o=e.asyncScheduler);var i=r.timer(n,o);return t.delayWhen(function(){return i})},Pf}var Nf,$f={};function qf(){if(Nf)return $f;Nf=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.dematerialize=void 0;var e=Fa(),t=Eo(),r=jo();return $f.dematerialize=function(){return t.operate(function(t,n){t.subscribe(r.createOperatorSubscriber(n,function(t){return e.observeNotification(t,n)}))})},$f}var zf,Wf={};function Vf(){if(zf)return Wf;zf=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.distinct=void 0;var e=Eo(),t=jo(),r=eo(),n=Gu();return Wf.distinct=function(o,i){return e.operate(function(e,u){var a=new Set;e.subscribe(t.createOperatorSubscriber(u,function(e){var t=o?o(e):e;a.has(t)||(a.add(t),u.next(e))})),i&&n.innerFrom(i).subscribe(t.createOperatorSubscriber(u,function(){return a.clear()},r.noop))})},Wf}var Gf,Kf={};function Yf(){if(Gf)return Kf;Gf=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.distinctUntilChanged=void 0;var e=mo(),t=Eo(),r=jo();function n(e,t){return e===t}return Kf.distinctUntilChanged=function(o,i){return void 0===i&&(i=e.identity),o=null!=o?o:n,t.operate(function(e,t){var n,u=!0;e.subscribe(r.createOperatorSubscriber(t,function(e){var r=i(e);!u&&o(n,r)||(u=!1,n=r,t.next(e))}))})},Kf}var Hf,Jf={};function Qf(){if(Hf)return Jf;Hf=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.distinctUntilKeyChanged=void 0;var e=Yf();return Jf.distinctUntilKeyChanged=function(t,r){return e.distinctUntilChanged(function(e,n){return r?r(e[t],n[t]):e[t]===n[t]})},Jf}var Xf,Zf,ed={},td={};function rd(){if(Xf)return td;Xf=1,Object.defineProperty(td,"__esModule",{value:!0}),td.throwIfEmpty=void 0;var e=La(),t=Eo(),r=jo();function n(){return new e.EmptyError}return td.throwIfEmpty=function(e){return void 0===e&&(e=n),t.operate(function(t,n){var o=!1;t.subscribe(r.createOperatorSubscriber(n,function(e){o=!0,n.next(e)},function(){return o?n.complete():n.error(e())}))})},td}function nd(){if(Zf)return ed;Zf=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.elementAt=void 0;var e=Wa(),t=Ls(),r=rd(),n=Sf(),o=Ff();return ed.elementAt=function(i,u){if(i<0)throw new e.ArgumentOutOfRangeError;var a=arguments.length>=2;return function(c){return c.pipe(t.filter(function(e,t){return t===i}),o.take(1),a?n.defaultIfEmpty(u):r.throwIfEmpty(function(){return new e.ArgumentOutOfRangeError}))}},ed}var od,id={};function ud(){if(od)return id;od=1;var e=id&&id.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=id&&id.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(id,"__esModule",{value:!0}),id.endWith=void 0;var r=$c(),n=Sa();return id.endWith=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return function(i){return r.concat(i,n.of.apply(void 0,t([],e(o))))}},id}var ad,cd={};function sd(){if(ad)return cd;ad=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.every=void 0;var e=Eo(),t=jo();return cd.every=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(t){r.call(n,t,i++,e)||(o.next(!1),o.complete())},function(){o.next(!0),o.complete()}))})},cd}var ld,fd,dd,pd={},hd={},bd={};function vd(){if(ld)return bd;ld=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.exhaustMap=void 0;var e=fc(),t=Gu(),r=Eo(),n=jo();return bd.exhaustMap=function o(i,u){return u?function(r){return r.pipe(o(function(r,n){return t.innerFrom(i(r,n)).pipe(e.map(function(e,t){return u(r,e,n,t)}))}))}:r.operate(function(e,r){var o=0,u=null,a=!1;e.subscribe(n.createOperatorSubscriber(r,function(e){u||(u=n.createOperatorSubscriber(r,void 0,function(){u=null,a&&r.complete()}),t.innerFrom(i(e,o++)).subscribe(u))},function(){a=!0,!u&&r.complete()}))})},bd}function yd(){if(fd)return hd;fd=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.exhaustAll=void 0;var e=vd(),t=mo();return hd.exhaustAll=function(){return e.exhaustMap(t.identity)},hd}function md(){if(dd)return pd;dd=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.exhaust=void 0;var e=yd();return pd.exhaust=e.exhaustAll,pd}var Dd,gd={};function wd(){if(Dd)return gd;Dd=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.expand=void 0;var e=Eo(),t=Lc();return gd.expand=function(r,n,o){return void 0===n&&(n=1/0),n=(n||0)<1?1/0:n,e.operate(function(e,i){return t.mergeInternals(e,i,r,n,void 0,!0,o)})},gd}var _d,Od={};function Sd(){if(_d)return Od;_d=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.finalize=void 0;var e=Eo();return Od.finalize=function(t){return e.operate(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})},Od}var Ed,Pd={};function Cd(){if(Ed)return Pd;Ed=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.createFind=Pd.find=void 0;var e=Eo(),t=jo();function r(e,r,n){var o="index"===n;return function(n,i){var u=0;n.subscribe(t.createOperatorSubscriber(i,function(t){var a=u++;e.call(r,t,a,n)&&(i.next(o?a:t),i.complete())},function(){i.next(o?-1:void 0),i.complete()}))}}return Pd.find=function(t,n){return e.operate(r(t,n,"value"))},Pd.createFind=r,Pd}var xd,Fd={};function jd(){if(xd)return Fd;xd=1,Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.findIndex=void 0;var e=Eo(),t=Cd();return Fd.findIndex=function(r,n){return e.operate(t.createFind(r,n,"index"))},Fd}var Bd,Ad={};function Md(){if(Bd)return Ad;Bd=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.first=void 0;var e=La(),t=Ls(),r=Ff(),n=Sf(),o=rd(),i=mo();return Ad.first=function(u,a){var c=arguments.length>=2;return function(s){return s.pipe(u?t.filter(function(e,t){return u(e,t,s)}):i.identity,r.take(1),c?n.defaultIfEmpty(a):o.throwIfEmpty(function(){return new e.EmptyError}))}},Ad}var kd,Td={};function Id(){if(kd)return Td;kd=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.groupBy=void 0;var e=go(),t=Gu(),r=Ko(),n=Eo(),o=jo();return Td.groupBy=function(i,u,a,c){return n.operate(function(n,s){var l;u&&"function"!=typeof u?(a=u.duration,l=u.element,c=u.connector):l=u;var f=new Map,d=function(e){f.forEach(e),e(s)},p=function(e){return d(function(t){return t.error(e)})},h=0,b=!1,v=new o.OperatorSubscriber(s,function(n){try{var u=i(n),d=f.get(u);if(!d){f.set(u,d=c?c():new r.Subject);var y=function(t,r){var n=new e.Observable(function(e){h++;var t=r.subscribe(e);return function(){t.unsubscribe(),0===--h&&b&&v.unsubscribe()}});return n.key=t,n}(u,d);if(s.next(y),a){var m=o.createOperatorSubscriber(d,function(){d.complete(),null==m||m.unsubscribe()},void 0,void 0,function(){return f.delete(u)});v.add(t.innerFrom(a(y)).subscribe(m))}}d.next(l?l(n):n)}catch(e){p(e)}},function(){return d(function(e){return e.complete()})},p,function(){return f.clear()},function(){return b=!0,0===h});n.subscribe(v)})},Td}var Ld,Rd={};function Ud(){if(Ld)return Rd;Ld=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.isEmpty=void 0;var e=Eo(),t=jo();return Rd.isEmpty=function(){return e.operate(function(e,r){e.subscribe(t.createOperatorSubscriber(r,function(){r.next(!1),r.complete()},function(){r.next(!0),r.complete()}))})},Rd}var Nd,$d,qd={},zd={};function Wd(){if(Nd)return zd;Nd=1;var e=zd&&zd.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(zd,"__esModule",{value:!0}),zd.takeLast=void 0;var t=su(),r=Eo(),n=jo();return zd.takeLast=function(o){return o<=0?function(){return t.EMPTY}:r.operate(function(t,r){var i=[];t.subscribe(n.createOperatorSubscriber(r,function(e){i.push(e),o<i.length&&i.shift()},function(){var t,n;try{for(var o=e(i),u=o.next();!u.done;u=o.next()){var a=u.value;r.next(a)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}r.complete()},void 0,function(){i=null}))})},zd}function Vd(){if($d)return qd;$d=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.last=void 0;var e=La(),t=Ls(),r=Wd(),n=rd(),o=Sf(),i=mo();return qd.last=function(u,a){var c=arguments.length>=2;return function(s){return s.pipe(u?t.filter(function(e,t){return u(e,t,s)}):i.identity,r.takeLast(1),c?o.defaultIfEmpty(a):n.throwIfEmpty(function(){return new e.EmptyError}))}},qd}var Gd,Kd={};function Yd(){if(Gd)return Kd;Gd=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.materialize=void 0;var e=Fa(),t=Eo(),r=jo();return Kd.materialize=function(){return t.operate(function(t,n){t.subscribe(r.createOperatorSubscriber(n,function(t){n.next(e.Notification.createNext(t))},function(){n.next(e.Notification.createComplete()),n.complete()},function(t){n.next(e.Notification.createError(t)),n.complete()}))})},Kd}var Hd,Jd={};function Qd(){if(Hd)return Jd;Hd=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.max=void 0;var e=Ll(),t=jn();return Jd.max=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})},Jd}var Xd,Zd={};function ep(){if(Xd)return Zd;Xd=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.flatMap=void 0;var e=Rc();return Zd.flatMap=e.mergeMap,Zd}var tp,rp={};function np(){if(tp)return rp;tp=1,Object.defineProperty(rp,"__esModule",{value:!0}),rp.mergeMapTo=void 0;var e=Rc(),t=jn();return rp.mergeMapTo=function(r,n,o){return void 0===o&&(o=1/0),t.isFunction(n)?e.mergeMap(function(){return r},n,o):("number"==typeof n&&(o=n),e.mergeMap(function(){return r},o))},rp}var op,ip={};function up(){if(op)return ip;op=1,Object.defineProperty(ip,"__esModule",{value:!0}),ip.mergeScan=void 0;var e=Eo(),t=Lc();return ip.mergeScan=function(r,n,o){return void 0===o&&(o=1/0),e.operate(function(e,i){var u=n;return t.mergeInternals(e,i,function(e,t){return r(u,e,t)},o,function(e){u=e},!1,void 0,function(){return u=null})})},ip}var ap,cp,sp={},lp={};function fp(){if(ap)return lp;ap=1;var e=lp&&lp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=lp&&lp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(lp,"__esModule",{value:!0}),lp.merge=void 0;var r=Eo(),n=Uc(),o=vu(),i=Oa();return lp.merge=function(){for(var u=[],a=0;a<arguments.length;a++)u[a]=arguments[a];var c=o.popScheduler(u),s=o.popNumber(u,1/0);return r.operate(function(r,o){n.mergeAll(s)(i.from(t([r],e(u)),c)).subscribe(o)})},lp}function dp(){if(cp)return sp;cp=1;var e=sp&&sp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=sp&&sp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeWith=void 0;var r=fp();return sp.mergeWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.merge.apply(void 0,t([],e(n)))},sp}var pp,hp={};function bp(){if(pp)return hp;pp=1,Object.defineProperty(hp,"__esModule",{value:!0}),hp.min=void 0;var e=Ll(),t=jn();return hp.min=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})},hp}var vp,yp={};function mp(){if(vp)return yp;vp=1,Object.defineProperty(yp,"__esModule",{value:!0}),yp.multicast=void 0;var e=Ao(),t=jn(),r=df();return yp.multicast=function(n,o){var i=t.isFunction(n)?n:function(){return n};return t.isFunction(o)?r.connect(o,{connector:i}):function(t){return new e.ConnectableObservable(t,i)}},yp}var Dp,gp={};function wp(){if(Dp)return gp;Dp=1;var e=gp&&gp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=gp&&gp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(gp,"__esModule",{value:!0}),gp.onErrorResumeNext=gp.onErrorResumeNextWith=void 0;var r=Es(),n=Ps();function o(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=r.argsOrArgArray(o);return function(r){return n.onErrorResumeNext.apply(void 0,t([r],e(u)))}}return gp.onErrorResumeNextWith=o,gp.onErrorResumeNext=o,gp}var _p,Op={};function Sp(){if(_p)return Op;_p=1,Object.defineProperty(Op,"__esModule",{value:!0}),Op.pairwise=void 0;var e=Eo(),t=jo();return Op.pairwise=function(){return e.operate(function(e,r){var n,o=!1;e.subscribe(t.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})},Op}var Ep,Pp={};function Cp(){if(Ep)return Pp;Ep=1,Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.pluck=void 0;var e=fc();return Pp.pluck=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return e.map(function(e){for(var r=e,o=0;o<n;o++){var i=null==r?void 0:r[t[o]];if(void 0===i)return;r=i}return r})},Pp}var xp,Fp={};function jp(){if(xp)return Fp;xp=1,Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.publish=void 0;var e=Ko(),t=mp(),r=df();return Fp.publish=function(n){return n?function(e){return r.connect(n)(e)}:function(r){return t.multicast(new e.Subject)(r)}},Fp}var Bp,Ap={};function Mp(){if(Bp)return Ap;Bp=1,Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.publishBehavior=void 0;var e=Jo(),t=Ao();return Ap.publishBehavior=function(r){return function(n){var o=new e.BehaviorSubject(r);return new t.ConnectableObservable(n,function(){return o})}},Ap}var kp,Tp={};function Ip(){if(kp)return Tp;kp=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.publishLast=void 0;var e=ii(),t=Ao();return Tp.publishLast=function(){return function(r){var n=new e.AsyncSubject;return new t.ConnectableObservable(r,function(){return n})}},Tp}var Lp,Rp={};function Up(){if(Lp)return Rp;Lp=1,Object.defineProperty(Rp,"__esModule",{value:!0}),Rp.publishReplay=void 0;var e=ri(),t=mp(),r=jn();return Rp.publishReplay=function(n,o,i,u){i&&!r.isFunction(i)&&(u=i);var a=r.isFunction(i)?i:void 0;return function(r){return t.multicast(new e.ReplaySubject(n,o,u),a)(r)}},Rp}var Np,$p={};function qp(){if(Np)return $p;Np=1;var e=$p&&$p.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=$p&&$p.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty($p,"__esModule",{value:!0}),$p.raceWith=void 0;var r=$s(),n=Eo(),o=mo();return $p.raceWith=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return i.length?n.operate(function(n,o){r.raceInit(t([n],e(i)))(o)}):o.identity},$p}var zp,Wp={};function Vp(){if(zp)return Wp;zp=1,Object.defineProperty(Wp,"__esModule",{value:!0}),Wp.repeat=void 0;var e=su(),t=Eo(),r=jo(),n=Gu(),o=ps();return Wp.repeat=function(i){var u,a,c=1/0;return null!=i&&("object"==typeof i?(u=i.count,c=void 0===u?1/0:u,a=i.delay):c=i),c<=0?function(){return e.EMPTY}:t.operate(function(e,t){var i,u=0,s=function(){if(null==i||i.unsubscribe(),i=null,null!=a){var e="number"==typeof a?o.timer(a):n.innerFrom(a(u)),c=r.createOperatorSubscriber(t,function(){c.unsubscribe(),l()});e.subscribe(c)}else l()},l=function(){var n=!1;i=e.subscribe(r.createOperatorSubscriber(t,void 0,function(){++u<c?i?s():n=!0:t.complete()})),n&&s()};l()})},Wp}var Gp,Kp={};function Yp(){if(Gp)return Kp;Gp=1,Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.repeatWhen=void 0;var e=Gu(),t=Ko(),r=Eo(),n=jo();return Kp.repeatWhen=function(o){return r.operate(function(r,i){var u,a,c=!1,s=!1,l=!1,f=function(){return l&&s&&(i.complete(),!0)},d=function(){l=!1,u=r.subscribe(n.createOperatorSubscriber(i,void 0,function(){l=!0,!f()&&(a||(a=new t.Subject,e.innerFrom(o(a)).subscribe(n.createOperatorSubscriber(i,function(){u?d():c=!0},function(){s=!0,f()}))),a).next()})),c&&(u.unsubscribe(),u=null,c=!1,d())};d()})},Kp}var Hp,Jp={};function Qp(){if(Hp)return Jp;Hp=1,Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.retry=void 0;var e=Eo(),t=jo(),r=mo(),n=ps(),o=Gu();return Jp.retry=function(i){var u;void 0===i&&(i=1/0);var a=(u=i&&"object"==typeof i?i:{count:i}).count,c=void 0===a?1/0:a,s=u.delay,l=u.resetOnSuccess,f=void 0!==l&&l;return c<=0?r.identity:e.operate(function(e,r){var i,u=0,a=function(){var l=!1;i=e.subscribe(t.createOperatorSubscriber(r,function(e){f&&(u=0),r.next(e)},void 0,function(e){if(u++<c){var f=function(){i?(i.unsubscribe(),i=null,a()):l=!0};if(null!=s){var d="number"==typeof s?n.timer(s):o.innerFrom(s(e,u)),p=t.createOperatorSubscriber(r,function(){p.unsubscribe(),f()},function(){r.complete()});d.subscribe(p)}else f()}else r.error(e)})),l&&(i.unsubscribe(),i=null,a())};a()})},Jp}var Xp,Zp={};function eh(){if(Xp)return Zp;Xp=1,Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.retryWhen=void 0;var e=Gu(),t=Ko(),r=Eo(),n=jo();return Zp.retryWhen=function(o){return r.operate(function(r,i){var u,a,c=!1,s=function(){u=r.subscribe(n.createOperatorSubscriber(i,void 0,void 0,function(r){a||(a=new t.Subject,e.innerFrom(o(a)).subscribe(n.createOperatorSubscriber(i,function(){return u?s():c=!0}))),a&&a.next(r)})),c&&(u.unsubscribe(),u=null,c=!1,s())};s()})},Zp}var th,rh={};function nh(){if(th)return rh;th=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.sample=void 0;var e=Gu(),t=Eo(),r=eo(),n=jo();return rh.sample=function(o){return t.operate(function(t,i){var u=!1,a=null;t.subscribe(n.createOperatorSubscriber(i,function(e){u=!0,a=e})),e.innerFrom(o).subscribe(n.createOperatorSubscriber(i,function(){if(u){u=!1;var e=a;a=null,i.next(e)}},r.noop))})},rh}var oh,ih={};function uh(){if(oh)return ih;oh=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.sampleTime=void 0;var e=Ri(),t=nh(),r=hs();return ih.sampleTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.sample(r.interval(n,o))},ih}var ah,ch={};function sh(){if(ah)return ch;ah=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.scan=void 0;var e=Eo(),t=Il();return ch.scan=function(r,n){return e.operate(t.scanInternals(r,n,arguments.length>=2,!0))},ch}var lh,fh={};function dh(){if(lh)return fh;lh=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.sequenceEqual=void 0;var e=Eo(),t=jo(),r=Gu();return fh.sequenceEqual=function(n,o){return void 0===o&&(o=function(e,t){return e===t}),e.operate(function(e,i){var u={buffer:[],complete:!1},a={buffer:[],complete:!1},c=function(e){i.next(e),i.complete()},s=function(e,r){var n=t.createOperatorSubscriber(i,function(t){var n=r.buffer,i=r.complete;0===n.length?i?c(!1):e.buffer.push(t):!o(t,n.shift())&&c(!1)},function(){e.complete=!0;var t=r.complete,o=r.buffer;t&&c(0===o.length),null==n||n.unsubscribe()});return n};e.subscribe(s(u,a)),r.innerFrom(n).subscribe(s(a,u))})},fh}var ph,hh={};function bh(){if(ph)return hh;ph=1;var e=hh&&hh.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=hh&&hh.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(hh,"__esModule",{value:!0}),hh.share=void 0;var r=Gu(),n=Ko(),o=co(),i=Eo();function u(n,i){for(var u=[],a=2;a<arguments.length;a++)u[a-2]=arguments[a];if(!0!==i){if(!1!==i){var c=new o.SafeSubscriber({next:function(){c.unsubscribe(),n()}});return r.innerFrom(i.apply(void 0,t([],e(u)))).subscribe(c)}}else n()}return hh.share=function(e){void 0===e&&(e={});var t=e.connector,a=void 0===t?function(){return new n.Subject}:t,c=e.resetOnError,s=void 0===c||c,l=e.resetOnComplete,f=void 0===l||l,d=e.resetOnRefCountZero,p=void 0===d||d;return function(e){var t,n,c,l=0,d=!1,h=!1,b=function(){null==n||n.unsubscribe(),n=void 0},v=function(){b(),t=c=void 0,d=h=!1},y=function(){var e=t;v(),null==e||e.unsubscribe()};return i.operate(function(e,i){l++,h||d||b();var m=c=null!=c?c:a();i.add(function(){0!==--l||h||d||(n=u(y,p))}),m.subscribe(i),!t&&l>0&&(t=new o.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){h=!0,b(),n=u(v,s,e),m.error(e)},complete:function(){d=!0,b(),n=u(v,f),m.complete()}}),r.innerFrom(e).subscribe(t))})(e)}},hh}var vh,yh={};function mh(){if(vh)return yh;vh=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.shareReplay=void 0;var e=ri(),t=bh();return yh.shareReplay=function(r,n,o){var i,u,a,c,s=!1;return r&&"object"==typeof r?(i=r.bufferSize,c=void 0===i?1/0:i,u=r.windowTime,n=void 0===u?1/0:u,s=void 0!==(a=r.refCount)&&a,o=r.scheduler):c=null!=r?r:1/0,t.share({connector:function(){return new e.ReplaySubject(c,n,o)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})},yh}var Dh,gh={};function wh(){if(Dh)return gh;Dh=1,Object.defineProperty(gh,"__esModule",{value:!0}),gh.single=void 0;var e=La(),t=Ja(),r=Ka(),n=Eo(),o=jo();return gh.single=function(i){return n.operate(function(n,u){var a,c=!1,s=!1,l=0;n.subscribe(o.createOperatorSubscriber(u,function(e){s=!0,i&&!i(e,l++,n)||(c&&u.error(new t.SequenceError("Too many matching values")),c=!0,a=e)},function(){c?(u.next(a),u.complete()):u.error(s?new r.NotFoundError("No matching values"):new e.EmptyError)}))})},gh}var _h,Oh={};function Sh(){if(_h)return Oh;_h=1,Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.skip=void 0;var e=Ls();return Oh.skip=function(t){return e.filter(function(e,r){return t<=r})},Oh}var Eh,Ph={};function Ch(){if(Eh)return Ph;Eh=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.skipLast=void 0;var e=mo(),t=Eo(),r=jo();return Ph.skipLast=function(n){return n<=0?e.identity:t.operate(function(e,t){var o=new Array(n),i=0;return e.subscribe(r.createOperatorSubscriber(t,function(e){var r=i++;if(r<n)o[r]=e;else{var u=r%n,a=o[u];o[u]=e,t.next(a)}})),function(){o=null}})},Ph}var xh,Fh={};function jh(){if(xh)return Fh;xh=1,Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.skipUntil=void 0;var e=Eo(),t=jo(),r=Gu(),n=eo();return Fh.skipUntil=function(o){return e.operate(function(e,i){var u=!1,a=t.createOperatorSubscriber(i,function(){null==a||a.unsubscribe(),u=!0},n.noop);r.innerFrom(o).subscribe(a),e.subscribe(t.createOperatorSubscriber(i,function(e){return u&&i.next(e)}))})},Fh}var Bh,Ah={};function Mh(){if(Bh)return Ah;Bh=1,Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.skipWhile=void 0;var e=Eo(),t=jo();return Ah.skipWhile=function(r){return e.operate(function(e,n){var o=!1,i=0;e.subscribe(t.createOperatorSubscriber(n,function(e){return(o||(o=!r(e,i++)))&&n.next(e)}))})},Ah}var kh,Th={};function Ih(){if(kh)return Th;kh=1,Object.defineProperty(Th,"__esModule",{value:!0}),Th.startWith=void 0;var e=$c(),t=vu(),r=Eo();return Th.startWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=t.popScheduler(n);return r.operate(function(t,r){(i?e.concat(n,t,i):e.concat(n,t)).subscribe(r)})},Th}var Lh,Rh,Uh={},Nh={};function $h(){if(Lh)return Nh;Lh=1,Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.switchMap=void 0;var e=Gu(),t=Eo(),r=jo();return Nh.switchMap=function(n,o){return t.operate(function(t,i){var u=null,a=0,c=!1,s=function(){return c&&!u&&i.complete()};t.subscribe(r.createOperatorSubscriber(i,function(t){null==u||u.unsubscribe();var c=0,l=a++;e.innerFrom(n(t,l)).subscribe(u=r.createOperatorSubscriber(i,function(e){return i.next(o?o(t,e,l,c++):e)},function(){u=null,s()}))},function(){c=!0,s()}))})},Nh}function qh(){if(Rh)return Uh;Rh=1,Object.defineProperty(Uh,"__esModule",{value:!0}),Uh.switchAll=void 0;var e=$h(),t=mo();return Uh.switchAll=function(){return e.switchMap(t.identity)},Uh}var zh,Wh={};function Vh(){if(zh)return Wh;zh=1,Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.switchMapTo=void 0;var e=$h(),t=jn();return Wh.switchMapTo=function(r,n){return t.isFunction(n)?e.switchMap(function(){return r},n):e.switchMap(function(){return r})},Wh}var Gh,Kh={};function Yh(){if(Gh)return Kh;Gh=1,Object.defineProperty(Kh,"__esModule",{value:!0}),Kh.switchScan=void 0;var e=$h(),t=Eo();return Kh.switchScan=function(r,n){return t.operate(function(t,o){var i=n;return e.switchMap(function(e,t){return r(i,e,t)},function(e,t){return i=t,t})(t).subscribe(o),function(){i=null}})},Kh}var Hh,Jh={};function Qh(){if(Hh)return Jh;Hh=1,Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.takeUntil=void 0;var e=Eo(),t=jo(),r=Gu(),n=eo();return Jh.takeUntil=function(o){return e.operate(function(e,i){r.innerFrom(o).subscribe(t.createOperatorSubscriber(i,function(){return i.complete()},n.noop)),!i.closed&&e.subscribe(i)})},Jh}var Xh,Zh={};function eb(){if(Xh)return Zh;Xh=1,Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.takeWhile=void 0;var e=Eo(),t=jo();return Zh.takeWhile=function(r,n){return void 0===n&&(n=!1),e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){var t=r(e,i++);(t||n)&&o.next(e),!t&&o.complete()}))})},Zh}var tb,rb={};function nb(){if(tb)return rb;tb=1,Object.defineProperty(rb,"__esModule",{value:!0}),rb.tap=void 0;var e=jn(),t=Eo(),r=jo(),n=mo();return rb.tap=function(o,i,u){var a=e.isFunction(o)||i||u?{next:o,error:i,complete:u}:o;return a?t.operate(function(e,t){var n;null===(n=a.subscribe)||void 0===n||n.call(a);var o=!0;e.subscribe(r.createOperatorSubscriber(t,function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)},function(){var e;o=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()},function(e){var r;o=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)},function(){var e,t;o&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)}))}):n.identity},rb}var ob,ib={};function ub(){if(ob)return ib;ob=1,Object.defineProperty(ib,"__esModule",{value:!0}),ib.throttle=void 0;var e=Eo(),t=jo(),r=Gu();return ib.throttle=function(n,o){return e.operate(function(e,i){var u=null!=o?o:{},a=u.leading,c=void 0===a||a,s=u.trailing,l=void 0!==s&&s,f=!1,d=null,p=null,h=!1,b=function(){null==p||p.unsubscribe(),p=null,l&&(m(),h&&i.complete())},v=function(){p=null,h&&i.complete()},y=function(e){return p=r.innerFrom(n(e)).subscribe(t.createOperatorSubscriber(i,b,v))},m=function(){if(f){f=!1;var e=d;d=null,i.next(e),!h&&y(e)}};e.subscribe(t.createOperatorSubscriber(i,function(e){f=!0,d=e,(!p||p.closed)&&(c?m():y(e))},function(){h=!0,(!(l&&f&&p)||p.closed)&&i.complete()}))})},ib}var ab,cb={};function sb(){if(ab)return cb;ab=1,Object.defineProperty(cb,"__esModule",{value:!0}),cb.throttleTime=void 0;var e=Ri(),t=ub(),r=ps();return cb.throttleTime=function(n,o,i){void 0===o&&(o=e.asyncScheduler);var u=r.timer(n,o);return t.throttle(function(){return u},i)},cb}var lb,fb={};function db(){if(lb)return fb;lb=1,Object.defineProperty(fb,"__esModule",{value:!0}),fb.TimeInterval=fb.timeInterval=void 0;var e=Ri(),t=Eo(),r=jo();fb.timeInterval=function(o){return void 0===o&&(o=e.asyncScheduler),t.operate(function(e,t){var i=o.now();e.subscribe(r.createOperatorSubscriber(t,function(e){var r=o.now(),u=r-i;i=r,t.next(new n(e,u))}))})};var n=function(e,t){this.value=e,this.interval=t};return fb.TimeInterval=n,fb}var pb,hb={};function bb(){if(pb)return hb;pb=1,Object.defineProperty(hb,"__esModule",{value:!0}),hb.timeoutWith=void 0;var e=Ri(),t=tc(),r=rc();return hb.timeoutWith=function(n,o,i){var u,a,c;if(i=null!=i?i:e.async,t.isValidDate(n)?u=n:"number"==typeof n&&(a=n),!o)throw new TypeError("No observable provided to switch to");if(c=function(){return o},null==u&&null==a)throw new TypeError("No timeout provided.");return r.timeout({first:u,each:a,scheduler:i,with:c})},hb}var vb,yb={};function mb(){if(vb)return yb;vb=1,Object.defineProperty(yb,"__esModule",{value:!0}),yb.timestamp=void 0;var e=ti(),t=fc();return yb.timestamp=function(r){return void 0===r&&(r=e.dateTimestampProvider),t.map(function(e){return{value:e,timestamp:r.now()}})},yb}var Db,gb={};function wb(){if(Db)return gb;Db=1,Object.defineProperty(gb,"__esModule",{value:!0}),gb.window=void 0;var e=Ko(),t=Eo(),r=jo(),n=eo(),o=Gu();return gb.window=function(i){return t.operate(function(t,u){var a=new e.Subject;u.next(a.asObservable());var c=function(e){a.error(e),u.error(e)};return t.subscribe(r.createOperatorSubscriber(u,function(e){return null==a?void 0:a.next(e)},function(){a.complete(),u.complete()},c)),o.innerFrom(i).subscribe(r.createOperatorSubscriber(u,function(){a.complete(),u.next(a=new e.Subject)},n.noop,c)),function(){null==a||a.unsubscribe(),a=null}})},gb}var _b,Ob={};function Sb(){if(_b)return Ob;_b=1;var e=Ob&&Ob.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.windowCount=void 0;var t=Ko(),r=Eo(),n=jo();return Ob.windowCount=function(o,i){void 0===i&&(i=0);var u=i>0?i:o;return r.operate(function(r,i){var a=[new t.Subject],c=0;i.next(a[0].asObservable()),r.subscribe(n.createOperatorSubscriber(i,function(r){var n,s;try{for(var l=e(a),f=l.next();!f.done;f=l.next()){f.value.next(r)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(s=l.return)&&s.call(l)}finally{if(n)throw n.error}}var d=c-o+1;if(d>=0&&d%u===0&&a.shift().complete(),++c%u===0){var p=new t.Subject;a.push(p),i.next(p.asObservable())}},function(){for(;a.length>0;)a.shift().complete();i.complete()},function(e){for(;a.length>0;)a.shift().error(e);i.error(e)},function(){a=null}))})},Ob}var Eb,Pb={};function Cb(){if(Eb)return Pb;Eb=1,Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.windowTime=void 0;var e=Ko(),t=Ri(),r=qn(),n=Eo(),o=jo(),i=$n(),u=vu(),a=Qu();return Pb.windowTime=function(c){for(var s,l,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=null!==(s=u.popScheduler(f))&&void 0!==s?s:t.asyncScheduler,h=null!==(l=f[0])&&void 0!==l?l:null,b=f[1]||1/0;return n.operate(function(t,n){var u=[],s=!1,l=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),i.arrRemove(u,e),s&&f()},f=function(){if(u){var t=new r.Subscription;n.add(t);var o=new e.Subject,i={window:o,subs:t,seen:0};u.push(i),n.next(o.asObservable()),a.executeSchedule(t,p,function(){return l(i)},c)}};null!==h&&h>=0?a.executeSchedule(n,p,f,h,!0):s=!0,f();var d=function(e){return u.slice().forEach(e)},v=function(e){d(function(t){var r=t.window;return e(r)}),e(n),n.unsubscribe()};return t.subscribe(o.createOperatorSubscriber(n,function(e){d(function(t){t.window.next(e),b<=++t.seen&&l(t)})},function(){return v(function(e){return e.complete()})},function(e){return v(function(t){return t.error(e)})})),function(){u=null}})},Pb}var xb,Fb={};function jb(){if(xb)return Fb;xb=1;var e=Fb&&Fb.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.windowToggle=void 0;var t=Ko(),r=qn(),n=Eo(),o=Gu(),i=jo(),u=eo(),a=$n();return Fb.windowToggle=function(c,s){return n.operate(function(n,l){var f=[],d=function(e){for(;0<f.length;)f.shift().error(e);l.error(e)};o.innerFrom(c).subscribe(i.createOperatorSubscriber(l,function(e){var n=new t.Subject;f.push(n);var c,p=new r.Subscription;try{c=o.innerFrom(s(e))}catch(e){return void d(e)}l.next(n.asObservable()),p.add(c.subscribe(i.createOperatorSubscriber(l,function(){a.arrRemove(f,n),n.complete(),p.unsubscribe()},u.noop,d)))},u.noop)),n.subscribe(i.createOperatorSubscriber(l,function(t){var r,n,o=f.slice();try{for(var i=e(o),u=i.next();!u.done;u=i.next()){u.value.next(t)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},function(){for(;0<f.length;)f.shift().complete();l.complete()},d,function(){for(;0<f.length;)f.shift().unsubscribe()}))})},Fb}var Bb,Ab={};function Mb(){if(Bb)return Ab;Bb=1,Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.windowWhen=void 0;var e=Ko(),t=Eo(),r=jo(),n=Gu();return Ab.windowWhen=function(o){return t.operate(function(t,i){var u,a,c=function(e){u.error(e),i.error(e)},s=function(){var t;null==a||a.unsubscribe(),null==u||u.complete(),u=new e.Subject,i.next(u.asObservable());try{t=n.innerFrom(o())}catch(e){return void c(e)}t.subscribe(a=r.createOperatorSubscriber(i,s,s,c))};s(),t.subscribe(r.createOperatorSubscriber(i,function(e){return u.next(e)},function(){u.complete(),i.complete()},c,function(){null==a||a.unsubscribe(),u=null}))})},Ab}var kb,Tb={};function Ib(){if(kb)return Tb;kb=1;var e=Tb&&Tb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Tb&&Tb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.withLatestFrom=void 0;var r=Eo(),n=jo(),o=Gu(),i=mo(),u=eo(),a=vu();return Tb.withLatestFrom=function(){for(var c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];var l=a.popResultSelector(c);return r.operate(function(r,a){for(var s=c.length,f=new Array(s),d=c.map(function(){return!1}),p=!1,h=function(e){o.innerFrom(c[e]).subscribe(n.createOperatorSubscriber(a,function(t){f[e]=t,p||d[e]||(d[e]=!0,(p=d.every(i.identity))&&(d=null))},u.noop))},b=0;b<s;b++)h(b);r.subscribe(n.createOperatorSubscriber(a,function(r){if(p){var n=t([r],e(f));a.next(l?l.apply(void 0,t([],e(n))):n)}}))})},Tb}var Lb,Rb={};function Ub(){if(Lb)return Rb;Lb=1,Object.defineProperty(Rb,"__esModule",{value:!0}),Rb.zipAll=void 0;var e=Js(),t=Ul();return Rb.zipAll=function(r){return t.joinAllInternals(e.zip,r)},Rb}var Nb,$b,qb,zb={},Wb={};function Vb(){if(Nb)return Wb;Nb=1;var e=Wb&&Wb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Wb&&Wb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.zip=void 0;var r=Js(),n=Eo();return Wb.zip=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.operate(function(n,i){r.zip.apply(void 0,t([n],e(o))).subscribe(i)})},Wb}function Gb(){if($b)return zb;$b=1;var e=zb&&zb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=zb&&zb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(zb,"__esModule",{value:!0}),zb.zipWith=void 0;var r=Vb();return zb.zipWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.zip.apply(void 0,t([],e(n)))},zb}function Kb(){return qb||(qb=1,function(e){var t=Pn&&Pn.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Pn&&Pn.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var n=go();Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return n.Observable}});var o=Ao();Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var i=fo();Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return i.observable}});var u=$o();Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var a=Ko();Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return a.Subject}});var c=Jo();Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var s=ri();Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return s.ReplaySubject}});var l=ii();Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return l.AsyncSubject}});var f=Ti();Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return f.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return f.asapScheduler}});var d=Ri();Object.defineProperty(e,"async",{enumerable:!0,get:function(){return d.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return d.asyncScheduler}});var p=Ki();Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return p.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return p.queueScheduler}});var h=ru();Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return h.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return h.animationFrameScheduler}});var b=iu();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var v=Ai();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return v.Scheduler}});var y=qn();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return y.Subscription}});var m=co();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return m.Subscriber}});var D=Fa();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return D.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return D.NotificationKind}});var g=Do();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return g.pipe}});var w=eo();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return w.noop}});var _=mo();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return _.identity}});var O=Aa();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return O.isObservable}});var S=Ra();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return S.lastValueFrom}});var E=$a();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return E.firstValueFrom}});var P=Wa();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var C=La();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return C.EmptyError}});var x=Ka();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return x.NotFoundError}});var F=Go();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return F.ObjectUnsubscribedError}});var j=Ja();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return j.SequenceError}});var B=rc();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return B.TimeoutError}});var A=Ln();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return A.UnsubscriptionError}});var M=hc();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return M.bindCallback}});var k=yc();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return k.bindNodeCallback}});var T=Pc();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return T.combineLatest}});var I=$c();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return I.concat}});var L=Kc();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return L.connectable}});var R=Gc();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return R.defer}});var U=su();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return U.empty}});var N=Jc();Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return N.forkJoin}});var $=Oa();Object.defineProperty(e,"from",{enumerable:!0,get:function(){return $.from}});var q=Zc();Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return q.fromEvent}});var z=rs();Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return z.fromEventPattern}});var W=is();Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return W.generate}});var V=cs();Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return V.iif}});var G=hs();Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return G.interval}});var K=ys();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return K.merge}});var Y=gs();Object.defineProperty(e,"never",{enumerable:!0,get:function(){return Y.never}});var H=Sa();Object.defineProperty(e,"of",{enumerable:!0,get:function(){return H.of}});var J=Ps();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return J.onErrorResumeNext}});var Q=Fs();Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return Q.pairs}});var X=Rs();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return X.partition}});var Z=$s();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Z.race}});var ee=Ws();Object.defineProperty(e,"range",{enumerable:!0,get:function(){return ee.range}});var te=xa();Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return te.throwError}});var re=ps();Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return re.timer}});var ne=Ks();Object.defineProperty(e,"using",{enumerable:!0,get:function(){return ne.using}});var oe=Js();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return oe.zip}});var ie=_a();Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return ie.scheduled}});var ue=su();Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ae=gs();Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return ae.NEVER}}),r(Zs(),e);var ce=Vn();Object.defineProperty(e,"config",{enumerable:!0,get:function(){return ce.config}});var se=rl();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return se.audit}});var le=il();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return le.auditTime}});var fe=cl();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return fe.buffer}});var de=fl();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return de.bufferCount}});var pe=hl();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return pe.bufferTime}});var he=yl();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return he.bufferToggle}});var be=gl();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return be.bufferWhen}});var ve=Ol();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return ve.catchError}});var ye=$l();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return ye.combineAll}});var me=Nl();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return me.combineLatestAll}});var De=Kl();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return De.combineLatestWith}});var ge=Nc();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return ge.concatAll}});var we=Jl();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return we.concatMap}});var _e=Zl();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return _e.concatMapTo}});var Oe=uf();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Oe.concatWith}});var Se=df();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return Se.connect}});var Ee=bf();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ee.count}});var Pe=mf();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var Ce=wf();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Ce.debounceTime}});var xe=Sf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return xe.defaultIfEmpty}});var Fe=Uf();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Fe.delay}});var je=Rf();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return je.delayWhen}});var Be=qf();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return Be.dematerialize}});var Ae=Vf();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Ae.distinct}});var Me=Yf();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Me.distinctUntilChanged}});var ke=Qf();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ke.distinctUntilKeyChanged}});var Te=nd();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Te.elementAt}});var Ie=ud();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return Ie.endWith}});var Le=sd();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return Le.every}});var Re=md();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return Re.exhaust}});var Ue=yd();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return Ue.exhaustAll}});var Ne=vd();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Ne.exhaustMap}});var $e=wd();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return $e.expand}});var qe=Ls();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return qe.filter}});var ze=Sd();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return ze.finalize}});var We=Cd();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return We.find}});var Ve=jd();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return Ve.findIndex}});var Ge=Md();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Ge.first}});var Ke=Id();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ye=Af();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Ye.ignoreElements}});var He=Ud();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return He.isEmpty}});var Je=Vd();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Je.last}});var Qe=fc();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Qe.map}});var Xe=Lf();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Xe.mapTo}});var Ze=Yd();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Ze.materialize}});var et=Qd();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return et.max}});var tt=Uc();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return tt.mergeAll}});var rt=ep();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return rt.flatMap}});var nt=Rc();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return nt.mergeMap}});var ot=np();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var it=up();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return it.mergeScan}});var ut=dp();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var at=bp();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return at.min}});var ct=mp();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return ct.multicast}});var st=Xu();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return st.observeOn}});var lt=wp();Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return lt.onErrorResumeNextWith}});var ft=Sp();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return ft.pairwise}});var dt=Cp();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var pt=jp();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return pt.publish}});var ht=Mp();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ht.publishBehavior}});var bt=Ip();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return bt.publishLast}});var vt=Up();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return vt.publishReplay}});var yt=qp();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return yt.raceWith}});var mt=Ll();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return mt.reduce}});var Dt=Vp();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Dt.repeat}});var gt=Yp();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return gt.repeatWhen}});var wt=Qp();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return wt.retry}});var _t=eh();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return _t.retryWhen}});var Ot=Bo();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return Ot.refCount}});var St=nh();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return St.sample}});var Et=uh();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Et.sampleTime}});var Pt=sh();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Pt.scan}});var Ct=dh();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Ct.sequenceEqual}});var xt=bh();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return xt.share}});var Ft=mh();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Ft.shareReplay}});var jt=wh();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return jt.single}});var Bt=Sh();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Bt.skip}});var At=Ch();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return At.skipLast}});var Mt=jh();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Mt.skipUntil}});var kt=Mh();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return kt.skipWhile}});var Tt=Ih();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Tt.startWith}});var It=ra();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return It.subscribeOn}});var Lt=qh();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return Lt.switchAll}});var Rt=$h();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Rt.switchMap}});var Ut=Vh();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return Ut.switchMapTo}});var Nt=Yh();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Nt.switchScan}});var $t=Ff();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return $t.take}});var qt=Wd();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return qt.takeLast}});var zt=Qh();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Wt=eb();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Vt=nb();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Vt.tap}});var Gt=ub();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Gt.throttle}});var Kt=sb();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Yt=rd();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Yt.throwIfEmpty}});var Ht=db();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Ht.timeInterval}});var Jt=rc();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Qt=bb();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Qt.timeoutWith}});var Xt=mb();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var Zt=Rl();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Zt.toArray}});var er=wb();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return er.window}});var tr=Sb();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return tr.windowCount}});var rr=Cb();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return rr.windowTime}});var nr=jb();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return nr.windowToggle}});var or=Mb();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var ir=Ib();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return ir.withLatestFrom}});var ur=Ub();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return ur.zipAll}});var ar=Gb();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ar.zipWith}})}(Pn)),Pn}var Yb,Hb,Jb,Qb,Xb,Zb,ev,tv,rv,nv={exports:{}};function ov(){if(Yb)return nv.exports;function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}Yb=1;var t=nv.exports=function(t,r,n="async"){return"string"==typeof r&&(n=r,r=void 0),r=r||function(){},function(){var o=arguments,i=this,u=new Promise(function(r,u){var a=!1;const c=function(e){a&&console.warn("Run-async promise already resolved."),a=!0,r(e)};var s=!1;const l=function(e){s&&console.warn("Run-async promise already rejected."),s=!0,u(e)};var f,d=!1,p=!1,h=!1,b=function(){return h?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(p&&console.warn("Run-async wrapped function (async) returned a promise.\nCalls to async() callback can have unexpected results."),d=!0,function(e,t){e?l(e):c(t)})};f=i&&n&&Proxy?new Proxy(i,{get(e,t){return t===n?(t in e&&console.warn(`${n} property is been shadowed by run-sync`),b):Reflect.get(...arguments)}}):{[n]:b};var v=t.apply(f,Array.prototype.slice.call(o));d?e(v)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):e(v)?(p=!0,v.then(c,l)):c(v),h=!0});return u.then(r.bind(null,null),r),u}};return t.cb=function(e,r){return t(function(){var t=Array.prototype.slice.call(arguments);return t.length===e.length-1&&t.push(this.async()),e.apply(this,t)},r)},nv.exports}function iv(){return Hb||(Hb=1,function(e){var t=En&&En.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e._=void 0;const r=t(u),n=Kb(),o=t(ov()),i=t(tt()),a=gt(),c=t(ft());async function s(e,t,r){const n=e[t];return"function"==typeof n?(0,o.default)(n)(r):n}e._={set:(e,t="",r)=>{let n=e;t.split(".").forEach((e,t,o)=>{"__proto__"!==e&&"constructor"!==e&&(t===o.length-1?n[e]=r:e in n&&"object"==typeof n[e]||(n[e]={}),n=n[e])})},get:(e,t="",r)=>{const n=r=>String.prototype.split.call(t,r).filter(Boolean).reduce((e,t)=>null==e?e:e[t],e),o=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return void 0===o||o===e?r:o}};class l extends Error{name="TTYError";isTtyError=!0}e.default=class{prompts;answers={};process=n.EMPTY;abortController=new AbortController;opt;constructor(e,t={}){this.opt=t,this.prompts=e}async run(t,r){let o;return this.abortController=new AbortController,this.answers="object"==typeof r?{...r}:{},o=function(e){return Array.isArray(e)}(t)?(0,n.from)(t):(0,n.isObservable)(t)?t:function(e){return Object.values(e).every(e=>"object"==typeof e&&!Array.isArray(e)&&null!=e)}(t)?(0,n.from)(Object.entries(t).map(([e,t])=>Object.assign({},t,{name:e}))):(0,n.from)([t]),this.process=o.pipe((0,n.concatMap)(e=>(0,n.of)(e).pipe((0,n.concatMap)(e=>(0,n.from)(this.shouldRun(e).then(t=>{if(t)return e})).pipe((0,n.filter)(e=>null!=e))),(0,n.concatMap)(e=>(0,n.defer)(()=>(0,n.from)(this.fetchAnswer(e))))))),(0,n.lastValueFrom)(this.process.pipe((0,n.reduce)((t,r)=>(e._.set(t,r.name,r.answer),t),this.answers))).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async e=>{const[t,r,n]=await Promise.all([s(e,"message",this.answers),s(e,"default",this.answers),s(e,"choices",this.answers)]);let o;return Array.isArray(n)&&(o=n.map(e=>{const t="object"!=typeof e||null==e?{name:e,value:e}:{...e,value:"value"in e?e.value:"name"in e?e.name:void 0};return"value"in t&&Array.isArray(r)?{checked:r.includes(t.value),...t}:t})),Object.assign({},e,{message:t,default:r,choices:o,type:e.type in this.prompts?e.type:"input"})};fetchAnswer=async e=>{const t=await this.prepareQuestion(e),n=this.prompts[t.type];if(null==n)throw new Error(`Prompt for type ${t.type} not found`);let o;const u=function(e){return Boolean(e.prototype&&"run"in e.prototype&&"function"==typeof e.prototype.run)}(n)?(e,t)=>new Promise((u,s)=>{const{signal:f}=t;if(f.aborted)return void s(new a.AbortPromptError({cause:f.reason}));const d=r.default.createInterface(function(e){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new l("Prompts can not be meaningfully rendered in non-TTY environments");const r=new i.default;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(t)),p=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")};process.on("exit",p),d.on("SIGINT",p);const h=new n(e,d,this.answers),b=()=>{process.removeListener("exit",p),d.removeListener("SIGINT",p),d.setPrompt(""),d.output.unmute(),d.output.write(c.default.cursorShow),d.output.end(),d.close(),o?.()},v=()=>{s(new a.AbortPromptError({cause:f.reason})),b()};f.addEventListener("abort",v),o=()=>{f.removeEventListener("abort",v),o=void 0},h.run().then(u,s).finally(b)}):n;let s;const{signal:f}=this.opt;if(f?.aborted)this.abortController.abort(f.reason);else if(f){const e=()=>this.abortController.abort(f.reason);f.addEventListener("abort",e),s=()=>{f.removeEventListener("abort",e)}}const{filter:d=e=>e}=t,{signal:p}=this.abortController;return u(t,{...this.opt,signal:p}).then(e=>({name:t.name,answer:d(e,this.answers)})).finally(()=>{o?.(),s?.()})};close=()=>{this.abortController.abort()};shouldRun=async t=>{if(!0!==t.askAnswered&&void 0!==e._.get(this.answers,t.name))return!1;const{when:r}=t;if("function"==typeof r){const e=await(0,o.default)(r)(this.answers);return Boolean(e)}return!1!==r}}}(En)),En}function uv(){if(Jb)return x;Jb=1;var e=x&&x.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x,"__esModule",{value:!0}),x.createPromptModule=o;const t=On(),r=e(iv()),n={input:t.input,select:t.select,list:t.select,number:t.number,confirm:t.confirm,rawlist:t.rawlist,expand:t.expand,checkbox:t.checkbox,password:t.password,editor:t.editor,search:t.search};function o(e){function t(n,o){const i=new r.default(t.prompts,e),u=i.run(n,o);return Object.assign(u,{ui:i})}return t.prompts={...n},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){t.prompts={...n}},t}const i=o();const u={prompt:i,ui:{Prompt:r.default},createPromptModule:o,registerPrompt:function(e,t){i.registerPrompt(e,t)},restoreDefaultPrompts:function(){i.restoreDefaultPrompts()},Separator:t.Separator};return x.default=u,x}function av(){return Xb?Qb:(Xb=1,Qb={CONFIG_FILE_NAME:"minigame.config.json",SDK_URL:"https://connect.tiktok-minis.com/game/sdk.js",VCONSOLE_URL:"https://connect.tiktok-minis.com/libs/vConsole.js",VCONSOLE_INIT:"\n if(typeof VConsole === 'function') {\n window.vConsole = new VConsole();\n }\n ",MINIS_MANIFEST_FILE_NAME:"minis.manifest.json",MINIS_RUNTIME_URL:"https://www.tiktok.com/minigames/runtime"})}function cv(){if(ev)return Zb;ev=1;const e=s,r=v,n=y,o=t,{JSDOM:i}=r,{CONFIG_FILE_NAME:u,SDK_URL:a,VCONSOLE_URL:c,VCONSOLE_INIT:l}=av(),f=`${process.cwd()}/${u}`,d=`${process.cwd()}/index.html`;return Zb=async function({config:t,clientKey:r}){if(e.writeFileSync(f,JSON.stringify(t,null,2)),!e.existsSync(d))return void console.error("index.html does not exist");const u=e.readFileSync(d,"utf8"),s=new i(u),{document:p}=s.window;let h=p.querySelector("head");h||(h=p.createElement("head"),p.documentElement.insertBefore(h,p.body));const b=Array.from(p.querySelectorAll("script")),v=b.some(e=>e.src&&e.src.includes(a)),y=b.some(e=>e.src&&e.src.includes("vConsole.js"));let m=null;if(v){const e=Array.from(h.querySelectorAll("script"));if(m=e.find(e=>function(e,t){return!!e.innerHTML&&e.innerHTML.includes("TTMinis.game.init")&&e.innerHTML.includes(t)}(e,r)),m)console.log("JS SDK 已接入,跳过 SDK 相关脚本注入");else{const t=e.filter(e=>e.src&&e.src.includes(a));t.length>0&&(m=t[t.length-1])}}else{const e=p.createElement("script");e.src=a,h.insertBefore(e,h.firstChild);const t=p.createElement("script");t.innerHTML=`\n window.TTMinis = TTMinis;\n TTMinis.game.init({\n clientKey: "${r}",\n });\n `,h.insertBefore(t,e.nextSibling),m=t}if(function(e){return e.startsWith("sb")}(r)&&(console.log("Sandbox 环境,跳过 vConsole 相关脚本注入"),!y)){let e=m;e=e?e.nextSibling:h.firstChild;const t=p.createElement("script");t.src=c;const r=p.createElement("script");r.innerHTML=l,h.insertBefore(t,e),h.insertBefore(r,e)}const D=await n.format(s.serialize(),{parser:"html"});e.writeFileSync(d,D),console.log(o.green.bold("TikTok H5 Mini Game initialization has been completed..."))},Zb}var sv,lv,fv=function(){if(rv)return tv;rv=1;const e=uv(),t=cv();return tv=function(){e.createPromptModule()([{type:"input",name:"clientKey",message:"Please input client key"},{type:"input",name:"devPort",message:"Please input dev port",default:9527}]).then(async e=>{const{clientKey:r,devPort:n}=e;t({clientKey:r,config:{_comment:"orientation is the orientation of the game. It can be either 'VERTICAL' or 'HORIZONTAL'.our game default is VERTICAL; minigame.config.json dev is a configuration file for minigame development. You can use it to configure the minigame.",orientation:"VERTICAL",dev:{port:n}}})})}}(),dv=P(fv);var pv,hv,bv,vv,yv=function(){if(lv)return sv;lv=1;const e=m,r=h,n=s,o=t,i=D,u=e(),a=b,{CONFIG_FILE_NAME:c,MINIS_RUNTIME_URL:l}=av();return sv=function(){const t=r.join(process.cwd(),c);if(!n.existsSync(t))return void console.log(o.red.bold(`${c} is not exist, please run minis game init first`));const s=JSON.parse(n.readFileSync(t,"utf8")),f=s.dev?.port||9527;console.log(o.yellow.bold("⚠️ Before dev, please ensure:\n 1. The account used to login www.tiktok.com is in the sandbox target user range of Minis developer platform, otherwise login authorization will throw an error.\n 2. The browser allows www.tiktok.com <popup and redirect>, because the authorization login linkage needs to open a new tab popup for operation, otherwise the authorization login linkage will not be able to debug normally.")),console.log(o.bold.blue("\n \n============== start dev your game, it will take a few seconds ============ \n \n")),u.use((e,t,r)=>{e.url.endsWith(".br")?t.setHeader("Content-Encoding","br"):e.url.endsWith(".gz")&&t.setHeader("Content-Encoding","gzip"),r()}),u.use((e,t,u)=>{try{const e=r.join(process.cwd(),"index.html"),o=n.readFileSync(e,"utf8"),u=i.load(o),c=[];u("script:not([src])").each((e,t)=>{const r=u(t).html();r&&r.trim()&&c.push(r)});c.map(e=>`'sha256-${a.createHash("sha256").update(e,"utf8").digest("base64")}'`);const s="*";t.setHeader("Content-Security-Policy",`default-src 'self';script-src 'self' data: blob: 'unsafe-eval' 'unsafe-inline' connect.tiktok-minis.com sf-connect.tiktokminis.us;img-src 'self' ${s} data: blob: *; connect-src 'self' ${s} data: blob: ; style-src 'self' ${s} 'unsafe-inline' fonts.googleapis.com data: blob: *; font-src 'self' fonts.gstatic.com blob: data: *; media-src 'self' ${s} data: blob: *; frame-src 'none'; base-uri 'self'; worker-src 'self' blob: data: ;`)}catch(e){console.warn(o.red("Failed to set CSP header:"),e.message)}u()}),u.use(e.static(r.join(process.cwd()))),u.listen(f,()=>{const e=`${l}?minis_url=${`http://localhost:${f}`}&enable_log=1`;console.log(`you can access ${o.green.underline.bold(e)} to debug your game in browser...`);try{open(e)}catch(e){console.warn(o.red("Failed to open browser, you can access it manually"),e.message)}})}}(),mv=P(yv);function Dv(){if(hv)return pv;hv=1;const e=t,r=s,n=h,{MINIS_MANIFEST_FILE_NAME:o}=av();function i(e,t){let r=t.find(t=>"folder"===t.type&&t.name===e[0]);return r||(r={type:"folder",name:e[0],children:[]},t.push(r)),e.length>1?i(e.slice(1),r.children):r}function u(e,t=e){const o={};return r.readdirSync(e).forEach(i=>{const a=n.join(e,i);if(r.statSync(a).isDirectory()){const e=u(a,t);Object.assign(o,e)}else if(""!==n.extname(i)&&i){const e="/"+n.relative(t,a).replace(/\\/g,"/");o[a]=e}}),o}return pv={buildMinisManifest:async function(){try{const e=n.join(process.cwd()),t=[],a=u(e);Object.keys(a).filter(e=>!e.endsWith(".map")).forEach(e=>{const r=a[e].split("/").filter(Boolean),n=r.pop()||"";if(0===r.length)t.push({type:"file",name:n});else{i(r,t).children.push({type:"file",name:n})}}),r.writeFileSync(n.join(e,o),JSON.stringify({name:o,resource_list:t},null,2))}catch(t){console.error(e.red(`Error during debug process: ${t.message}`)),t instanceof Error&&t.stack&&console.error(e.red(`Stack trace: ${t.stack}`)),process.exit(1)}}}}var gv=P(function(){if(vv)return bv;vv=1;const e=s,r=g,n=h,o=t,i=w,u=uv().createPromptModule(),{buildMinisManifest:a}=Dv();return bv=async function(){try{const{zipName:t}=await u({type:"input",name:"zipName",default:"game",message:"Please input zip name"}),c=Date.now();console.log(o.bold.blue("start build your game, it will take a few minutes..."));e.readdirSync(process.cwd()).forEach(t=>{t.endsWith(".zip")&&e.unlinkSync(n.join(process.cwd(),t))}),await a();const s=i("zip",{zlib:{level:9}});s.on("error",function(e){throw e});const l=function(){const t=r.homedir(),o=["Desktop","桌面"];for(const r of o){const o=n.join(t,r);if(e.existsSync(o))return o}return n.join(t,"Desktop")}(),f=n.join(l,`${t}.zip`);return await s.pipe(e.createWriteStream(f)),await s.directory(n.resolve(process.cwd()),!1),await s.finalize(),console.log(o.yellow.bold(`build ${t}.zip success, you can find it in desktop, use time ${Date.now()-c} ms`)),new Promise((e,t)=>{s.on("end",e),s.on("error",t)})}catch(e){console.log(o.red(`auto build ${zipNameInput}.zip failed: ${e.message}, you should zip it manually`))}}}());function wv(e){return`https://www.tiktok.com/ttmg/dev/${e}?host=${function(){const e=g.networkInterfaces();for(const t in e){const r=e[t];if(r)for(const e of r)if("IPv4"===e.family&&!e.internal)return e.address}}()}&port=9527`}const _v=e=>"up"===e.name||"k"===e.name||e.ctrl&&"p"===e.name,Ov=e=>"down"===e.name||"j"===e.name||e.ctrl&&"n"===e.name,Sv=e=>"backspace"===e.name,Ev=e=>"1234567890".includes(e.name),Pv=e=>"enter"===e.name||"return"===e.name;class Cv extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class xv extends Error{name="CancelPromptError";message="Prompt was canceled"}class Fv extends Error{name="ExitPromptError"}class jv extends Error{name="HookError"}class Bv extends Error{name="ValidationError"}const Av=new r.AsyncLocalStorage;function Mv(){const e=Av.getStore();if(!e)throw new jv("[Inquirer] Hook functions can only be called from within a prompt");return e}function kv(){return Mv().rl}function Tv(e){return r.AsyncResource.bind((...t)=>{const r=Mv();let n=!1;const o=r.handleChange;r.handleChange=()=>{n=!0};const i=e(...t);return n&&o(),r.handleChange=o,i})}function Iv(e){const t=Mv(),{index:r}=t,n=e({get:()=>t.hooks[r],set(e){t.hooks[r]=e},initialized:r in t.hooks});return t.index++,n}const Lv={queue(e){const t=Mv(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();const n=e(kv());if(null!=n&&"function"!=typeof n)throw new Bv("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){const e=Mv();Tv(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=Mv();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Rv(e){return Iv(t=>{const n=r.AsyncResource.bind(function(e){t.get()!==e&&(t.set(e),Mv().handleChange())});if(t.initialized)return[t.get(),n];const o="function"==typeof e?e():e;return t.set(o),[o,n]})}function Uv(e,t){Iv(r=>{const n=r.get();(!Array.isArray(n)||t.some((e,t)=>!Object.is(e,n[t])))&&Lv.queue(e),r.set(t)})}var Nv=P(J());const $v={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},qv={...$v,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},zv={...$v,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Wv=("win32"!==o.platform?"linux"!==o.env.TERM:Boolean(o.env.WT_SESSION)||Boolean(o.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===o.env.ConEmuTask||"Terminus-Sublime"===o.env.TERM_PROGRAM||"vscode"===o.env.TERM_PROGRAM||"xterm-256color"===o.env.TERM||"alacritty"===o.env.TERM||"JetBrains-JediTerm"===o.env.TERMINAL_EMULATOR)?qv:zv,Vv={prefix:{idle:Nv.blue("?"),done:Nv.green(Wv.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>Nv.yellow(e))},style:{answer:Nv.cyan,message:Nv.bold,error:e=>Nv.red(`> ${e}`),defaultAnswer:e=>Nv.dim(`(${e})`),help:Nv.dim,highlight:Nv.cyan,key:e=>Nv.cyan(Nv.bold(`<${e}>`))}};function Gv(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Kv(...e){const t={};for(const r of e)for(const[e,n]of Object.entries(r)){const r=t[e];t[e]=Gv(r)&&Gv(n)?Kv(r,n):n}return t}function Yv(...e){const t=[Vv,...e.filter(e=>null!=e)];return Kv(...t)}function Hv({status:e="idle",theme:t}){const[r,n]=Rv(!1),[o,i]=Rv(0),{prefix:u,spinner:a}=Yv(t);if(Uv(()=>{if("loading"===e){let e,t=-1;const r=setTimeout(()=>{n(!0),e=setInterval(()=>{t+=1,i(t%a.frames.length)},a.interval)},300);return()=>{clearTimeout(r),clearInterval(e)}}n(!1)},[e]),r)return a.frames[o];return"string"==typeof u?u:u["loading"===e?"idle":e]??u.idle}function Jv(e,t){return Iv(r=>{const n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((e,r)=>e!==t[r])){const n=e();return r.set({value:n,dependencies:t}),n}return n.value})}function Qv(e){return Rv({current:e})[0]}function Xv(e){const t=Qv(e);t.current=e,Uv(e=>{let r=!1;const n=Tv((n,o)=>{r||t.current(o,e)});return e.input.on("keypress",n),()=>{r=!0,e.input.removeListener("keypress",n)}},[])}var Zv=P(be()),ey=P(He());function ty(e,t){return e.split("\n").flatMap(e=>ey(e,t,{trim:!1,hard:!0}).split("\n").map(e=>e.trimEnd())).join("\n")}function ry(){return Zv({defaultWidth:80,output:kv().output})}function ny({items:e,active:t,renderItem:r,pageSize:n,loop:o=!0}){const i=ry(),u=t=>(t%e.length+e.length)%e.length,a=e.map((e,n)=>null==e?[]:ty(r({item:e,index:n,isActive:n===t}),i).split("\n")),c=a.reduce((e,t)=>e+t.length,0),s=e=>a[e]??[],l=function({active:e,renderedItems:t,pageSize:r,loop:n}){const o=Qv({lastPointer:e,lastActive:void 0}),{lastPointer:i,lastActive:u}=o.current,a=Math.floor(r/2),c=t.reduce((e,t)=>e+t.length,0),s=t.slice(0,e).reduce((e,t)=>e+t.length,0);let l=s;if(c>r)if(n)l=i,null!=u&&u<e&&e-u<r&&(l=Math.min(a,1===Math.abs(e-u)?Math.min(i+(t[u]?.length??0),Math.max(s,i)):i+e-u));else{const n=t.slice(e).reduce((e,t)=>e+t.length,0);l=n<r-a?r-n:Math.min(s,a)}return o.current.lastPointer=l,o.current.lastActive=e,l}({active:t,renderedItems:a,pageSize:n,loop:o}),f=s(t).slice(0,n),d=l+f.length<=n?l:n-f.length,p=Array.from({length:n});p.splice(d,f.length,...f);const h=new Set([t]);let b=d+f.length,v=u(t+1);for(;b<n&&!h.has(v)&&(o&&c>n?v!==t:v>t);){const e=s(v).slice(0,n-b);p.splice(b,e.length,...e),h.add(v),b+=e.length,v=u(v+1)}for(b=d-1,v=u(t-1);b>=0&&!h.has(v)&&(o&&c>n?v!==t:v<t);){const e=s(v),t=e.slice(Math.max(0,e.length-b-1));p.splice(b-t.length+1,t.length,...t),h.add(v),b-=t.length,v=u(v-1)}return p.filter(e=>"string"==typeof e).join("\n")}var oy=P(tt());const iy=[];iy.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&iy.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&iy.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const uy=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,ay=Symbol.for("signal-exit emitter"),cy=globalThis,sy=Object.defineProperty.bind(Object);class ly{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(cy[ay])return cy[ay];sy(cy,ay,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class fy{}const dy=globalThis.process,{onExit:py}=(hy=uy(dy)?new class extends fy{#n="win32"===dy.platform?"SIGINT":"SIGHUP";#o=new ly;#i;#u;#a;#c={};#s=!1;constructor(e){super(),this.#i=e,this.#c={};for(const t of iy)this.#c[t]=()=>{const r=this.#i.listeners(t);let{count:n}=this.#o;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#o.emit("exit",null,t),n="SIGHUP"===t?this.#n:t;r||e.kill(e.pid,n)}};this.#a=e.reallyExit,this.#u=e.emit}onExit(e,t){if(!uy(this.#i))return()=>{};!1===this.#s&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#o.on(r,e),()=>{this.#o.removeListener(r,e),0===this.#o.listeners.exit.length&&0===this.#o.listeners.afterExit.length&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#o.count+=1;for(const e of iy)try{const t=this.#c[e];t&&this.#i.on(e,t)}catch(e){}this.#i.emit=(e,...t)=>this.#l(e,...t),this.#i.reallyExit=e=>this.#f(e)}}unload(){this.#s&&(this.#s=!1,iy.forEach(e=>{const t=this.#c[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#i.removeListener(e,t)}catch(e){}}),this.#i.emit=this.#u,this.#i.reallyExit=this.#a,this.#o.count-=1)}#f(e){return uy(this.#i)?(this.#i.exitCode=e||0,this.#o.emit("exit",this.#i.exitCode,null),this.#a.call(this.#i,this.#i.exitCode)):0}#l(e,...t){const r=this.#u;if("exit"===e&&uy(this.#i)){"number"==typeof t[0]&&(this.#i.exitCode=t[0]);const n=r.call(this.#i,e,...t);return this.#o.emit("exit",this.#i.exitCode,null),n}return r.call(this.#i,e,...t)}}(dy):new class extends fy{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>hy.onExit(e,t),load:()=>hy.load(),unload:()=>hy.unload()});var hy,by=P(ft());const vy=e=>e.split("\n").length;function yy(e){return e>0?by.cursorDown(e):""}class my{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=""){const r=(e=>e.split("\n").pop()??"")(e),n=c.stripVTControlCharacters(r);let o=n;this.rl.line.length>0&&(o=o.slice(0,-this.rl.line.length)),this.rl.setPrompt(o),this.cursorPos=this.rl.getCursorPos();const i=ry();e=ty(e,i),t=ty(t,i),n.length%i===0&&(e+="\n");let u=e+(t?"\n"+t:"");const a=Math.floor(n.length/i)-this.cursorPos.rows+(t?vy(t):0);a>0&&(u+=by.cursorUp(a)),u+=by.cursorTo(this.cursorPos.cols),this.write(yy(this.extraLinesUnderPrompt)+by.eraseLines(this.height)+u),this.extraLinesUnderPrompt=a,this.height=vy(u)}checkCursorPos(){const e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(by.cursorTo(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let t=yy(this.extraLinesUnderPrompt);t+=e?by.eraseLines(this.height):"\n",t+=by.cursorShow,this.write(t),this.rl.close()}}class Dy extends Promise{static withResolver(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}}function gy(e){const t=function(){const e=Error.prepareStackTrace;let t=[];try{Error.prepareStackTrace=(e,r)=>{const n=r.slice(1);return t=n,n},(new Error).stack}catch{return t}return Error.prepareStackTrace=e,t}();return(n,o={})=>{const{input:i=process.stdin,signal:u}=o,a=new Set,c=new oy;c.pipe(o.output??process.stdout);const s=E.createInterface({terminal:!0,input:i,output:c}),l=new my(s),{promise:f,resolve:d,reject:p}=Dy.withResolver(),h=()=>p(new xv);if(u){const e=()=>p(new Cv({cause:u.reason}));if(u.aborted)return e(),Object.assign(f,{cancel:h});u.addEventListener("abort",e),a.add(()=>u.removeEventListener("abort",e))}a.add(py((e,t)=>{p(new Fv(`User force closed the prompt with ${e} ${t}`))}));const b=()=>p(new Fv("User force closed the prompt with SIGINT"));s.on("SIGINT",b),a.add(()=>s.removeListener("SIGINT",b));const v=()=>l.checkCursorPos();return s.input.on("keypress",v),a.add(()=>s.input.removeListener("keypress",v)),function(e,t){const r=function(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}(e);return Av.run(r,()=>t(function(e){r.handleChange=()=>{r.index=0,e()},r.handleChange()}))}(s,i=>{const u=r.AsyncResource.bind(()=>Lv.clearAll());return s.on("close",u),a.add(()=>s.removeListener("close",u)),i(()=>{try{const r=e(n,e=>{setImmediate(()=>d(e))});if(void 0===r){const e=t[1]?.getFileName();throw new Error(`Prompt functions must return a string.\n at ${e}`)}const[o,i]="string"==typeof r?[r]:r;l.render(o,i),Lv.run()}catch(e){p(e)}}),Object.assign(f.then(e=>(Lv.clearAll(),e),e=>{throw Lv.clearAll(),e}).finally(()=>{a.forEach(e=>e()),l.done({clearContent:Boolean(o.clearPromptOnDone)}),c.end()}).then(()=>f),{cancel:h})})}}class wy{separator=Nv.dim(Array.from({length:15}).join(Wv.line));type="separator";constructor(e){e&&(this.separator=e)}static isSeparator(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"separator"===e.type)}}const _y={icon:{checked:Nv.green(Wv.circleFilled),unchecked:Wv.circle,cursor:Wv.pointer},style:{disabledChoice:e=>Nv.dim(`- ${e}`),renderSelectedChoices:e=>e.map(e=>e.short).join(", "),description:e=>Nv.cyan(e)},helpMode:"auto"};function Oy(e){return!wy.isSeparator(e)&&!e.disabled}function Sy(e){return Oy(e)&&Boolean(e.checked)}function Ey(e){return Oy(e)?{...e,checked:!e.checked}:e}var Py=gy((e,t)=>{const{instructions:r,pageSize:n=7,loop:o=!0,required:i,validate:u=()=>!0}=e,a={all:"a",invert:"i",...e.shortcuts},c=Yv(_y,e.theme),s=Qv(!0),[l,f]=Rv("idle"),d=Hv({status:l,theme:c}),[p,h]=Rv(e.choices.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1,checked:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(r.description=e.description),r}));const b=Jv(()=>{const e=p.findIndex(Oy),t=p.findLastIndex(Oy);if(-1===e)throw new Bv("[checkbox prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[p]),[v,y]=Rv(b.first),[m,D]=Rv(!0),[g,w]=Rv();Xv(async e=>{if(Pv(e)){const e=p.filter(Sy),r=await u([...e]);i&&!p.some(Sy)?w("At least one choice must be selected"):!0===r?(f("done"),t(e.map(e=>e.value))):w(r||"You must select a valid value")}else if(_v(e)||Ov(e)){if(o||_v(e)&&v!==b.first||Ov(e)&&v!==b.last){const t=_v(e)?-1:1;let r=v;do{r=(r+t+p.length)%p.length}while(!Oy(p[r]));y(r)}}else if((e=>"space"===e.name)(e))w(void 0),D(!1),h(p.map((e,t)=>t===v?Ey(e):e));else if(e.name===a.all){const e=p.some(e=>Oy(e)&&!e.checked);h(p.map((r=e,function(e){return Oy(e)?{...e,checked:r}:e})))}else if(e.name===a.invert)h(p.map(Ey));else if(Ev(e)){const t=Number(e.name)-1,r=p[t];null!=r&&Oy(r)&&(y(t),h(p.map((e,r)=>r===t?Ey(e):e)))}var r});const _=c.style.message(e.message,l);let O;const S=ny({items:p,active:v,renderItem({item:e,isActive:t}){if(wy.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return c.style.disabledChoice(`${e.name} ${t}`)}t&&(O=e.description);const r=e.checked?c.icon.checked:c.icon.unchecked;return(t?c.style.highlight:e=>e)(`${t?c.icon.cursor:" "}${r} ${e.name}`)},pageSize:n,loop:o});if("done"===l){const e=p.filter(Sy);return`${d} ${_} ${c.style.answer(c.style.renderSelectedChoices(e,p))}`}let E="",P="";if("always"===c.helpMode||"auto"===c.helpMode&&m&&(void 0===r||r)){if("string"==typeof r)E=r;else{E=` (Press ${[`${c.style.key("space")} to select`,a.all?`${c.style.key(a.all)} to toggle all`:"",a.invert?`${c.style.key(a.invert)} to invert selection`:"",`and ${c.style.key("enter")} to proceed`].filter(e=>""!==e).join(", ")})`}p.length>n&&("always"===c.helpMode||"auto"===c.helpMode&&s.current)&&(P=`\n${c.style.help("(Use arrow keys to reveal more choices)")}`,s.current=!1)}const C=O?`\n${c.style.description(O)}`:"";let x="";return g&&(x=`\n${c.style.error(g)}`),`${d} ${_}${E}\n${S}${P}${C}${x}${by.cursorHide}`}),Cy=Hr();const xy={validationFailureMode:"keep"};var Fy=gy((e,t)=>{const{waitForUseInput:r=!0,file:{postfix:n=e.postfix??".txt",...o}={},validate:i=()=>!0}=e,u=Yv(xy,e.theme),[a,c]=Rv("idle"),[s="",l]=Rv(e.default),[f,d]=Rv(),p=Hv({status:a,theme:u});function h(r){r.pause();Cy.editAsync(s,(n,o)=>{(async(n,o)=>{if(r.resume(),n)d(n.toString());else{c("loading");const r=await i(o);!0===r?(d(void 0),c("done"),t(o)):("clear"===u.validationFailureMode?l(e.default):l(o),d(r||"You must provide a valid value"),c("idle"))}})(n,o)},{postfix:n,...o})}Uv(e=>{r||h(e)},[]),Xv((e,t)=>{"idle"===a&&Pv(e)&&h(t)});const b=u.style.message(e.message,a);let v="";if("loading"===a)v=u.style.help("Received");else if("idle"===a){const e=u.style.key("enter");v=u.style.help(`Press ${e} to launch your preferred editor.`)}let y="";return f&&(y=u.style.error(f)),[[p,b,v].filter(Boolean).join(" "),y]});function jy(e,t){let r=!1!==t;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function By(e){return e?"Yes":"No"}var Ay=gy((e,t)=>{const{transformer:r=By}=e,[n,o]=Rv("idle"),[i,u]=Rv(""),a=Yv(e.theme),c=Hv({status:n,theme:a});Xv((n,a)=>{if(Pv(n)){const n=jy(i,e.default);u(r(n)),o("done"),t(n)}else if("tab"===n.name){const t=By(!jy(i,e.default));a.clearLine(0),a.write(t),u(t)}else u(a.line)});let s=i,l="";"done"===n?s=a.style.answer(i):l=` ${a.style.defaultAnswer(!1===e.default?"y/N":"Y/n")}`;return`${c} ${a.style.message(e.message,n)}${l} ${s}`});const My={validationFailureMode:"keep"};var ky=gy((e,t)=>{const{required:r,validate:n=()=>!0,prefill:o="tab"}=e,i=Yv(My,e.theme),[u,a]=Rv("idle"),[c="",s]=Rv(e.default),[l,f]=Rv(),[d,p]=Rv(""),h=Hv({status:u,theme:i});Xv(async(e,o)=>{if("idle"===u)if(Pv(e)){const e=d||c;a("loading");const u=r&&!e?"You must provide a value":await n(e);!0===u?(p(e),a("done"),t(e)):("clear"===i.validationFailureMode?p(""):o.write(d),f(u||"You must provide a valid value"),a("idle"))}else Sv(e)&&!d?s(void 0):"tab"!==e.name||d?(p(o.line),f(void 0)):(s(void 0),o.clearLine(0),o.write(c),p(c))}),Uv(e=>{"editable"===o&&c&&(e.write(c),p(c))},[]);const b=i.style.message(e.message,u);let v,y=d;"function"==typeof e.transformer?y=e.transformer(d,{isFinal:"done"===u}):"done"===u&&(y=i.style.answer(d)),c&&"done"!==u&&!d&&(v=i.style.defaultAnswer(c));let m="";return l&&(m=i.style.error(l)),[[h,b,v,y].filter(e=>void 0!==e).join(" "),m]});function Ty(e,{min:t,max:r,step:n}){return null!=e&&!Number.isNaN(e)&&(e<t||e>r?`Value must be between ${t} and ${r}`:!("any"!==n&&!function(e,t,r){const n=e*Math.pow(10,6),o=t*Math.pow(10,6),i=r*Math.pow(10,6);return(n-(Number.isFinite(r)?i:0))%o===0}(e,n,t))||`Value must be a multiple of ${n}${Number.isFinite(t)?` starting from ${t}`:""}`)}var Iy=gy((e,t)=>{const{validate:r=()=>!0,min:n=-1/0,max:o=1/0,step:i=1,required:u=!1}=e,a=Yv(e.theme),[c,s]=Rv("idle"),[l,f]=Rv(""),d=!0===Ty(e.default,{min:n,max:o,step:i})?e.default?.toString():void 0,[p="",h]=Rv(d),[b,v]=Rv(),y=Hv({status:c,theme:a});Xv(async(e,a)=>{if("idle"===c)if(Pv(e)){const e=l||p,c=""===e?void 0:Number(e);s("loading");let d=!0;(u||null!=c)&&(d=Ty(c,{min:n,max:o,step:i})),!0===d&&(d=await r(c)),!0===d?(f(String(c??"")),s("done"),t(c)):(a.write(l),v(d||"You must provide a valid numeric value"),s("idle"))}else Sv(e)&&!l?h(void 0):"tab"!==e.name||l?(f(a.line),v(void 0)):(h(void 0),a.clearLine(0),a.write(p),f(p))});const m=a.style.message(e.message,c);let D,g=l;"done"===c&&(g=a.style.answer(l)),p&&"done"!==c&&!l&&(D=a.style.defaultAnswer(p));let w="";return b&&(w=a.style.error(b)),[[y,m,D,g].filter(e=>void 0!==e).join(" "),w]});const Ly={key:"h",name:"Help, list all options",value:void 0};var Ry=gy((e,t)=>{const{default:r="h"}=e,n=Jv(()=>function(e){return e.map(e=>{if(wy.isSeparator(e))return e;const t="name"in e?e.name:String(e.value);return{value:"value"in e?e.value:t,name:t,key:e.key.toLowerCase()}})}(e.choices),[e.choices]),[o,i]=Rv("idle"),[u,a]=Rv(""),[c,s]=Rv(e.expanded??!1),[l,f]=Rv(),d=Yv(e.theme),p=Hv({theme:d,status:o});Xv((e,o)=>{if(Pv(e)){const e=(u||r).toLowerCase();if("h"!==e||c){const r=n.find(t=>!wy.isSeparator(t)&&t.key===e);r?(i("done"),a(e),t(r.value)):f(""===u?"Please input a value":`"${Nv.red(u)}" isn't an available option`)}else s(!0)}else a(o.line),f(void 0)});const h=d.style.message(e.message,o);if("done"===o){const e=n.find(e=>!wy.isSeparator(e)&&e.key===u.toLowerCase());return`${p} ${h} ${d.style.answer(e.name)}`}const b=c?n:[...n,Ly];let v="",y=b.map(e=>wy.isSeparator(e)?"":e.key===r?e.key.toUpperCase():e.key).join("");y=` ${d.style.defaultAnswer(y)}`,c&&(y="",v=b.map(e=>{if(wy.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===u.toLowerCase()?d.style.highlight(t):t}).join("\n"));let m="";const D=n.find(e=>!wy.isSeparator(e)&&e.key===u.toLowerCase());D&&(m=`${Nv.cyan(">>")} ${D.name}`);let g="";return l&&(g=d.style.error(l)),[`${p} ${h}${y} ${u}`,[v,m,g].filter(Boolean).join("\n")]});const Uy=/\d+/;function Ny(e){return null!=e&&!wy.isSeparator(e)}function $y(e,t){let r;const n=t.filter(Ny);if(Uy.test(e)){r=n[Number.parseInt(e,10)-1]}else r=n.find(t=>t.key===e);return r?[r,t.indexOf(r)]:[void 0,void 0]}var qy=gy((e,t)=>{const{loop:r=!0}=e,n=Jv(()=>function(e){let t=0;return e.map(e=>{if(wy.isSeparator(e))return e;if(t+=1,"string"==typeof e)return{value:e,name:e,short:e,key:String(t)};const r=e.name??String(e.value);return{value:e.value,name:r,short:e.short??r,key:e.key??String(t)}})}(e.choices),[e.choices]),[o,i]=Rv("idle"),[u,a]=Rv(""),[c,s]=Rv(),l=Yv(e.theme),f=Hv({status:o,theme:l}),d=Jv(()=>{const e=n.findIndex(Ny),t=n.findLastIndex(Ny);if(-1===e)throw new Bv("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[n]);Xv((e,o)=>{if(Pv(e)){const[e]=$y(u,n);Ny(e)?(a(e.short),i("done"),t(e.value)):s(""===u?"Please input a value":`"${Nv.red(u)}" isn't an available option`)}else if("up"===e.name||"down"===e.name){o.clearLine(0);const[t,i]=$y(u,n);if(t){if(r||"up"===e.name&&i!==d.first||"down"===e.name&&i!==d.last){const t="up"===e.name?-1:1;let r=i;do{r=(r+t+n.length)%n.length}while(!Ny(n[r]));a(n[r].key)}}else{const t="down"===e.name?n.find(Ny):n.findLast(Ny);a(t.key)}}else a(o.line),s(void 0)});const p=l.style.message(e.message,o);if("done"===o)return`${f} ${p} ${l.style.answer(u)}`;const h=n.map(e=>{if(wy.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===u.toLowerCase()?l.style.highlight(t):t}).join("\n");let b="";return c&&(b=l.style.error(c)),[`${f} ${p} ${u}`,[h,b].filter(Boolean).join("\n")]}),zy=gy((e,t)=>{const{validate:r=()=>!0}=e,n=Yv(e.theme),[o,i]=Rv("idle"),[u,a]=Rv(),[c,s]=Rv(""),l=Hv({status:o,theme:n});Xv(async(e,n)=>{if("idle"===o)if(Pv(e)){const e=c;i("loading");const o=await r(e);!0===o?(s(e),i("done"),t(e)):(n.write(c),a(o||"You must provide a valid value"),i("idle"))}else s(n.line),a(void 0)});const f=n.style.message(e.message,o);let d,p="";if(e.mask){p=("string"==typeof e.mask?e.mask:"*").repeat(c.length)}else"done"!==o&&(d=`${n.style.help("[input is masked]")}${by.cursorHide}`);"done"===o&&(p=n.style.answer(p));let h="";return u&&(h=n.style.error(u)),[[l,f,e.mask?p:d].join(" "),h]});const Wy={icon:{cursor:Wv.pointer},style:{disabled:e=>Nv.dim(`- ${e}`),searchTerm:e=>Nv.cyan(e),description:e=>Nv.cyan(e)},helpMode:"auto"};function Vy(e){return!wy.isSeparator(e)&&!e.disabled}var Gy=gy((e,t)=>{const{pageSize:r=7,validate:n=()=>!0}=e,o=Yv(Wy,e.theme),i=Qv(!0),[u,a]=Rv("loading"),[c,s]=Rv(""),[l,f]=Rv([]),[d,p]=Rv(),h=Hv({status:u,theme:o}),b=Jv(()=>({first:l.findIndex(Vy),last:l.findLastIndex(Vy)}),[l]),[v=b.first,y]=Rv();Uv(()=>{const t=new AbortController;a("loading"),p(void 0);return(async()=>{try{const r=await e.source(c||void 0,{signal:t.signal});t.signal.aborted||(y(void 0),p(void 0),f(r.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(r.description=e.description),r})),a("idle"))}catch(e){!t.signal.aborted&&e instanceof Error&&p(e.message)}})(),()=>{t.abort()}},[c]);const m=l[v];Xv(async(e,r)=>{if(Pv(e))if(m){a("loading");const e=await n(m.value);a("idle"),!0===e?(a("done"),t(m.value)):m.name===c?p(e||"You must provide a valid value"):(r.write(m.name),s(m.name))}else r.write(c);else if("tab"===e.name&&m)r.clearLine(0),r.write(m.name),s(m.name);else if("loading"===u||"up"!==e.name&&"down"!==e.name)s(r.line);else if(r.clearLine(0),"up"===e.name&&v!==b.first||"down"===e.name&&v!==b.last){const t="up"===e.name?-1:1;let r=v;do{r=(r+t+l.length)%l.length}while(!Vy(l[r]));y(r)}});const D=o.style.message(e.message,u);v>0&&(i.current=!1);let g="";l.length>1&&("always"===o.helpMode||"auto"===o.helpMode&&i.current)&&(g=l.length>r?`\n${o.style.help("(Use arrow keys to reveal more choices)")}`:`\n${o.style.help("(Use arrow keys)")}`);const w=ny({items:l,active:v,renderItem({item:e,isActive:t}){if(wy.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return o.style.disabled(`${e.name} ${t}`)}return(t?o.style.highlight:e=>e)(`${t?o.icon.cursor:" "} ${e.name}`)},pageSize:r,loop:!1});let _,O;if(d?_=o.style.error(d):0===l.length&&""!==c&&"idle"===u&&(_=o.style.error("No results found")),"done"===u&&m){const e=m.short;return`${h} ${D} ${o.style.answer(e)}`}O=o.style.searchTerm(c);const S=m?.description?`\n${o.style.description(m.description)}`:"";return[[h,D,O].filter(Boolean).join(" "),`${_??w}${g}${S}`]});const Ky={icon:{cursor:Wv.pointer},style:{disabled:e=>Nv.dim(`- ${e}`),description:e=>Nv.cyan(e)},helpMode:"auto",indexMode:"hidden"};function Yy(e){return!wy.isSeparator(e)&&!e.disabled}var Hy=gy((e,t)=>{const{loop:r=!0,pageSize:n=7}=e,o=Qv(!0),i=Yv(Ky,e.theme),[u,a]=Rv("idle"),c=Hv({status:u,theme:i}),s=Qv(),l=Jv(()=>e.choices.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(r.description=e.description),r}),[e.choices]),f=Jv(()=>{const e=l.findIndex(Yy),t=l.findLastIndex(Yy);if(-1===e)throw new Bv("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[l]),d=Jv(()=>"default"in e?l.findIndex(t=>Yy(t)&&t.value===e.default):-1,[e.default,l]),[p,h]=Rv(-1===d?f.first:d),b=l[p];Xv((e,n)=>{if(clearTimeout(s.current),Pv(e))a("done"),t(b.value);else if(_v(e)||Ov(e)){if(n.clearLine(0),r||_v(e)&&p!==f.first||Ov(e)&&p!==f.last){const t=_v(e)?-1:1;let r=p;do{r=(r+t+l.length)%l.length}while(!Yy(l[r]));h(r)}}else if(Ev(e)&&!Number.isNaN(Number(n.line))){const e=Number(n.line)-1,t=l[e];null!=t&&Yy(t)&&h(e),s.current=setTimeout(()=>{n.clearLine(0)},700)}else if(Sv(e))n.clearLine(0);else{const e=n.line.toLowerCase(),t=l.findIndex(t=>!(wy.isSeparator(t)||!Yy(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&h(t),s.current=setTimeout(()=>{n.clearLine(0)},700)}}),Uv(()=>()=>{clearTimeout(s.current)},[]);const v=i.style.message(e.message,u);let y="",m="";("always"===i.helpMode||"auto"===i.helpMode&&o.current)&&(o.current=!1,l.length>n?m=`\n${i.style.help(`(${e.instructions?.pager??"Use arrow keys to reveal more choices"})`)}`:y=i.style.help(`(${e.instructions?.navigation??"Use arrow keys"})`));const D=ny({items:l,active:p,renderItem({item:e,isActive:t,index:r}){if(wy.isSeparator(e))return` ${e.separator}`;const n="number"===i.indexMode?`${r+1}. `:"";if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return i.style.disabled(`${n}${e.name} ${t}`)}return(t?i.style.highlight:e=>e)(`${t?i.icon.cursor:" "} ${n}${e.name}`)},pageSize:n,loop:r});if("done"===u)return`${c} ${v} ${i.style.answer(b.short)}`;const g=b.description?`\n${i.style.description(b.description)}`:"";return`${[c,v,y].filter(Boolean).join(" ")}\n${D}${m}${g}${by.cursorHide}`}),Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Jy(e,t)};function Qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Jy(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Xy(e,t,r,n){return new(r||(r=Promise))(function(o,i){function u(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(u,a)}c((n=n.apply(e,t||[])).next())})}function Zy(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function em(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tm(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function rm(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function nm(e){return this instanceof nm?(this.v=e,this):new nm(e)}function om(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),n[Symbol.asyncIterator]=function(){return this},n;function u(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=o[e](t)).value instanceof nm?Promise.resolve(r.value.v).then(c,s):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function s(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function im(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=em(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}}function um(e){return"function"==typeof e}function am(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var cm=am(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function sm(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var lm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var u=em(i),a=u.next();!a.done;a=u.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else i.remove(this);var c=this.initialTeardown;if(um(c))try{c()}catch(e){o=e instanceof cm?e.errors:[e]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var l=em(s),f=l.next();!f.done;f=l.next()){var d=f.value;try{dm(d)}catch(e){o=null!=o?o:[],e instanceof cm?o=rm(rm([],tm(o)),tm(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new cm(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)dm(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&sm(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&sm(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();function fm(e){return e instanceof lm||e&&"closed"in e&&um(e.remove)&&um(e.add)&&um(e.unsubscribe)}function dm(e){um(e)?e():e.unsubscribe()}lm.EMPTY;var pm={Promise:void 0},hm=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,rm([e,t],tm(r)))};function bm(e){hm(function(){throw e})}function vm(){}var ym=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,fm(t)&&t.add(r)):r.destination=wm,r}return Qy(t,e),t.create=function(e,t,r){return new Dm(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(lm),mm=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){gm(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){gm(e)}else gm(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){gm(e)}},e}(),Dm=function(e){function t(t,r,n){var o,i=e.call(this)||this;return o=um(t)||!t?{next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:t,i.destination=new mm(o),i}return Qy(t,e),t}(ym);function gm(e){bm(e)}var wm={closed:!0,next:vm,error:function(e){throw e},complete:vm},_m="function"==typeof Symbol&&Symbol.observable||"@@observable";function Om(e){return e}var Sm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof ym||function(e){return e&&um(e.next)&&um(e.error)&&um(e.complete)}(n)&&fm(n)?e:new Dm(e,t,r);return function(){var e=o,t=e.operator,r=e.source;i.add(t?t.call(i,r):r?o._subscribe(i):o._trySubscribe(i))}(),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Em(t))(function(t,n){var o=new Dm({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[_m]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?Om:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Em(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function Em(e){var t;return null!==(t=null!=e?e:pm.Promise)&&void 0!==t?t:Promise}function Pm(e){return function(t){if(function(e){return um(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function Cm(e,t,r,n,o){return new xm(e,t,r,n,o)}var xm=function(e){function t(t,r,n,o,i,u){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=u,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return Qy(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(ym),Fm=new Sm(function(e){return e.complete()});function jm(e){return(t=(r=e)[r.length-1])&&um(t.schedule)?e.pop():void 0;var t,r}var Bm=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Am(e){return um(null==e?void 0:e.then)}function Mm(e){return um(e[_m])}function km(e){return Symbol.asyncIterator&&um(null==e?void 0:e[Symbol.asyncIterator])}function Tm(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Im="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Lm(e){return um(null==e?void 0:e[Im])}function Rm(e){return om(this,arguments,function(){var t,r,n;return Zy(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,nm(t.read())];case 3:return r=o.sent(),n=r.value,r.done?[4,nm(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,nm(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Um(e){return um(null==e?void 0:e.getReader)}function Nm(e){if(e instanceof Sm)return e;if(null!=e){if(Mm(e))return o=e,new Sm(function(e){var t=o[_m]();if(um(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(Bm(e))return n=e,new Sm(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()});if(Am(e))return r=e,new Sm(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,bm)});if(km(e))return $m(e);if(Lm(e))return t=e,new Sm(function(e){var r,n;try{for(var o=em(t),i=o.next();!i.done;i=o.next()){var u=i.value;if(e.next(u),e.closed)return}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.complete()});if(Um(e))return $m(Rm(e))}var t,r,n,o;throw Tm(e)}function $m(e){return new Sm(function(t){(function(e,t){var r,n,o,i;return Xy(this,void 0,void 0,function(){var u,a;return Zy(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=im(e),c.label=1;case 1:return[4,r.next()];case 2:if((n=c.sent()).done)return[3,4];if(u=n.value,t.next(u),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function qm(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function zm(e,t){return void 0===t&&(t=0),Pm(function(r,n){r.subscribe(Cm(n,function(r){return qm(n,e,function(){return n.next(r)},t)},function(){return qm(n,e,function(){return n.complete()},t)},function(r){return qm(n,e,function(){return n.error(r)},t)}))})}function Wm(e,t){return void 0===t&&(t=0),Pm(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function Vm(e,t){if(!e)throw new Error("Iterable cannot be null");return new Sm(function(r){qm(r,t,function(){var n=e[Symbol.asyncIterator]();qm(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function Gm(e,t){if(null!=e){if(Mm(e))return function(e,t){return Nm(e).pipe(Wm(t),zm(t))}(e,t);if(Bm(e))return function(e,t){return new Sm(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}(e,t);if(Am(e))return function(e,t){return Nm(e).pipe(Wm(t),zm(t))}(e,t);if(km(e))return Vm(e,t);if(Lm(e))return function(e,t){return new Sm(function(r){var n;return qm(r,t,function(){n=e[Im](),qm(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)},0,!0)}),function(){return um(null==n?void 0:n.return)&&n.return()}})}(e,t);if(Um(e))return function(e,t){return Vm(Rm(e),t)}(e,t)}throw Tm(e)}function Km(e,t){return t?Gm(e,t):Nm(e)}var Ym=am(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Hm(e,t,r){return void 0===r&&(r=1/0),um(t)?Hm(function(r,n){return function(e,t){return Pm(function(r,n){var o=0;r.subscribe(Cm(n,function(r){n.next(e.call(t,r,o++))}))})}(function(e,o){return t(r,e,n,o)})(Nm(e(r,n)))},r):("number"==typeof t&&(r=t),Pm(function(t,n){return function(e,t,r,n,o,i,u){var a=[],c=0,s=0,l=!1,f=function(){!l||a.length||c||t.complete()},d=function(e){c++;var o=!1;Nm(r(e,s++)).subscribe(Cm(t,function(e){t.next(e)},function(){o=!0},void 0,function(){if(o)try{c--;for(var e=function(){var e=a.shift();u||d(e)};a.length&&c<n;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(Cm(t,function(e){return c<n?d(e):a.push(e)},function(){l=!0,f()})),function(){}}(t,n,e,r)}))}function Jm(e,t){return Pm(function(e,t,r){return function(n,o){var i=r,u=t,a=0;n.subscribe(Cm(o,function(t){var r=a++;u=i?e(u,t,r):(i=!0,t)},function(){i&&o.next(u),o.complete()}))}}(e,t,arguments.length>=2))}function Qm(e,t){return um(t)?Hm(e,t,1):Hm(e,1)}var Xm=P(ov());const Zm=(e,t="",r)=>{let n=e;t.split(".").forEach((e,t,o)=>{"__proto__"!==e&&"constructor"!==e&&(t===o.length-1?n[e]=r:e in n&&"object"==typeof n[e]||(n[e]={}),n=n[e])})},eD=(e,t="",r)=>{const n=r=>String.prototype.split.call(t,r).filter(Boolean).reduce((e,t)=>null==e?e:e[t],e),o=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return void 0===o||o===e?r:o};async function tD(e,t,r){const n=e[t];return"function"==typeof n?Xm(n)(r):n}class rD extends Error{name="TTYError";isTtyError=!0}class nD{prompts;answers={};process=Fm;abortController=new AbortController;opt;constructor(e,t={}){this.opt=t,this.prompts=e}async run(e,t){let r;var n,o;return this.abortController=new AbortController,this.answers="object"==typeof t?{...t}:{},!function(e){return Array.isArray(e)}(e)?r=(n=e)&&(n instanceof Sm||um(n.lift)&&um(n.subscribe))?e:function(e){return Object.values(e).every(e=>"object"==typeof e&&!Array.isArray(e)&&null!=e)}(e)?Km(Object.entries(e).map(([e,t])=>Object.assign({},t,{name:e}))):Km([e]):r=Km(e),this.process=r.pipe(Qm(e=>function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Km(e,jm(e))}(e).pipe(Qm(e=>{return Km(this.shouldRun(e).then(t=>{if(t)return e})).pipe((t=e=>null!=e,Pm(function(e,n){var o=0;e.subscribe(Cm(n,function(e){return t.call(r,e,o++)&&n.next(e)}))})));var t,r}),Qm(e=>{return t=()=>Km(this.fetchAnswer(e)),new Sm(function(e){Nm(t()).subscribe(e)});var t})))),(o=this.process.pipe(Jm((e,t)=>(Zm(e,t.name,t.answer),e),this.answers)),new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):t(new Ym)}})})).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async e=>{const[t,r,n]=await Promise.all([tD(e,"message",this.answers),tD(e,"default",this.answers),tD(e,"choices",this.answers)]);let o;return Array.isArray(n)&&(o=n.map(e=>{const t="object"!=typeof e||null==e?{name:e,value:e}:{...e,value:"value"in e?e.value:"name"in e?e.name:void 0};return"value"in t&&Array.isArray(r)?{checked:r.includes(t.value),...t}:t})),Object.assign({},e,{message:t,default:r,choices:o,type:e.type in this.prompts?e.type:"input"})};fetchAnswer=async e=>{const t=await this.prepareQuestion(e),r=this.prompts[t.type];if(null==r)throw new Error(`Prompt for type ${t.type} not found`);let n;const o=function(e){return Boolean(e.prototype&&"run"in e.prototype&&"function"==typeof e.prototype.run)}(r)?(e,t)=>new Promise((o,i)=>{const{signal:a}=t;if(a.aborted)return void i(new Cv({cause:a.reason}));const c=u.createInterface(function(e){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new rD("Prompts can not be meaningfully rendered in non-TTY environments");const r=new oy;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(t)),s=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")};process.on("exit",s),c.on("SIGINT",s);const l=new r(e,c,this.answers),f=()=>{process.removeListener("exit",s),c.removeListener("SIGINT",s),c.setPrompt(""),c.output.unmute(),c.output.write(by.cursorShow),c.output.end(),c.close(),n?.()},d=()=>{i(new Cv({cause:a.reason})),f()};a.addEventListener("abort",d),n=()=>{a.removeEventListener("abort",d),n=void 0},l.run().then(o,i).finally(f)}):r;let i;const{signal:a}=this.opt;if(a?.aborted)this.abortController.abort(a.reason);else if(a){const e=()=>this.abortController.abort(a.reason);a.addEventListener("abort",e),i=()=>{a.removeEventListener("abort",e)}}const{filter:c=e=>e}=t,{signal:s}=this.abortController;return o(t,{...this.opt,signal:s}).then(e=>({name:t.name,answer:c(e,this.answers)})).finally(()=>{n?.(),i?.()})};close=()=>{this.abortController.abort()};shouldRun=async e=>{if(!0!==e.askAnswered&&void 0!==eD(this.answers,e.name))return!1;const{when:t}=e;if("function"==typeof t){const e=await Xm(t)(this.answers);return Boolean(e)}return!1!==t}}const oD={input:ky,select:Hy,list:Hy,number:Iy,confirm:Ay,rawlist:qy,expand:Ry,checkbox:Py,password:zy,editor:Fy,search:Gy};function iD(e){function t(r,n){const o=new nD(t.prompts,e),i=o.run(r,n);return Object.assign(i,{ui:o})}return t.prompts={...oD},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){t.prompts={...oD}},t}const uD=iD();const aD={prompt:uD,ui:{Prompt:nD},createPromptModule:iD,registerPrompt:function(e,t){uD.registerPrompt(e,t)},restoreDefaultPrompts:function(){uD.restoreDefaultPrompts()},Separator:wy},cD=h.join(g.homedir(),".ttmg-cli"),sD=h.join(cD,"config.json");function lD(e){let t=[];if(s.existsSync(sD))try{const e=JSON.parse(s.readFileSync(sD,"utf-8"));t=Array.isArray(e.clientKeys)?e.clientKeys:[]}catch(e){t=[]}t.includes(e)||(t.push(e),s.existsSync(cD)||s.mkdirSync(cD,{recursive:!0}),s.writeFileSync(sD,JSON.stringify({clientKeys:t},null,2),{encoding:"utf-8"}))}async function fD(){const e=function(){if(!s.existsSync(sD))return[];try{const e=JSON.parse(s.readFileSync(sD,"utf-8"));return Array.isArray(e.clientKeys)?e.clientKeys:[]}catch(e){return[]}}();let t;if(e.length>0){const{selectedKey:r}=await aD.prompt([{type:"list",name:"selectedKey",message:"Please select your game id(client_key):",choices:[...e,new aD.Separator,"Add new game id"]}]);if("Add new game id"===r){const{newKey:e}=await aD.prompt([{type:"input",name:"newKey",message:"Please input your new game id(client_key):",validate:e=>!!e||"Please input game id"}]);lD(e),t=e}else t=r}else{const{newKey:e}=await aD.prompt([{type:"input",name:"newKey",message:"Please input your game id(client_key):",validate:e=>!!e||"Please input game id"}]);lD(e),t=e}return t}const dD=m();function pD(){dD.use(m.json()),dD.post("/game/env",(e,r)=>{const n=e.body,{host:o,port:i}=n;r.json({code:0,msg:"ok"});const u=`http://${o}:${i}`;!function(e){const{exec:t}=require("child_process");open(e)}(u),console.log(t.bold.yellow(`Game debug is ready! Visit ${u} in your browser.`))}),dD.listen(9527,()=>{})}async function hD(){const e=await fD(),r=process.cwd(),n=function(){const e=g.homedir(),t=["Desktop","桌面"];for(const r of t){const t=h.join(e,r);if(s.existsSync(t))return t}return h.join(e,"Desktop")}();if(!n)return void console.log(t.redBright("Desktop path not found"));const o=h.join(n,"__TTMG_DEV_TEMP__",e);s.existsSync(o)?s.rmSync(o,{recursive:!0,force:!0}):s.mkdirSync(o,{recursive:!0});const i=await O.debugPkgs({entry:r,output:o,rules:{mainPackageSizeLimit:209715200,projectSizeLimit:209715200}});if(!(null==i?void 0:i.isSuccess))return console.log(t.redBright("Build game package failed, Please check the error message below:")),void console.log(t.redBright(null==i?void 0:i.errorMsg));console.log(t.cyan("\n==============================")),console.log(t.greenBright("✅ Game package built successfully!")),console.log(t.cyan("==============================\n")),console.log(t.yellow("Next steps:")),console.log(` 1. ${t.blue("Scan the QR code to start the client devServer.")}`),console.log(` 2. ${t.blue("Upload the dev package from:")} ${t.bold(o)}`),console.log(` 3. ${t.blue("Debug your game in the browser.")}\n`),pD();const u=wv(e);_.generate(u,{small:!0},e=>{console.log(function(e){const t=process.stdout.columns||80,r=e.split("\n"),n=r.reduce((e,t)=>Math.max(e,t.length),0),o=Math.floor((t-n)/3),i=" ".repeat(o>0?o:0);return r.map(e=>i+e).join("\n")}(e))})}const bD=new e.Command;bD.name("ttmg").description("TikTok Mini Game Command Line Tool").version("0.0.1"),bD.command("init").option("--h5","H5 Mini Game").option("--native","Native Mini Game").description("Initialize project").action(e=>{e.h5?dv():e.native?console.log("Native Mini Game initialize"):console.log(t.red.bold("Please run ttmg init --h5 or ttmg init --native"))}),bD.command("dev").description("Open browser dev environment").option("--h5","H5 Mini Game").option("--native","Native Mini Game").action(e=>{e.h5?mv():e.native?hD():console.log(t.red.bold("Please run ttmg dev --h5 or ttmg dev --native"))}),bD.command("build").option("--h5","H5 Mini Game").option("--native","Native Mini Game").description("Bundle project").action(async e=>{e.h5?gv():e.native?console.log("Native Mini Game bundle"):console.log(t.red.bold("Please run ttmg build --h5 or ttmg build --native"))}),bD.parse(process.argv),console.log("ttmg cli is running");
|
|
9
|
+
*/(),o=process.binding("constants"),i=n(),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",a=/XXXXXX/,c=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),l=o.EBADF||o.os.errno.EBADF,f=o.ENOENT||o.os.errno.ENOENT,d=[];var p=!1,v=!1;function y(e){var t=[],n=null;try{n=r.randomBytes(e)}catch(t){n=r.pseudoRandomBytes(e)}for(var o=0;o<e;o++)t.push(u[n[o]%62]);return t.join("")}function m(e){return void 0===e}function D(e,t){return"function"==typeof e?[t||{},e]:m(e)?[{},t]:[e,t]}function g(e){if(e.name)return t.join(e.dir||i,e.name);if(e.template)return e.template.replace(a,y(6));const r=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return t.join(e.dir||i,r)}function w(t,r){var n=D(t,r),o=n[0],i=n[1],u=o.name?1:o.tries||3;return isNaN(u)||u<0?i(new Error("Invalid tries")):o.template&&!o.template.match(a)?i(new Error("Invalid template provided")):void function t(){const r=g(o);e.stat(r,function(e){if(!e)return u-- >0?t():i(new Error("Could not get a unique tmp filename, max tries reached "+r));i(null,r)})}()}function _(t){var r=D(t)[0],n=r.name?1:r.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(a))throw new Error("Invalid template provided");do{const t=g(r);try{e.statSync(t)}catch(e){return t}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function O(r){const n=[r];do{for(var o=n.pop(),i=!1,u=e.readdirSync(o),a=0,c=u.length;a<c;a++){var s=t.join(o,u[a]);e.lstatSync(s).isDirectory()?(i||(i=!0,n.push(o)),n.push(s)):e.unlinkSync(s)}i||e.rmdirSync(o)}while(0!==n.length)}function S(t,r,n){const o=P(function(t){try{0<=t[0]&&e.closeSync(t[0])}catch(e){if(!(r=e,F(r,-l,"EBADF")||x(e)))throw e}var r;try{e.unlinkSync(t[1])}catch(e){if(!x(e))throw e}},[r,t]);return n.keep||d.unshift(o),o}function E(t,r){const n=P(r.unsafeCleanup?O:e.rmdirSync.bind(e),t);return r.keep||d.unshift(n),n}function P(e,t){var r=!1;return function n(o){if(!r){const o=d.indexOf(n);o>=0&&d.splice(o,1),r=!0,e(t)}o&&o(null)}}function C(){if(!v||p)for(;d.length;)try{d[0].call(null)}catch(e){}}function x(e){return F(e,-f,"ENOENT")}function F(e,t,r){return e.code==t||e.code==r}const j=process.versions.node.split(".").map(function(e){return parseInt(e,10)});return 0===j[0]&&(j[1]<9||9===j[1]&&j[2]<5)&&process.addListener("uncaughtException",function(e){throw v=!0,C(),e}),process.addListener("exit",function(e){e&&(v=!0),C()}),Lr.tmpdir=i,Lr.dir=function(t,r){var n=D(t,r),o=n[0],i=n[1];w(o,function(t,r){if(t)return i(t);e.mkdir(r,o.mode||448,function(e){if(e)return i(e);i(null,r,E(r,o))})})},Lr.dirSync=function(t){var r=D(t)[0];const n=_(r);return e.mkdirSync(n,r.mode||448),{name:n,removeCallback:E(n,r)}},Lr.file=function(t,r){var n=D(t,r),o=n[0],i=n[1];o.postfix=m(o.postfix)?".tmp":o.postfix,w(o,function(t,r){if(t)return i(t);e.open(r,c,o.mode||384,function(t,n){return t?i(t):o.discardDescriptor?e.close(n,function(t){if(t){try{e.unlinkSync(r)}catch(e){x(e)||(t=e)}return i(t)}i(null,r,void 0,S(r,-1,o))}):o.detachDescriptor?i(null,r,n,S(r,-1,o)):void i(null,r,n,S(r,n,o))})})},Lr.fileSync=function(t){var r=D(t)[0];r.postfix=r.postfix||".tmp";const n=r.discardDescriptor||r.detachDescriptor,o=_(r);var i=e.openSync(o,c,r.mode||384);return r.discardDescriptor&&(e.closeSync(i),i=void 0),{name:o,fd:i,removeCallback:S(o,n?-1:i,r)}},Lr.tmpName=w,Lr.tmpNameSync=_,Lr.setGracefulCleanup=function(){p=!0},Lr}var Ur,Nr={};var $r,qr={};var zr,Wr={};var Vr,Gr,Kr,Yr={};function Hr(){if(Gr)return Ct;Gr=1,Object.defineProperty(Ct,"__esModule",{value:!0});var e=function(){if($t)return xt;$t=1;var e=s,t=jt(),r=Mt(),n=It(),o=Ut(),i=zt(),u=xt,a=[new t,new r.UTF_16BE,new r.UTF_16LE,new r.UTF_32BE,new r.UTF_32LE,new n.sjis,new n.big5,new n.euc_jp,new n.euc_kr,new n.gb_18030,new i.ISO_2022_JP,new i.ISO_2022_KR,new i.ISO_2022_CN,new o.ISO_8859_1,new o.ISO_8859_2,new o.ISO_8859_5,new o.ISO_8859_6,new o.ISO_8859_7,new o.ISO_8859_8,new o.ISO_8859_9,new o.windows_1251,new o.windows_1256,new o.KOI8_R];return xt.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var o=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){o=!0;break}var i={fByteStats:r,fC1Bytes:o,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},u=a.map(function(e){return e.match(i)}).filter(function(e){return!!e}).sort(function(e,t){return t.confidence-e.confidence});return t&&!0===t.returnAllMatches?u:u.length>0?u[0].name:null},xt.detectFile=function(t,r,n){var o;"function"==typeof r&&(n=r,r=void 0);var i=function(t,i){if(o&&e.closeSync(o),t)return n(t,null);n(null,u.detect(i,r))};if(r&&r.sampleSize)return o=e.openSync(t,"r"),sample=Buffer.allocUnsafe(r.sampleSize),void e.read(o,sample,0,r.sampleSize,null,function(e){i(e,sample)});e.readFile(t,i)},xt.detectFileSync=function(t,r){if(r&&r.sampleSize){var n=e.openSync(t,"r"),o=Buffer.allocUnsafe(r.sampleSize);return e.readSync(n,o,0,r.sampleSize),e.closeSync(n),u.detect(o,r)}return u.detect(e.readFileSync(t),r)},xt.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detect(e,t)},xt.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFile(e,t,r)},xt.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,u.detectFileSync(e,t)},xt}(),t=f,r=s,n=Mr(),o=Rr(),i=function(){if(Ur)return Nr;Ur=1;var e=Nr&&Nr.__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(Nr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to create temporary file for editor")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Nr.CreateFileError=t,Nr}();Ct.CreateFileError=i.CreateFileError;var u=function(){if($r)return qr;$r=1;var e=qr&&qr.__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(qr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed launch editor")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return qr.LaunchEditorError=t,qr}();Ct.LaunchEditorError=u.LaunchEditorError;var a=function(){if(zr)return Wr;zr=1;var e=Wr&&Wr.__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(Wr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to read temporary file")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Wr.ReadFileError=t,Wr}();Ct.ReadFileError=a.ReadFileError;var c=function(){if(Vr)return Yr;Vr=1;var e=Yr&&Yr.__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(Yr,"__esModule",{value:!0});var t=function(t){function r(e){var r=this.constructor,n=t.call(this,"Failed to cleanup temporary file")||this;n.originalError=e;var o=r.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=r.prototype,n}return e(r,t),r}(Error);return Yr.RemoveFileError=t,Yr}();Ct.RemoveFileError=c.RemoveFileError,Ct.edit=function(e,t){void 0===e&&(e="");var r=new l(e,t);return r.run(),r.cleanup(),r.text},Ct.editAsync=function(e,t,r){void 0===e&&(e="");var n=new l(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)}})};var l=function(){function s(e,t){void 0===e&&(e=""),this.text="",this.fileOptions={},this.text=e,t&&(this.fileOptions=t),this.determineEditor(),this.createTemporaryFile()}return s.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(s.prototype,"temp_file",{get:function(){return console.log("DEPRECATED: temp_file. Use tempFile moving forward."),this.tempFile},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"last_exit_status",{get:function(){return console.log("DEPRECATED: last_exit_status. Use lastExitStatus moving forward."),this.lastExitStatus},enumerable:!0,configurable:!0}),s.prototype.run=function(){return this.launchEditor(),this.readTemporaryFile(),this.text},s.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)}},s.prototype.cleanup=function(){this.removeTemporaryFile()},s.prototype.determineEditor=function(){var e=process.env.VISUAL?process.env.VISUAL:process.env.EDITOR?process.env.EDITOR:/^win/.test(process.platform)?"notepad":"vim",t=s.splitStringBySpace(e).map(function(e){return e.replace("\\ "," ")}),r=t.shift();this.editor={args:t,bin:r}},s.prototype.createTemporaryFile=function(){try{this.tempFile=o.tmpNameSync(this.fileOptions);var e={encoding:"utf8"};this.fileOptions.hasOwnProperty("mode")&&(e.mode=this.fileOptions.mode),r.writeFileSync(this.tempFile,this.text,e)}catch(e){throw new i.CreateFileError(e)}},s.prototype.readTemporaryFile=function(){try{var t=r.readFileSync(this.tempFile);if(0===t.length)this.text="";else{var o=e.detect(t).toString();n.encodingExists(o)||(o="utf8"),this.text=n.decode(t,o)}}catch(e){throw new a.ReadFileError(e)}},s.prototype.removeTemporaryFile=function(){try{r.unlinkSync(this.tempFile)}catch(e){throw new c.RemoveFileError(e)}},s.prototype.launchEditor=function(){try{var e=t.spawnSync(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=e.status}catch(e){throw new u.LaunchEditorError(e)}},s.prototype.launchEditorAsync=function(e){var r=this;try{t.spawn(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",function(t){r.lastExitStatus=t,setImmediate(e)})}catch(e){throw new u.LaunchEditorError(e)}},s}();return Ct.ExternalEditor=l,Ct}function Jr(){if(Kr)return Pt;Kr=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=Hr(),t=gt(),r={validationFailureMode:"keep"};return Pt.default=(0,t.createPrompt)((n,o)=>{const{waitForUseInput:i=!0,file:{postfix:u=n.postfix??".txt",...a}={},validate:c=()=>!0}=n,s=(0,t.makeTheme)(r,n.theme),[l,f]=(0,t.useState)("idle"),[d="",p]=(0,t.useState)(n.default),[h,b]=(0,t.useState)(),v=(0,t.usePrefix)({status:l,theme:s});function y(t){t.pause();(0,e.editAsync)(d,(e,r)=>{(async(e,r)=>{if(t.resume(),e)b(e.toString());else{f("loading");const e=await c(r);!0===e?(b(void 0),f("done"),o(r)):("clear"===s.validationFailureMode?p(n.default):p(r),b(e||"You must provide a valid value"),f("idle"))}})(e,r)},{postfix:u,...a})}(0,t.useEffect)(e=>{i||y(e)},[]),(0,t.useKeypress)((e,r)=>{"idle"===l&&(0,t.isEnterKey)(e)&&y(r)});const m=s.style.message(n.message,l);let D="";if("loading"===l)D=s.style.help("Received");else if("idle"===l){const e=s.style.key("enter");D=s.style.help(`Press ${e} to launch your preferred editor.`)}let g="";return h&&(g=s.style.error(h)),[[v,m,D].filter(Boolean).join(" "),g]}),Pt}var Qr,Xr={};function Zr(){if(Qr)return Xr;Qr=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=gt();function t(e,t){let r=!1!==t;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function r(e){return e?"Yes":"No"}return Xr.default=(0,e.createPrompt)((n,o)=>{const{transformer:i=r}=n,[u,a]=(0,e.useState)("idle"),[c,s]=(0,e.useState)(""),l=(0,e.makeTheme)(n.theme),f=(0,e.usePrefix)({status:u,theme:l});(0,e.useKeypress)((u,l)=>{if((0,e.isEnterKey)(u)){const e=t(c,n.default);s(i(e)),a("done"),o(e)}else if("tab"===u.name){const e=r(!t(c,n.default));l.clearLine(0),l.write(e),s(e)}else s(l.line)});let d=c,p="";"done"===u?d=l.style.answer(c):p=` ${l.style.defaultAnswer(!1===n.default?"y/N":"Y/n")}`;return`${f} ${l.style.message(n.message,u)}${p} ${d}`}),Xr}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=gt(),t={validationFailureMode:"keep"};return tn.default=(0,e.createPrompt)((r,n)=>{const{required:o,validate:i=()=>!0,prefill:u="tab"}=r,a=(0,e.makeTheme)(t,r.theme),[c,s]=(0,e.useState)("idle"),[l="",f]=(0,e.useState)(r.default),[d,p]=(0,e.useState)(),[h,b]=(0,e.useState)(""),v=(0,e.usePrefix)({status:c,theme:a});(0,e.useKeypress)(async(t,r)=>{if("idle"===c)if((0,e.isEnterKey)(t)){const e=h||l;s("loading");const t=o&&!e?"You must provide a value":await i(e);!0===t?(b(e),s("done"),n(e)):("clear"===a.validationFailureMode?b(""):r.write(h),p(t||"You must provide a valid value"),s("idle"))}else(0,e.isBackspaceKey)(t)&&!h?f(void 0):"tab"!==t.name||h?(b(r.line),p(void 0)):(f(void 0),r.clearLine(0),r.write(l),b(l))}),(0,e.useEffect)(e=>{"editable"===u&&l&&(e.write(l),b(l))},[]);const y=a.style.message(r.message,c);let m,D=h;"function"==typeof r.transformer?D=r.transformer(h,{isFinal:"done"===c}):"done"===c&&(D=a.style.answer(h)),l&&"done"!==c&&!h&&(m=a.style.defaultAnswer(l));let g="";return d&&(g=a.style.error(d)),[[v,y,m,D].filter(e=>void 0!==e).join(" "),g]}),tn}var nn,on={};function un(){if(nn)return on;nn=1,Object.defineProperty(on,"__esModule",{value:!0});const e=gt();function t(e,{min:t,max:r,step:n}){return null!=e&&!Number.isNaN(e)&&(e<t||e>r?`Value must be between ${t} and ${r}`:!("any"!==n&&!function(e,t,r){const n=e*Math.pow(10,6),o=t*Math.pow(10,6),i=r*Math.pow(10,6);return(n-(Number.isFinite(r)?i:0))%o===0}(e,n,t))||`Value must be a multiple of ${n}${Number.isFinite(t)?` starting from ${t}`:""}`)}return on.default=(0,e.createPrompt)((r,n)=>{const{validate:o=()=>!0,min:i=-1/0,max:u=1/0,step:a=1,required:c=!1}=r,s=(0,e.makeTheme)(r.theme),[l,f]=(0,e.useState)("idle"),[d,p]=(0,e.useState)(""),h=!0===t(r.default,{min:i,max:u,step:a})?r.default?.toString():void 0,[b="",v]=(0,e.useState)(h),[y,m]=(0,e.useState)(),D=(0,e.usePrefix)({status:l,theme:s});(0,e.useKeypress)(async(r,s)=>{if("idle"===l)if((0,e.isEnterKey)(r)){const e=d||b,r=""===e?void 0:Number(e);f("loading");let l=!0;(c||null!=r)&&(l=t(r,{min:i,max:u,step:a})),!0===l&&(l=await o(r)),!0===l?(p(String(r??"")),f("done"),n(r)):(s.write(d),m(l||"You must provide a valid numeric value"),f("idle"))}else(0,e.isBackspaceKey)(r)&&!d?v(void 0):"tab"!==r.name||d?(p(s.line),m(void 0)):(v(void 0),s.clearLine(0),s.write(b),p(b))});const g=s.style.message(r.message,l);let w,_=d;"done"===l&&(_=s.style.answer(d)),b&&"done"!==l&&!d&&(w=s.style.defaultAnswer(b));let O="";return y&&(O=s.style.error(y)),[[D,g,w,_].filter(e=>void 0!==e).join(" "),O]}),on}var an,cn={};function sn(){return an||(an=1,function(e){var t=cn&&cn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J());const o={key:"h",name:"Help, list all options",value:void 0};e.default=(0,r.createPrompt)((e,t)=>{const{default:i="h"}=e,u=(0,r.useMemo)(()=>function(e){return e.map(e=>{if(r.Separator.isSeparator(e))return e;const t="name"in e?e.name:String(e.value);return{value:"value"in e?e.value:t,name:t,key:e.key.toLowerCase()}})}(e.choices),[e.choices]),[a,c]=(0,r.useState)("idle"),[s,l]=(0,r.useState)(""),[f,d]=(0,r.useState)(e.expanded??!1),[p,h]=(0,r.useState)(),b=(0,r.makeTheme)(e.theme),v=(0,r.usePrefix)({theme:b,status:a});(0,r.useKeypress)((e,o)=>{if((0,r.isEnterKey)(e)){const e=(s||i).toLowerCase();if("h"!==e||f){const o=u.find(t=>!r.Separator.isSeparator(t)&&t.key===e);o?(c("done"),l(e),t(o.value)):h(""===s?"Please input a value":`"${n.default.red(s)}" isn't an available option`)}else d(!0)}else l(o.line),h(void 0)});const y=b.style.message(e.message,a);if("done"===a){const e=u.find(e=>!r.Separator.isSeparator(e)&&e.key===s.toLowerCase());return`${v} ${y} ${b.style.answer(e.name)}`}const m=f?u:[...u,o];let D="",g=m.map(e=>r.Separator.isSeparator(e)?"":e.key===i?e.key.toUpperCase():e.key).join("");g=` ${b.style.defaultAnswer(g)}`,f&&(g="",D=m.map(e=>{if(r.Separator.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===s.toLowerCase()?b.style.highlight(t):t}).join("\n"));let w="";const _=u.find(e=>!r.Separator.isSeparator(e)&&e.key===s.toLowerCase());_&&(w=`${n.default.cyan(">>")} ${_.name}`);let O="";return p&&(O=b.style.error(p)),[`${v} ${y}${g} ${s}`,[D,w,O].filter(Boolean).join("\n")]});var i=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return i.Separator}})}(cn)),cn}var ln,fn={};function dn(){return ln||(ln=1,function(e){var t=fn&&fn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o=/\d+/;function i(e){return null!=e&&!r.Separator.isSeparator(e)}function u(e,t){let r;const n=t.filter(i);if(o.test(e)){r=n[Number.parseInt(e,10)-1]}else r=n.find(t=>t.key===e);return r?[r,t.indexOf(r)]:[void 0,void 0]}e.default=(0,r.createPrompt)((e,t)=>{const{loop:o=!0}=e,a=(0,r.useMemo)(()=>function(e){let t=0;return e.map(e=>{if(r.Separator.isSeparator(e))return e;if(t+=1,"string"==typeof e)return{value:e,name:e,short:e,key:String(t)};const n=e.name??String(e.value);return{value:e.value,name:n,short:e.short??n,key:e.key??String(t)}})}(e.choices),[e.choices]),[c,s]=(0,r.useState)("idle"),[l,f]=(0,r.useState)(""),[d,p]=(0,r.useState)(),h=(0,r.makeTheme)(e.theme),b=(0,r.usePrefix)({status:c,theme:h}),v=(0,r.useMemo)(()=>{const e=a.findIndex(i),t=a.findLastIndex(i);if(-1===e)throw new r.ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[a]);(0,r.useKeypress)((e,c)=>{if((0,r.isEnterKey)(e)){const[e]=u(l,a);i(e)?(f(e.short),s("done"),t(e.value)):p(""===l?"Please input a value":`"${n.default.red(l)}" isn't an available option`)}else if("up"===e.name||"down"===e.name){c.clearLine(0);const[t,r]=u(l,a);if(t){if(o||"up"===e.name&&r!==v.first||"down"===e.name&&r!==v.last){const t="up"===e.name?-1:1;let n=r;do{n=(n+t+a.length)%a.length}while(!i(a[n]));f(a[n].key)}}else{const t="down"===e.name?a.find(i):a.findLast(i);f(t.key)}}else f(c.line),p(void 0)});const y=h.style.message(e.message,c);if("done"===c)return`${b} ${y} ${h.style.answer(l)}`;const m=a.map(e=>{if(r.Separator.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===l.toLowerCase()?h.style.highlight(t):t}).join("\n");let D="";return d&&(D=h.style.error(d)),[`${b} ${y} ${l}`,[m,D].filter(Boolean).join("\n")]});var a=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return a.Separator}})}(fn)),fn}var pn,hn={};function bn(){if(pn)return hn;pn=1;var e=hn&&hn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});const t=gt(),r=e(ft());return hn.default=(0,t.createPrompt)((e,n)=>{const{validate:o=()=>!0}=e,i=(0,t.makeTheme)(e.theme),[u,a]=(0,t.useState)("idle"),[c,s]=(0,t.useState)(),[l,f]=(0,t.useState)(""),d=(0,t.usePrefix)({status:u,theme:i});(0,t.useKeypress)(async(e,r)=>{if("idle"===u)if((0,t.isEnterKey)(e)){const e=l;a("loading");const t=await o(e);!0===t?(f(e),a("done"),n(e)):(r.write(l),s(t||"You must provide a valid value"),a("idle"))}else f(r.line),s(void 0)});const p=i.style.message(e.message,u);let h,b="";if(e.mask){b=("string"==typeof e.mask?e.mask:"*").repeat(l.length)}else"done"!==u&&(h=`${i.style.help("[input is masked]")}${r.default.cursorHide}`);"done"===u&&(b=i.style.answer(b));let v="";return c&&(v=i.style.error(c)),[[d,p,e.mask?b:h].join(" "),v]}),hn}var vn,yn={};function mn(){return vn||(vn=1,function(e){var t=yn&&yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o={icon:{cursor:t(re()).default.pointer},style:{disabled:e=>n.default.dim(`- ${e}`),searchTerm:e=>n.default.cyan(e),description:e=>n.default.cyan(e)},helpMode:"auto"};function i(e){return!r.Separator.isSeparator(e)&&!e.disabled}e.default=(0,r.createPrompt)((e,t)=>{const{pageSize:n=7,validate:u=()=>!0}=e,a=(0,r.makeTheme)(o,e.theme),c=(0,r.useRef)(!0),[s,l]=(0,r.useState)("loading"),[f,d]=(0,r.useState)(""),[p,h]=(0,r.useState)([]),[b,v]=(0,r.useState)(),y=(0,r.usePrefix)({status:s,theme:a}),m=(0,r.useMemo)(()=>({first:p.findIndex(i),last:p.findLastIndex(i)}),[p]),[D=m.first,g]=(0,r.useState)();(0,r.useEffect)(()=>{const t=new AbortController;l("loading"),v(void 0);return(async()=>{try{const n=await e.source(f||void 0,{signal:t.signal});t.signal.aborted||(g(void 0),v(void 0),h(n.map(e=>{if(r.Separator.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})),l("idle"))}catch(e){!t.signal.aborted&&e instanceof Error&&v(e.message)}})(),()=>{t.abort()}},[f]);const w=p[D];(0,r.useKeypress)(async(e,n)=>{if((0,r.isEnterKey)(e))if(w){l("loading");const e=await u(w.value);l("idle"),!0===e?(l("done"),t(w.value)):w.name===f?v(e||"You must provide a valid value"):(n.write(w.name),d(w.name))}else n.write(f);else if("tab"===e.name&&w)n.clearLine(0),n.write(w.name),d(w.name);else if("loading"===s||"up"!==e.name&&"down"!==e.name)d(n.line);else if(n.clearLine(0),"up"===e.name&&D!==m.first||"down"===e.name&&D!==m.last){const t="up"===e.name?-1:1;let r=D;do{r=(r+t+p.length)%p.length}while(!i(p[r]));g(r)}});const _=a.style.message(e.message,s);D>0&&(c.current=!1);let O="";p.length>1&&("always"===a.helpMode||"auto"===a.helpMode&&c.current)&&(O=p.length>n?`\n${a.style.help("(Use arrow keys to reveal more choices)")}`:`\n${a.style.help("(Use arrow keys)")}`);const S=(0,r.usePagination)({items:p,active:D,renderItem({item:e,isActive:t}){if(r.Separator.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return a.style.disabled(`${e.name} ${t}`)}return(t?a.style.highlight:e=>e)(`${t?a.icon.cursor:" "} ${e.name}`)},pageSize:n,loop:!1});let E,P;if(b?E=a.style.error(b):0===p.length&&""!==f&&"idle"===s&&(E=a.style.error("No results found")),"done"===s&&w){const e=w.short;return`${y} ${_} ${a.style.answer(e)}`}P=a.style.searchTerm(f);const C=w?.description?`\n${a.style.description(w.description)}`:"";return[[y,_,P].filter(Boolean).join(" "),`${E??S}${O}${C}`]});var u=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return u.Separator}})}(yn)),yn}var Dn,gn,wn={};function _n(){return Dn||(Dn=1,function(e){var t=wn&&wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;const r=gt(),n=t(J()),o=t(re()),i=t(ft()),u={icon:{cursor:o.default.pointer},style:{disabled:e=>n.default.dim(`- ${e}`),description:e=>n.default.cyan(e)},helpMode:"auto",indexMode:"hidden"};function a(e){return!r.Separator.isSeparator(e)&&!e.disabled}e.default=(0,r.createPrompt)((e,t)=>{const{loop:n=!0,pageSize:o=7}=e,c=(0,r.useRef)(!0),s=(0,r.makeTheme)(u,e.theme),[l,f]=(0,r.useState)("idle"),d=(0,r.usePrefix)({status:l,theme:s}),p=(0,r.useRef)(),h=(0,r.useMemo)(()=>e.choices.map(e=>{if(r.Separator.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n}),[e.choices]),b=(0,r.useMemo)(()=>{const e=h.findIndex(a),t=h.findLastIndex(a);if(-1===e)throw new r.ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[h]),v=(0,r.useMemo)(()=>"default"in e?h.findIndex(t=>a(t)&&t.value===e.default):-1,[e.default,h]),[y,m]=(0,r.useState)(-1===v?b.first:v),D=h[y];(0,r.useKeypress)((e,o)=>{if(clearTimeout(p.current),(0,r.isEnterKey)(e))f("done"),t(D.value);else if((0,r.isUpKey)(e)||(0,r.isDownKey)(e)){if(o.clearLine(0),n||(0,r.isUpKey)(e)&&y!==b.first||(0,r.isDownKey)(e)&&y!==b.last){const t=(0,r.isUpKey)(e)?-1:1;let n=y;do{n=(n+t+h.length)%h.length}while(!a(h[n]));m(n)}}else if((0,r.isNumberKey)(e)&&!Number.isNaN(Number(o.line))){const e=Number(o.line)-1,t=h[e];null!=t&&a(t)&&m(e),p.current=setTimeout(()=>{o.clearLine(0)},700)}else if((0,r.isBackspaceKey)(e))o.clearLine(0);else{const e=o.line.toLowerCase(),t=h.findIndex(t=>!(r.Separator.isSeparator(t)||!a(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&m(t),p.current=setTimeout(()=>{o.clearLine(0)},700)}}),(0,r.useEffect)(()=>()=>{clearTimeout(p.current)},[]);const g=s.style.message(e.message,l);let w="",_="";("always"===s.helpMode||"auto"===s.helpMode&&c.current)&&(c.current=!1,h.length>o?_=`\n${s.style.help(`(${e.instructions?.pager??"Use arrow keys to reveal more choices"})`)}`:w=s.style.help(`(${e.instructions?.navigation??"Use arrow keys"})`));const O=(0,r.usePagination)({items:h,active:y,renderItem({item:e,isActive:t,index:n}){if(r.Separator.isSeparator(e))return` ${e.separator}`;const o="number"===s.indexMode?`${n+1}. `:"";if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return s.style.disabled(`${o}${e.name} ${t}`)}return(t?s.style.highlight:e=>e)(`${t?s.icon.cursor:" "} ${o}${e.name}`)},pageSize:o,loop:n});if("done"===l)return`${d} ${g} ${s.style.answer(D.short)}`;const S=D.description?`\n${s.style.description(D.description)}`:"";return`${[d,g,w].filter(Boolean).join(" ")}\n${O}${_}${S}${i.default.cursorHide}`});var c=gt();Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return c.Separator}})}(wn)),wn}function On(){return gn||(gn=1,function(e){var t=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.select=e.search=e.password=e.rawlist=e.expand=e.number=e.input=e.confirm=e.editor=e.Separator=e.checkbox=void 0;var r=wt();Object.defineProperty(e,"checkbox",{enumerable:!0,get:function(){return t(r).default}}),Object.defineProperty(e,"Separator",{enumerable:!0,get:function(){return r.Separator}});var n=Jr();Object.defineProperty(e,"editor",{enumerable:!0,get:function(){return t(n).default}});var o=Zr();Object.defineProperty(e,"confirm",{enumerable:!0,get:function(){return t(o).default}});var i=rn();Object.defineProperty(e,"input",{enumerable:!0,get:function(){return t(i).default}});var u=un();Object.defineProperty(e,"number",{enumerable:!0,get:function(){return t(u).default}});var a=sn();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return t(a).default}});var c=dn();Object.defineProperty(e,"rawlist",{enumerable:!0,get:function(){return t(c).default}});var s=bn();Object.defineProperty(e,"password",{enumerable:!0,get:function(){return t(s).default}});var l=mn();Object.defineProperty(e,"search",{enumerable:!0,get:function(){return t(l).default}});var f=_n();Object.defineProperty(e,"select",{enumerable:!0,get:function(){return t(f).default}})}(F)),F}var Sn,En={},Pn={},Cn={},xn={},Fn={};function jn(){if(Sn)return Fn;return Sn=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.isFunction=void 0,Fn.isFunction=function(e){return"function"==typeof e},Fn}var Bn,An,Mn={},kn={},Tn={};function In(){if(Bn)return Tn;return Bn=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.createErrorClass=void 0,Tn.createErrorClass=function(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t},Tn}function Ln(){if(An)return kn;An=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.UnsubscriptionError=void 0;var e=In();return kn.UnsubscriptionError=e.createErrorClass(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),kn}var Rn,Un,Nn={};function $n(){if(Rn)return Nn;return Rn=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.arrRemove=void 0,Nn.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}},Nn}function qn(){if(Un)return Mn;Un=1;var e=Mn&&Mn.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=Mn&&Mn.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Mn&&Mn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.isSubscription=Mn.EMPTY_SUBSCRIPTION=Mn.Subscription=void 0;var n=jn(),o=Ln(),i=$n(),u=function(){function u(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return u.prototype.unsubscribe=function(){var i,u,c,s,l;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var d=e(f),p=d.next();!p.done;p=d.next()){p.value.remove(this)}}catch(e){i={error:e}}finally{try{p&&!p.done&&(u=d.return)&&u.call(d)}finally{if(i)throw i.error}}else f.remove(this);var h=this.initialTeardown;if(n.isFunction(h))try{h()}catch(e){l=e instanceof o.UnsubscriptionError?e.errors:[e]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var v=e(b),y=v.next();!y.done;y=v.next()){var m=y.value;try{a(m)}catch(e){l=null!=l?l:[],e instanceof o.UnsubscriptionError?l=r(r([],t(l)),t(e.errors)):l.push(e)}}}catch(e){c={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(c)throw c.error}}}if(l)throw new o.UnsubscriptionError(l)}},u.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)a(e);else{if(e instanceof u){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}},u.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},u.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},u.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&i.arrRemove(t,e)},u.prototype.remove=function(e){var t=this._finalizers;t&&i.arrRemove(t,e),e instanceof u&&e._removeParent(this)},u.EMPTY=function(){var e=new u;return e.closed=!0,e}(),u}();function a(e){n.isFunction(e)?e():e.unsubscribe()}return Mn.Subscription=u,Mn.EMPTY_SUBSCRIPTION=u.EMPTY,Mn.isSubscription=function(e){return e instanceof u||e&&"closed"in e&&n.isFunction(e.remove)&&n.isFunction(e.add)&&n.isFunction(e.unsubscribe)},Mn}var zn,Wn={};function Vn(){return zn||(zn=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.config=void 0,Wn.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}),Wn}var Gn,Kn,Yn={},Hn={};function Jn(){return Gn||(Gn=1,function(e){var t=Hn&&Hn.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(n,o){for(var i=[],u=2;u<arguments.length;u++)i[u-2]=arguments[u];var a=e.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,r([n,o],t(i))):setTimeout.apply(void 0,r([n,o],t(i)))},clearTimeout:function(t){var r=e.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0}}(Hn)),Hn}function Qn(){if(Kn)return Yn;Kn=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.reportUnhandledError=void 0;var e=Vn(),t=Jn();return Yn.reportUnhandledError=function(r){t.timeoutProvider.setTimeout(function(){var t=e.config.onUnhandledError;if(!t)throw r;t(r)})},Yn}var Xn,Zn={};function eo(){if(Xn)return Zn;return Xn=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.noop=void 0,Zn.noop=function(){},Zn}var to,ro={};function no(){if(to)return ro;function e(e,t,r){return{kind:e,value:t,error:r}}return to=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.createNotification=ro.nextNotification=ro.errorNotification=ro.COMPLETE_NOTIFICATION=void 0,ro.COMPLETE_NOTIFICATION=e("C",void 0,void 0),ro.errorNotification=function(t){return e("E",void 0,t)},ro.nextNotification=function(t){return e("N",t,void 0)},ro.createNotification=e,ro}var oo,io,uo={};function ao(){if(oo)return uo;oo=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.captureError=uo.errorContext=void 0;var e=Vn(),t=null;return uo.errorContext=function(r){if(e.config.useDeprecatedSynchronousErrorHandling){var n=!t;if(n&&(t={errorThrown:!1,error:null}),r(),n){var o=t,i=o.errorThrown,u=o.error;if(t=null,i)throw u}}else r()},uo.captureError=function(r){e.config.useDeprecatedSynchronousErrorHandling&&t&&(t.errorThrown=!0,t.error=r)},uo}function co(){return io||(io=1,function(e){var t=xn&&xn.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var r=jn(),n=qn(),o=Vn(),i=Qn(),u=eo(),a=no(),c=Jn(),s=ao(),l=function(r){function o(t){var o=r.call(this)||this;return o.isStopped=!1,t?(o.destination=t,n.isSubscription(t)&&t.add(o)):o.destination=e.EMPTY_OBSERVER,o}return t(o,r),o.create=function(e,t,r){return new h(e,t,r)},o.prototype.next=function(e){this.isStopped?v(a.nextNotification(e),this):this._next(e)},o.prototype.error=function(e){this.isStopped?v(a.errorNotification(e),this):(this.isStopped=!0,this._error(e))},o.prototype.complete=function(){this.isStopped?v(a.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(e){this.destination.next(e)},o.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(n.Subscription);e.Subscriber=l;var f=Function.prototype.bind;function d(e,t){return f.call(e,t)}var p=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),h=function(e){function n(t,n,i){var u,a,c=e.call(this)||this;r.isFunction(t)||!t?u={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=i?i:void 0}:c&&o.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},u={next:t.next&&d(t.next,a),error:t.error&&d(t.error,a),complete:t.complete&&d(t.complete,a)}):u=t;return c.destination=new p(u),c}return t(n,e),n}(l);function b(e){o.config.useDeprecatedSynchronousErrorHandling?s.captureError(e):i.reportUnhandledError(e)}function v(e,t){var r=o.config.onStoppedNotification;r&&c.timeoutProvider.setTimeout(function(){return r(e,t)})}e.SafeSubscriber=h,e.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}}(xn)),xn}var so,lo={};function fo(){return so||(so=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.observable=void 0,lo.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"),lo}var po,ho,bo,vo={},yo={};function mo(){if(po)return yo;return po=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.identity=void 0,yo.identity=function(e){return e},yo}function Do(){if(ho)return vo;ho=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.pipeFromArray=vo.pipe=void 0;var e=mo();function t(t){return 0===t.length?e.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}return vo.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t(e)},vo.pipeFromArray=t,vo}function go(){if(bo)return Cn;bo=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.Observable=void 0;var e=co(),t=qn(),r=fo(),n=Do(),o=Vn(),i=jn(),u=ao(),a=function(){function o(e){e&&(this._subscribe=e)}return o.prototype.lift=function(e){var t=new o;return t.source=this,t.operator=e,t},o.prototype.subscribe=function(r,n,o){var a,c=this,s=(a=r)&&a instanceof e.Subscriber||function(e){return e&&i.isFunction(e.next)&&i.isFunction(e.error)&&i.isFunction(e.complete)}(a)&&t.isSubscription(a)?r:new e.SafeSubscriber(r,n,o);return u.errorContext(function(){var e=c,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?c._subscribe(s):c._trySubscribe(s))}),s},o.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},o.prototype.forEach=function(t,r){var n=this;return new(r=c(r))(function(r,o){var i=new e.SafeSubscriber({next:function(e){try{t(e)}catch(e){o(e),i.unsubscribe()}},error:o,complete:r});n.subscribe(i)})},o.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},o.prototype[r.observable]=function(){return this},o.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.pipeFromArray(e)(this)},o.prototype.toPromise=function(e){var t=this;return new(e=c(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},o.create=function(e){return new o(e)},o}();function c(e){var t;return null!==(t=null!=e?e:o.config.Promise)&&void 0!==t?t:Promise}return Cn.Observable=a,Cn}var wo,_o={},Oo={},So={};function Eo(){if(wo)return So;wo=1,Object.defineProperty(So,"__esModule",{value:!0}),So.operate=So.hasLift=void 0;var e=jn();function t(t){return e.isFunction(null==t?void 0:t.lift)}return So.hasLift=t,So.operate=function(e){return function(r){if(t(r))return r.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}},So}var Po,Co,xo,Fo={};function jo(){if(Po)return Fo;Po=1;var e=Fo&&Fo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.OperatorSubscriber=Fo.createOperatorSubscriber=void 0;var t=co();Fo.createOperatorSubscriber=function(e,t,n,o,i){return new r(e,t,n,o,i)};var r=function(t){function r(e,r,n,o,i,u){var a=t.call(this,e)||this;return a.onFinalize=i,a.shouldUnsubscribe=u,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return e(r,t),r.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},r}(t.Subscriber);return Fo.OperatorSubscriber=r,Fo}function Bo(){if(Co)return Oo;Co=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.refCount=void 0;var e=Eo(),t=jo();return Oo.refCount=function(){return e.operate(function(e,r){var n=null;e._refCount++;var o=t.createOperatorSubscriber(r,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var t=e._connection,o=n;n=null,!t||o&&t!==o||t.unsubscribe(),r.unsubscribe()}});e.subscribe(o),o.closed||(n=e.connect())})},Oo}function Ao(){if(xo)return _o;xo=1;var e=_o&&_o.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(_o,"__esModule",{value:!0}),_o.ConnectableObservable=void 0;var t=go(),r=qn(),n=Bo(),o=jo(),i=Eo(),u=function(t){function u(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,i.hasLift(e)&&(n.lift=e.lift),n}return e(u,t),u.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},u.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},u.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},u.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new r.Subscription;var n=this.getSubject();t.add(this.source.subscribe(o.createOperatorSubscriber(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=r.Subscription.EMPTY)}return t},u.prototype.refCount=function(){return n.refCount()(this)},u}(t.Observable);return _o.ConnectableObservable=u,_o}var Mo,ko={},To={};function Io(){return Mo||(Mo=1,e=To,Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}),To;var e}var Lo,Ro,Uo={};function No(){return Lo||(Lo=1,function(e){var t=Uo&&Uo.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=Uo&&Uo.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrameProvider=void 0;var n=qn();e.animationFrameProvider={schedule:function(t){var r=requestAnimationFrame,o=cancelAnimationFrame,i=e.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,o=i.cancelAnimationFrame);var u=r(function(e){o=void 0,t(e)});return new n.Subscription(function(){return null==o?void 0:o(u)})},requestAnimationFrame:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=e.animationFrameProvider.delegate;return((null==i?void 0:i.requestAnimationFrame)||requestAnimationFrame).apply(void 0,r([],t(n)))},cancelAnimationFrame:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=e.animationFrameProvider.delegate;return((null==i?void 0:i.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,r([],t(n)))},delegate:void 0}}(Uo)),Uo}function $o(){if(Ro)return ko;Ro=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.animationFrames=void 0;var e=go(),t=Io(),r=No();function n(n){return new e.Observable(function(e){var o=n||t.performanceTimestampProvider,i=o.now(),u=0,a=function(){e.closed||(u=r.animationFrameProvider.requestAnimationFrame(function(t){u=0;var r=o.now();e.next({timestamp:n?r:t,elapsed:r-i}),a()}))};return a(),function(){u&&r.animationFrameProvider.cancelAnimationFrame(u)}})}ko.animationFrames=function(e){return e?n(e):o};var o=n();return ko}var qo,zo,Wo={},Vo={};function Go(){if(qo)return Vo;qo=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.ObjectUnsubscribedError=void 0;var e=In();return Vo.ObjectUnsubscribedError=e.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Vo}function Ko(){if(zo)return Wo;zo=1;var e=Wo&&Wo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),t=Wo&&Wo.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.AnonymousSubject=Wo.Subject=void 0;var r=go(),n=qn(),o=Go(),i=$n(),u=ao(),a=function(a){function s(){var e=a.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(s,a),s.prototype.lift=function(e){var t=new c(this,this);return t.operator=e,t},s.prototype._throwIfClosed=function(){if(this.closed)throw new o.ObjectUnsubscribedError},s.prototype.next=function(e){var r=this;u.errorContext(function(){var n,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=t(r.currentObservers),u=i.next();!u.done;u=i.next()){u.value.next(e)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}})},s.prototype.error=function(e){var t=this;u.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},s.prototype.complete=function(){var e=this;u.errorContext(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},s.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(s.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),s.prototype._trySubscribe=function(e){return this._throwIfClosed(),a.prototype._trySubscribe.call(this,e)},s.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},s.prototype._innerSubscribe=function(e){var t=this,r=this,o=r.hasError,u=r.isStopped,a=r.observers;return o||u?n.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(e),new n.Subscription(function(){t.currentObservers=null,i.arrRemove(a,e)}))},s.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},s.prototype.asObservable=function(){var e=new r.Observable;return e.source=this,e},s.create=function(e,t){return new c(e,t)},s}(r.Observable);Wo.Subject=a;var c=function(t){function r(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return e(r,t),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:n.EMPTY_SUBSCRIPTION},r}(a);return Wo.AnonymousSubject=c,Wo}var Yo,Ho={};function Jo(){if(Yo)return Ho;Yo=1;var e=Ho&&Ho.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.BehaviorSubject=void 0;var t=function(t){function r(e){var r=t.call(this)||this;return r._value=e,r}return e(r,t),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},r.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},r.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},r}(Ko().Subject);return Ho.BehaviorSubject=t,Ho}var Qo,Xo,Zo={},ei={};function ti(){return Qo||(Qo=1,e=ei,Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}),ei;var e}function ri(){if(Xo)return Zo;Xo=1;var e=Zo&&Zo.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.ReplaySubject=void 0;var t=Ko(),r=ti(),n=function(t){function n(e,n,o){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===o&&(o=r.dateTimestampProvider);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return e(n,t),n.prototype.next=function(e){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,u=r._timestampProvider,a=r._windowTime;n||(o.push(e),!i&&o.push(u.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},n.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},n.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var u=r.now(),a=0,c=1;c<n.length&&n[c]<=u;c+=2)a=c;a&&n.splice(0,a+1)}},n}(t.Subject);return Zo.ReplaySubject=n,Zo}var ni,oi={};function ii(){if(ni)return oi;ni=1;var e=oi&&oi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(oi,"__esModule",{value:!0}),oi.AsyncSubject=void 0;var t=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}return e(r,t),r.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,o=t._value,i=t.thrownError,u=t.isStopped,a=t._isComplete;r?e.error(i):(u||a)&&(n&&e.next(o),e.complete())},r.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},r.prototype.complete=function(){var e=this,r=e._hasValue,n=e._value;e._isComplete||(this._isComplete=!0,r&&t.prototype.next.call(this,n),t.prototype.complete.call(this))},r}(Ko().Subject);return oi.AsyncSubject=t,oi}var ui,ai={},ci={},si={},li={};function fi(){if(ui)return li;ui=1;var e=li&&li.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(li,"__esModule",{value:!0}),li.Action=void 0;var t=function(t){function r(e,r){return t.call(this)||this}return e(r,t),r.prototype.schedule=function(e,t){return this},r}(qn().Subscription);return li.Action=t,li}var di,pi,hi={};function bi(){return di||(di=1,function(e){var t=hi&&hi.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=hi&&hi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(n,o){for(var i=[],u=2;u<arguments.length;u++)i[u-2]=arguments[u];var a=e.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,r([n,o],t(i))):setInterval.apply(void 0,r([n,o],t(i)))},clearInterval:function(t){var r=e.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(t)},delegate:void 0}}(hi)),hi}function vi(){if(pi)return si;pi=1;var e=si&&si.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(si,"__esModule",{value:!0}),si.AsyncAction=void 0;var t=fi(),r=bi(),n=$n(),o=function(t){function o(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return e(o,t),o.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},o.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),r.intervalProvider.setInterval(e.flush.bind(e,this),n)},o.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&r.intervalProvider.clearInterval(t)},o.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},o.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},o.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,o=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,n.arrRemove(o,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},o}(t.Action);return si.AsyncAction=o,si}var yi,mi,Di,gi={},wi={};function _i(){if(yi)return wi;yi=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.TestTools=wi.Immediate=void 0;var e,t=1,r={};function n(e){return e in r&&(delete r[e],!0)}return wi.Immediate={setImmediate:function(o){var i=t++;return r[i]=!0,e||(e=Promise.resolve()),e.then(function(){return n(i)&&o()}),i},clearImmediate:function(e){n(e)}},wi.TestTools={pending:function(){return Object.keys(r).length}},wi}function Oi(){return mi||(mi=1,function(e){var t=gi&&gi.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},r=gi&&gi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.immediateProvider=void 0;var n=_i(),o=n.Immediate.setImmediate,i=n.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var u=e.immediateProvider.delegate;return((null==u?void 0:u.setImmediate)||o).apply(void 0,r([],t(n)))},clearImmediate:function(t){var r=e.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||i)(t)},delegate:void 0}}(gi)),gi}function Si(){if(Di)return ci;Di=1;var e=ci&&ci.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ci,"__esModule",{value:!0}),ci.AsapAction=void 0;var t=vi(),r=Oi(),n=function(t){function n(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(n,t),n.prototype.requestAsyncId=function(e,n,o){return void 0===o&&(o=0),null!==o&&o>0?t.prototype.requestAsyncId.call(this,e,n,o):(e.actions.push(this),e._scheduled||(e._scheduled=r.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},n.prototype.recycleAsyncId=function(e,n,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,o);var u=e.actions;null!=n&&(null===(i=u[u.length-1])||void 0===i?void 0:i.id)!==n&&(r.immediateProvider.clearImmediate(n),e._scheduled===n&&(e._scheduled=void 0))},n}(t.AsyncAction);return ci.AsapAction=n,ci}var Ei,Pi,Ci,xi,Fi={},ji={},Bi={};function Ai(){if(Ei)return Bi;Ei=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Scheduler=void 0;var e=ti(),t=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},t.now=e.dateTimestampProvider.now,t}();return Bi.Scheduler=t,Bi}function Mi(){if(Pi)return ji;Pi=1;var e=ji&&ji.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ji,"__esModule",{value:!0}),ji.AsyncScheduler=void 0;var t=Ai(),r=function(r){function n(e,n){void 0===n&&(n=t.Scheduler.now);var o=r.call(this,e,n)||this;return o.actions=[],o._active=!1,o}return e(n,r),n.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},n}(t.Scheduler);return ji.AsyncScheduler=r,ji}function ki(){if(Ci)return Fi;Ci=1;var e=Fi&&Fi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.AsapScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(Mi().AsyncScheduler);return Fi.AsapScheduler=t,Fi}function Ti(){return xi||(xi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var t=Si(),r=ki();e.asapScheduler=new r.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}(ai)),ai}var Ii,Li={};function Ri(){return Ii||(Ii=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=vi(),r=Mi();e.asyncScheduler=new r.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}(Li)),Li}var Ui,Ni={},$i={};function qi(){if(Ui)return $i;Ui=1;var e=$i&&$i.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($i,"__esModule",{value:!0}),$i.QueueAction=void 0;var t=function(t){function r(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(r,t),r.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},r.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},r.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.flush(this),0)},r}(vi().AsyncAction);return $i.QueueAction=t,$i}var zi,Wi,Vi={};function Gi(){if(zi)return Vi;zi=1;var e=Vi&&Vi.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.QueueScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(Mi().AsyncScheduler);return Vi.QueueScheduler=t,Vi}function Ki(){return Wi||(Wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=qi(),r=Gi();e.queueScheduler=new r.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}(Ni)),Ni}var Yi,Hi={},Ji={};function Qi(){if(Yi)return Ji;Yi=1;var e=Ji&&Ji.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.AnimationFrameAction=void 0;var t=vi(),r=No(),n=function(t){function n(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e(n,t),n.prototype.requestAsyncId=function(e,n,o){return void 0===o&&(o=0),null!==o&&o>0?t.prototype.requestAsyncId.call(this,e,n,o):(e.actions.push(this),e._scheduled||(e._scheduled=r.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},n.prototype.recycleAsyncId=function(e,n,o){var i;if(void 0===o&&(o=0),null!=o?o>0:this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,o);var u=e.actions;null!=n&&n===e._scheduled&&(null===(i=u[u.length-1])||void 0===i?void 0:i.id)!==n&&(r.animationFrameProvider.cancelAnimationFrame(n),e._scheduled=void 0)},n}(t.AsyncAction);return Ji.AnimationFrameAction=n,Ji}var Xi,Zi,eu={};function tu(){if(Xi)return eu;Xi=1;var e=eu&&eu.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(eu,"__esModule",{value:!0}),eu.AnimationFrameScheduler=void 0;var t=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},r}(Mi().AsyncScheduler);return eu.AnimationFrameScheduler=t,eu}function ru(){return Zi||(Zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=Qi(),r=tu();e.animationFrameScheduler=new r.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}(Hi)),Hi}var nu,ou={};function iu(){if(nu)return ou;nu=1;var e=ou&&ou.__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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ou,"__esModule",{value:!0}),ou.VirtualAction=ou.VirtualTimeScheduler=void 0;var t=vi(),r=qn(),n=function(t){function r(e,r){void 0===e&&(e=o),void 0===r&&(r=1/0);var n=t.call(this,e,function(){return n.frame})||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return e(r,t),r.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},r.frameTimeFactor=10,r}(Mi().AsyncScheduler);ou.VirtualTimeScheduler=n;var o=function(t){function n(e,r,n){void 0===n&&(n=e.index+=1);var o=t.call(this,e,r)||this;return o.scheduler=e,o.work=r,o.index=n,o.active=!0,o.index=e.index=n,o}return e(n,t),n.prototype.schedule=function(e,o){if(void 0===o&&(o=0),Number.isFinite(o)){if(!this.id)return t.prototype.schedule.call(this,e,o);this.active=!1;var i=new n(this.scheduler,this.work);return this.add(i),i.schedule(e,o)}return r.Subscription.EMPTY},n.prototype.requestAsyncId=function(e,t,r){void 0===r&&(r=0),this.delay=e.frame+r;var o=e.actions;return o.push(this),o.sort(n.sortActions),1},n.prototype.recycleAsyncId=function(e,t,r){},n.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},n.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},n}(t.AsyncAction);return ou.VirtualAction=o,ou}var uu,au={},cu={};function su(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=go();e.EMPTY=new t.Observable(function(e){return e.complete()}),e.empty=function(r){return r?function(e){return new t.Observable(function(t){return e.schedule(function(){return t.complete()})})}(r):e.EMPTY}}(cu)),cu}var lu,fu,du={},pu={},hu={};function bu(){if(lu)return hu;lu=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.isScheduler=void 0;var e=jn();return hu.isScheduler=function(t){return t&&e.isFunction(t.schedule)},hu}function vu(){if(fu)return pu;fu=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.popNumber=pu.popScheduler=pu.popResultSelector=void 0;var e=jn(),t=bu();function r(e){return e[e.length-1]}return pu.popResultSelector=function(t){return e.isFunction(r(t))?t.pop():void 0},pu.popScheduler=function(e){return t.isScheduler(r(e))?e.pop():void 0},pu.popNumber=function(e,t){return"number"==typeof r(e)?e.pop():t},pu}var yu,mu={},Du={},gu={},wu={},_u={};function Ou(){return yu||(yu=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.isArrayLike=void 0,_u.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}),_u}var Su,Eu={};function Pu(){if(Su)return Eu;Su=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.isPromise=void 0;var e=jn();return Eu.isPromise=function(t){return e.isFunction(null==t?void 0:t.then)},Eu}var Cu,xu={};function Fu(){if(Cu)return xu;Cu=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.isInteropObservable=void 0;var e=fo(),t=jn();return xu.isInteropObservable=function(r){return t.isFunction(r[e.observable])},xu}var ju,Bu={};function Au(){if(ju)return Bu;ju=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.isAsyncIterable=void 0;var e=jn();return Bu.isAsyncIterable=function(t){return Symbol.asyncIterator&&e.isFunction(null==t?void 0:t[Symbol.asyncIterator])},Bu}var Mu,ku={};function Tu(){if(Mu)return ku;return Mu=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createInvalidObservableTypeError=void 0,ku.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")},ku}var Iu,Lu,Ru={},Uu={};function Nu(){if(Iu)return Uu;function e(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}return Iu=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.iterator=Uu.getSymbolIterator=void 0,Uu.getSymbolIterator=e,Uu.iterator=e(),Uu}function $u(){if(Lu)return Ru;Lu=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.isIterable=void 0;var e=Nu(),t=jn();return Ru.isIterable=function(r){return t.isFunction(null==r?void 0:r[e.iterator])},Ru}var qu,zu,Wu={};function Vu(){if(qu)return Wu;qu=1;var e=Wu&&Wu.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},t=Wu&&Wu.__await||function(e){return this instanceof t?(this.v=e,this):new t(e)},r=Wu&&Wu.__asyncGenerator||function(e,r,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,i=n.apply(e,r||[]),u=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){i[e]&&(o[e]=function(t){return new Promise(function(r,n){u.push([e,t,r,n])>1||c(e,t)})})}function c(e,r){try{(n=i[e](r)).value instanceof t?Promise.resolve(n.value.v).then(s,l):f(u[0][2],n)}catch(e){f(u[0][3],e)}var n}function s(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),u.shift(),u.length&&c(u[0][0],u[0][1])}};Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.isReadableStreamLike=Wu.readableStreamLikeToAsyncGenerator=void 0;var n=jn();return Wu.readableStreamLikeToAsyncGenerator=function(n){return r(this,arguments,function(){var r,o,i;return e(this,function(e){switch(e.label){case 0:r=n.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,t(r.read())];case 3:return o=e.sent(),i=o.value,o.done?[4,t(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,t(i)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})},Wu.isReadableStreamLike=function(e){return n.isFunction(null==e?void 0:e.getReader)},Wu}function Gu(){if(zu)return wu;zu=1;var e=wu&&wu.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function u(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(u,a)}c((n=n.apply(e,t||[])).next())})},t=wu&&wu.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},r=wu&&wu.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof n?n(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}},n=wu&&wu.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wu,"__esModule",{value:!0}),wu.fromReadableStreamLike=wu.fromAsyncIterable=wu.fromIterable=wu.fromPromise=wu.fromArrayLike=wu.fromInteropObservable=wu.innerFrom=void 0;var o=Ou(),i=Pu(),u=go(),a=Fu(),c=Au(),s=Tu(),l=$u(),f=Vu(),d=jn(),p=Qn(),h=fo();function b(e){return new u.Observable(function(t){var r=e[h.observable]();if(d.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function v(e){return new u.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function y(e){return new u.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,p.reportUnhandledError)})}function m(e){return new u.Observable(function(t){var r,o;try{for(var i=n(e),u=i.next();!u.done;u=i.next()){var a=u.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}t.complete()})}function D(n){return new u.Observable(function(o){(function(n,o){var i,u,a,c;return e(this,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:t.trys.push([0,5,6,11]),i=r(n),t.label=1;case 1:return[4,i.next()];case 2:if((u=t.sent()).done)return[3,4];if(e=u.value,o.next(e),o.closed)return[2];t.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=t.sent(),a={error:s},[3,11];case 6:return t.trys.push([6,,9,10]),u&&!u.done&&(c=i.return)?[4,c.call(i)]:[3,8];case 7:t.sent(),t.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return o.complete(),[2]}})})})(n,o).catch(function(e){return o.error(e)})})}function g(e){return D(f.readableStreamLikeToAsyncGenerator(e))}return wu.innerFrom=function(e){if(e instanceof u.Observable)return e;if(null!=e){if(a.isInteropObservable(e))return b(e);if(o.isArrayLike(e))return v(e);if(i.isPromise(e))return y(e);if(c.isAsyncIterable(e))return D(e);if(l.isIterable(e))return m(e);if(f.isReadableStreamLike(e))return g(e)}throw s.createInvalidObservableTypeError(e)},wu.fromInteropObservable=b,wu.fromArrayLike=v,wu.fromPromise=y,wu.fromIterable=m,wu.fromAsyncIterable=D,wu.fromReadableStreamLike=g,wu}var Ku,Yu,Hu={},Ju={};function Qu(){if(Ku)return Ju;return Ku=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.executeSchedule=void 0,Ju.executeSchedule=function(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i},Ju}function Xu(){if(Yu)return Hu;Yu=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.observeOn=void 0;var e=Qu(),t=Eo(),r=jo();return Hu.observeOn=function(n,o){return void 0===o&&(o=0),t.operate(function(t,i){t.subscribe(r.createOperatorSubscriber(i,function(t){return e.executeSchedule(i,n,function(){return i.next(t)},o)},function(){return e.executeSchedule(i,n,function(){return i.complete()},o)},function(t){return e.executeSchedule(i,n,function(){return i.error(t)},o)}))})},Hu}var Zu,ea,ta={};function ra(){if(Zu)return ta;Zu=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.subscribeOn=void 0;var e=Eo();return ta.subscribeOn=function(t,r){return void 0===r&&(r=0),e.operate(function(e,n){n.add(t.schedule(function(){return e.subscribe(n)},r))})},ta}function na(){if(ea)return gu;ea=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.scheduleObservable=void 0;var e=Gu(),t=Xu(),r=ra();return gu.scheduleObservable=function(n,o){return e.innerFrom(n).pipe(r.subscribeOn(o),t.observeOn(o))},gu}var oa,ia={};function ua(){if(oa)return ia;oa=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.schedulePromise=void 0;var e=Gu(),t=Xu(),r=ra();return ia.schedulePromise=function(n,o){return e.innerFrom(n).pipe(r.subscribeOn(o),t.observeOn(o))},ia}var aa,ca={};function sa(){if(aa)return ca;aa=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.scheduleArray=void 0;var e=go();return ca.scheduleArray=function(t,r){return new e.Observable(function(e){var n=0;return r.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})},ca}var la,fa={};function da(){if(la)return fa;la=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.scheduleIterable=void 0;var e=go(),t=Nu(),r=jn(),n=Qu();return fa.scheduleIterable=function(o,i){return new e.Observable(function(e){var u;return n.executeSchedule(e,i,function(){u=o[t.iterator](),n.executeSchedule(e,i,function(){var t,r,n;try{r=(t=u.next()).value,n=t.done}catch(t){return void e.error(t)}n?e.complete():e.next(r)},0,!0)}),function(){return r.isFunction(null==u?void 0:u.return)&&u.return()}})},fa}var pa,ha={};function ba(){if(pa)return ha;pa=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.scheduleAsyncIterable=void 0;var e=go(),t=Qu();return ha.scheduleAsyncIterable=function(r,n){if(!r)throw new Error("Iterable cannot be null");return new e.Observable(function(e){t.executeSchedule(e,n,function(){var o=r[Symbol.asyncIterator]();t.executeSchedule(e,n,function(){o.next().then(function(t){t.done?e.complete():e.next(t.value)})},0,!0)})})},ha}var va,ya,ma,Da,ga={};function wa(){if(va)return ga;va=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.scheduleReadableStreamLike=void 0;var e=ba(),t=Vu();return ga.scheduleReadableStreamLike=function(r,n){return e.scheduleAsyncIterable(t.readableStreamLikeToAsyncGenerator(r),n)},ga}function _a(){if(ya)return Du;ya=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.scheduled=void 0;var e=na(),t=ua(),r=sa(),n=da(),o=ba(),i=Fu(),u=Pu(),a=Ou(),c=$u(),s=Au(),l=Tu(),f=Vu(),d=wa();return Du.scheduled=function(p,h){if(null!=p){if(i.isInteropObservable(p))return e.scheduleObservable(p,h);if(a.isArrayLike(p))return r.scheduleArray(p,h);if(u.isPromise(p))return t.schedulePromise(p,h);if(s.isAsyncIterable(p))return o.scheduleAsyncIterable(p,h);if(c.isIterable(p))return n.scheduleIterable(p,h);if(f.isReadableStreamLike(p))return d.scheduleReadableStreamLike(p,h)}throw l.createInvalidObservableTypeError(p)},Du}function Oa(){if(ma)return mu;ma=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.from=void 0;var e=_a(),t=Gu();return mu.from=function(r,n){return n?e.scheduled(r,n):t.innerFrom(r)},mu}function Sa(){if(Da)return du;Da=1,Object.defineProperty(du,"__esModule",{value:!0}),du.of=void 0;var e=vu(),t=Oa();return du.of=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.popScheduler(r);return t.from(r,o)},du}var Ea,Pa,Ca={};function xa(){if(Ea)return Ca;Ea=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.throwError=void 0;var e=go(),t=jn();return Ca.throwError=function(r,n){var o=t.isFunction(r)?r:function(){return r},i=function(e){return e.error(o())};return new e.Observable(n?function(e){return n.schedule(i,0,e)}:i)},Ca}function Fa(){return Pa||(Pa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t,r=su(),n=Sa(),o=xa(),i=jn();(t=e.NotificationKind||(e.NotificationKind={})).NEXT="N",t.ERROR="E",t.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return a(this,e)},e.prototype.do=function(e,t,r){var n=this,o=n.kind,i=n.value,u=n.error;return"N"===o?null==e?void 0:e(i):"E"===o?null==t?void 0:t(u):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return i.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,i=e.value,u=e.error,a="N"===t?n.of(i):"E"===t?o.throwError(function(){return u}):"C"===t?r.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function a(e,t){var r,n,o,i=e,u=i.kind,a=i.value,c=i.error;if("string"!=typeof u)throw new TypeError('Invalid notification, missing "kind"');"N"===u?null===(r=t.next)||void 0===r||r.call(t,a):"E"===u?null===(n=t.error)||void 0===n||n.call(t,c):null===(o=t.complete)||void 0===o||o.call(t)}e.Notification=u,e.observeNotification=a}(au)),au}var ja,Ba={};function Aa(){if(ja)return Ba;ja=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.isObservable=void 0;var e=go(),t=jn();return Ba.isObservable=function(r){return!!r&&(r instanceof e.Observable||t.isFunction(r.lift)&&t.isFunction(r.subscribe))},Ba}var Ma,ka,Ta={},Ia={};function La(){if(Ma)return Ia;Ma=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.EmptyError=void 0;var e=In();return Ia.EmptyError=e.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Ia}function Ra(){if(ka)return Ta;ka=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.lastValueFrom=void 0;var e=La();return Ta.lastValueFrom=function(t,r){var n="object"==typeof r;return new Promise(function(o,i){var u,a=!1;t.subscribe({next:function(e){u=e,a=!0},error:i,complete:function(){a?o(u):n?o(r.defaultValue):i(new e.EmptyError)}})})},Ta}var Ua,Na={};function $a(){if(Ua)return Na;Ua=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.firstValueFrom=void 0;var e=La(),t=co();return Na.firstValueFrom=function(r,n){var o="object"==typeof n;return new Promise(function(i,u){var a=new t.SafeSubscriber({next:function(e){i(e),a.unsubscribe()},error:u,complete:function(){o?i(n.defaultValue):u(new e.EmptyError)}});r.subscribe(a)})},Na}var qa,za={};function Wa(){if(qa)return za;qa=1,Object.defineProperty(za,"__esModule",{value:!0}),za.ArgumentOutOfRangeError=void 0;var e=In();return za.ArgumentOutOfRangeError=e.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),za}var Va,Ga={};function Ka(){if(Va)return Ga;Va=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.NotFoundError=void 0;var e=In();return Ga.NotFoundError=e.createErrorClass(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}),Ga}var Ya,Ha={};function Ja(){if(Ya)return Ha;Ya=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.SequenceError=void 0;var e=In();return Ha.SequenceError=e.createErrorClass(function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}),Ha}var Qa,Xa,Za={},ec={};function tc(){if(Qa)return ec;return Qa=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.isValidDate=void 0,ec.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},ec}function rc(){return Xa||(Xa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=Ri(),r=tc(),n=Eo(),o=Gu(),i=In(),u=jo(),a=Qu();function c(t){throw new e.TimeoutError(t)}e.TimeoutError=i.createErrorClass(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}),e.timeout=function(e,i){var s=r.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,l=s.first,f=s.each,d=s.with,p=void 0===d?c:d,h=s.scheduler,b=void 0===h?null!=i?i:t.asyncScheduler:h,v=s.meta,y=void 0===v?null:v;if(null==l&&null==f)throw new TypeError("No timeout provided.");return n.operate(function(e,t){var r,n,i=null,c=0,s=function(e){n=a.executeSchedule(t,b,function(){try{r.unsubscribe(),o.innerFrom(p({meta:y,lastValue:i,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};r=e.subscribe(u.createOperatorSubscriber(t,function(e){null==n||n.unsubscribe(),c++,t.next(i=e),f>0&&s(f)},void 0,void 0,function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null})),!c&&s(null!=l?"number"==typeof l?l:+l-b.now():f)})}}(Za)),Za}var nc,oc,ic,uc,ac={},cc={},sc={},lc={};function fc(){if(nc)return lc;nc=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.map=void 0;var e=Eo(),t=jo();return lc.map=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){o.next(r.call(n,e,i++))}))})},lc}function dc(){if(oc)return sc;oc=1;var e=sc&&sc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=sc&&sc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(sc,"__esModule",{value:!0}),sc.mapOneOrManyArgs=void 0;var r=fc(),n=Array.isArray;return sc.mapOneOrManyArgs=function(o){return r.map(function(r){return function(r,o){return n(o)?r.apply(void 0,t([],e(o))):r(o)}(o,r)})},sc}function pc(){if(ic)return cc;ic=1;var e=cc&&cc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=cc&&cc.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(cc,"__esModule",{value:!0}),cc.bindCallbackInternals=void 0;var r=bu(),n=go(),o=ra(),i=dc(),u=Xu(),a=ii();return cc.bindCallbackInternals=function c(s,l,f,d){if(f){if(!r.isScheduler(f))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return c(s,l,d).apply(this,e).pipe(i.mapOneOrManyArgs(f))};d=f}return d?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return c(s,l).apply(this,e).pipe(o.subscribeOn(d),u.observeOn(d))}:function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=new a.AsyncSubject,c=!0;return new n.Observable(function(n){var i=u.subscribe(n);if(c){c=!1;var a=!1,f=!1;l.apply(r,t(t([],e(o)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(s){var r=e.shift();if(null!=r)return void u.error(r)}u.next(1<e.length?e:e[0]),f=!0,a&&u.complete()}])),f&&u.complete(),a=!0}return i})}},cc}function hc(){if(uc)return ac;uc=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.bindCallback=void 0;var e=pc();return ac.bindCallback=function(t,r,n){return e.bindCallbackInternals(!1,t,r,n)},ac}var bc,vc={};function yc(){if(bc)return vc;bc=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.bindNodeCallback=void 0;var e=pc();return vc.bindNodeCallback=function(t,r,n){return e.bindCallbackInternals(!0,t,r,n)},vc}var mc,Dc={},gc={};function wc(){if(mc)return gc;mc=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.argsArgArrayOrObject=void 0;var e=Array.isArray,t=Object.getPrototypeOf,r=Object.prototype,n=Object.keys;return gc.argsArgArrayOrObject=function(o){if(1===o.length){var i=o[0];if(e(i))return{args:i,keys:null};if((a=i)&&"object"==typeof a&&t(a)===r){var u=n(i);return{args:u.map(function(e){return i[e]}),keys:u}}}var a;return{args:o,keys:null}},gc}var _c,Oc,Sc={};function Ec(){if(_c)return Sc;return _c=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.createObject=void 0,Sc.createObject=function(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})},Sc}function Pc(){if(Oc)return Dc;Oc=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.combineLatestInit=Dc.combineLatest=void 0;var e=go(),t=wc(),r=Oa(),n=mo(),o=dc(),i=vu(),u=Ec(),a=jo(),c=Qu();function s(e,t,o){return void 0===o&&(o=n.identity),function(n){l(t,function(){for(var i=e.length,u=new Array(i),c=i,s=i,f=function(i){l(t,function(){var l=r.from(e[i],t),f=!1;l.subscribe(a.createOperatorSubscriber(n,function(e){u[i]=e,f||(f=!0,s--),s||n.next(o(u.slice()))},function(){--c||n.complete()}))},n)},d=0;d<i;d++)f(d)},n)}}function l(e,t,r){e?c.executeSchedule(r,e,t):t()}return Dc.combineLatest=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var l=i.popScheduler(a),f=i.popResultSelector(a),d=t.argsArgArrayOrObject(a),p=d.args,h=d.keys;if(0===p.length)return r.from([],l);var b=new e.Observable(s(p,l,h?function(e){return u.createObject(h,e)}:n.identity));return f?b.pipe(o.mapOneOrManyArgs(f)):b},Dc.combineLatestInit=s,Dc}var Cc,xc,Fc,jc,Bc,Ac={},Mc={},kc={},Tc={},Ic={};function Lc(){if(Cc)return Ic;Cc=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.mergeInternals=void 0;var e=Gu(),t=Qu(),r=jo();return Ic.mergeInternals=function(n,o,i,u,a,c,s,l){var f=[],d=0,p=0,h=!1,b=function(){!h||f.length||d||o.complete()},v=function(e){return d<u?y(e):f.push(e)},y=function(n){c&&o.next(n),d++;var l=!1;e.innerFrom(i(n,p++)).subscribe(r.createOperatorSubscriber(o,function(e){null==a||a(e),c?v(e):o.next(e)},function(){l=!0},void 0,function(){if(l)try{d--;for(var e=function(){var e=f.shift();s?t.executeSchedule(o,s,function(){return y(e)}):y(e)};f.length&&d<u;)e();b()}catch(e){o.error(e)}}))};return n.subscribe(r.createOperatorSubscriber(o,v,function(){h=!0,b()})),function(){null==l||l()}},Ic}function Rc(){if(xc)return Tc;xc=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.mergeMap=void 0;var e=fc(),t=Gu(),r=Eo(),n=Lc(),o=jn();return Tc.mergeMap=function i(u,a,c){return void 0===c&&(c=1/0),o.isFunction(a)?i(function(r,n){return e.map(function(e,t){return a(r,e,n,t)})(t.innerFrom(u(r,n)))},c):("number"==typeof a&&(c=a),r.operate(function(e,t){return n.mergeInternals(e,t,u,c)}))},Tc}function Uc(){if(Fc)return kc;Fc=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.mergeAll=void 0;var e=Rc(),t=mo();return kc.mergeAll=function(r){return void 0===r&&(r=1/0),e.mergeMap(t.identity,r)},kc}function Nc(){if(jc)return Mc;jc=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.concatAll=void 0;var e=Uc();return Mc.concatAll=function(){return e.mergeAll(1)},Mc}function $c(){if(Bc)return Ac;Bc=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.concat=void 0;var e=Nc(),t=vu(),r=Oa();return Ac.concat=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.concatAll()(r.from(n,t.popScheduler(n)))},Ac}var qc,zc,Wc={},Vc={};function Gc(){if(qc)return Vc;qc=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.defer=void 0;var e=go(),t=Gu();return Vc.defer=function(r){return new e.Observable(function(e){t.innerFrom(r()).subscribe(e)})},Vc}function Kc(){if(zc)return Wc;zc=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.connectable=void 0;var e=Ko(),t=go(),r=Gc(),n={connector:function(){return new e.Subject},resetOnDisconnect:!0};return Wc.connectable=function(e,o){void 0===o&&(o=n);var i=null,u=o.connector,a=o.resetOnDisconnect,c=void 0===a||a,s=u(),l=new t.Observable(function(e){return s.subscribe(e)});return l.connect=function(){return i&&!i.closed||(i=r.defer(function(){return e}).subscribe(s),c&&i.add(function(){return s=u()})),i},l},Wc}var Yc,Hc={};function Jc(){if(Yc)return Hc;Yc=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.forkJoin=void 0;var e=go(),t=wc(),r=Gu(),n=vu(),o=jo(),i=dc(),u=Ec();return Hc.forkJoin=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var s=n.popResultSelector(a),l=t.argsArgArrayOrObject(a),f=l.args,d=l.keys,p=new e.Observable(function(e){var t=f.length;if(t)for(var n=new Array(t),i=t,a=t,c=function(t){var c=!1;r.innerFrom(f[t]).subscribe(o.createOperatorSubscriber(e,function(e){c||(c=!0,a--),n[t]=e},function(){return i--},void 0,function(){i&&c||(a||e.next(d?u.createObject(d,n):n),e.complete())}))},s=0;s<t;s++)c(s);else e.complete()});return s?p.pipe(i.mapOneOrManyArgs(s)):p},Hc}var Qc,Xc={};function Zc(){if(Qc)return Xc;Qc=1;var e=Xc&&Xc.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.fromEvent=void 0;var t=Gu(),r=go(),n=Rc(),o=Ou(),i=jn(),u=dc(),a=["addListener","removeListener"],c=["addEventListener","removeEventListener"],s=["on","off"];function l(e,t){return function(r){return function(n){return e[r](t,n)}}}return Xc.fromEvent=function f(d,p,h,b){if(i.isFunction(h)&&(b=h,h=void 0),b)return f(d,p,h).pipe(u.mapOneOrManyArgs(b));var v=e(function(e){return i.isFunction(e.addEventListener)&&i.isFunction(e.removeEventListener)}(d)?c.map(function(e){return function(t){return d[e](p,t,h)}}):function(e){return i.isFunction(e.addListener)&&i.isFunction(e.removeListener)}(d)?a.map(l(d,p)):function(e){return i.isFunction(e.on)&&i.isFunction(e.off)}(d)?s.map(l(d,p)):[],2),y=v[0],m=v[1];if(!y&&o.isArrayLike(d))return n.mergeMap(function(e){return f(e,p,h)})(t.innerFrom(d));if(!y)throw new TypeError("Invalid event target");return new r.Observable(function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return y(t),function(){return m(t)}})},Xc}var es,ts={};function rs(){if(es)return ts;es=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.fromEventPattern=void 0;var e=go(),t=jn(),r=dc();return ts.fromEventPattern=function n(o,i,u){return u?n(o,i).pipe(r.mapOneOrManyArgs(u)):new e.Observable(function(e){var r=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},n=o(r);return t.isFunction(i)?function(){return i(r,n)}:void 0})},ts}var ns,os={};function is(){if(ns)return os;ns=1;var e=os&&os.__generator||function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(os,"__esModule",{value:!0}),os.generate=void 0;var t=mo(),r=bu(),n=Gc(),o=da();return os.generate=function(i,u,a,c,s){var l,f,d,p;function h(){var t;return e(this,function(e){switch(e.label){case 0:t=p,e.label=1;case 1:return u&&!u(t)?[3,4]:[4,d(t)];case 2:e.sent(),e.label=3;case 3:return t=a(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(p=(l=i).initialState,u=l.condition,a=l.iterate,f=l.resultSelector,d=void 0===f?t.identity:f,s=l.scheduler):(p=i,!c||r.isScheduler(c)?(d=t.identity,s=c):d=c),n.defer(s?function(){return o.scheduleIterable(h(),s)}:h)},os}var us,as={};function cs(){if(us)return as;us=1,Object.defineProperty(as,"__esModule",{value:!0}),as.iif=void 0;var e=Gc();return as.iif=function(t,r,n){return e.defer(function(){return t()?r:n})},as}var ss,ls,fs={},ds={};function ps(){if(ss)return ds;ss=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.timer=void 0;var e=go(),t=Ri(),r=bu(),n=tc();return ds.timer=function(o,i,u){void 0===o&&(o=0),void 0===u&&(u=t.async);var a=-1;return null!=i&&(r.isScheduler(i)?u=i:a=i),new e.Observable(function(e){var t=n.isValidDate(o)?+o-u.now():o;t<0&&(t=0);var r=0;return u.schedule(function(){e.closed||(e.next(r++),0<=a?this.schedule(void 0,a):e.complete())},t)})},ds}function hs(){if(ls)return fs;ls=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.interval=void 0;var e=Ri(),t=ps();return fs.interval=function(r,n){return void 0===r&&(r=0),void 0===n&&(n=e.asyncScheduler),r<0&&(r=0),t.timer(r,r,n)},fs}var bs,vs={};function ys(){if(bs)return vs;bs=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.merge=void 0;var e=Uc(),t=Gu(),r=su(),n=vu(),o=Oa();return vs.merge=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];var a=n.popScheduler(i),c=n.popNumber(i,1/0),s=i;return s.length?1===s.length?t.innerFrom(s[0]):e.mergeAll(c)(o.from(s,a)):r.EMPTY},vs}var ms,Ds={};function gs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var t=go(),r=eo();e.NEVER=new t.Observable(r.noop),e.never=function(){return e.NEVER}}(Ds)),Ds}var ws,_s,Os={},Ss={};function Es(){if(ws)return Ss;ws=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.argsOrArgArray=void 0;var e=Array.isArray;return Ss.argsOrArgArray=function(t){return 1===t.length&&e(t[0])?t[0]:t},Ss}function Ps(){if(_s)return Os;_s=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.onErrorResumeNext=void 0;var e=go(),t=Es(),r=jo(),n=eo(),o=Gu();return Os.onErrorResumeNext=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];var a=t.argsOrArgArray(i);return new e.Observable(function(e){var t=0,i=function(){if(t<a.length){var u=void 0;try{u=o.innerFrom(a[t++])}catch(e){return void i()}var c=new r.OperatorSubscriber(e,void 0,n.noop,n.noop);u.subscribe(c),c.add(i)}else e.complete()};i()})},Os}var Cs,xs={};function Fs(){if(Cs)return xs;Cs=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.pairs=void 0;var e=Oa();return xs.pairs=function(t,r){return e.from(Object.entries(t),r)},xs}var js,Bs={},As={};function Ms(){if(js)return As;return js=1,Object.defineProperty(As,"__esModule",{value:!0}),As.not=void 0,As.not=function(e,t){return function(r,n){return!e.call(t,r,n)}},As}var ks,Ts,Is={};function Ls(){if(ks)return Is;ks=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.filter=void 0;var e=Eo(),t=jo();return Is.filter=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){return r.call(n,e,i++)&&o.next(e)}))})},Is}function Rs(){if(Ts)return Bs;Ts=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.partition=void 0;var e=Ms(),t=Ls(),r=Gu();return Bs.partition=function(n,o,i){return[t.filter(o,i)(r.innerFrom(n)),t.filter(e.not(o,i))(r.innerFrom(n))]},Bs}var Us,Ns={};function $s(){if(Us)return Ns;Us=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.raceInit=Ns.race=void 0;var e=go(),t=Gu(),r=Es(),n=jo();function o(e){return function(r){for(var o=[],i=function(i){o.push(t.innerFrom(e[i]).subscribe(n.createOperatorSubscriber(r,function(e){if(o){for(var t=0;t<o.length;t++)t!==i&&o[t].unsubscribe();o=null}r.next(e)})))},u=0;o&&!r.closed&&u<e.length;u++)i(u)}}return Ns.race=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return 1===(n=r.argsOrArgArray(n)).length?t.innerFrom(n[0]):new e.Observable(o(n))},Ns.raceInit=o,Ns}var qs,zs={};function Ws(){if(qs)return zs;qs=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.range=void 0;var e=go(),t=su();return zs.range=function(r,n,o){if(null==n&&(n=r,r=0),n<=0)return t.EMPTY;var i=n+r;return new e.Observable(o?function(e){var t=r;return o.schedule(function(){t<i?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<i&&!e.closed;)e.next(t++);e.complete()})},zs}var Vs,Gs={};function Ks(){if(Vs)return Gs;Vs=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.using=void 0;var e=go(),t=Gu(),r=su();return Gs.using=function(n,o){return new e.Observable(function(e){var i=n(),u=o(i);return(u?t.innerFrom(u):r.EMPTY).subscribe(e),function(){i&&i.unsubscribe()}})},Gs}var Ys,Hs={};function Js(){if(Ys)return Hs;Ys=1;var e=Hs&&Hs.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Hs&&Hs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.zip=void 0;var r=go(),n=Gu(),o=Es(),i=su(),u=jo(),a=vu();return Hs.zip=function(){for(var c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];var l=a.popResultSelector(c),f=o.argsOrArgArray(c);return f.length?new r.Observable(function(r){var o=f.map(function(){return[]}),i=f.map(function(){return!1});r.add(function(){o=i=null});for(var a=function(a){n.innerFrom(f[a]).subscribe(u.createOperatorSubscriber(r,function(n){if(o[a].push(n),o.every(function(e){return e.length})){var u=o.map(function(e){return e.shift()});r.next(l?l.apply(void 0,t([],e(u))):u),o.some(function(e,t){return!e.length&&i[t]})&&r.complete()}},function(){i[a]=!0,!o[a].length&&r.complete()}))},c=0;!r.closed&&c<f.length;c++)a(c);return function(){o=i=null}}):i.EMPTY},Hs}var Qs,Xs={};function Zs(){return Qs||(Qs=1,Object.defineProperty(Xs,"__esModule",{value:!0})),Xs}var el,tl={};function rl(){if(el)return tl;el=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.audit=void 0;var e=Eo(),t=Gu(),r=jo();return tl.audit=function(n){return e.operate(function(e,o){var i=!1,u=null,a=null,c=!1,s=function(){if(null==a||a.unsubscribe(),a=null,i){i=!1;var e=u;u=null,o.next(e)}c&&o.complete()},l=function(){a=null,c&&o.complete()};e.subscribe(r.createOperatorSubscriber(o,function(e){i=!0,u=e,a||t.innerFrom(n(e)).subscribe(a=r.createOperatorSubscriber(o,s,l))},function(){c=!0,(!i||!a||a.closed)&&o.complete()}))})},tl}var nl,ol={};function il(){if(nl)return ol;nl=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.auditTime=void 0;var e=Ri(),t=rl(),r=ps();return ol.auditTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.audit(function(){return r.timer(n,o)})},ol}var ul,al={};function cl(){if(ul)return al;ul=1,Object.defineProperty(al,"__esModule",{value:!0}),al.buffer=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return al.buffer=function(o){return e.operate(function(e,i){var u=[];return e.subscribe(r.createOperatorSubscriber(i,function(e){return u.push(e)},function(){i.next(u),i.complete()})),n.innerFrom(o).subscribe(r.createOperatorSubscriber(i,function(){var e=u;u=[],i.next(e)},t.noop)),function(){u=null}})},al}var sl,ll={};function fl(){if(sl)return ll;sl=1;var e=ll&&ll.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ll,"__esModule",{value:!0}),ll.bufferCount=void 0;var t=Eo(),r=jo(),n=$n();return ll.bufferCount=function(o,i){return void 0===i&&(i=null),i=null!=i?i:o,t.operate(function(t,u){var a=[],c=0;t.subscribe(r.createOperatorSubscriber(u,function(t){var r,s,l,f,d=null;c++%i===0&&a.push([]);try{for(var p=e(a),h=p.next();!h.done;h=p.next()){(y=h.value).push(t),o<=y.length&&(d=null!=d?d:[]).push(y)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(r)throw r.error}}if(d)try{for(var b=e(d),v=b.next();!v.done;v=b.next()){var y=v.value;n.arrRemove(a,y),u.next(y)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=b.return)&&f.call(b)}finally{if(l)throw l.error}}},function(){var t,r;try{for(var n=e(a),o=n.next();!o.done;o=n.next()){var i=o.value;u.next(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}u.complete()},void 0,function(){a=null}))})},ll}var dl,pl={};function hl(){if(dl)return pl;dl=1;var e=pl&&pl.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(pl,"__esModule",{value:!0}),pl.bufferTime=void 0;var t=qn(),r=Eo(),n=jo(),o=$n(),i=Ri(),u=vu(),a=Qu();return pl.bufferTime=function(c){for(var s,l,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=null!==(s=u.popScheduler(f))&&void 0!==s?s:i.asyncScheduler,h=null!==(l=f[0])&&void 0!==l?l:null,b=f[1]||1/0;return r.operate(function(r,i){var u=[],s=!1,l=function(e){var t=e.buffer;e.subs.unsubscribe(),o.arrRemove(u,e),i.next(t),s&&f()},f=function(){if(u){var e=new t.Subscription;i.add(e);var r={buffer:[],subs:e};u.push(r),a.executeSchedule(e,p,function(){return l(r)},c)}};null!==h&&h>=0?a.executeSchedule(i,p,f,h,!0):s=!0,f();var d=n.createOperatorSubscriber(i,function(t){var r,n,o=u.slice();try{for(var i=e(o),a=i.next();!a.done;a=i.next()){var c=a.value,s=c.buffer;s.push(t),b<=s.length&&l(c)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},function(){for(;null==u?void 0:u.length;)i.next(u.shift().buffer);null==d||d.unsubscribe(),i.complete(),i.unsubscribe()},void 0,function(){return u=null});r.subscribe(d)})},pl}var bl,vl={};function yl(){if(bl)return vl;bl=1;var e=vl&&vl.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(vl,"__esModule",{value:!0}),vl.bufferToggle=void 0;var t=qn(),r=Eo(),n=Gu(),o=jo(),i=eo(),u=$n();return vl.bufferToggle=function(a,c){return r.operate(function(r,s){var l=[];n.innerFrom(a).subscribe(o.createOperatorSubscriber(s,function(e){var r=[];l.push(r);var a=new t.Subscription;a.add(n.innerFrom(c(e)).subscribe(o.createOperatorSubscriber(s,function(){u.arrRemove(l,r),s.next(r),a.unsubscribe()},i.noop)))},i.noop)),r.subscribe(o.createOperatorSubscriber(s,function(t){var r,n;try{for(var o=e(l),i=o.next();!i.done;i=o.next()){i.value.push(t)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},function(){for(;l.length>0;)s.next(l.shift());s.complete()}))})},vl}var ml,Dl={};function gl(){if(ml)return Dl;ml=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.bufferWhen=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return Dl.bufferWhen=function(o){return e.operate(function(e,i){var u=null,a=null,c=function(){null==a||a.unsubscribe();var e=u;u=[],e&&i.next(e),n.innerFrom(o()).subscribe(a=r.createOperatorSubscriber(i,c,t.noop))};c(),e.subscribe(r.createOperatorSubscriber(i,function(e){return null==u?void 0:u.push(e)},function(){u&&i.next(u),i.complete()},void 0,function(){return u=a=null}))})},Dl}var wl,_l={};function Ol(){if(wl)return _l;wl=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.catchError=void 0;var e=Gu(),t=jo(),r=Eo();return _l.catchError=function n(o){return r.operate(function(r,i){var u,a=null,c=!1;a=r.subscribe(t.createOperatorSubscriber(i,void 0,void 0,function(t){u=e.innerFrom(o(t,n(o)(r))),a?(a.unsubscribe(),a=null,u.subscribe(i)):c=!0})),c&&(a.unsubscribe(),a=null,u.subscribe(i))})},_l}var Sl,El,Pl,Cl,xl,Fl,jl={},Bl={},Al={},Ml={},kl={},Tl={};function Il(){if(Sl)return Tl;Sl=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.scanInternals=void 0;var e=jo();return Tl.scanInternals=function(t,r,n,o,i){return function(u,a){var c=n,s=r,l=0;u.subscribe(e.createOperatorSubscriber(a,function(e){var r=l++;s=c?t(s,e,r):(c=!0,e),o&&a.next(s)},i&&function(){c&&a.next(s),a.complete()}))}},Tl}function Ll(){if(El)return kl;El=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.reduce=void 0;var e=Il(),t=Eo();return kl.reduce=function(r,n){return t.operate(e.scanInternals(r,n,arguments.length>=2,!1,!0))},kl}function Rl(){if(Pl)return Ml;Pl=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.toArray=void 0;var e=Ll(),t=Eo(),r=function(e,t){return e.push(t),e};return Ml.toArray=function(){return t.operate(function(t,n){e.reduce(r,[])(t).subscribe(n)})},Ml}function Ul(){if(Cl)return Al;Cl=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.joinAllInternals=void 0;var e=mo(),t=dc(),r=Do(),n=Rc(),o=Rl();return Al.joinAllInternals=function(i,u){return r.pipe(o.toArray(),n.mergeMap(function(e){return i(e)}),u?t.mapOneOrManyArgs(u):e.identity)},Al}function Nl(){if(xl)return Bl;xl=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.combineLatestAll=void 0;var e=Pc(),t=Ul();return Bl.combineLatestAll=function(r){return t.joinAllInternals(e.combineLatest,r)},Bl}function $l(){if(Fl)return jl;Fl=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.combineAll=void 0;var e=Nl();return jl.combineAll=e.combineLatestAll,jl}var ql,zl,Wl={},Vl={};function Gl(){if(ql)return Vl;ql=1;var e=Vl&&Vl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Vl&&Vl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.combineLatest=void 0;var r=Pc(),n=Eo(),o=Es(),i=dc(),u=Do(),a=vu();return Vl.combineLatest=function c(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var f=a.popResultSelector(s);return f?u.pipe(c.apply(void 0,t([],e(s))),i.mapOneOrManyArgs(f)):n.operate(function(n,i){r.combineLatestInit(t([n],e(o.argsOrArgArray(s))))(i)})},Vl}function Kl(){if(zl)return Wl;zl=1;var e=Wl&&Wl.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Wl&&Wl.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.combineLatestWith=void 0;var r=Gl();return Wl.combineLatestWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.combineLatest.apply(void 0,t([],e(n)))},Wl}var Yl,Hl={};function Jl(){if(Yl)return Hl;Yl=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.concatMap=void 0;var e=Rc(),t=jn();return Hl.concatMap=function(r,n){return t.isFunction(n)?e.mergeMap(r,n,1):e.mergeMap(r,1)},Hl}var Ql,Xl={};function Zl(){if(Ql)return Xl;Ql=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.concatMapTo=void 0;var e=Jl(),t=jn();return Xl.concatMapTo=function(r,n){return t.isFunction(n)?e.concatMap(function(){return r},n):e.concatMap(function(){return r})},Xl}var ef,tf,rf={},nf={};function of(){if(ef)return nf;ef=1;var e=nf&&nf.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=nf&&nf.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(nf,"__esModule",{value:!0}),nf.concat=void 0;var r=Eo(),n=Nc(),o=vu(),i=Oa();return nf.concat=function(){for(var u=[],a=0;a<arguments.length;a++)u[a]=arguments[a];var c=o.popScheduler(u);return r.operate(function(r,o){n.concatAll()(i.from(t([r],e(u)),c)).subscribe(o)})},nf}function uf(){if(tf)return rf;tf=1;var e=rf&&rf.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=rf&&rf.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(rf,"__esModule",{value:!0}),rf.concatWith=void 0;var r=of();return rf.concatWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.concat.apply(void 0,t([],e(n)))},rf}var af,cf,sf={},lf={};function ff(){if(af)return lf;af=1,Object.defineProperty(lf,"__esModule",{value:!0}),lf.fromSubscribable=void 0;var e=go();return lf.fromSubscribable=function(t){return new e.Observable(function(e){return t.subscribe(e)})},lf}function df(){if(cf)return sf;cf=1,Object.defineProperty(sf,"__esModule",{value:!0}),sf.connect=void 0;var e=Ko(),t=Gu(),r=Eo(),n=ff(),o={connector:function(){return new e.Subject}};return sf.connect=function(e,i){void 0===i&&(i=o);var u=i.connector;return r.operate(function(r,o){var i=u();t.innerFrom(e(n.fromSubscribable(i))).subscribe(o),o.add(r.subscribe(i))})},sf}var pf,hf={};function bf(){if(pf)return hf;pf=1,Object.defineProperty(hf,"__esModule",{value:!0}),hf.count=void 0;var e=Ll();return hf.count=function(t){return e.reduce(function(e,r,n){return!t||t(r,n)?e+1:e},0)},hf}var vf,yf={};function mf(){if(vf)return yf;vf=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.debounce=void 0;var e=Eo(),t=eo(),r=jo(),n=Gu();return yf.debounce=function(o){return e.operate(function(e,i){var u=!1,a=null,c=null,s=function(){if(null==c||c.unsubscribe(),c=null,u){u=!1;var e=a;a=null,i.next(e)}};e.subscribe(r.createOperatorSubscriber(i,function(e){null==c||c.unsubscribe(),u=!0,a=e,c=r.createOperatorSubscriber(i,s,t.noop),n.innerFrom(o(e)).subscribe(c)},function(){s(),i.complete()},void 0,function(){a=c=null}))})},yf}var Df,gf={};function wf(){if(Df)return gf;Df=1,Object.defineProperty(gf,"__esModule",{value:!0}),gf.debounceTime=void 0;var e=Ri(),t=Eo(),r=jo();return gf.debounceTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.operate(function(e,t){var i=null,u=null,a=null,c=function(){if(i){i.unsubscribe(),i=null;var e=u;u=null,t.next(e)}};function s(){var e=a+n,r=o.now();if(r<e)return i=this.schedule(void 0,e-r),void t.add(i);c()}e.subscribe(r.createOperatorSubscriber(t,function(e){u=e,a=o.now(),i||(i=o.schedule(s,n),t.add(i))},function(){c(),t.complete()},void 0,function(){u=i=null}))})},gf}var _f,Of={};function Sf(){if(_f)return Of;_f=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.defaultIfEmpty=void 0;var e=Eo(),t=jo();return Of.defaultIfEmpty=function(r){return e.operate(function(e,n){var o=!1;e.subscribe(t.createOperatorSubscriber(n,function(e){o=!0,n.next(e)},function(){o||n.next(r),n.complete()}))})},Of}var Ef,Pf={},Cf={},xf={};function Ff(){if(Ef)return xf;Ef=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.take=void 0;var e=su(),t=Eo(),r=jo();return xf.take=function(n){return n<=0?function(){return e.EMPTY}:t.operate(function(e,t){var o=0;e.subscribe(r.createOperatorSubscriber(t,function(e){++o<=n&&(t.next(e),n<=o&&t.complete())}))})},xf}var jf,Bf={};function Af(){if(jf)return Bf;jf=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.ignoreElements=void 0;var e=Eo(),t=jo(),r=eo();return Bf.ignoreElements=function(){return e.operate(function(e,n){e.subscribe(t.createOperatorSubscriber(n,r.noop))})},Bf}var Mf,kf,Tf,If={};function Lf(){if(Mf)return If;Mf=1,Object.defineProperty(If,"__esModule",{value:!0}),If.mapTo=void 0;var e=fc();return If.mapTo=function(t){return e.map(function(){return t})},If}function Rf(){if(kf)return Cf;kf=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.delayWhen=void 0;var e=$c(),t=Ff(),r=Af(),n=Lf(),o=Rc(),i=Gu();return Cf.delayWhen=function u(a,c){return c?function(n){return e.concat(c.pipe(t.take(1),r.ignoreElements()),n.pipe(u(a)))}:o.mergeMap(function(e,r){return i.innerFrom(a(e,r)).pipe(t.take(1),n.mapTo(e))})},Cf}function Uf(){if(Tf)return Pf;Tf=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.delay=void 0;var e=Ri(),t=Rf(),r=ps();return Pf.delay=function(n,o){void 0===o&&(o=e.asyncScheduler);var i=r.timer(n,o);return t.delayWhen(function(){return i})},Pf}var Nf,$f={};function qf(){if(Nf)return $f;Nf=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.dematerialize=void 0;var e=Fa(),t=Eo(),r=jo();return $f.dematerialize=function(){return t.operate(function(t,n){t.subscribe(r.createOperatorSubscriber(n,function(t){return e.observeNotification(t,n)}))})},$f}var zf,Wf={};function Vf(){if(zf)return Wf;zf=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.distinct=void 0;var e=Eo(),t=jo(),r=eo(),n=Gu();return Wf.distinct=function(o,i){return e.operate(function(e,u){var a=new Set;e.subscribe(t.createOperatorSubscriber(u,function(e){var t=o?o(e):e;a.has(t)||(a.add(t),u.next(e))})),i&&n.innerFrom(i).subscribe(t.createOperatorSubscriber(u,function(){return a.clear()},r.noop))})},Wf}var Gf,Kf={};function Yf(){if(Gf)return Kf;Gf=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.distinctUntilChanged=void 0;var e=mo(),t=Eo(),r=jo();function n(e,t){return e===t}return Kf.distinctUntilChanged=function(o,i){return void 0===i&&(i=e.identity),o=null!=o?o:n,t.operate(function(e,t){var n,u=!0;e.subscribe(r.createOperatorSubscriber(t,function(e){var r=i(e);!u&&o(n,r)||(u=!1,n=r,t.next(e))}))})},Kf}var Hf,Jf={};function Qf(){if(Hf)return Jf;Hf=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.distinctUntilKeyChanged=void 0;var e=Yf();return Jf.distinctUntilKeyChanged=function(t,r){return e.distinctUntilChanged(function(e,n){return r?r(e[t],n[t]):e[t]===n[t]})},Jf}var Xf,Zf,ed={},td={};function rd(){if(Xf)return td;Xf=1,Object.defineProperty(td,"__esModule",{value:!0}),td.throwIfEmpty=void 0;var e=La(),t=Eo(),r=jo();function n(){return new e.EmptyError}return td.throwIfEmpty=function(e){return void 0===e&&(e=n),t.operate(function(t,n){var o=!1;t.subscribe(r.createOperatorSubscriber(n,function(e){o=!0,n.next(e)},function(){return o?n.complete():n.error(e())}))})},td}function nd(){if(Zf)return ed;Zf=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.elementAt=void 0;var e=Wa(),t=Ls(),r=rd(),n=Sf(),o=Ff();return ed.elementAt=function(i,u){if(i<0)throw new e.ArgumentOutOfRangeError;var a=arguments.length>=2;return function(c){return c.pipe(t.filter(function(e,t){return t===i}),o.take(1),a?n.defaultIfEmpty(u):r.throwIfEmpty(function(){return new e.ArgumentOutOfRangeError}))}},ed}var od,id={};function ud(){if(od)return id;od=1;var e=id&&id.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=id&&id.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(id,"__esModule",{value:!0}),id.endWith=void 0;var r=$c(),n=Sa();return id.endWith=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return function(i){return r.concat(i,n.of.apply(void 0,t([],e(o))))}},id}var ad,cd={};function sd(){if(ad)return cd;ad=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.every=void 0;var e=Eo(),t=jo();return cd.every=function(r,n){return e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(t){r.call(n,t,i++,e)||(o.next(!1),o.complete())},function(){o.next(!0),o.complete()}))})},cd}var ld,fd,dd,pd={},hd={},bd={};function vd(){if(ld)return bd;ld=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.exhaustMap=void 0;var e=fc(),t=Gu(),r=Eo(),n=jo();return bd.exhaustMap=function o(i,u){return u?function(r){return r.pipe(o(function(r,n){return t.innerFrom(i(r,n)).pipe(e.map(function(e,t){return u(r,e,n,t)}))}))}:r.operate(function(e,r){var o=0,u=null,a=!1;e.subscribe(n.createOperatorSubscriber(r,function(e){u||(u=n.createOperatorSubscriber(r,void 0,function(){u=null,a&&r.complete()}),t.innerFrom(i(e,o++)).subscribe(u))},function(){a=!0,!u&&r.complete()}))})},bd}function yd(){if(fd)return hd;fd=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.exhaustAll=void 0;var e=vd(),t=mo();return hd.exhaustAll=function(){return e.exhaustMap(t.identity)},hd}function md(){if(dd)return pd;dd=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.exhaust=void 0;var e=yd();return pd.exhaust=e.exhaustAll,pd}var Dd,gd={};function wd(){if(Dd)return gd;Dd=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.expand=void 0;var e=Eo(),t=Lc();return gd.expand=function(r,n,o){return void 0===n&&(n=1/0),n=(n||0)<1?1/0:n,e.operate(function(e,i){return t.mergeInternals(e,i,r,n,void 0,!0,o)})},gd}var _d,Od={};function Sd(){if(_d)return Od;_d=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.finalize=void 0;var e=Eo();return Od.finalize=function(t){return e.operate(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})},Od}var Ed,Pd={};function Cd(){if(Ed)return Pd;Ed=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.createFind=Pd.find=void 0;var e=Eo(),t=jo();function r(e,r,n){var o="index"===n;return function(n,i){var u=0;n.subscribe(t.createOperatorSubscriber(i,function(t){var a=u++;e.call(r,t,a,n)&&(i.next(o?a:t),i.complete())},function(){i.next(o?-1:void 0),i.complete()}))}}return Pd.find=function(t,n){return e.operate(r(t,n,"value"))},Pd.createFind=r,Pd}var xd,Fd={};function jd(){if(xd)return Fd;xd=1,Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.findIndex=void 0;var e=Eo(),t=Cd();return Fd.findIndex=function(r,n){return e.operate(t.createFind(r,n,"index"))},Fd}var Bd,Ad={};function Md(){if(Bd)return Ad;Bd=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.first=void 0;var e=La(),t=Ls(),r=Ff(),n=Sf(),o=rd(),i=mo();return Ad.first=function(u,a){var c=arguments.length>=2;return function(s){return s.pipe(u?t.filter(function(e,t){return u(e,t,s)}):i.identity,r.take(1),c?n.defaultIfEmpty(a):o.throwIfEmpty(function(){return new e.EmptyError}))}},Ad}var kd,Td={};function Id(){if(kd)return Td;kd=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.groupBy=void 0;var e=go(),t=Gu(),r=Ko(),n=Eo(),o=jo();return Td.groupBy=function(i,u,a,c){return n.operate(function(n,s){var l;u&&"function"!=typeof u?(a=u.duration,l=u.element,c=u.connector):l=u;var f=new Map,d=function(e){f.forEach(e),e(s)},p=function(e){return d(function(t){return t.error(e)})},h=0,b=!1,v=new o.OperatorSubscriber(s,function(n){try{var u=i(n),d=f.get(u);if(!d){f.set(u,d=c?c():new r.Subject);var y=function(t,r){var n=new e.Observable(function(e){h++;var t=r.subscribe(e);return function(){t.unsubscribe(),0===--h&&b&&v.unsubscribe()}});return n.key=t,n}(u,d);if(s.next(y),a){var m=o.createOperatorSubscriber(d,function(){d.complete(),null==m||m.unsubscribe()},void 0,void 0,function(){return f.delete(u)});v.add(t.innerFrom(a(y)).subscribe(m))}}d.next(l?l(n):n)}catch(e){p(e)}},function(){return d(function(e){return e.complete()})},p,function(){return f.clear()},function(){return b=!0,0===h});n.subscribe(v)})},Td}var Ld,Rd={};function Ud(){if(Ld)return Rd;Ld=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.isEmpty=void 0;var e=Eo(),t=jo();return Rd.isEmpty=function(){return e.operate(function(e,r){e.subscribe(t.createOperatorSubscriber(r,function(){r.next(!1),r.complete()},function(){r.next(!0),r.complete()}))})},Rd}var Nd,$d,qd={},zd={};function Wd(){if(Nd)return zd;Nd=1;var e=zd&&zd.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(zd,"__esModule",{value:!0}),zd.takeLast=void 0;var t=su(),r=Eo(),n=jo();return zd.takeLast=function(o){return o<=0?function(){return t.EMPTY}:r.operate(function(t,r){var i=[];t.subscribe(n.createOperatorSubscriber(r,function(e){i.push(e),o<i.length&&i.shift()},function(){var t,n;try{for(var o=e(i),u=o.next();!u.done;u=o.next()){var a=u.value;r.next(a)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}r.complete()},void 0,function(){i=null}))})},zd}function Vd(){if($d)return qd;$d=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.last=void 0;var e=La(),t=Ls(),r=Wd(),n=rd(),o=Sf(),i=mo();return qd.last=function(u,a){var c=arguments.length>=2;return function(s){return s.pipe(u?t.filter(function(e,t){return u(e,t,s)}):i.identity,r.takeLast(1),c?o.defaultIfEmpty(a):n.throwIfEmpty(function(){return new e.EmptyError}))}},qd}var Gd,Kd={};function Yd(){if(Gd)return Kd;Gd=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.materialize=void 0;var e=Fa(),t=Eo(),r=jo();return Kd.materialize=function(){return t.operate(function(t,n){t.subscribe(r.createOperatorSubscriber(n,function(t){n.next(e.Notification.createNext(t))},function(){n.next(e.Notification.createComplete()),n.complete()},function(t){n.next(e.Notification.createError(t)),n.complete()}))})},Kd}var Hd,Jd={};function Qd(){if(Hd)return Jd;Hd=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.max=void 0;var e=Ll(),t=jn();return Jd.max=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})},Jd}var Xd,Zd={};function ep(){if(Xd)return Zd;Xd=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.flatMap=void 0;var e=Rc();return Zd.flatMap=e.mergeMap,Zd}var tp,rp={};function np(){if(tp)return rp;tp=1,Object.defineProperty(rp,"__esModule",{value:!0}),rp.mergeMapTo=void 0;var e=Rc(),t=jn();return rp.mergeMapTo=function(r,n,o){return void 0===o&&(o=1/0),t.isFunction(n)?e.mergeMap(function(){return r},n,o):("number"==typeof n&&(o=n),e.mergeMap(function(){return r},o))},rp}var op,ip={};function up(){if(op)return ip;op=1,Object.defineProperty(ip,"__esModule",{value:!0}),ip.mergeScan=void 0;var e=Eo(),t=Lc();return ip.mergeScan=function(r,n,o){return void 0===o&&(o=1/0),e.operate(function(e,i){var u=n;return t.mergeInternals(e,i,function(e,t){return r(u,e,t)},o,function(e){u=e},!1,void 0,function(){return u=null})})},ip}var ap,cp,sp={},lp={};function fp(){if(ap)return lp;ap=1;var e=lp&&lp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=lp&&lp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(lp,"__esModule",{value:!0}),lp.merge=void 0;var r=Eo(),n=Uc(),o=vu(),i=Oa();return lp.merge=function(){for(var u=[],a=0;a<arguments.length;a++)u[a]=arguments[a];var c=o.popScheduler(u),s=o.popNumber(u,1/0);return r.operate(function(r,o){n.mergeAll(s)(i.from(t([r],e(u)),c)).subscribe(o)})},lp}function dp(){if(cp)return sp;cp=1;var e=sp&&sp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=sp&&sp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(sp,"__esModule",{value:!0}),sp.mergeWith=void 0;var r=fp();return sp.mergeWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.merge.apply(void 0,t([],e(n)))},sp}var pp,hp={};function bp(){if(pp)return hp;pp=1,Object.defineProperty(hp,"__esModule",{value:!0}),hp.min=void 0;var e=Ll(),t=jn();return hp.min=function(r){return e.reduce(t.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})},hp}var vp,yp={};function mp(){if(vp)return yp;vp=1,Object.defineProperty(yp,"__esModule",{value:!0}),yp.multicast=void 0;var e=Ao(),t=jn(),r=df();return yp.multicast=function(n,o){var i=t.isFunction(n)?n:function(){return n};return t.isFunction(o)?r.connect(o,{connector:i}):function(t){return new e.ConnectableObservable(t,i)}},yp}var Dp,gp={};function wp(){if(Dp)return gp;Dp=1;var e=gp&&gp.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=gp&&gp.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(gp,"__esModule",{value:!0}),gp.onErrorResumeNext=gp.onErrorResumeNextWith=void 0;var r=Es(),n=Ps();function o(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=r.argsOrArgArray(o);return function(r){return n.onErrorResumeNext.apply(void 0,t([r],e(u)))}}return gp.onErrorResumeNextWith=o,gp.onErrorResumeNext=o,gp}var _p,Op={};function Sp(){if(_p)return Op;_p=1,Object.defineProperty(Op,"__esModule",{value:!0}),Op.pairwise=void 0;var e=Eo(),t=jo();return Op.pairwise=function(){return e.operate(function(e,r){var n,o=!1;e.subscribe(t.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})},Op}var Ep,Pp={};function Cp(){if(Ep)return Pp;Ep=1,Object.defineProperty(Pp,"__esModule",{value:!0}),Pp.pluck=void 0;var e=fc();return Pp.pluck=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return e.map(function(e){for(var r=e,o=0;o<n;o++){var i=null==r?void 0:r[t[o]];if(void 0===i)return;r=i}return r})},Pp}var xp,Fp={};function jp(){if(xp)return Fp;xp=1,Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.publish=void 0;var e=Ko(),t=mp(),r=df();return Fp.publish=function(n){return n?function(e){return r.connect(n)(e)}:function(r){return t.multicast(new e.Subject)(r)}},Fp}var Bp,Ap={};function Mp(){if(Bp)return Ap;Bp=1,Object.defineProperty(Ap,"__esModule",{value:!0}),Ap.publishBehavior=void 0;var e=Jo(),t=Ao();return Ap.publishBehavior=function(r){return function(n){var o=new e.BehaviorSubject(r);return new t.ConnectableObservable(n,function(){return o})}},Ap}var kp,Tp={};function Ip(){if(kp)return Tp;kp=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.publishLast=void 0;var e=ii(),t=Ao();return Tp.publishLast=function(){return function(r){var n=new e.AsyncSubject;return new t.ConnectableObservable(r,function(){return n})}},Tp}var Lp,Rp={};function Up(){if(Lp)return Rp;Lp=1,Object.defineProperty(Rp,"__esModule",{value:!0}),Rp.publishReplay=void 0;var e=ri(),t=mp(),r=jn();return Rp.publishReplay=function(n,o,i,u){i&&!r.isFunction(i)&&(u=i);var a=r.isFunction(i)?i:void 0;return function(r){return t.multicast(new e.ReplaySubject(n,o,u),a)(r)}},Rp}var Np,$p={};function qp(){if(Np)return $p;Np=1;var e=$p&&$p.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=$p&&$p.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty($p,"__esModule",{value:!0}),$p.raceWith=void 0;var r=$s(),n=Eo(),o=mo();return $p.raceWith=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return i.length?n.operate(function(n,o){r.raceInit(t([n],e(i)))(o)}):o.identity},$p}var zp,Wp={};function Vp(){if(zp)return Wp;zp=1,Object.defineProperty(Wp,"__esModule",{value:!0}),Wp.repeat=void 0;var e=su(),t=Eo(),r=jo(),n=Gu(),o=ps();return Wp.repeat=function(i){var u,a,c=1/0;return null!=i&&("object"==typeof i?(u=i.count,c=void 0===u?1/0:u,a=i.delay):c=i),c<=0?function(){return e.EMPTY}:t.operate(function(e,t){var i,u=0,s=function(){if(null==i||i.unsubscribe(),i=null,null!=a){var e="number"==typeof a?o.timer(a):n.innerFrom(a(u)),c=r.createOperatorSubscriber(t,function(){c.unsubscribe(),l()});e.subscribe(c)}else l()},l=function(){var n=!1;i=e.subscribe(r.createOperatorSubscriber(t,void 0,function(){++u<c?i?s():n=!0:t.complete()})),n&&s()};l()})},Wp}var Gp,Kp={};function Yp(){if(Gp)return Kp;Gp=1,Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.repeatWhen=void 0;var e=Gu(),t=Ko(),r=Eo(),n=jo();return Kp.repeatWhen=function(o){return r.operate(function(r,i){var u,a,c=!1,s=!1,l=!1,f=function(){return l&&s&&(i.complete(),!0)},d=function(){l=!1,u=r.subscribe(n.createOperatorSubscriber(i,void 0,function(){l=!0,!f()&&(a||(a=new t.Subject,e.innerFrom(o(a)).subscribe(n.createOperatorSubscriber(i,function(){u?d():c=!0},function(){s=!0,f()}))),a).next()})),c&&(u.unsubscribe(),u=null,c=!1,d())};d()})},Kp}var Hp,Jp={};function Qp(){if(Hp)return Jp;Hp=1,Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.retry=void 0;var e=Eo(),t=jo(),r=mo(),n=ps(),o=Gu();return Jp.retry=function(i){var u;void 0===i&&(i=1/0);var a=(u=i&&"object"==typeof i?i:{count:i}).count,c=void 0===a?1/0:a,s=u.delay,l=u.resetOnSuccess,f=void 0!==l&&l;return c<=0?r.identity:e.operate(function(e,r){var i,u=0,a=function(){var l=!1;i=e.subscribe(t.createOperatorSubscriber(r,function(e){f&&(u=0),r.next(e)},void 0,function(e){if(u++<c){var f=function(){i?(i.unsubscribe(),i=null,a()):l=!0};if(null!=s){var d="number"==typeof s?n.timer(s):o.innerFrom(s(e,u)),p=t.createOperatorSubscriber(r,function(){p.unsubscribe(),f()},function(){r.complete()});d.subscribe(p)}else f()}else r.error(e)})),l&&(i.unsubscribe(),i=null,a())};a()})},Jp}var Xp,Zp={};function eh(){if(Xp)return Zp;Xp=1,Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.retryWhen=void 0;var e=Gu(),t=Ko(),r=Eo(),n=jo();return Zp.retryWhen=function(o){return r.operate(function(r,i){var u,a,c=!1,s=function(){u=r.subscribe(n.createOperatorSubscriber(i,void 0,void 0,function(r){a||(a=new t.Subject,e.innerFrom(o(a)).subscribe(n.createOperatorSubscriber(i,function(){return u?s():c=!0}))),a&&a.next(r)})),c&&(u.unsubscribe(),u=null,c=!1,s())};s()})},Zp}var th,rh={};function nh(){if(th)return rh;th=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.sample=void 0;var e=Gu(),t=Eo(),r=eo(),n=jo();return rh.sample=function(o){return t.operate(function(t,i){var u=!1,a=null;t.subscribe(n.createOperatorSubscriber(i,function(e){u=!0,a=e})),e.innerFrom(o).subscribe(n.createOperatorSubscriber(i,function(){if(u){u=!1;var e=a;a=null,i.next(e)}},r.noop))})},rh}var oh,ih={};function uh(){if(oh)return ih;oh=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.sampleTime=void 0;var e=Ri(),t=nh(),r=hs();return ih.sampleTime=function(n,o){return void 0===o&&(o=e.asyncScheduler),t.sample(r.interval(n,o))},ih}var ah,ch={};function sh(){if(ah)return ch;ah=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.scan=void 0;var e=Eo(),t=Il();return ch.scan=function(r,n){return e.operate(t.scanInternals(r,n,arguments.length>=2,!0))},ch}var lh,fh={};function dh(){if(lh)return fh;lh=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.sequenceEqual=void 0;var e=Eo(),t=jo(),r=Gu();return fh.sequenceEqual=function(n,o){return void 0===o&&(o=function(e,t){return e===t}),e.operate(function(e,i){var u={buffer:[],complete:!1},a={buffer:[],complete:!1},c=function(e){i.next(e),i.complete()},s=function(e,r){var n=t.createOperatorSubscriber(i,function(t){var n=r.buffer,i=r.complete;0===n.length?i?c(!1):e.buffer.push(t):!o(t,n.shift())&&c(!1)},function(){e.complete=!0;var t=r.complete,o=r.buffer;t&&c(0===o.length),null==n||n.unsubscribe()});return n};e.subscribe(s(u,a)),r.innerFrom(n).subscribe(s(a,u))})},fh}var ph,hh={};function bh(){if(ph)return hh;ph=1;var e=hh&&hh.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=hh&&hh.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(hh,"__esModule",{value:!0}),hh.share=void 0;var r=Gu(),n=Ko(),o=co(),i=Eo();function u(n,i){for(var u=[],a=2;a<arguments.length;a++)u[a-2]=arguments[a];if(!0!==i){if(!1!==i){var c=new o.SafeSubscriber({next:function(){c.unsubscribe(),n()}});return r.innerFrom(i.apply(void 0,t([],e(u)))).subscribe(c)}}else n()}return hh.share=function(e){void 0===e&&(e={});var t=e.connector,a=void 0===t?function(){return new n.Subject}:t,c=e.resetOnError,s=void 0===c||c,l=e.resetOnComplete,f=void 0===l||l,d=e.resetOnRefCountZero,p=void 0===d||d;return function(e){var t,n,c,l=0,d=!1,h=!1,b=function(){null==n||n.unsubscribe(),n=void 0},v=function(){b(),t=c=void 0,d=h=!1},y=function(){var e=t;v(),null==e||e.unsubscribe()};return i.operate(function(e,i){l++,h||d||b();var m=c=null!=c?c:a();i.add(function(){0!==--l||h||d||(n=u(y,p))}),m.subscribe(i),!t&&l>0&&(t=new o.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){h=!0,b(),n=u(v,s,e),m.error(e)},complete:function(){d=!0,b(),n=u(v,f),m.complete()}}),r.innerFrom(e).subscribe(t))})(e)}},hh}var vh,yh={};function mh(){if(vh)return yh;vh=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.shareReplay=void 0;var e=ri(),t=bh();return yh.shareReplay=function(r,n,o){var i,u,a,c,s=!1;return r&&"object"==typeof r?(i=r.bufferSize,c=void 0===i?1/0:i,u=r.windowTime,n=void 0===u?1/0:u,s=void 0!==(a=r.refCount)&&a,o=r.scheduler):c=null!=r?r:1/0,t.share({connector:function(){return new e.ReplaySubject(c,n,o)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})},yh}var Dh,gh={};function wh(){if(Dh)return gh;Dh=1,Object.defineProperty(gh,"__esModule",{value:!0}),gh.single=void 0;var e=La(),t=Ja(),r=Ka(),n=Eo(),o=jo();return gh.single=function(i){return n.operate(function(n,u){var a,c=!1,s=!1,l=0;n.subscribe(o.createOperatorSubscriber(u,function(e){s=!0,i&&!i(e,l++,n)||(c&&u.error(new t.SequenceError("Too many matching values")),c=!0,a=e)},function(){c?(u.next(a),u.complete()):u.error(s?new r.NotFoundError("No matching values"):new e.EmptyError)}))})},gh}var _h,Oh={};function Sh(){if(_h)return Oh;_h=1,Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.skip=void 0;var e=Ls();return Oh.skip=function(t){return e.filter(function(e,r){return t<=r})},Oh}var Eh,Ph={};function Ch(){if(Eh)return Ph;Eh=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.skipLast=void 0;var e=mo(),t=Eo(),r=jo();return Ph.skipLast=function(n){return n<=0?e.identity:t.operate(function(e,t){var o=new Array(n),i=0;return e.subscribe(r.createOperatorSubscriber(t,function(e){var r=i++;if(r<n)o[r]=e;else{var u=r%n,a=o[u];o[u]=e,t.next(a)}})),function(){o=null}})},Ph}var xh,Fh={};function jh(){if(xh)return Fh;xh=1,Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.skipUntil=void 0;var e=Eo(),t=jo(),r=Gu(),n=eo();return Fh.skipUntil=function(o){return e.operate(function(e,i){var u=!1,a=t.createOperatorSubscriber(i,function(){null==a||a.unsubscribe(),u=!0},n.noop);r.innerFrom(o).subscribe(a),e.subscribe(t.createOperatorSubscriber(i,function(e){return u&&i.next(e)}))})},Fh}var Bh,Ah={};function Mh(){if(Bh)return Ah;Bh=1,Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.skipWhile=void 0;var e=Eo(),t=jo();return Ah.skipWhile=function(r){return e.operate(function(e,n){var o=!1,i=0;e.subscribe(t.createOperatorSubscriber(n,function(e){return(o||(o=!r(e,i++)))&&n.next(e)}))})},Ah}var kh,Th={};function Ih(){if(kh)return Th;kh=1,Object.defineProperty(Th,"__esModule",{value:!0}),Th.startWith=void 0;var e=$c(),t=vu(),r=Eo();return Th.startWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=t.popScheduler(n);return r.operate(function(t,r){(i?e.concat(n,t,i):e.concat(n,t)).subscribe(r)})},Th}var Lh,Rh,Uh={},Nh={};function $h(){if(Lh)return Nh;Lh=1,Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.switchMap=void 0;var e=Gu(),t=Eo(),r=jo();return Nh.switchMap=function(n,o){return t.operate(function(t,i){var u=null,a=0,c=!1,s=function(){return c&&!u&&i.complete()};t.subscribe(r.createOperatorSubscriber(i,function(t){null==u||u.unsubscribe();var c=0,l=a++;e.innerFrom(n(t,l)).subscribe(u=r.createOperatorSubscriber(i,function(e){return i.next(o?o(t,e,l,c++):e)},function(){u=null,s()}))},function(){c=!0,s()}))})},Nh}function qh(){if(Rh)return Uh;Rh=1,Object.defineProperty(Uh,"__esModule",{value:!0}),Uh.switchAll=void 0;var e=$h(),t=mo();return Uh.switchAll=function(){return e.switchMap(t.identity)},Uh}var zh,Wh={};function Vh(){if(zh)return Wh;zh=1,Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.switchMapTo=void 0;var e=$h(),t=jn();return Wh.switchMapTo=function(r,n){return t.isFunction(n)?e.switchMap(function(){return r},n):e.switchMap(function(){return r})},Wh}var Gh,Kh={};function Yh(){if(Gh)return Kh;Gh=1,Object.defineProperty(Kh,"__esModule",{value:!0}),Kh.switchScan=void 0;var e=$h(),t=Eo();return Kh.switchScan=function(r,n){return t.operate(function(t,o){var i=n;return e.switchMap(function(e,t){return r(i,e,t)},function(e,t){return i=t,t})(t).subscribe(o),function(){i=null}})},Kh}var Hh,Jh={};function Qh(){if(Hh)return Jh;Hh=1,Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.takeUntil=void 0;var e=Eo(),t=jo(),r=Gu(),n=eo();return Jh.takeUntil=function(o){return e.operate(function(e,i){r.innerFrom(o).subscribe(t.createOperatorSubscriber(i,function(){return i.complete()},n.noop)),!i.closed&&e.subscribe(i)})},Jh}var Xh,Zh={};function eb(){if(Xh)return Zh;Xh=1,Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.takeWhile=void 0;var e=Eo(),t=jo();return Zh.takeWhile=function(r,n){return void 0===n&&(n=!1),e.operate(function(e,o){var i=0;e.subscribe(t.createOperatorSubscriber(o,function(e){var t=r(e,i++);(t||n)&&o.next(e),!t&&o.complete()}))})},Zh}var tb,rb={};function nb(){if(tb)return rb;tb=1,Object.defineProperty(rb,"__esModule",{value:!0}),rb.tap=void 0;var e=jn(),t=Eo(),r=jo(),n=mo();return rb.tap=function(o,i,u){var a=e.isFunction(o)||i||u?{next:o,error:i,complete:u}:o;return a?t.operate(function(e,t){var n;null===(n=a.subscribe)||void 0===n||n.call(a);var o=!0;e.subscribe(r.createOperatorSubscriber(t,function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)},function(){var e;o=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()},function(e){var r;o=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)},function(){var e,t;o&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)}))}):n.identity},rb}var ob,ib={};function ub(){if(ob)return ib;ob=1,Object.defineProperty(ib,"__esModule",{value:!0}),ib.throttle=void 0;var e=Eo(),t=jo(),r=Gu();return ib.throttle=function(n,o){return e.operate(function(e,i){var u=null!=o?o:{},a=u.leading,c=void 0===a||a,s=u.trailing,l=void 0!==s&&s,f=!1,d=null,p=null,h=!1,b=function(){null==p||p.unsubscribe(),p=null,l&&(m(),h&&i.complete())},v=function(){p=null,h&&i.complete()},y=function(e){return p=r.innerFrom(n(e)).subscribe(t.createOperatorSubscriber(i,b,v))},m=function(){if(f){f=!1;var e=d;d=null,i.next(e),!h&&y(e)}};e.subscribe(t.createOperatorSubscriber(i,function(e){f=!0,d=e,(!p||p.closed)&&(c?m():y(e))},function(){h=!0,(!(l&&f&&p)||p.closed)&&i.complete()}))})},ib}var ab,cb={};function sb(){if(ab)return cb;ab=1,Object.defineProperty(cb,"__esModule",{value:!0}),cb.throttleTime=void 0;var e=Ri(),t=ub(),r=ps();return cb.throttleTime=function(n,o,i){void 0===o&&(o=e.asyncScheduler);var u=r.timer(n,o);return t.throttle(function(){return u},i)},cb}var lb,fb={};function db(){if(lb)return fb;lb=1,Object.defineProperty(fb,"__esModule",{value:!0}),fb.TimeInterval=fb.timeInterval=void 0;var e=Ri(),t=Eo(),r=jo();fb.timeInterval=function(o){return void 0===o&&(o=e.asyncScheduler),t.operate(function(e,t){var i=o.now();e.subscribe(r.createOperatorSubscriber(t,function(e){var r=o.now(),u=r-i;i=r,t.next(new n(e,u))}))})};var n=function(e,t){this.value=e,this.interval=t};return fb.TimeInterval=n,fb}var pb,hb={};function bb(){if(pb)return hb;pb=1,Object.defineProperty(hb,"__esModule",{value:!0}),hb.timeoutWith=void 0;var e=Ri(),t=tc(),r=rc();return hb.timeoutWith=function(n,o,i){var u,a,c;if(i=null!=i?i:e.async,t.isValidDate(n)?u=n:"number"==typeof n&&(a=n),!o)throw new TypeError("No observable provided to switch to");if(c=function(){return o},null==u&&null==a)throw new TypeError("No timeout provided.");return r.timeout({first:u,each:a,scheduler:i,with:c})},hb}var vb,yb={};function mb(){if(vb)return yb;vb=1,Object.defineProperty(yb,"__esModule",{value:!0}),yb.timestamp=void 0;var e=ti(),t=fc();return yb.timestamp=function(r){return void 0===r&&(r=e.dateTimestampProvider),t.map(function(e){return{value:e,timestamp:r.now()}})},yb}var Db,gb={};function wb(){if(Db)return gb;Db=1,Object.defineProperty(gb,"__esModule",{value:!0}),gb.window=void 0;var e=Ko(),t=Eo(),r=jo(),n=eo(),o=Gu();return gb.window=function(i){return t.operate(function(t,u){var a=new e.Subject;u.next(a.asObservable());var c=function(e){a.error(e),u.error(e)};return t.subscribe(r.createOperatorSubscriber(u,function(e){return null==a?void 0:a.next(e)},function(){a.complete(),u.complete()},c)),o.innerFrom(i).subscribe(r.createOperatorSubscriber(u,function(){a.complete(),u.next(a=new e.Subject)},n.noop,c)),function(){null==a||a.unsubscribe(),a=null}})},gb}var _b,Ob={};function Sb(){if(_b)return Ob;_b=1;var e=Ob&&Ob.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.windowCount=void 0;var t=Ko(),r=Eo(),n=jo();return Ob.windowCount=function(o,i){void 0===i&&(i=0);var u=i>0?i:o;return r.operate(function(r,i){var a=[new t.Subject],c=0;i.next(a[0].asObservable()),r.subscribe(n.createOperatorSubscriber(i,function(r){var n,s;try{for(var l=e(a),f=l.next();!f.done;f=l.next()){f.value.next(r)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(s=l.return)&&s.call(l)}finally{if(n)throw n.error}}var d=c-o+1;if(d>=0&&d%u===0&&a.shift().complete(),++c%u===0){var p=new t.Subject;a.push(p),i.next(p.asObservable())}},function(){for(;a.length>0;)a.shift().complete();i.complete()},function(e){for(;a.length>0;)a.shift().error(e);i.error(e)},function(){a=null}))})},Ob}var Eb,Pb={};function Cb(){if(Eb)return Pb;Eb=1,Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.windowTime=void 0;var e=Ko(),t=Ri(),r=qn(),n=Eo(),o=jo(),i=$n(),u=vu(),a=Qu();return Pb.windowTime=function(c){for(var s,l,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var p=null!==(s=u.popScheduler(f))&&void 0!==s?s:t.asyncScheduler,h=null!==(l=f[0])&&void 0!==l?l:null,b=f[1]||1/0;return n.operate(function(t,n){var u=[],s=!1,l=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),i.arrRemove(u,e),s&&f()},f=function(){if(u){var t=new r.Subscription;n.add(t);var o=new e.Subject,i={window:o,subs:t,seen:0};u.push(i),n.next(o.asObservable()),a.executeSchedule(t,p,function(){return l(i)},c)}};null!==h&&h>=0?a.executeSchedule(n,p,f,h,!0):s=!0,f();var d=function(e){return u.slice().forEach(e)},v=function(e){d(function(t){var r=t.window;return e(r)}),e(n),n.unsubscribe()};return t.subscribe(o.createOperatorSubscriber(n,function(e){d(function(t){t.window.next(e),b<=++t.seen&&l(t)})},function(){return v(function(e){return e.complete()})},function(e){return v(function(t){return t.error(e)})})),function(){u=null}})},Pb}var xb,Fb={};function jb(){if(xb)return Fb;xb=1;var e=Fb&&Fb.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.windowToggle=void 0;var t=Ko(),r=qn(),n=Eo(),o=Gu(),i=jo(),u=eo(),a=$n();return Fb.windowToggle=function(c,s){return n.operate(function(n,l){var f=[],d=function(e){for(;0<f.length;)f.shift().error(e);l.error(e)};o.innerFrom(c).subscribe(i.createOperatorSubscriber(l,function(e){var n=new t.Subject;f.push(n);var c,p=new r.Subscription;try{c=o.innerFrom(s(e))}catch(e){return void d(e)}l.next(n.asObservable()),p.add(c.subscribe(i.createOperatorSubscriber(l,function(){a.arrRemove(f,n),n.complete(),p.unsubscribe()},u.noop,d)))},u.noop)),n.subscribe(i.createOperatorSubscriber(l,function(t){var r,n,o=f.slice();try{for(var i=e(o),u=i.next();!u.done;u=i.next()){u.value.next(t)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},function(){for(;0<f.length;)f.shift().complete();l.complete()},d,function(){for(;0<f.length;)f.shift().unsubscribe()}))})},Fb}var Bb,Ab={};function Mb(){if(Bb)return Ab;Bb=1,Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.windowWhen=void 0;var e=Ko(),t=Eo(),r=jo(),n=Gu();return Ab.windowWhen=function(o){return t.operate(function(t,i){var u,a,c=function(e){u.error(e),i.error(e)},s=function(){var t;null==a||a.unsubscribe(),null==u||u.complete(),u=new e.Subject,i.next(u.asObservable());try{t=n.innerFrom(o())}catch(e){return void c(e)}t.subscribe(a=r.createOperatorSubscriber(i,s,s,c))};s(),t.subscribe(r.createOperatorSubscriber(i,function(e){return u.next(e)},function(){u.complete(),i.complete()},c,function(){null==a||a.unsubscribe(),u=null}))})},Ab}var kb,Tb={};function Ib(){if(kb)return Tb;kb=1;var e=Tb&&Tb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Tb&&Tb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Tb,"__esModule",{value:!0}),Tb.withLatestFrom=void 0;var r=Eo(),n=jo(),o=Gu(),i=mo(),u=eo(),a=vu();return Tb.withLatestFrom=function(){for(var c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];var l=a.popResultSelector(c);return r.operate(function(r,a){for(var s=c.length,f=new Array(s),d=c.map(function(){return!1}),p=!1,h=function(e){o.innerFrom(c[e]).subscribe(n.createOperatorSubscriber(a,function(t){f[e]=t,p||d[e]||(d[e]=!0,(p=d.every(i.identity))&&(d=null))},u.noop))},b=0;b<s;b++)h(b);r.subscribe(n.createOperatorSubscriber(a,function(r){if(p){var n=t([r],e(f));a.next(l?l.apply(void 0,t([],e(n))):n)}}))})},Tb}var Lb,Rb={};function Ub(){if(Lb)return Rb;Lb=1,Object.defineProperty(Rb,"__esModule",{value:!0}),Rb.zipAll=void 0;var e=Js(),t=Ul();return Rb.zipAll=function(r){return t.joinAllInternals(e.zip,r)},Rb}var Nb,$b,qb,zb={},Wb={};function Vb(){if(Nb)return Wb;Nb=1;var e=Wb&&Wb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=Wb&&Wb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.zip=void 0;var r=Js(),n=Eo();return Wb.zip=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.operate(function(n,i){r.zip.apply(void 0,t([n],e(o))).subscribe(i)})},Wb}function Gb(){if($b)return zb;$b=1;var e=zb&&zb.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},t=zb&&zb.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(zb,"__esModule",{value:!0}),zb.zipWith=void 0;var r=Vb();return zb.zipWith=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return r.zip.apply(void 0,t([],e(n)))},zb}function Kb(){return qb||(qb=1,function(e){var t=Pn&&Pn.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Pn&&Pn.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var n=go();Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return n.Observable}});var o=Ao();Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var i=fo();Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return i.observable}});var u=$o();Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var a=Ko();Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return a.Subject}});var c=Jo();Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var s=ri();Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return s.ReplaySubject}});var l=ii();Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return l.AsyncSubject}});var f=Ti();Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return f.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return f.asapScheduler}});var d=Ri();Object.defineProperty(e,"async",{enumerable:!0,get:function(){return d.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return d.asyncScheduler}});var p=Ki();Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return p.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return p.queueScheduler}});var h=ru();Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return h.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return h.animationFrameScheduler}});var b=iu();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var v=Ai();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return v.Scheduler}});var y=qn();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return y.Subscription}});var m=co();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return m.Subscriber}});var D=Fa();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return D.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return D.NotificationKind}});var g=Do();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return g.pipe}});var w=eo();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return w.noop}});var _=mo();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return _.identity}});var O=Aa();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return O.isObservable}});var S=Ra();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return S.lastValueFrom}});var E=$a();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return E.firstValueFrom}});var P=Wa();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var C=La();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return C.EmptyError}});var x=Ka();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return x.NotFoundError}});var F=Go();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return F.ObjectUnsubscribedError}});var j=Ja();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return j.SequenceError}});var B=rc();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return B.TimeoutError}});var A=Ln();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return A.UnsubscriptionError}});var M=hc();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return M.bindCallback}});var k=yc();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return k.bindNodeCallback}});var T=Pc();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return T.combineLatest}});var I=$c();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return I.concat}});var L=Kc();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return L.connectable}});var R=Gc();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return R.defer}});var U=su();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return U.empty}});var N=Jc();Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return N.forkJoin}});var $=Oa();Object.defineProperty(e,"from",{enumerable:!0,get:function(){return $.from}});var q=Zc();Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return q.fromEvent}});var z=rs();Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return z.fromEventPattern}});var W=is();Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return W.generate}});var V=cs();Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return V.iif}});var G=hs();Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return G.interval}});var K=ys();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return K.merge}});var Y=gs();Object.defineProperty(e,"never",{enumerable:!0,get:function(){return Y.never}});var H=Sa();Object.defineProperty(e,"of",{enumerable:!0,get:function(){return H.of}});var J=Ps();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return J.onErrorResumeNext}});var Q=Fs();Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return Q.pairs}});var X=Rs();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return X.partition}});var Z=$s();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Z.race}});var ee=Ws();Object.defineProperty(e,"range",{enumerable:!0,get:function(){return ee.range}});var te=xa();Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return te.throwError}});var re=ps();Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return re.timer}});var ne=Ks();Object.defineProperty(e,"using",{enumerable:!0,get:function(){return ne.using}});var oe=Js();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return oe.zip}});var ie=_a();Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return ie.scheduled}});var ue=su();Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ae=gs();Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return ae.NEVER}}),r(Zs(),e);var ce=Vn();Object.defineProperty(e,"config",{enumerable:!0,get:function(){return ce.config}});var se=rl();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return se.audit}});var le=il();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return le.auditTime}});var fe=cl();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return fe.buffer}});var de=fl();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return de.bufferCount}});var pe=hl();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return pe.bufferTime}});var he=yl();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return he.bufferToggle}});var be=gl();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return be.bufferWhen}});var ve=Ol();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return ve.catchError}});var ye=$l();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return ye.combineAll}});var me=Nl();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return me.combineLatestAll}});var De=Kl();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return De.combineLatestWith}});var ge=Nc();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return ge.concatAll}});var we=Jl();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return we.concatMap}});var _e=Zl();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return _e.concatMapTo}});var Oe=uf();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Oe.concatWith}});var Se=df();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return Se.connect}});var Ee=bf();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ee.count}});var Pe=mf();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Pe.debounce}});var Ce=wf();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Ce.debounceTime}});var xe=Sf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return xe.defaultIfEmpty}});var Fe=Uf();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Fe.delay}});var je=Rf();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return je.delayWhen}});var Be=qf();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return Be.dematerialize}});var Ae=Vf();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Ae.distinct}});var Me=Yf();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Me.distinctUntilChanged}});var ke=Qf();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ke.distinctUntilKeyChanged}});var Te=nd();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Te.elementAt}});var Ie=ud();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return Ie.endWith}});var Le=sd();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return Le.every}});var Re=md();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return Re.exhaust}});var Ue=yd();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return Ue.exhaustAll}});var Ne=vd();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Ne.exhaustMap}});var $e=wd();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return $e.expand}});var qe=Ls();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return qe.filter}});var ze=Sd();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return ze.finalize}});var We=Cd();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return We.find}});var Ve=jd();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return Ve.findIndex}});var Ge=Md();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Ge.first}});var Ke=Id();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ye=Af();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Ye.ignoreElements}});var He=Ud();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return He.isEmpty}});var Je=Vd();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Je.last}});var Qe=fc();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Qe.map}});var Xe=Lf();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Xe.mapTo}});var Ze=Yd();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Ze.materialize}});var et=Qd();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return et.max}});var tt=Uc();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return tt.mergeAll}});var rt=ep();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return rt.flatMap}});var nt=Rc();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return nt.mergeMap}});var ot=np();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var it=up();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return it.mergeScan}});var ut=dp();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var at=bp();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return at.min}});var ct=mp();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return ct.multicast}});var st=Xu();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return st.observeOn}});var lt=wp();Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return lt.onErrorResumeNextWith}});var ft=Sp();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return ft.pairwise}});var dt=Cp();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var pt=jp();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return pt.publish}});var ht=Mp();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ht.publishBehavior}});var bt=Ip();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return bt.publishLast}});var vt=Up();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return vt.publishReplay}});var yt=qp();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return yt.raceWith}});var mt=Ll();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return mt.reduce}});var Dt=Vp();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Dt.repeat}});var gt=Yp();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return gt.repeatWhen}});var wt=Qp();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return wt.retry}});var _t=eh();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return _t.retryWhen}});var Ot=Bo();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return Ot.refCount}});var St=nh();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return St.sample}});var Et=uh();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Et.sampleTime}});var Pt=sh();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Pt.scan}});var Ct=dh();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Ct.sequenceEqual}});var xt=bh();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return xt.share}});var Ft=mh();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Ft.shareReplay}});var jt=wh();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return jt.single}});var Bt=Sh();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Bt.skip}});var At=Ch();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return At.skipLast}});var Mt=jh();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Mt.skipUntil}});var kt=Mh();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return kt.skipWhile}});var Tt=Ih();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Tt.startWith}});var It=ra();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return It.subscribeOn}});var Lt=qh();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return Lt.switchAll}});var Rt=$h();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Rt.switchMap}});var Ut=Vh();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return Ut.switchMapTo}});var Nt=Yh();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Nt.switchScan}});var $t=Ff();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return $t.take}});var qt=Wd();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return qt.takeLast}});var zt=Qh();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Wt=eb();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Vt=nb();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Vt.tap}});var Gt=ub();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Gt.throttle}});var Kt=sb();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Yt=rd();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Yt.throwIfEmpty}});var Ht=db();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Ht.timeInterval}});var Jt=rc();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Qt=bb();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Qt.timeoutWith}});var Xt=mb();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var Zt=Rl();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Zt.toArray}});var er=wb();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return er.window}});var tr=Sb();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return tr.windowCount}});var rr=Cb();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return rr.windowTime}});var nr=jb();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return nr.windowToggle}});var or=Mb();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var ir=Ib();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return ir.withLatestFrom}});var ur=Ub();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return ur.zipAll}});var ar=Gb();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ar.zipWith}})}(Pn)),Pn}var Yb,Hb,Jb,Qb,Xb,Zb,ev,tv,rv,nv={exports:{}};function ov(){if(Yb)return nv.exports;function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}Yb=1;var t=nv.exports=function(t,r,n="async"){return"string"==typeof r&&(n=r,r=void 0),r=r||function(){},function(){var o=arguments,i=this,u=new Promise(function(r,u){var a=!1;const c=function(e){a&&console.warn("Run-async promise already resolved."),a=!0,r(e)};var s=!1;const l=function(e){s&&console.warn("Run-async promise already rejected."),s=!0,u(e)};var f,d=!1,p=!1,h=!1,b=function(){return h?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(p&&console.warn("Run-async wrapped function (async) returned a promise.\nCalls to async() callback can have unexpected results."),d=!0,function(e,t){e?l(e):c(t)})};f=i&&n&&Proxy?new Proxy(i,{get(e,t){return t===n?(t in e&&console.warn(`${n} property is been shadowed by run-sync`),b):Reflect.get(...arguments)}}):{[n]:b};var v=t.apply(f,Array.prototype.slice.call(o));d?e(v)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):e(v)?(p=!0,v.then(c,l)):c(v),h=!0});return u.then(r.bind(null,null),r),u}};return t.cb=function(e,r){return t(function(){var t=Array.prototype.slice.call(arguments);return t.length===e.length-1&&t.push(this.async()),e.apply(this,t)},r)},nv.exports}function iv(){return Hb||(Hb=1,function(e){var t=En&&En.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e._=void 0;const r=t(u),n=Kb(),o=t(ov()),i=t(tt()),a=gt(),c=t(ft());async function s(e,t,r){const n=e[t];return"function"==typeof n?(0,o.default)(n)(r):n}e._={set:(e,t="",r)=>{let n=e;t.split(".").forEach((e,t,o)=>{"__proto__"!==e&&"constructor"!==e&&(t===o.length-1?n[e]=r:e in n&&"object"==typeof n[e]||(n[e]={}),n=n[e])})},get:(e,t="",r)=>{const n=r=>String.prototype.split.call(t,r).filter(Boolean).reduce((e,t)=>null==e?e:e[t],e),o=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return void 0===o||o===e?r:o}};class l extends Error{name="TTYError";isTtyError=!0}e.default=class{prompts;answers={};process=n.EMPTY;abortController=new AbortController;opt;constructor(e,t={}){this.opt=t,this.prompts=e}async run(t,r){let o;return this.abortController=new AbortController,this.answers="object"==typeof r?{...r}:{},o=function(e){return Array.isArray(e)}(t)?(0,n.from)(t):(0,n.isObservable)(t)?t:function(e){return Object.values(e).every(e=>"object"==typeof e&&!Array.isArray(e)&&null!=e)}(t)?(0,n.from)(Object.entries(t).map(([e,t])=>Object.assign({},t,{name:e}))):(0,n.from)([t]),this.process=o.pipe((0,n.concatMap)(e=>(0,n.of)(e).pipe((0,n.concatMap)(e=>(0,n.from)(this.shouldRun(e).then(t=>{if(t)return e})).pipe((0,n.filter)(e=>null!=e))),(0,n.concatMap)(e=>(0,n.defer)(()=>(0,n.from)(this.fetchAnswer(e))))))),(0,n.lastValueFrom)(this.process.pipe((0,n.reduce)((t,r)=>(e._.set(t,r.name,r.answer),t),this.answers))).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async e=>{const[t,r,n]=await Promise.all([s(e,"message",this.answers),s(e,"default",this.answers),s(e,"choices",this.answers)]);let o;return Array.isArray(n)&&(o=n.map(e=>{const t="object"!=typeof e||null==e?{name:e,value:e}:{...e,value:"value"in e?e.value:"name"in e?e.name:void 0};return"value"in t&&Array.isArray(r)?{checked:r.includes(t.value),...t}:t})),Object.assign({},e,{message:t,default:r,choices:o,type:e.type in this.prompts?e.type:"input"})};fetchAnswer=async e=>{const t=await this.prepareQuestion(e),n=this.prompts[t.type];if(null==n)throw new Error(`Prompt for type ${t.type} not found`);let o;const u=function(e){return Boolean(e.prototype&&"run"in e.prototype&&"function"==typeof e.prototype.run)}(n)?(e,t)=>new Promise((u,s)=>{const{signal:f}=t;if(f.aborted)return void s(new a.AbortPromptError({cause:f.reason}));const d=r.default.createInterface(function(e){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new l("Prompts can not be meaningfully rendered in non-TTY environments");const r=new i.default;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(t)),p=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")};process.on("exit",p),d.on("SIGINT",p);const h=new n(e,d,this.answers),b=()=>{process.removeListener("exit",p),d.removeListener("SIGINT",p),d.setPrompt(""),d.output.unmute(),d.output.write(c.default.cursorShow),d.output.end(),d.close(),o?.()},v=()=>{s(new a.AbortPromptError({cause:f.reason})),b()};f.addEventListener("abort",v),o=()=>{f.removeEventListener("abort",v),o=void 0},h.run().then(u,s).finally(b)}):n;let s;const{signal:f}=this.opt;if(f?.aborted)this.abortController.abort(f.reason);else if(f){const e=()=>this.abortController.abort(f.reason);f.addEventListener("abort",e),s=()=>{f.removeEventListener("abort",e)}}const{filter:d=e=>e}=t,{signal:p}=this.abortController;return u(t,{...this.opt,signal:p}).then(e=>({name:t.name,answer:d(e,this.answers)})).finally(()=>{o?.(),s?.()})};close=()=>{this.abortController.abort()};shouldRun=async t=>{if(!0!==t.askAnswered&&void 0!==e._.get(this.answers,t.name))return!1;const{when:r}=t;if("function"==typeof r){const e=await(0,o.default)(r)(this.answers);return Boolean(e)}return!1!==r}}}(En)),En}function uv(){if(Jb)return x;Jb=1;var e=x&&x.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x,"__esModule",{value:!0}),x.createPromptModule=o;const t=On(),r=e(iv()),n={input:t.input,select:t.select,list:t.select,number:t.number,confirm:t.confirm,rawlist:t.rawlist,expand:t.expand,checkbox:t.checkbox,password:t.password,editor:t.editor,search:t.search};function o(e){function t(n,o){const i=new r.default(t.prompts,e),u=i.run(n,o);return Object.assign(u,{ui:i})}return t.prompts={...n},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){t.prompts={...n}},t}const i=o();const u={prompt:i,ui:{Prompt:r.default},createPromptModule:o,registerPrompt:function(e,t){i.registerPrompt(e,t)},restoreDefaultPrompts:function(){i.restoreDefaultPrompts()},Separator:t.Separator};return x.default=u,x}function av(){return Xb?Qb:(Xb=1,Qb={CONFIG_FILE_NAME:"minigame.config.json",SDK_URL:"https://connect.tiktok-minis.com/game/sdk.js",VCONSOLE_URL:"https://connect.tiktok-minis.com/libs/vConsole.js",VCONSOLE_INIT:"\n if(typeof VConsole === 'function') {\n window.vConsole = new VConsole();\n }\n ",MINIS_MANIFEST_FILE_NAME:"minis.manifest.json",MINIS_RUNTIME_URL:"https://www.tiktok.com/minigames/runtime"})}function cv(){if(ev)return Zb;ev=1;const e=s,r=v,n=y,o=t,{JSDOM:i}=r,{CONFIG_FILE_NAME:u,SDK_URL:a,VCONSOLE_URL:c,VCONSOLE_INIT:l}=av(),f=`${process.cwd()}/${u}`,d=`${process.cwd()}/index.html`;return Zb=async function({config:t,clientKey:r}){if(e.writeFileSync(f,JSON.stringify(t,null,2)),!e.existsSync(d))return void console.error("index.html does not exist");const u=e.readFileSync(d,"utf8"),s=new i(u),{document:p}=s.window;let h=p.querySelector("head");h||(h=p.createElement("head"),p.documentElement.insertBefore(h,p.body));const b=Array.from(p.querySelectorAll("script")),v=b.some(e=>e.src&&e.src.includes(a)),y=b.some(e=>e.src&&e.src.includes("vConsole.js"));let m=null;if(v){const e=Array.from(h.querySelectorAll("script"));if(m=e.find(e=>function(e,t){return!!e.innerHTML&&e.innerHTML.includes("TTMinis.game.init")&&e.innerHTML.includes(t)}(e,r)),m)console.log("JS SDK 已接入,跳过 SDK 相关脚本注入");else{const t=e.filter(e=>e.src&&e.src.includes(a));t.length>0&&(m=t[t.length-1])}}else{const e=p.createElement("script");e.src=a,h.insertBefore(e,h.firstChild);const t=p.createElement("script");t.innerHTML=`\n window.TTMinis = TTMinis;\n TTMinis.game.init({\n clientKey: "${r}",\n });\n `,h.insertBefore(t,e.nextSibling),m=t}if(function(e){return e.startsWith("sb")}(r)&&(console.log("Sandbox 环境,跳过 vConsole 相关脚本注入"),!y)){let e=m;e=e?e.nextSibling:h.firstChild;const t=p.createElement("script");t.src=c;const r=p.createElement("script");r.innerHTML=l,h.insertBefore(t,e),h.insertBefore(r,e)}const D=await n.format(s.serialize(),{parser:"html"});e.writeFileSync(d,D),console.log(o.green.bold("TikTok H5 Mini Game initialization has been completed..."))},Zb}var sv,lv,fv=function(){if(rv)return tv;rv=1;const e=uv(),t=cv();return tv=function(){e.createPromptModule()([{type:"input",name:"clientKey",message:"Please input client key"},{type:"input",name:"devPort",message:"Please input dev port",default:9527}]).then(async e=>{const{clientKey:r,devPort:n}=e;t({clientKey:r,config:{_comment:"orientation is the orientation of the game. It can be either 'VERTICAL' or 'HORIZONTAL'.our game default is VERTICAL; minigame.config.json dev is a configuration file for minigame development. You can use it to configure the minigame.",orientation:"VERTICAL",dev:{port:n}}})})}}(),dv=P(fv);var pv,hv,bv,vv,yv=function(){if(lv)return sv;lv=1;const e=m,r=h,n=s,o=t,i=D,u=e(),a=b,{CONFIG_FILE_NAME:c,MINIS_RUNTIME_URL:l}=av();return sv=function(){const t=r.join(process.cwd(),c);if(!n.existsSync(t))return void console.log(o.red.bold(`${c} is not exist, please run minis game init first`));const s=JSON.parse(n.readFileSync(t,"utf8")),f=s.dev?.port||9527;console.log(o.yellow.bold("⚠️ Before dev, please ensure:\n 1. The account used to login www.tiktok.com is in the sandbox target user range of Minis developer platform, otherwise login authorization will throw an error.\n 2. The browser allows www.tiktok.com <popup and redirect>, because the authorization login linkage needs to open a new tab popup for operation, otherwise the authorization login linkage will not be able to debug normally.")),console.log(o.bold.blue("\n \n============== start dev your game, it will take a few seconds ============ \n \n")),u.use((e,t,r)=>{e.url.endsWith(".br")?t.setHeader("Content-Encoding","br"):e.url.endsWith(".gz")&&t.setHeader("Content-Encoding","gzip"),r()}),u.use((e,t,u)=>{try{const e=r.join(process.cwd(),"index.html"),o=n.readFileSync(e,"utf8"),u=i.load(o),c=[];u("script:not([src])").each((e,t)=>{const r=u(t).html();r&&r.trim()&&c.push(r)});c.map(e=>`'sha256-${a.createHash("sha256").update(e,"utf8").digest("base64")}'`);const s="*";t.setHeader("Content-Security-Policy",`default-src 'self';script-src 'self' data: blob: 'unsafe-eval' 'unsafe-inline' connect.tiktok-minis.com sf-connect.tiktokminis.us;img-src 'self' ${s} data: blob: *; connect-src 'self' ${s} data: blob: ; style-src 'self' ${s} 'unsafe-inline' fonts.googleapis.com data: blob: *; font-src 'self' fonts.gstatic.com blob: data: *; media-src 'self' ${s} data: blob: *; frame-src 'none'; base-uri 'self'; worker-src 'self' blob: data: ;`)}catch(e){console.warn(o.red("Failed to set CSP header:"),e.message)}u()}),u.use(e.static(r.join(process.cwd()))),u.listen(f,()=>{const e=`${l}?minis_url=${`http://localhost:${f}`}&enable_log=1`;console.log(`you can access ${o.green.underline.bold(e)} to debug your game in browser...`);try{open(e)}catch(e){console.warn(o.red("Failed to open browser, you can access it manually"),e.message)}})}}(),mv=P(yv);function Dv(){if(hv)return pv;hv=1;const e=t,r=s,n=h,{MINIS_MANIFEST_FILE_NAME:o}=av();function i(e,t){let r=t.find(t=>"folder"===t.type&&t.name===e[0]);return r||(r={type:"folder",name:e[0],children:[]},t.push(r)),e.length>1?i(e.slice(1),r.children):r}function u(e,t=e){const o={};return r.readdirSync(e).forEach(i=>{const a=n.join(e,i);if(r.statSync(a).isDirectory()){const e=u(a,t);Object.assign(o,e)}else if(""!==n.extname(i)&&i){const e="/"+n.relative(t,a).replace(/\\/g,"/");o[a]=e}}),o}return pv={buildMinisManifest:async function(){try{const e=n.join(process.cwd()),t=[],a=u(e);Object.keys(a).filter(e=>!e.endsWith(".map")).forEach(e=>{const r=a[e].split("/").filter(Boolean),n=r.pop()||"";if(0===r.length)t.push({type:"file",name:n});else{i(r,t).children.push({type:"file",name:n})}}),r.writeFileSync(n.join(e,o),JSON.stringify({name:o,resource_list:t},null,2))}catch(t){console.error(e.red(`Error during debug process: ${t.message}`)),t instanceof Error&&t.stack&&console.error(e.red(`Stack trace: ${t.stack}`)),process.exit(1)}}}}var gv=P(function(){if(vv)return bv;vv=1;const e=s,r=g,n=h,o=t,i=w,u=uv().createPromptModule(),{buildMinisManifest:a}=Dv();return bv=async function(){try{const{zipName:t}=await u({type:"input",name:"zipName",default:"game",message:"Please input zip name"}),c=Date.now();console.log(o.bold.blue("start build your game, it will take a few minutes..."));e.readdirSync(process.cwd()).forEach(t=>{t.endsWith(".zip")&&e.unlinkSync(n.join(process.cwd(),t))}),await a();const s=i("zip",{zlib:{level:9}});s.on("error",function(e){throw e});const l=function(){const t=r.homedir(),o=["Desktop","桌面"];for(const r of o){const o=n.join(t,r);if(e.existsSync(o))return o}return n.join(t,"Desktop")}(),f=n.join(l,`${t}.zip`);return await s.pipe(e.createWriteStream(f)),await s.directory(n.resolve(process.cwd()),!1),await s.finalize(),console.log(o.yellow.bold(`build ${t}.zip success, you can find it in desktop, use time ${Date.now()-c} ms`)),new Promise((e,t)=>{s.on("end",e),s.on("error",t)})}catch(e){console.log(o.red(`auto build ${zipNameInput}.zip failed: ${e.message}, you should zip it manually`))}}}());function wv(e){return`https://www.tiktok.com/ttmg/dev/${e}?host=${function(){const e=g.networkInterfaces();for(const t in e){const r=e[t];if(r)for(const e of r)if("IPv4"===e.family&&!e.internal)return e.address}}()}&port=9527`}const _v=e=>"up"===e.name||"k"===e.name||e.ctrl&&"p"===e.name,Ov=e=>"down"===e.name||"j"===e.name||e.ctrl&&"n"===e.name,Sv=e=>"backspace"===e.name,Ev=e=>"1234567890".includes(e.name),Pv=e=>"enter"===e.name||"return"===e.name;class Cv extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class xv extends Error{name="CancelPromptError";message="Prompt was canceled"}class Fv extends Error{name="ExitPromptError"}class jv extends Error{name="HookError"}class Bv extends Error{name="ValidationError"}const Av=new r.AsyncLocalStorage;function Mv(){const e=Av.getStore();if(!e)throw new jv("[Inquirer] Hook functions can only be called from within a prompt");return e}function kv(){return Mv().rl}function Tv(e){return r.AsyncResource.bind((...t)=>{const r=Mv();let n=!1;const o=r.handleChange;r.handleChange=()=>{n=!0};const i=e(...t);return n&&o(),r.handleChange=o,i})}function Iv(e){const t=Mv(),{index:r}=t,n=e({get:()=>t.hooks[r],set(e){t.hooks[r]=e},initialized:r in t.hooks});return t.index++,n}const Lv={queue(e){const t=Mv(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();const n=e(kv());if(null!=n&&"function"!=typeof n)throw new Bv("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){const e=Mv();Tv(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=Mv();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Rv(e){return Iv(t=>{const n=r.AsyncResource.bind(function(e){t.get()!==e&&(t.set(e),Mv().handleChange())});if(t.initialized)return[t.get(),n];const o="function"==typeof e?e():e;return t.set(o),[o,n]})}function Uv(e,t){Iv(r=>{const n=r.get();(!Array.isArray(n)||t.some((e,t)=>!Object.is(e,n[t])))&&Lv.queue(e),r.set(t)})}var Nv=P(J());const $v={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},qv={...$v,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},zv={...$v,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Wv=("win32"!==o.platform?"linux"!==o.env.TERM:Boolean(o.env.WT_SESSION)||Boolean(o.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===o.env.ConEmuTask||"Terminus-Sublime"===o.env.TERM_PROGRAM||"vscode"===o.env.TERM_PROGRAM||"xterm-256color"===o.env.TERM||"alacritty"===o.env.TERM||"JetBrains-JediTerm"===o.env.TERMINAL_EMULATOR)?qv:zv,Vv={prefix:{idle:Nv.blue("?"),done:Nv.green(Wv.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>Nv.yellow(e))},style:{answer:Nv.cyan,message:Nv.bold,error:e=>Nv.red(`> ${e}`),defaultAnswer:e=>Nv.dim(`(${e})`),help:Nv.dim,highlight:Nv.cyan,key:e=>Nv.cyan(Nv.bold(`<${e}>`))}};function Gv(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Kv(...e){const t={};for(const r of e)for(const[e,n]of Object.entries(r)){const r=t[e];t[e]=Gv(r)&&Gv(n)?Kv(r,n):n}return t}function Yv(...e){const t=[Vv,...e.filter(e=>null!=e)];return Kv(...t)}function Hv({status:e="idle",theme:t}){const[r,n]=Rv(!1),[o,i]=Rv(0),{prefix:u,spinner:a}=Yv(t);if(Uv(()=>{if("loading"===e){let e,t=-1;const r=setTimeout(()=>{n(!0),e=setInterval(()=>{t+=1,i(t%a.frames.length)},a.interval)},300);return()=>{clearTimeout(r),clearInterval(e)}}n(!1)},[e]),r)return a.frames[o];return"string"==typeof u?u:u["loading"===e?"idle":e]??u.idle}function Jv(e,t){return Iv(r=>{const n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((e,r)=>e!==t[r])){const n=e();return r.set({value:n,dependencies:t}),n}return n.value})}function Qv(e){return Rv({current:e})[0]}function Xv(e){const t=Qv(e);t.current=e,Uv(e=>{let r=!1;const n=Tv((n,o)=>{r||t.current(o,e)});return e.input.on("keypress",n),()=>{r=!0,e.input.removeListener("keypress",n)}},[])}var Zv=P(be()),ey=P(He());function ty(e,t){return e.split("\n").flatMap(e=>ey(e,t,{trim:!1,hard:!0}).split("\n").map(e=>e.trimEnd())).join("\n")}function ry(){return Zv({defaultWidth:80,output:kv().output})}function ny({items:e,active:t,renderItem:r,pageSize:n,loop:o=!0}){const i=ry(),u=t=>(t%e.length+e.length)%e.length,a=e.map((e,n)=>null==e?[]:ty(r({item:e,index:n,isActive:n===t}),i).split("\n")),c=a.reduce((e,t)=>e+t.length,0),s=e=>a[e]??[],l=function({active:e,renderedItems:t,pageSize:r,loop:n}){const o=Qv({lastPointer:e,lastActive:void 0}),{lastPointer:i,lastActive:u}=o.current,a=Math.floor(r/2),c=t.reduce((e,t)=>e+t.length,0),s=t.slice(0,e).reduce((e,t)=>e+t.length,0);let l=s;if(c>r)if(n)l=i,null!=u&&u<e&&e-u<r&&(l=Math.min(a,1===Math.abs(e-u)?Math.min(i+(t[u]?.length??0),Math.max(s,i)):i+e-u));else{const n=t.slice(e).reduce((e,t)=>e+t.length,0);l=n<r-a?r-n:Math.min(s,a)}return o.current.lastPointer=l,o.current.lastActive=e,l}({active:t,renderedItems:a,pageSize:n,loop:o}),f=s(t).slice(0,n),d=l+f.length<=n?l:n-f.length,p=Array.from({length:n});p.splice(d,f.length,...f);const h=new Set([t]);let b=d+f.length,v=u(t+1);for(;b<n&&!h.has(v)&&(o&&c>n?v!==t:v>t);){const e=s(v).slice(0,n-b);p.splice(b,e.length,...e),h.add(v),b+=e.length,v=u(v+1)}for(b=d-1,v=u(t-1);b>=0&&!h.has(v)&&(o&&c>n?v!==t:v<t);){const e=s(v),t=e.slice(Math.max(0,e.length-b-1));p.splice(b-t.length+1,t.length,...t),h.add(v),b-=t.length,v=u(v-1)}return p.filter(e=>"string"==typeof e).join("\n")}var oy=P(tt());const iy=[];iy.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&iy.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&iy.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const uy=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,ay=Symbol.for("signal-exit emitter"),cy=globalThis,sy=Object.defineProperty.bind(Object);class ly{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(cy[ay])return cy[ay];sy(cy,ay,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class fy{}const dy=globalThis.process,{onExit:py}=(hy=uy(dy)?new class extends fy{#n="win32"===dy.platform?"SIGINT":"SIGHUP";#o=new ly;#i;#u;#a;#c={};#s=!1;constructor(e){super(),this.#i=e,this.#c={};for(const t of iy)this.#c[t]=()=>{const r=this.#i.listeners(t);let{count:n}=this.#o;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#o.emit("exit",null,t),n="SIGHUP"===t?this.#n:t;r||e.kill(e.pid,n)}};this.#a=e.reallyExit,this.#u=e.emit}onExit(e,t){if(!uy(this.#i))return()=>{};!1===this.#s&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#o.on(r,e),()=>{this.#o.removeListener(r,e),0===this.#o.listeners.exit.length&&0===this.#o.listeners.afterExit.length&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#o.count+=1;for(const e of iy)try{const t=this.#c[e];t&&this.#i.on(e,t)}catch(e){}this.#i.emit=(e,...t)=>this.#l(e,...t),this.#i.reallyExit=e=>this.#f(e)}}unload(){this.#s&&(this.#s=!1,iy.forEach(e=>{const t=this.#c[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#i.removeListener(e,t)}catch(e){}}),this.#i.emit=this.#u,this.#i.reallyExit=this.#a,this.#o.count-=1)}#f(e){return uy(this.#i)?(this.#i.exitCode=e||0,this.#o.emit("exit",this.#i.exitCode,null),this.#a.call(this.#i,this.#i.exitCode)):0}#l(e,...t){const r=this.#u;if("exit"===e&&uy(this.#i)){"number"==typeof t[0]&&(this.#i.exitCode=t[0]);const n=r.call(this.#i,e,...t);return this.#o.emit("exit",this.#i.exitCode,null),n}return r.call(this.#i,e,...t)}}(dy):new class extends fy{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>hy.onExit(e,t),load:()=>hy.load(),unload:()=>hy.unload()});var hy,by=P(ft());const vy=e=>e.split("\n").length;function yy(e){return e>0?by.cursorDown(e):""}class my{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=""){const r=(e=>e.split("\n").pop()??"")(e),n=c.stripVTControlCharacters(r);let o=n;this.rl.line.length>0&&(o=o.slice(0,-this.rl.line.length)),this.rl.setPrompt(o),this.cursorPos=this.rl.getCursorPos();const i=ry();e=ty(e,i),t=ty(t,i),n.length%i===0&&(e+="\n");let u=e+(t?"\n"+t:"");const a=Math.floor(n.length/i)-this.cursorPos.rows+(t?vy(t):0);a>0&&(u+=by.cursorUp(a)),u+=by.cursorTo(this.cursorPos.cols),this.write(yy(this.extraLinesUnderPrompt)+by.eraseLines(this.height)+u),this.extraLinesUnderPrompt=a,this.height=vy(u)}checkCursorPos(){const e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(by.cursorTo(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let t=yy(this.extraLinesUnderPrompt);t+=e?by.eraseLines(this.height):"\n",t+=by.cursorShow,this.write(t),this.rl.close()}}class Dy extends Promise{static withResolver(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}}function gy(e){const t=function(){const e=Error.prepareStackTrace;let t=[];try{Error.prepareStackTrace=(e,r)=>{const n=r.slice(1);return t=n,n},(new Error).stack}catch{return t}return Error.prepareStackTrace=e,t}();return(n,o={})=>{const{input:i=process.stdin,signal:u}=o,a=new Set,c=new oy;c.pipe(o.output??process.stdout);const s=E.createInterface({terminal:!0,input:i,output:c}),l=new my(s),{promise:f,resolve:d,reject:p}=Dy.withResolver(),h=()=>p(new xv);if(u){const e=()=>p(new Cv({cause:u.reason}));if(u.aborted)return e(),Object.assign(f,{cancel:h});u.addEventListener("abort",e),a.add(()=>u.removeEventListener("abort",e))}a.add(py((e,t)=>{p(new Fv(`User force closed the prompt with ${e} ${t}`))}));const b=()=>p(new Fv("User force closed the prompt with SIGINT"));s.on("SIGINT",b),a.add(()=>s.removeListener("SIGINT",b));const v=()=>l.checkCursorPos();return s.input.on("keypress",v),a.add(()=>s.input.removeListener("keypress",v)),function(e,t){const r=function(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}(e);return Av.run(r,()=>t(function(e){r.handleChange=()=>{r.index=0,e()},r.handleChange()}))}(s,i=>{const u=r.AsyncResource.bind(()=>Lv.clearAll());return s.on("close",u),a.add(()=>s.removeListener("close",u)),i(()=>{try{const r=e(n,e=>{setImmediate(()=>d(e))});if(void 0===r){const e=t[1]?.getFileName();throw new Error(`Prompt functions must return a string.\n at ${e}`)}const[o,i]="string"==typeof r?[r]:r;l.render(o,i),Lv.run()}catch(e){p(e)}}),Object.assign(f.then(e=>(Lv.clearAll(),e),e=>{throw Lv.clearAll(),e}).finally(()=>{a.forEach(e=>e()),l.done({clearContent:Boolean(o.clearPromptOnDone)}),c.end()}).then(()=>f),{cancel:h})})}}class wy{separator=Nv.dim(Array.from({length:15}).join(Wv.line));type="separator";constructor(e){e&&(this.separator=e)}static isSeparator(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"separator"===e.type)}}const _y={icon:{checked:Nv.green(Wv.circleFilled),unchecked:Wv.circle,cursor:Wv.pointer},style:{disabledChoice:e=>Nv.dim(`- ${e}`),renderSelectedChoices:e=>e.map(e=>e.short).join(", "),description:e=>Nv.cyan(e)},helpMode:"auto"};function Oy(e){return!wy.isSeparator(e)&&!e.disabled}function Sy(e){return Oy(e)&&Boolean(e.checked)}function Ey(e){return Oy(e)?{...e,checked:!e.checked}:e}var Py=gy((e,t)=>{const{instructions:r,pageSize:n=7,loop:o=!0,required:i,validate:u=()=>!0}=e,a={all:"a",invert:"i",...e.shortcuts},c=Yv(_y,e.theme),s=Qv(!0),[l,f]=Rv("idle"),d=Hv({status:l,theme:c}),[p,h]=Rv(e.choices.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1,checked:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(r.description=e.description),r}));const b=Jv(()=>{const e=p.findIndex(Oy),t=p.findLastIndex(Oy);if(-1===e)throw new Bv("[checkbox prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[p]),[v,y]=Rv(b.first),[m,D]=Rv(!0),[g,w]=Rv();Xv(async e=>{if(Pv(e)){const e=p.filter(Sy),r=await u([...e]);i&&!p.some(Sy)?w("At least one choice must be selected"):!0===r?(f("done"),t(e.map(e=>e.value))):w(r||"You must select a valid value")}else if(_v(e)||Ov(e)){if(o||_v(e)&&v!==b.first||Ov(e)&&v!==b.last){const t=_v(e)?-1:1;let r=v;do{r=(r+t+p.length)%p.length}while(!Oy(p[r]));y(r)}}else if((e=>"space"===e.name)(e))w(void 0),D(!1),h(p.map((e,t)=>t===v?Ey(e):e));else if(e.name===a.all){const e=p.some(e=>Oy(e)&&!e.checked);h(p.map((r=e,function(e){return Oy(e)?{...e,checked:r}:e})))}else if(e.name===a.invert)h(p.map(Ey));else if(Ev(e)){const t=Number(e.name)-1,r=p[t];null!=r&&Oy(r)&&(y(t),h(p.map((e,r)=>r===t?Ey(e):e)))}var r});const _=c.style.message(e.message,l);let O;const S=ny({items:p,active:v,renderItem({item:e,isActive:t}){if(wy.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return c.style.disabledChoice(`${e.name} ${t}`)}t&&(O=e.description);const r=e.checked?c.icon.checked:c.icon.unchecked;return(t?c.style.highlight:e=>e)(`${t?c.icon.cursor:" "}${r} ${e.name}`)},pageSize:n,loop:o});if("done"===l){const e=p.filter(Sy);return`${d} ${_} ${c.style.answer(c.style.renderSelectedChoices(e,p))}`}let E="",P="";if("always"===c.helpMode||"auto"===c.helpMode&&m&&(void 0===r||r)){if("string"==typeof r)E=r;else{E=` (Press ${[`${c.style.key("space")} to select`,a.all?`${c.style.key(a.all)} to toggle all`:"",a.invert?`${c.style.key(a.invert)} to invert selection`:"",`and ${c.style.key("enter")} to proceed`].filter(e=>""!==e).join(", ")})`}p.length>n&&("always"===c.helpMode||"auto"===c.helpMode&&s.current)&&(P=`\n${c.style.help("(Use arrow keys to reveal more choices)")}`,s.current=!1)}const C=O?`\n${c.style.description(O)}`:"";let x="";return g&&(x=`\n${c.style.error(g)}`),`${d} ${_}${E}\n${S}${P}${C}${x}${by.cursorHide}`}),Cy=Hr();const xy={validationFailureMode:"keep"};var Fy=gy((e,t)=>{const{waitForUseInput:r=!0,file:{postfix:n=e.postfix??".txt",...o}={},validate:i=()=>!0}=e,u=Yv(xy,e.theme),[a,c]=Rv("idle"),[s="",l]=Rv(e.default),[f,d]=Rv(),p=Hv({status:a,theme:u});function h(r){r.pause();Cy.editAsync(s,(n,o)=>{(async(n,o)=>{if(r.resume(),n)d(n.toString());else{c("loading");const r=await i(o);!0===r?(d(void 0),c("done"),t(o)):("clear"===u.validationFailureMode?l(e.default):l(o),d(r||"You must provide a valid value"),c("idle"))}})(n,o)},{postfix:n,...o})}Uv(e=>{r||h(e)},[]),Xv((e,t)=>{"idle"===a&&Pv(e)&&h(t)});const b=u.style.message(e.message,a);let v="";if("loading"===a)v=u.style.help("Received");else if("idle"===a){const e=u.style.key("enter");v=u.style.help(`Press ${e} to launch your preferred editor.`)}let y="";return f&&(y=u.style.error(f)),[[p,b,v].filter(Boolean).join(" "),y]});function jy(e,t){let r=!1!==t;return/^(y|yes)/i.test(e)?r=!0:/^(n|no)/i.test(e)&&(r=!1),r}function By(e){return e?"Yes":"No"}var Ay=gy((e,t)=>{const{transformer:r=By}=e,[n,o]=Rv("idle"),[i,u]=Rv(""),a=Yv(e.theme),c=Hv({status:n,theme:a});Xv((n,a)=>{if(Pv(n)){const n=jy(i,e.default);u(r(n)),o("done"),t(n)}else if("tab"===n.name){const t=By(!jy(i,e.default));a.clearLine(0),a.write(t),u(t)}else u(a.line)});let s=i,l="";"done"===n?s=a.style.answer(i):l=` ${a.style.defaultAnswer(!1===e.default?"y/N":"Y/n")}`;return`${c} ${a.style.message(e.message,n)}${l} ${s}`});const My={validationFailureMode:"keep"};var ky=gy((e,t)=>{const{required:r,validate:n=()=>!0,prefill:o="tab"}=e,i=Yv(My,e.theme),[u,a]=Rv("idle"),[c="",s]=Rv(e.default),[l,f]=Rv(),[d,p]=Rv(""),h=Hv({status:u,theme:i});Xv(async(e,o)=>{if("idle"===u)if(Pv(e)){const e=d||c;a("loading");const u=r&&!e?"You must provide a value":await n(e);!0===u?(p(e),a("done"),t(e)):("clear"===i.validationFailureMode?p(""):o.write(d),f(u||"You must provide a valid value"),a("idle"))}else Sv(e)&&!d?s(void 0):"tab"!==e.name||d?(p(o.line),f(void 0)):(s(void 0),o.clearLine(0),o.write(c),p(c))}),Uv(e=>{"editable"===o&&c&&(e.write(c),p(c))},[]);const b=i.style.message(e.message,u);let v,y=d;"function"==typeof e.transformer?y=e.transformer(d,{isFinal:"done"===u}):"done"===u&&(y=i.style.answer(d)),c&&"done"!==u&&!d&&(v=i.style.defaultAnswer(c));let m="";return l&&(m=i.style.error(l)),[[h,b,v,y].filter(e=>void 0!==e).join(" "),m]});function Ty(e,{min:t,max:r,step:n}){return null!=e&&!Number.isNaN(e)&&(e<t||e>r?`Value must be between ${t} and ${r}`:!("any"!==n&&!function(e,t,r){const n=e*Math.pow(10,6),o=t*Math.pow(10,6),i=r*Math.pow(10,6);return(n-(Number.isFinite(r)?i:0))%o===0}(e,n,t))||`Value must be a multiple of ${n}${Number.isFinite(t)?` starting from ${t}`:""}`)}var Iy=gy((e,t)=>{const{validate:r=()=>!0,min:n=-1/0,max:o=1/0,step:i=1,required:u=!1}=e,a=Yv(e.theme),[c,s]=Rv("idle"),[l,f]=Rv(""),d=!0===Ty(e.default,{min:n,max:o,step:i})?e.default?.toString():void 0,[p="",h]=Rv(d),[b,v]=Rv(),y=Hv({status:c,theme:a});Xv(async(e,a)=>{if("idle"===c)if(Pv(e)){const e=l||p,c=""===e?void 0:Number(e);s("loading");let d=!0;(u||null!=c)&&(d=Ty(c,{min:n,max:o,step:i})),!0===d&&(d=await r(c)),!0===d?(f(String(c??"")),s("done"),t(c)):(a.write(l),v(d||"You must provide a valid numeric value"),s("idle"))}else Sv(e)&&!l?h(void 0):"tab"!==e.name||l?(f(a.line),v(void 0)):(h(void 0),a.clearLine(0),a.write(p),f(p))});const m=a.style.message(e.message,c);let D,g=l;"done"===c&&(g=a.style.answer(l)),p&&"done"!==c&&!l&&(D=a.style.defaultAnswer(p));let w="";return b&&(w=a.style.error(b)),[[y,m,D,g].filter(e=>void 0!==e).join(" "),w]});const Ly={key:"h",name:"Help, list all options",value:void 0};var Ry=gy((e,t)=>{const{default:r="h"}=e,n=Jv(()=>function(e){return e.map(e=>{if(wy.isSeparator(e))return e;const t="name"in e?e.name:String(e.value);return{value:"value"in e?e.value:t,name:t,key:e.key.toLowerCase()}})}(e.choices),[e.choices]),[o,i]=Rv("idle"),[u,a]=Rv(""),[c,s]=Rv(e.expanded??!1),[l,f]=Rv(),d=Yv(e.theme),p=Hv({theme:d,status:o});Xv((e,o)=>{if(Pv(e)){const e=(u||r).toLowerCase();if("h"!==e||c){const r=n.find(t=>!wy.isSeparator(t)&&t.key===e);r?(i("done"),a(e),t(r.value)):f(""===u?"Please input a value":`"${Nv.red(u)}" isn't an available option`)}else s(!0)}else a(o.line),f(void 0)});const h=d.style.message(e.message,o);if("done"===o){const e=n.find(e=>!wy.isSeparator(e)&&e.key===u.toLowerCase());return`${p} ${h} ${d.style.answer(e.name)}`}const b=c?n:[...n,Ly];let v="",y=b.map(e=>wy.isSeparator(e)?"":e.key===r?e.key.toUpperCase():e.key).join("");y=` ${d.style.defaultAnswer(y)}`,c&&(y="",v=b.map(e=>{if(wy.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===u.toLowerCase()?d.style.highlight(t):t}).join("\n"));let m="";const D=n.find(e=>!wy.isSeparator(e)&&e.key===u.toLowerCase());D&&(m=`${Nv.cyan(">>")} ${D.name}`);let g="";return l&&(g=d.style.error(l)),[`${p} ${h}${y} ${u}`,[v,m,g].filter(Boolean).join("\n")]});const Uy=/\d+/;function Ny(e){return null!=e&&!wy.isSeparator(e)}function $y(e,t){let r;const n=t.filter(Ny);if(Uy.test(e)){r=n[Number.parseInt(e,10)-1]}else r=n.find(t=>t.key===e);return r?[r,t.indexOf(r)]:[void 0,void 0]}var qy=gy((e,t)=>{const{loop:r=!0}=e,n=Jv(()=>function(e){let t=0;return e.map(e=>{if(wy.isSeparator(e))return e;if(t+=1,"string"==typeof e)return{value:e,name:e,short:e,key:String(t)};const r=e.name??String(e.value);return{value:e.value,name:r,short:e.short??r,key:e.key??String(t)}})}(e.choices),[e.choices]),[o,i]=Rv("idle"),[u,a]=Rv(""),[c,s]=Rv(),l=Yv(e.theme),f=Hv({status:o,theme:l}),d=Jv(()=>{const e=n.findIndex(Ny),t=n.findLastIndex(Ny);if(-1===e)throw new Bv("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[n]);Xv((e,o)=>{if(Pv(e)){const[e]=$y(u,n);Ny(e)?(a(e.short),i("done"),t(e.value)):s(""===u?"Please input a value":`"${Nv.red(u)}" isn't an available option`)}else if("up"===e.name||"down"===e.name){o.clearLine(0);const[t,i]=$y(u,n);if(t){if(r||"up"===e.name&&i!==d.first||"down"===e.name&&i!==d.last){const t="up"===e.name?-1:1;let r=i;do{r=(r+t+n.length)%n.length}while(!Ny(n[r]));a(n[r].key)}}else{const t="down"===e.name?n.find(Ny):n.findLast(Ny);a(t.key)}}else a(o.line),s(void 0)});const p=l.style.message(e.message,o);if("done"===o)return`${f} ${p} ${l.style.answer(u)}`;const h=n.map(e=>{if(wy.isSeparator(e))return` ${e.separator}`;const t=` ${e.key}) ${e.name}`;return e.key===u.toLowerCase()?l.style.highlight(t):t}).join("\n");let b="";return c&&(b=l.style.error(c)),[`${f} ${p} ${u}`,[h,b].filter(Boolean).join("\n")]}),zy=gy((e,t)=>{const{validate:r=()=>!0}=e,n=Yv(e.theme),[o,i]=Rv("idle"),[u,a]=Rv(),[c,s]=Rv(""),l=Hv({status:o,theme:n});Xv(async(e,n)=>{if("idle"===o)if(Pv(e)){const e=c;i("loading");const o=await r(e);!0===o?(s(e),i("done"),t(e)):(n.write(c),a(o||"You must provide a valid value"),i("idle"))}else s(n.line),a(void 0)});const f=n.style.message(e.message,o);let d,p="";if(e.mask){p=("string"==typeof e.mask?e.mask:"*").repeat(c.length)}else"done"!==o&&(d=`${n.style.help("[input is masked]")}${by.cursorHide}`);"done"===o&&(p=n.style.answer(p));let h="";return u&&(h=n.style.error(u)),[[l,f,e.mask?p:d].join(" "),h]});const Wy={icon:{cursor:Wv.pointer},style:{disabled:e=>Nv.dim(`- ${e}`),searchTerm:e=>Nv.cyan(e),description:e=>Nv.cyan(e)},helpMode:"auto"};function Vy(e){return!wy.isSeparator(e)&&!e.disabled}var Gy=gy((e,t)=>{const{pageSize:r=7,validate:n=()=>!0}=e,o=Yv(Wy,e.theme),i=Qv(!0),[u,a]=Rv("loading"),[c,s]=Rv(""),[l,f]=Rv([]),[d,p]=Rv(),h=Hv({status:u,theme:o}),b=Jv(()=>({first:l.findIndex(Vy),last:l.findLastIndex(Vy)}),[l]),[v=b.first,y]=Rv();Uv(()=>{const t=new AbortController;a("loading"),p(void 0);return(async()=>{try{const r=await e.source(c||void 0,{signal:t.signal});t.signal.aborted||(y(void 0),p(void 0),f(r.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(r.description=e.description),r})),a("idle"))}catch(e){!t.signal.aborted&&e instanceof Error&&p(e.message)}})(),()=>{t.abort()}},[c]);const m=l[v];Xv(async(e,r)=>{if(Pv(e))if(m){a("loading");const e=await n(m.value);a("idle"),!0===e?(a("done"),t(m.value)):m.name===c?p(e||"You must provide a valid value"):(r.write(m.name),s(m.name))}else r.write(c);else if("tab"===e.name&&m)r.clearLine(0),r.write(m.name),s(m.name);else if("loading"===u||"up"!==e.name&&"down"!==e.name)s(r.line);else if(r.clearLine(0),"up"===e.name&&v!==b.first||"down"===e.name&&v!==b.last){const t="up"===e.name?-1:1;let r=v;do{r=(r+t+l.length)%l.length}while(!Vy(l[r]));y(r)}});const D=o.style.message(e.message,u);v>0&&(i.current=!1);let g="";l.length>1&&("always"===o.helpMode||"auto"===o.helpMode&&i.current)&&(g=l.length>r?`\n${o.style.help("(Use arrow keys to reveal more choices)")}`:`\n${o.style.help("(Use arrow keys)")}`);const w=ny({items:l,active:v,renderItem({item:e,isActive:t}){if(wy.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return o.style.disabled(`${e.name} ${t}`)}return(t?o.style.highlight:e=>e)(`${t?o.icon.cursor:" "} ${e.name}`)},pageSize:r,loop:!1});let _,O;if(d?_=o.style.error(d):0===l.length&&""!==c&&"idle"===u&&(_=o.style.error("No results found")),"done"===u&&m){const e=m.short;return`${h} ${D} ${o.style.answer(e)}`}O=o.style.searchTerm(c);const S=m?.description?`\n${o.style.description(m.description)}`:"";return[[h,D,O].filter(Boolean).join(" "),`${_??w}${g}${S}`]});const Ky={icon:{cursor:Wv.pointer},style:{disabled:e=>Nv.dim(`- ${e}`),description:e=>Nv.cyan(e)},helpMode:"auto",indexMode:"hidden"};function Yy(e){return!wy.isSeparator(e)&&!e.disabled}var Hy=gy((e,t)=>{const{loop:r=!0,pageSize:n=7}=e,o=Qv(!0),i=Yv(Ky,e.theme),[u,a]=Rv("idle"),c=Hv({status:u,theme:i}),s=Qv(),l=Jv(()=>e.choices.map(e=>{if(wy.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1};const t=e.name??String(e.value),r={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(r.description=e.description),r}),[e.choices]),f=Jv(()=>{const e=l.findIndex(Yy),t=l.findLastIndex(Yy);if(-1===e)throw new Bv("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[l]),d=Jv(()=>"default"in e?l.findIndex(t=>Yy(t)&&t.value===e.default):-1,[e.default,l]),[p,h]=Rv(-1===d?f.first:d),b=l[p];Xv((e,n)=>{if(clearTimeout(s.current),Pv(e))a("done"),t(b.value);else if(_v(e)||Ov(e)){if(n.clearLine(0),r||_v(e)&&p!==f.first||Ov(e)&&p!==f.last){const t=_v(e)?-1:1;let r=p;do{r=(r+t+l.length)%l.length}while(!Yy(l[r]));h(r)}}else if(Ev(e)&&!Number.isNaN(Number(n.line))){const e=Number(n.line)-1,t=l[e];null!=t&&Yy(t)&&h(e),s.current=setTimeout(()=>{n.clearLine(0)},700)}else if(Sv(e))n.clearLine(0);else{const e=n.line.toLowerCase(),t=l.findIndex(t=>!(wy.isSeparator(t)||!Yy(t))&&t.name.toLowerCase().startsWith(e));-1!==t&&h(t),s.current=setTimeout(()=>{n.clearLine(0)},700)}}),Uv(()=>()=>{clearTimeout(s.current)},[]);const v=i.style.message(e.message,u);let y="",m="";("always"===i.helpMode||"auto"===i.helpMode&&o.current)&&(o.current=!1,l.length>n?m=`\n${i.style.help(`(${e.instructions?.pager??"Use arrow keys to reveal more choices"})`)}`:y=i.style.help(`(${e.instructions?.navigation??"Use arrow keys"})`));const D=ny({items:l,active:p,renderItem({item:e,isActive:t,index:r}){if(wy.isSeparator(e))return` ${e.separator}`;const n="number"===i.indexMode?`${r+1}. `:"";if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return i.style.disabled(`${n}${e.name} ${t}`)}return(t?i.style.highlight:e=>e)(`${t?i.icon.cursor:" "} ${n}${e.name}`)},pageSize:n,loop:r});if("done"===u)return`${c} ${v} ${i.style.answer(b.short)}`;const g=b.description?`\n${i.style.description(b.description)}`:"";return`${[c,v,y].filter(Boolean).join(" ")}\n${D}${m}${g}${by.cursorHide}`}),Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Jy(e,t)};function Qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Jy(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Xy(e,t,r,n){return new(r||(r=Promise))(function(o,i){function u(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(u,a)}c((n=n.apply(e,t||[])).next())})}function Zy(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function em(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tm(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function rm(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function nm(e){return this instanceof nm?(this.v=e,this):new nm(e)}function om(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),n[Symbol.asyncIterator]=function(){return this},n;function u(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=o[e](t)).value instanceof nm?Promise.resolve(r.value.v).then(c,s):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function s(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function im(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=em(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}}function um(e){return"function"==typeof e}function am(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var cm=am(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function sm(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var lm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var u=em(i),a=u.next();!a.done;a=u.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else i.remove(this);var c=this.initialTeardown;if(um(c))try{c()}catch(e){o=e instanceof cm?e.errors:[e]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var l=em(s),f=l.next();!f.done;f=l.next()){var d=f.value;try{dm(d)}catch(e){o=null!=o?o:[],e instanceof cm?o=rm(rm([],tm(o)),tm(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new cm(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)dm(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&sm(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&sm(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();function fm(e){return e instanceof lm||e&&"closed"in e&&um(e.remove)&&um(e.add)&&um(e.unsubscribe)}function dm(e){um(e)?e():e.unsubscribe()}lm.EMPTY;var pm={Promise:void 0},hm=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,rm([e,t],tm(r)))};function bm(e){hm(function(){throw e})}function vm(){}var ym=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,fm(t)&&t.add(r)):r.destination=wm,r}return Qy(t,e),t.create=function(e,t,r){return new Dm(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(lm),mm=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){gm(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){gm(e)}else gm(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){gm(e)}},e}(),Dm=function(e){function t(t,r,n){var o,i=e.call(this)||this;return o=um(t)||!t?{next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:t,i.destination=new mm(o),i}return Qy(t,e),t}(ym);function gm(e){bm(e)}var wm={closed:!0,next:vm,error:function(e){throw e},complete:vm},_m="function"==typeof Symbol&&Symbol.observable||"@@observable";function Om(e){return e}var Sm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof ym||function(e){return e&&um(e.next)&&um(e.error)&&um(e.complete)}(n)&&fm(n)?e:new Dm(e,t,r);return function(){var e=o,t=e.operator,r=e.source;i.add(t?t.call(i,r):r?o._subscribe(i):o._trySubscribe(i))}(),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Em(t))(function(t,n){var o=new Dm({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[_m]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?Om:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Em(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function Em(e){var t;return null!==(t=null!=e?e:pm.Promise)&&void 0!==t?t:Promise}function Pm(e){return function(t){if(function(e){return um(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function Cm(e,t,r,n,o){return new xm(e,t,r,n,o)}var xm=function(e){function t(t,r,n,o,i,u){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=u,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return Qy(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(ym),Fm=new Sm(function(e){return e.complete()});function jm(e){return(t=(r=e)[r.length-1])&&um(t.schedule)?e.pop():void 0;var t,r}var Bm=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Am(e){return um(null==e?void 0:e.then)}function Mm(e){return um(e[_m])}function km(e){return Symbol.asyncIterator&&um(null==e?void 0:e[Symbol.asyncIterator])}function Tm(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Im="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Lm(e){return um(null==e?void 0:e[Im])}function Rm(e){return om(this,arguments,function(){var t,r,n;return Zy(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,nm(t.read())];case 3:return r=o.sent(),n=r.value,r.done?[4,nm(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,nm(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Um(e){return um(null==e?void 0:e.getReader)}function Nm(e){if(e instanceof Sm)return e;if(null!=e){if(Mm(e))return o=e,new Sm(function(e){var t=o[_m]();if(um(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(Bm(e))return n=e,new Sm(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()});if(Am(e))return r=e,new Sm(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,bm)});if(km(e))return $m(e);if(Lm(e))return t=e,new Sm(function(e){var r,n;try{for(var o=em(t),i=o.next();!i.done;i=o.next()){var u=i.value;if(e.next(u),e.closed)return}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.complete()});if(Um(e))return $m(Rm(e))}var t,r,n,o;throw Tm(e)}function $m(e){return new Sm(function(t){(function(e,t){var r,n,o,i;return Xy(this,void 0,void 0,function(){var u,a;return Zy(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=im(e),c.label=1;case 1:return[4,r.next()];case 2:if((n=c.sent()).done)return[3,4];if(u=n.value,t.next(u),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function qm(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function zm(e,t){return void 0===t&&(t=0),Pm(function(r,n){r.subscribe(Cm(n,function(r){return qm(n,e,function(){return n.next(r)},t)},function(){return qm(n,e,function(){return n.complete()},t)},function(r){return qm(n,e,function(){return n.error(r)},t)}))})}function Wm(e,t){return void 0===t&&(t=0),Pm(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function Vm(e,t){if(!e)throw new Error("Iterable cannot be null");return new Sm(function(r){qm(r,t,function(){var n=e[Symbol.asyncIterator]();qm(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function Gm(e,t){if(null!=e){if(Mm(e))return function(e,t){return Nm(e).pipe(Wm(t),zm(t))}(e,t);if(Bm(e))return function(e,t){return new Sm(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}(e,t);if(Am(e))return function(e,t){return Nm(e).pipe(Wm(t),zm(t))}(e,t);if(km(e))return Vm(e,t);if(Lm(e))return function(e,t){return new Sm(function(r){var n;return qm(r,t,function(){n=e[Im](),qm(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)},0,!0)}),function(){return um(null==n?void 0:n.return)&&n.return()}})}(e,t);if(Um(e))return function(e,t){return Vm(Rm(e),t)}(e,t)}throw Tm(e)}function Km(e,t){return t?Gm(e,t):Nm(e)}var Ym=am(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Hm(e,t,r){return void 0===r&&(r=1/0),um(t)?Hm(function(r,n){return function(e,t){return Pm(function(r,n){var o=0;r.subscribe(Cm(n,function(r){n.next(e.call(t,r,o++))}))})}(function(e,o){return t(r,e,n,o)})(Nm(e(r,n)))},r):("number"==typeof t&&(r=t),Pm(function(t,n){return function(e,t,r,n,o,i,u){var a=[],c=0,s=0,l=!1,f=function(){!l||a.length||c||t.complete()},d=function(e){c++;var o=!1;Nm(r(e,s++)).subscribe(Cm(t,function(e){t.next(e)},function(){o=!0},void 0,function(){if(o)try{c--;for(var e=function(){var e=a.shift();u||d(e)};a.length&&c<n;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(Cm(t,function(e){return c<n?d(e):a.push(e)},function(){l=!0,f()})),function(){}}(t,n,e,r)}))}function Jm(e,t){return Pm(function(e,t,r){return function(n,o){var i=r,u=t,a=0;n.subscribe(Cm(o,function(t){var r=a++;u=i?e(u,t,r):(i=!0,t)},function(){i&&o.next(u),o.complete()}))}}(e,t,arguments.length>=2))}function Qm(e,t){return um(t)?Hm(e,t,1):Hm(e,1)}var Xm=P(ov());const Zm=(e,t="",r)=>{let n=e;t.split(".").forEach((e,t,o)=>{"__proto__"!==e&&"constructor"!==e&&(t===o.length-1?n[e]=r:e in n&&"object"==typeof n[e]||(n[e]={}),n=n[e])})},eD=(e,t="",r)=>{const n=r=>String.prototype.split.call(t,r).filter(Boolean).reduce((e,t)=>null==e?e:e[t],e),o=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return void 0===o||o===e?r:o};async function tD(e,t,r){const n=e[t];return"function"==typeof n?Xm(n)(r):n}class rD extends Error{name="TTYError";isTtyError=!0}class nD{prompts;answers={};process=Fm;abortController=new AbortController;opt;constructor(e,t={}){this.opt=t,this.prompts=e}async run(e,t){let r;var n,o;return this.abortController=new AbortController,this.answers="object"==typeof t?{...t}:{},!function(e){return Array.isArray(e)}(e)?r=(n=e)&&(n instanceof Sm||um(n.lift)&&um(n.subscribe))?e:function(e){return Object.values(e).every(e=>"object"==typeof e&&!Array.isArray(e)&&null!=e)}(e)?Km(Object.entries(e).map(([e,t])=>Object.assign({},t,{name:e}))):Km([e]):r=Km(e),this.process=r.pipe(Qm(e=>function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Km(e,jm(e))}(e).pipe(Qm(e=>{return Km(this.shouldRun(e).then(t=>{if(t)return e})).pipe((t=e=>null!=e,Pm(function(e,n){var o=0;e.subscribe(Cm(n,function(e){return t.call(r,e,o++)&&n.next(e)}))})));var t,r}),Qm(e=>{return t=()=>Km(this.fetchAnswer(e)),new Sm(function(e){Nm(t()).subscribe(e)});var t})))),(o=this.process.pipe(Jm((e,t)=>(Zm(e,t.name,t.answer),e),this.answers)),new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):t(new Ym)}})})).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async e=>{const[t,r,n]=await Promise.all([tD(e,"message",this.answers),tD(e,"default",this.answers),tD(e,"choices",this.answers)]);let o;return Array.isArray(n)&&(o=n.map(e=>{const t="object"!=typeof e||null==e?{name:e,value:e}:{...e,value:"value"in e?e.value:"name"in e?e.name:void 0};return"value"in t&&Array.isArray(r)?{checked:r.includes(t.value),...t}:t})),Object.assign({},e,{message:t,default:r,choices:o,type:e.type in this.prompts?e.type:"input"})};fetchAnswer=async e=>{const t=await this.prepareQuestion(e),r=this.prompts[t.type];if(null==r)throw new Error(`Prompt for type ${t.type} not found`);let n;const o=function(e){return Boolean(e.prototype&&"run"in e.prototype&&"function"==typeof e.prototype.run)}(r)?(e,t)=>new Promise((o,i)=>{const{signal:a}=t;if(a.aborted)return void i(new Cv({cause:a.reason}));const c=u.createInterface(function(e){e.skipTTYChecks=void 0===e.skipTTYChecks||e.skipTTYChecks;const t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new rD("Prompts can not be meaningfully rendered in non-TTY environments");const r=new oy;r.pipe(e.output||process.stdout);const n=r;return{terminal:!0,...e,input:t,output:n}}(t)),s=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")};process.on("exit",s),c.on("SIGINT",s);const l=new r(e,c,this.answers),f=()=>{process.removeListener("exit",s),c.removeListener("SIGINT",s),c.setPrompt(""),c.output.unmute(),c.output.write(by.cursorShow),c.output.end(),c.close(),n?.()},d=()=>{i(new Cv({cause:a.reason})),f()};a.addEventListener("abort",d),n=()=>{a.removeEventListener("abort",d),n=void 0},l.run().then(o,i).finally(f)}):r;let i;const{signal:a}=this.opt;if(a?.aborted)this.abortController.abort(a.reason);else if(a){const e=()=>this.abortController.abort(a.reason);a.addEventListener("abort",e),i=()=>{a.removeEventListener("abort",e)}}const{filter:c=e=>e}=t,{signal:s}=this.abortController;return o(t,{...this.opt,signal:s}).then(e=>({name:t.name,answer:c(e,this.answers)})).finally(()=>{n?.(),i?.()})};close=()=>{this.abortController.abort()};shouldRun=async e=>{if(!0!==e.askAnswered&&void 0!==eD(this.answers,e.name))return!1;const{when:t}=e;if("function"==typeof t){const e=await Xm(t)(this.answers);return Boolean(e)}return!1!==t}}const oD={input:ky,select:Hy,list:Hy,number:Iy,confirm:Ay,rawlist:qy,expand:Ry,checkbox:Py,password:zy,editor:Fy,search:Gy};function iD(e){function t(r,n){const o=new nD(t.prompts,e),i=o.run(r,n);return Object.assign(i,{ui:o})}return t.prompts={...oD},t.registerPrompt=function(e,r){return t.prompts[e]=r,this},t.restoreDefaultPrompts=function(){t.prompts={...oD}},t}const uD=iD();const aD={prompt:uD,ui:{Prompt:nD},createPromptModule:iD,registerPrompt:function(e,t){uD.registerPrompt(e,t)},restoreDefaultPrompts:function(){uD.restoreDefaultPrompts()},Separator:wy},cD=h.join(g.homedir(),".ttmg-cli"),sD=h.join(cD,"config.json");function lD(e){let t=[];if(s.existsSync(sD))try{const e=JSON.parse(s.readFileSync(sD,"utf-8"));t=Array.isArray(e.clientKeys)?e.clientKeys:[]}catch(e){t=[]}t.includes(e)||(t.push(e),s.existsSync(cD)||s.mkdirSync(cD,{recursive:!0}),s.writeFileSync(sD,JSON.stringify({clientKeys:t},null,2),{encoding:"utf-8"}))}async function fD(){const e=h.join(process.cwd(),"project.config.json");let r;try{const t=JSON.parse(s.readFileSync(e,"utf-8"));r=t.appid||t.appId}catch(e){r=""}if(r)return console.log(`Found game id in project.config.json: ${r}`),r;console.log(t.red.bold("No appid found in project.config.json, you should provide it in project.config.json")),process.exit(1);const n=function(){if(!s.existsSync(sD))return[];try{const e=JSON.parse(s.readFileSync(sD,"utf-8"));return Array.isArray(e.clientKeys)?e.clientKeys:[]}catch(e){return[]}}();if(n.length>0){const{selectedKey:e}=await aD.prompt([{type:"list",name:"selectedKey",message:"Please select your game id(client_key):",choices:[...n,new aD.Separator,"Add new game id"]}]);if("Add new game id"===e){const{newKey:e}=await aD.prompt([{type:"input",name:"newKey",message:"Please input your new game id(client_key):",validate:e=>!!e||"Please input game id"}]);lD(e),r=e}else r=e}else{const{newKey:e}=await aD.prompt([{type:"input",name:"newKey",message:"Please input your game id(client_key):",validate:e=>!!e||"Please input game id"}]);lD(e),r=e}return r}const dD=m();function pD(){dD.use(m.json()),dD.post("/game/env",(e,r)=>{const n=e.body,{host:o,port:i}=n;r.json({code:0,msg:"ok"});const u=`http://${o}:${i}`;!function(e){const{exec:t}=require("child_process");open(e)}(u),console.log(t.bold.yellow(`Game debug is ready! Visit ${u} in your browser.`))}),dD.listen(9527,()=>{})}async function hD(){const e=await fD(),r=process.cwd(),n=function(){const e=g.homedir(),t=["Desktop","桌面"];for(const r of t){const t=h.join(e,r);if(s.existsSync(t))return t}return h.join(e,"Desktop")}();if(!n)return void console.log(t.redBright("Desktop path not found"));const o=h.join(n,"__TTMG_DEV_TEMP__",e);s.existsSync(o)?s.rmSync(o,{recursive:!0,force:!0}):s.mkdirSync(o,{recursive:!0});const i=await O.debugPkgs({entry:r,output:o,rules:{mainPackageSizeLimit:209715200,projectSizeLimit:209715200}});if(!(null==i?void 0:i.isSuccess))return console.log(t.redBright("Build game package failed, Please check the error message below:")),void console.log(t.redBright(null==i?void 0:i.errorMsg));console.log(t.cyan("\n==============================")),console.log(t.greenBright("✅ Game package built successfully!")),console.log(t.cyan("==============================\n")),console.log(t.yellow("Next steps:")),console.log(` 1. ${t.blue("Scan the QR code to start the client devServer.")}`),console.log(` 2. ${t.blue("Upload the dev package from:")} ${t.bold(o)}`),console.log(` 3. ${t.blue("Debug your game in the browser.")}\n`),pD();const u=wv(e);_.generate(u,{small:!0},e=>{console.log(function(e){const t=process.stdout.columns||80,r=e.split("\n"),n=r.reduce((e,t)=>Math.max(e,t.length),0),o=Math.floor((t-n)/3),i=" ".repeat(o>0?o:0);return r.map(e=>i+e).join("\n")}(e))})}const bD=new e.Command;bD.name("ttmg").description("TikTok Mini Game Command Line Tool").version("0.0.1"),bD.command("init").option("--h5","H5 Mini Game").option("--native","Native Mini Game").description("Initialize project").action(e=>{e.h5?dv():e.native?console.log("Native Mini Game initialize"):console.log(t.red.bold("Please run ttmg init --h5 or ttmg init --native"))}),bD.command("dev").description("Open browser dev environment").option("--h5","H5 Mini Game").option("--native","Native Mini Game").action(e=>{e.h5?mv():e.native?hD():console.log(t.red.bold("Please run ttmg dev --h5 or ttmg dev --native"))}),bD.command("build").option("--h5","H5 Mini Game").option("--native","Native Mini Game").description("Bundle project").action(async e=>{e.h5?gv():e.native?console.log("Native Mini Game bundle"):console.log(t.red.bold("Please run ttmg build --h5 or ttmg build --native"))}),bD.parse(process.argv);
|