@finsemble/finsemble-core 7.3.1 → 7.3.2
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/configs/core/config.json +3 -3
- package/configs/schemas/finsemble.schema.json +0 -1
- package/dist/configs/core/config.json +3 -3
- package/dist/configs/schemas/finsemble.schema.json +0 -1
- package/dist/services/Interop/InteropService.js +1 -1
- package/dist/services/logger/LoggerServiceUI.js +1 -1
- package/dist/services/logger/LoggerServiceUI.js.map +1 -1
- package/dist/services/logger/loggerService.js +1 -1
- package/dist/services/logger/loggerService.js.map +1 -1
- package/dist/services/logger/src/components/TopCollar.tsx +0 -14
- package/dist/services/logger/src/components/Views/Logs/rightPanel/LogLevelFilters.tsx +43 -16
- package/dist/services/router/routerService.js +1 -1
- package/dist/services/window/windowService.js +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see loggerService.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={17187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,c=p(u,l);for(r=0;r<l;++r)n(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},93162:function(e,t,r){var n;void 0===(n=function(){"use strict";function t(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,r,s){var a=o.URL||o.webkitURL,u=document.createElement("a");r=r||e.name||"download",u.download=r,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?i(u):n(u.href)?t(e,r,s):i(u,u.target="_blank")):(u.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(u.href)}),4e4),setTimeout((function(){i(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,o){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),r);else if(n(e))t(e,r,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,r,n);var a="application/octet-stream"===e.type,u=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&u||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a}.apply(t,[]))||(e.exports=n)},55733:(e,t,r)=>{e.exports=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return i(t[s][1][e]||e)}),l,l.exports,e,t,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,i,s,a,u,l,c=[],d=0,f=e.length,h=f,p="string"!==n.getTypeOf(e);d<e.length;)h=f-d,i=p?(t=e[d++],r=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),r=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),s=t>>2,a=(3&t)<<4|r>>4,u=1<h?(15&r)<<2|i>>6:64,l=2<h?63&i:64,c.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(l));return c.join("")},r.decode=function(e){var t,r,n,s,a,u,l=0,c=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var f,h=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=i.uint8array?new Uint8Array(0|h):new Array(0|h);l<e.length;)t=o.indexOf(e.charAt(l++))<<2|(s=o.indexOf(e.charAt(l++)))>>4,r=(15&s)<<4|(a=o.indexOf(e.charAt(l++)))>>2,n=(3&a)<<6|(u=o.indexOf(e.charAt(l++))),f[c++]=t,64!==a&&(f[c++]=r),64!==u&&(f[c++]=n);return f}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var o=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r,n){var o=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function u(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new u("Deflate",e)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,r,i,s,c){var d,f,h=e.file,p=e.compression,g=c!==a.utf8encode,m=o.transformTo("string",c(h.name)),v=o.transformTo("string",a.utf8encode(h.name)),y=h.comment,w=o.transformTo("string",c(y)),b=o.transformTo("string",a.utf8encode(y)),S=v.length!==h.name.length,_=b.length!==y.length,C="",L="",E="",k=h.dir,A=h.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),g||!S&&!_||(O|=2048);var R=0,I=0;k&&(R|=16),"UNIX"===s?(I=798,R|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,k)):(I=20,R|=function(e){return 63&(e||0)}(h.dosPermissions)),d=A.getUTCHours(),d<<=6,d|=A.getUTCMinutes(),d<<=5,d|=A.getUTCSeconds()/2,f=A.getUTCFullYear()-1980,f<<=4,f|=A.getUTCMonth()+1,f<<=5,f|=A.getUTCDate(),S&&(L=n(1,1)+n(u(m),4)+v,C+="up"+n(L.length,2)+L),_&&(E=n(1,1)+n(u(w),4)+b,C+="uc"+n(E.length,2)+E);var x="";return x+="\n\0",x+=n(O,2),x+=p.magic,x+=n(d,2),x+=n(f,2),x+=n(T.crc32,4),x+=n(T.compressedSize,4),x+=n(T.uncompressedSize,4),x+=n(m.length,2),x+=n(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+x+m+C,dirRecord:l.CENTRAL_FILE_HEADER+n(I,2)+x+n(w.length,2)+"\0\0\0\0"+n(R,4)+n(i,4)+m+C+w}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),u=e("../crc32"),l=e("../signature");function c(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,s),c.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,s){var a=o.transformTo("string",s(i));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},c.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},c.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var o=new i(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach((function(e,r){s++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},u=r.dir,l=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:e,dir:u,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./external"),o=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function l(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new s(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var o=0;o<n.length;o++)r.push(l(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,s=0;s<o.length;s++){var a=o[s],u=a.fileNameStr,l=n.resolve(a.fileNameStr);r.file(l,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(l).unsafeOriginalName=u)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var n=e("readable-stream").Readable;function i(e,t,r){n.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),r&&r(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function n(e,t,r){var n,i=o.getTypeOf(t),a=o.extend(r||{},u);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=g(e)),a.createFolders&&(n=p(e))&&m.call(this,n,!0);var d="string"===i&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!d),(t instanceof l&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var v;v=t instanceof l||t instanceof s?t:f.isNode&&f.isStream(t)?new h(e,t):o.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var y=new c(e,v,a);this.files[e]=y}var i=e("./utf8"),o=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),u=e("./defaults"),l=e("./compressedObject"),c=e("./zipObject"),d=e("./generate"),f=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:u.createFolders,e=g(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(v(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");o.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=d.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function o(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,n),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,n),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),s=e("../base64"),a=e("../support"),u=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new i(s)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}c.prototype={accumulate:function(e){return function(e,t){return new u.Promise((function(r,i){var o=[],a=e._internalType,u=e._outputType,l=e._mimeType;e.on("data",(function(e,r){o.push(e),t&&t(r)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,o),l);r(e)}catch(e){i(e)}o=[]})).resume()}))}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){"use strict";for(var n=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,s,a=e.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=s=0;s<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,o,s=e.length,u=new Array(2*s);for(t=r=0;t<s;)if((i=e[t++])<128)u[r++]=i;else if(4<(o=a[i]))u[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<s;)i=i<<6|63&e[t++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(l,s),l.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),u=t;s!==t.length&&(i.uint8array?(u=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(u=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(u),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(c,s),c.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),s=e("./external");function a(e){return e}function u(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,r){var n=[],i=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=l.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return l.stringifyByChar(e)}function d(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=c;var f={};f.string={string:a,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},f.array={string:c,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},f.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:c,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return o.newBufferFrom(e)}},f.nodebuffer={string:c,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return f[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&o.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,o,a,l){return s.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new s.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var c=r.getTypeOf(t);return c?("arraybuffer"===c?t=r.transformTo("uint8array",t):"string"===c&&(l?t=i.decode(t):o&&!0!==a&&(t=function(e){return u(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),s=e("./zipEntry"),a=(e("./utf8"),e("./support"));function u(e){this.files=[],this.loadOptions=e}u.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),u=e("./compressions"),l=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),u=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<l.length;d++)n.prototype[l[d]]=c;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var u=new e.MessageChannel;u.port1.onmessage=c,r=function(){u.port2.postMessage(0)}}var l=[];function c(){var e,t;n=!0;for(var r=l.length;r;){for(t=l,l=[],e=-1;++e<r;)t[e]();r=l.length}n=!1}t.exports=function(e){1!==l.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var n=e("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n((function(){var n;try{n=t(r)}catch(n){return o.reject(e,n)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var s=p((function(){t(i,n)}));"error"===s.status&&n(s.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=l).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(i);return this.state!==u?d(r,this.state===a?e:t,this.outcome):this.queue.push(new c(r,e,t)),r},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,u=-1,l=new this(i);++u<r;)c(e[u],u);return l;function c(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==r||n||(n=!0,o.resolve(l,s))}),(function(e){n||(n=!0,o.reject(l,e))}))}},l.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,s=-1,a=new this(i);++s<t;)n=e[s],this.resolve(n).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}));return a}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var n=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),u=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,c)))throw new Error(s[r]);this._dict_set=!0}}function c(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(e,t){var r,s,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=l,r.deflate=c,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),u=e("./zlib/zstream"),l=e("./zlib/gzheader"),c=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function f(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,u,l,d,f,h=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===c.call(g)?new Uint8Array(g):g,r=n.inflateSetDictionary(this.strm,f)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),l=h.next_out-u,d=o.buf2string(h.output,u),h.next_out=l,h.avail_out=p-l,l&&i.arraySet(h.output,h.output,u,l,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(h.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=d,r.inflate=f,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var n=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,i,o,s,a=e.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),o=s=0;s<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,a=t||e.length,l=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)l[n++]=i;else if(4<(o=s[i]))l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&e[r++],o--;1<o?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,s=i+r;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),u=e("./messages"),l=-2,c=258,d=262,f=113;function h(e,t){return e.msg=u[t],t}function p(e){return(e<<1)-(4<e?9:0)}function g(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function b(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,l=e.window,f=e.w_mask,h=e.prev,p=e.strstart+c,g=l[o+s-1],m=l[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(r=t)+s]===m&&l[r+s-1]===g&&l[r]===l[o]&&l[++r]===l[o+1]){o+=2,r++;do{}while(l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&o<p);if(n=c-(p-o),o=p-c,s<n){if(e.match_start=t,a<=(s=n))break;g=l[o+s-1],m=l[o+s]}}}while((t=h[t&f])>u&&0!=--i);return s<=e.lookahead?s:e.lookahead}function S(e){var t,r,n,o,u,l,c,f,h,p,g=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-d)){for(i.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=r=e.hash_size;n=e.head[--t],e.head[t]=g<=n?n-g:0,--r;);for(t=r=g;n=e.prev[--t],e.prev[t]=g<=n?n-g:0,--r;);o+=g}if(0===e.strm.avail_in)break;if(l=e.strm,c=e.window,f=e.strstart+e.lookahead,p=void 0,(h=o)<(p=l.avail_in)&&(p=h),r=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,f),1===l.state.wrap?l.adler=s(l.adler,c,p,f):2===l.state.wrap&&(l.adler=a(l.adler,c,p,f)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+3-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<d){if(S(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-d&&(e.match_length=b(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t){for(var r,n,i;;){if(e.lookahead<d){if(S(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-d&&(e.match_length=b(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function L(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function E(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),g(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):h(e,l)}function A(e){var t=k(e);return 0===t&&function(e){e.window_size=2*e.w_size,g(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function T(e,t,r,n,o,s){if(!e)return l;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return h(e,l);8===n&&(n=9);var u=new E;return(e.state=u).strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=r,A(e)}n=[new L(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)})),new L(4,4,8,4,_),new L(4,5,16,8,_),new L(4,6,32,32,_),new L(4,4,16,16,C),new L(8,16,32,32,C),new L(8,16,128,128,C),new L(8,32,128,256,C),new L(32,128,258,1024,C),new L(32,258,258,4096,C)],r.deflateInit=function(e,t){return T(e,t,8,15,8,0)},r.deflateInit2=T,r.deflateReset=A,r.deflateResetKeep=k,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},r.deflate=function(e,t){var r,i,s,u;if(!e||!e.state||5<t||t<0)return e?h(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return h(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=f);else{var d=8+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=f,w(i,d),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(r)&&4!==t)return h(e,-5);if(666===i.status&&0!==e.avail_in)return h(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var b=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=c){if(S(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+c;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=c-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==b&&4!==b||(i.status=666),1===b||3===b)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),m(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==f&&666!==t?h(e,l):(e.state=null,t===f?h(e,-3):0):l},r.deflateSetDictionary=function(e,t){var r,n,o,a,u,c,d,f,h=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===a&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,h-r.w_size,r.w_size,0),t=f,h=r.w_size),u=e.avail_in,c=e.next_in,d=e.input,e.avail_in=h,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=2,S(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=c,e.input=d,e.avail_in=u,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,o,s,a,u,l,c,d,f,h,p,g,m,v,y,w,b,S,_,C,L,E,k;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),o=e.next_out,k=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,d=r.wnext,f=r.window,h=r.hold,p=r.bits,g=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(h+=E[n++]<<p,p+=8,h+=E[n++]<<p,p+=8),w=g[h&v];t:for(;;){if(h>>>=b=w>>>24,p-=b,0==(b=w>>>16&255))k[o++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=g[(65535&w)+(h&(1<<b)-1)];continue t}if(32&b){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}S=65535&w,(b&=15)&&(p<b&&(h+=E[n++]<<p,p+=8),S+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=E[n++]<<p,p+=8,h+=E[n++]<<p,p+=8),w=m[h&y];r:for(;;){if(h>>>=b=w>>>24,p-=b,!(16&(b=w>>>16&255))){if(0==(64&b)){w=m[(65535&w)+(h&(1<<b)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&w,p<(b&=15)&&(h+=E[n++]<<p,(p+=8)<b&&(h+=E[n++]<<p,p+=8)),u<(_+=h&(1<<b)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=b,p-=b,(b=o-s)<_){if(c<(b=_-b)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(L=f,(C=0)===d){if(C+=l-b,b<S){for(S-=b;k[o++]=f[C++],--b;);C=o-_,L=k}}else if(d<b){if(C+=l+d-b,(b-=d)<S){for(S-=b;k[o++]=f[C++],--b;);if(C=0,d<S){for(S-=b=d;k[o++]=f[C++],--b;);C=o-_,L=k}}}else if(C+=d-b,b<S){for(S-=b;k[o++]=f[C++],--b;);C=o-_,L=k}for(;2<S;)k[o++]=L[C++],k[o++]=L[C++],k[o++]=L[C++],S-=3;S&&(k[o++]=L[C++],1<S&&(k[o++]=L[C++]))}else{for(C=o-_;k[o++]=k[C++],k[o++]=k[C++],k[o++]=k[C++],2<(S-=3););S&&(k[o++]=k[C++],1<S&&(k[o++]=k[C++]))}break}}break}}while(n<i&&o<a);n-=S=p>>3,h&=(1<<(p-=S<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=h,r.bits=p}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),u=-2;function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):u}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,f(e))):u}function p(e,t){var r,n;return e?(n=new c,(e.state=n).window=null,0!==(r=h(e,t))&&(e.state=null),r):u}var g,m,v=!0;function y(e){if(v){var t;for(g=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=g,e.lenbits=9,e.distcode=m,e.distbits=5}function w(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=f,r.inflateReset2=h,r.inflateResetKeep=d,r.inflateInit=function(e){return p(e,15)},r.inflateInit2=p,r.inflate=function(e,t){var r,c,d,f,h,p,g,m,v,b,S,_,C,L,E,k,A,T,O,R,I,x,N,D,P=0,W=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(r=e.state).mode&&(r.mode=13),h=e.next_out,d=e.output,g=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,m=r.hold,v=r.bits,b=p,S=g,x=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(2&r.wrap&&35615===m){W[r.check=0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,W[2]=m>>>16&255,W[3]=m>>>24&255,r.check=o(r.check,W,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(_=r.length)&&(_=p),_&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,f,_,I)),512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break e;for(_=0;I=c[f+_++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I)),I&&_<p;);if(512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,I)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break e;for(_=0;I=c[f+_++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I)),I&&_<p;);if(512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,I)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}e.adler=r.check=l(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break e;n.arraySet(d,c,f,_,h),p-=_,f+=_,g-=_,h+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;v<3;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.lens[F[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},x=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;k=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(A<16)m>>>=E,v-=E,r.lens[r.have++]=A;else{if(16===A){for(D=E+2;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m>>>=E,v-=E,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===A){for(D=E+3;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}v-=E,I=0,_=3+(7&(m>>>=E)),m>>>=3,v-=3}else{for(D=E+7;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}v-=E,I=0,_=11+(127&(m>>>=E)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},x=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},x=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=p&&258<=g){e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,s(e,S),h=e.next_out,d=e.output,g=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;k=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(k&&0==(240&k)){for(T=E,O=k,R=A;k=(P=r.lencode[R+((m&(1<<T+O)-1)>>T)])>>>16&255,A=65535&P,!(T+(E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}m>>>=T,v-=T,r.back+=T}if(m>>>=E,v-=E,r.back+=E,r.length=A,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=12;break}if(64&k){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(D=r.extra;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(0==(240&k)){for(T=E,O=k,R=A;k=(P=r.distcode[R+((m&(1<<T+O)-1)>>T)])>>>16&255,A=65535&P,!(T+(E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}m>>>=T,v-=T,r.back+=T}if(m>>>=E,v-=E,r.back+=E,64&k){e.msg="invalid distance code",r.mode=30;break}r.offset=A,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(D=r.extra;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break e;if(_=S-g,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}C=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),L=r.window}else L=d,C=h-r.offset,_=r.length;for(g<_&&(_=g),g-=_,r.length-=_;d[h++]=L[C++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;d[h++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===p)break e;p--,m|=c[f++]<<v,v+=8}if(S-=g,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?o(r.check,d,S,h-S):i(r.check,d,S,h-S)),S=g,(r.flags?m:l(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return u}return e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,(r.wsize||S!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(b-=e.avail_in,S-=e.avail_out,e.total_in+=b,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?o(r.check,d,S,e.next_out-S):i(r.check,d,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==b&&0===S||4===t)&&0===x&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?u:((r.head=t).done=!1,0):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,l,c,d,f){var h,p,g,m,v,y,w,b,S,_=f.bits,C=0,L=0,E=0,k=0,A=0,T=0,O=0,R=0,I=0,x=0,N=null,D=0,P=new n.Buf16(16),W=new n.Buf16(16),F=null,j=0;for(C=0;C<=15;C++)P[C]=0;for(L=0;L<u;L++)P[t[r+L]]++;for(A=_,k=15;1<=k&&0===P[k];k--);if(k<A&&(A=k),0===k)return l[c++]=20971520,l[c++]=20971520,f.bits=1,0;for(E=1;E<k&&0===P[E];E++);for(A<E&&(A=E),C=R=1;C<=15;C++)if(R<<=1,(R-=P[C])<0)return-1;if(0<R&&(0===e||1!==k))return-1;for(W[1]=0,C=1;C<15;C++)W[C+1]=W[C]+P[C];for(L=0;L<u;L++)0!==t[r+L]&&(d[W[t[r+L]]++]=L);if(y=0===e?(N=F=d,19):1===e?(N=i,D-=257,F=o,j-=257,256):(N=s,F=a,-1),C=E,v=c,O=L=x=0,g=-1,m=(I=1<<(T=A))-1,1===e&&852<I||2===e&&592<I)return 1;for(;;){for(w=C-O,S=d[L]<y?(b=0,d[L]):d[L]>y?(b=F[j+d[L]],N[D+d[L]]):(b=96,0),h=1<<C-O,E=p=1<<T;l[v+(x>>O)+(p-=h)]=w<<24|b<<16|S|0,0!==p;);for(h=1<<C-1;x&h;)h>>=1;if(0!==h?(x&=h-1,x+=h):x=0,L++,0==--P[C]){if(C===k)break;C=t[r+d[L]]}if(A<C&&(x&m)!==g){for(0===O&&(O=A),v+=E,R=1<<(T=C-O);T+O<k&&!((R-=P[T+O])<=0);)T++,R<<=1;if(I+=1<<T,1===e&&852<I||2===e&&592<I)return 1;l[g=x&m]=A<<24|T<<16|v-c|0}}return 0!==x&&(l[v+x]=C-O<<24|64<<16|0),f.bits=A,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var n=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var o=256,s=286,a=30,u=15,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var p=new Array(60);i(p);var g=new Array(512);i(g);var m=new Array(256);i(m);var v=new Array(29);i(v);var y,w,b,S=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function C(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function L(e){return e<256?g[e]:g[256+(e>>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function A(e,t,r){k(e,r[2*t],r[2*t+1])}function T(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function O(e,t,r){var n,i,o=new Array(16),s=0;for(n=1;n<=u;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=T(o[a]++,a))}}function R(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){8<e.bi_valid?E(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&x(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!x(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function D(e,t,r){var n,i,s,a,u=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?A(e,i,t):(A(e,(s=m[i])+o+1,t),0!==(a=l[s])&&k(e,i-=v[s],a),A(e,s=L(--n),r),0!==(a=c[s])&&k(e,n-=S[s],a)),u<e.last_lit;);A(e,256,t)}function P(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)N(e,o,r);for(i=l;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,l=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(o=0;o<=u;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)g<(o=l[2*l[2*(n=e.heap[r])+1]+1]+1)&&(o=g,m++),l[2*n+1]=o,c<n||(e.bl_count[o]++,s=0,p<=n&&(s=h[n-p]),a=l[2*n],e.opt_len+=a*(o+s),f&&(e.static_len+=a*(d[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,m-=2}while(0<m);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)c<(i=e.heap[--r])||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}}(e,t),O(o,c,e.bl_count)}function W(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<u&&i===s||(a<l?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4))}function F(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<u&&i===s)){if(a<l)for(;A(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(A(e,i,e.bl_tree),a--),A(e,16,e.bl_tree),k(e,a-3,2)):a<=10?(A(e,17,e.bl_tree),k(e,a-3,3)):(A(e,18,e.bl_tree),k(e,a-11,7));o=i,l=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4)}}i(S);var j=!1;function M(e,t,r,i){k(e,0+(i?1:0),3),function(e,t,r,i){I(e),E(e,r),E(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}r._tr_init=function(e){j||(function(){var e,t,r,n,i,o=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<l[n];e++)m[r++]=n;for(m[r-1]=n,n=i=0;n<16;n++)for(S[n]=i,e=0;e<1<<c[n];e++)g[i++]=n;for(i>>=7;n<a;n++)for(S[n]=i<<7,e=0;e<1<<c[n]-7;e++)g[256+i++]=n;for(t=0;t<=u;t++)o[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,o[8]++;for(;e<=255;)h[2*e+1]=9,e++,o[9]++;for(;e<=279;)h[2*e+1]=7,e++,o[7]++;for(;e<=287;)h[2*e+1]=8,e++,o[8]++;for(O(h,287,o),e=0;e<a;e++)p[2*e+1]=5,p[2*e]=T(e,5);y=new _(h,l,257,s,u),w=new _(p,c,0,a,u),b=new _(new Array(0),d,0,19,7)}(),j=!0),e.l_desc=new C(e.dyn_ltree,y),e.d_desc=new C(e.dyn_dtree,w),e.bl_desc=new C(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,R(e)},r._tr_stored_block=M,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?M(e,t,r,n):4===e.strategy||s===i?(k(e,2+(n?1:0),3),D(e,h,p)):(k(e,4+(n?1:0),3),function(e,t,r,n){var i;for(k(e,t-257,5),k(e,r-1,5),k(e,n-4,4),i=0;i<n;i++)k(e,e.bl_tree[2*f[i]+1],3);F(e,e.dyn_ltree,t-1),F(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),D(e,e.dyn_ltree,e.dyn_dtree)),R(e),n&&I(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+o+1)]++,e.dyn_dtree[2*L(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){k(e,2,3),A(e,256,h),function(e){16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,n,i,o,s=1,a={},u=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){f(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(f,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return a[s]=i,r(s),s++},c.clearImmediate=d}function d(e){delete a[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=a[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(undefined,r)}}(t)}finally{d(e),u=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},18552:(e,t,r)=>{var n=r(10852)(r(55639),"DataView");e.exports=n},1989:(e,t,r)=>{var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},38407:(e,t,r)=>{var n=r(27040),i=r(14125),o=r(82117),s=r(67518),a=r(54705);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},57071:(e,t,r)=>{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),i=r(11285),o=r(96e3),s=r(49916),a=r(95265);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},53818:(e,t,r)=>{var n=r(10852)(r(55639),"Promise");e.exports=n},58525:(e,t,r)=>{var n=r(10852)(r(55639),"Set");e.exports=n},88668:(e,t,r)=>{var n=r(83369),i=r(90619),o=r(72385);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},46384:(e,t,r)=>{var n=r(38407),i=r(37465),o=r(63779),s=r(67599),a=r(44758),u=r(34309);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},11149:(e,t,r)=>{var n=r(55639).Uint8Array;e.exports=n},70577:(e,t,r)=>{var n=r(10852)(r(55639),"WeakMap");e.exports=n},96874:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},77412:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},34963:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},14636:(e,t,r)=>{var n=r(22545),i=r(35694),o=r(1469),s=r(44144),a=r(65776),u=r(36719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),c=!r&&i(e),d=!r&&!c&&s(e),f=!r&&!c&&!d&&u(e),h=r||c||d||f,p=h?n(e.length,String):[],g=p.length;for(var m in e)!t&&!l.call(e,m)||h&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},29932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},62488:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},82908:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},34865:(e,t,r)=>{var n=r(89465),i=r(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},18470:(e,t,r)=>{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},44037:(e,t,r)=>{var n=r(98363),i=r(3674);e.exports=function(e,t){return e&&n(t,i(t),e)}},63886:(e,t,r)=>{var n=r(98363),i=r(81704);e.exports=function(e,t){return e&&n(t,i(t),e)}},89465:(e,t,r)=>{var n=r(38777);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},85990:(e,t,r)=>{var n=r(46384),i=r(77412),o=r(34865),s=r(44037),a=r(63886),u=r(64626),l=r(278),c=r(18805),d=r(1911),f=r(58234),h=r(46904),p=r(64160),g=r(43824),m=r(29148),v=r(38517),y=r(1469),w=r(44144),b=r(56688),S=r(13218),_=r(72928),C=r(3674),L=r(81704),E="[object Arguments]",k="[object Function]",A="[object Object]",T={};T[E]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[A]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[k]=T["[object WeakMap]"]=!1,e.exports=function e(t,r,O,R,I,x){var N,D=1&r,P=2&r,W=4&r;if(O&&(N=I?O(t,R,I,x):O(t)),void 0!==N)return N;if(!S(t))return t;var F=y(t);if(F){if(N=g(t),!D)return l(t,N)}else{var j=p(t),M=j==k||"[object GeneratorFunction]"==j;if(w(t))return u(t,D);if(j==A||j==E||M&&!I){if(N=P||M?{}:v(t),!D)return P?d(t,a(N,t)):c(t,s(N,t))}else{if(!T[j])return I?t:{};N=m(t,j,D)}}x||(x=new n);var B=x.get(t);if(B)return B;x.set(t,N),_(t)?t.forEach((function(n){N.add(e(n,r,O,n,t,x))})):b(t)&&t.forEach((function(n,i){N.set(i,e(n,r,O,i,t,x))}));var z=F?void 0:(W?P?h:f:P?L:C)(t);return i(z||t,(function(n,i){z&&(n=t[i=n]),o(N,i,e(n,r,O,i,t,x))})),N}},3118:(e,t,r)=>{var n=r(13218),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},21078:(e,t,r)=>{var n=r(62488),i=r(37285);e.exports=function e(t,r,o,s,a){var u=-1,l=t.length;for(o||(o=i),a||(a=[]);++u<l;){var c=t[u];r>0&&o(c)?r>1?e(c,r-1,o,s,a):n(a,c):s||(a[a.length]=c)}return a}},97786:(e,t,r)=>{var n=r(71811),i=r(40327);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},68866:(e,t,r)=>{var n=r(62488),i=r(1469);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},44239:(e,t,r)=>{var n=r(62705),i=r(89607),o=r(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},90939:(e,t,r)=>{var n=r(2492),i=r(37005);e.exports=function e(t,r,o,s,a){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,s,e,a))}},2492:(e,t,r)=>{var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),u=r(1469),l=r(44144),c=r(36719),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,g,m,v){var y=u(e),w=u(t),b=y?f:a(e),S=w?f:a(t),_=(b=b==d?h:b)==h,C=(S=S==d?h:S)==h,L=b==S;if(L&&l(e)){if(!l(t))return!1;y=!0,_=!1}if(L&&!_)return v||(v=new n),y||c(e)?i(e,t,r,g,m,v):o(e,t,b,r,g,m,v);if(!(1&r)){var E=_&&p.call(e,"__wrapped__"),k=C&&p.call(t,"__wrapped__");if(E||k){var A=E?e.value():e,T=k?t.value():t;return v||(v=new n),m(A,T,r,g,v)}}return!!L&&(v||(v=new n),s(e,t,r,g,m,v))}},25588:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},28458:(e,t,r)=>{var n=r(23560),i=r(15346),o=r(13218),s=r(80346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:a).test(s(e))}},29221:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},38749:(e,t,r)=>{var n=r(44239),i=r(41780),o=r(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},280:(e,t,r)=>{var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},10313:(e,t,r)=>{var n=r(13218),i=r(25726),o=r(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},25970:(e,t,r)=>{var n=r(63012),i=r(79095);e.exports=function(e,t){return n(e,t,(function(t,r){return i(e,r)}))}},63012:(e,t,r)=>{var n=r(97786),i=r(10611),o=r(71811);e.exports=function(e,t,r){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=n(e,l);r(c,l)&&i(u,o(l,e),c)}return u}},10611:(e,t,r)=>{var n=r(34865),i=r(71811),o=r(65776),s=r(13218),a=r(40327);e.exports=function(e,t,r,u){if(!s(e))return e;for(var l=-1,c=(t=i(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var h=a(t[l]),p=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(l!=d){var g=f[h];void 0===(p=u?u(g,h,f):void 0)&&(p=s(g)?g:o(t[l+1])?[]:{})}n(f,h,p),f=f[h]}return e}},56560:(e,t,r)=>{var n=r(75703),i=r(38777),o=r(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},80531:(e,t,r)=>{var n=r(62705),i=r(29932),o=r(1469),s=r(33448),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},27561:(e,t,r)=>{var n=r(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,r)=>{var n=r(1469),i=r(15403),o=r(55514),s=r(79833);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},74318:(e,t,r)=>{var n=r(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},64626:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},57157:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},40419:(e,t,r)=>{var n=r(62705),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},98363:(e,t,r)=>{var n=r(34865),i=r(89465);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),s?i(r,l,c):n(r,l,c)}return r}},18805:(e,t,r)=>{var n=r(98363),i=r(99551);e.exports=function(e,t){return n(e,i(e),t)}},1911:(e,t,r)=>{var n=r(98363),i=r(51442);e.exports=function(e,t){return n(e,i(e),t)}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},38777:(e,t,r)=>{var n=r(10852),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},67114:(e,t,r)=>{var n=r(88668),i=r(82908),o=r(74757);e.exports=function(e,t,r,s,a,u){var l=1&r,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),h=u.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,m=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p<c;){var v=e[p],y=t[p];if(s)var w=l?s(y,v,p,t,e,u):s(v,y,p,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(v===e||a(v,e,r,s,u)))return m.push(t)}))){g=!1;break}}else if(v!==y&&!a(v,y,r,s,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},18351:(e,t,r)=>{var n=r(62705),i=r(11149),o=r(77813),s=r(67114),a=r(68776),u=r(21814),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&n;if(h||(h=u),e.size!=t.size&&!p)return!1;var g=f.get(e);if(g)return g==t;n|=2,f.set(e,t);var m=s(h(e),h(t),n,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},16096:(e,t,r)=>{var n=r(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var u=1&r,l=n(e),c=l.length;if(c!=n(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:i.call(t,f)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=u;++d<c;){var v=e[f=l[d]],y=t[f];if(o)var w=u?o(y,v,f,t,e,a):o(v,y,f,e,t,a);if(!(void 0===w?v===y||s(v,y,r,o,a):w)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},99021:(e,t,r)=>{var n=r(85564),i=r(45357),o=r(30061);e.exports=function(e){return o(i(e,void 0,n),e+"")}},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},58234:(e,t,r)=>{var n=r(68866),i=r(99551),o=r(3674);e.exports=function(e){return n(e,o,i)}},46904:(e,t,r)=>{var n=r(68866),i=r(51442),o=r(81704);e.exports=function(e){return n(e,o,i)}},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),i=r(47801);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},85924:(e,t,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);e.exports=n},89607:(e,t,r)=>{var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},99551:(e,t,r)=>{var n=r(34963),i=r(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},51442:(e,t,r)=>{var n=r(62488),i=r(85924),o=r(99551),s=r(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s;e.exports=a},64160:(e,t,r)=>{var n=r(18552),i=r(57071),o=r(53818),s=r(58525),a=r(70577),u=r(44239),l=r(80346),c="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",g=l(n),m=l(i),v=l(o),y=l(s),w=l(a),b=u;(n&&b(new n(new ArrayBuffer(1)))!=p||i&&b(new i)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=h)&&(b=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case g:return p;case m:return c;case v:return d;case y:return f;case w:return h}return t}),e.exports=b},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,r)=>{var n=r(71811),i=r(35694),o=r(1469),s=r(65776),a=r(41780),u=r(40327);e.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&r(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||i(e))}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},29148:(e,t,r)=>{var n=r(74318),i=r(57157),o=r(93147),s=r(40419),a=r(77133);e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,r)=>{var n=r(3118),i=r(85924),o=r(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},37285:(e,t,r)=>{var n=r(62705),i=r(35694),o=r(1469),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},15403:(e,t,r)=>{var n=r(1469),i=r(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,i=r(14429),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},86916:(e,t,r)=>{var n=r(5569)(Object.keys,Object);e.exports=n},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:(e,t,r)=>{e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},45357:(e,t,r)=>{var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=r(u),n(e,this,l)}}},55639:(e,t,r)=>{var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},30061:(e,t,r)=>{var n=r(56560),i=r(21275)(n);e.exports=i},21275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:(e,t,r)=>{var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,r)=>{var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},55514:(e,t,r)=>{var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=s},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},66678:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,4)}},50361:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,r)=>{var n=r(13218),i=r(7771),o=r(14841),s=Math.max,a=Math.min;e.exports=function(e,t,r){var u,l,c,d,f,h,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=u,n=l;return u=l=void 0,p=t,d=e.apply(n,r)}function w(e){return p=e,f=setTimeout(S,t),g?y(e):d}function b(e){var r=e-h;return void 0===h||r>=t||r<0||m&&e-p>=c}function S(){var e=i();if(b(e))return _(e);f=setTimeout(S,function(e){var r=t-(e-h);return m?a(r,c-(e-p)):r}(e))}function _(e){return f=void 0,v&&u?y(e):(u=l=void 0,d)}function C(){var e=i(),r=b(e);if(u=arguments,l=this,h=e,r){if(void 0===f)return w(h);if(m)return clearTimeout(f),f=setTimeout(S,t),y(h)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,n(r)&&(g=!!r.leading,c=(m="maxWait"in r)?s(o(r.maxWait)||0,t):c,v="trailing"in r?!!r.trailing:v),C.cancel=function(){void 0!==f&&clearTimeout(f),p=0,u=h=l=f=void 0},C.flush=function(){return void 0===f?d:_(i())},C}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,r)=>{var n=r(21078);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:(e,t,r)=>{var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,r)=>{var n=r(9454),i=r(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,r)=>{var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},18446:(e,t,r)=>{var n=r(90939);e.exports=function(e,t){return n(e,t)}},28368:(e,t,r)=>{var n=r(90939);e.exports=function(e,t,r){var i=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===i?n(e,t,void 0,r):!!i}},23560:(e,t,r)=>{var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,r)=>{var n=r(25588),i=r(7518),o=r(31167),s=o&&o.isMap,a=s?i(s):n;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,r)=>{var n=r(29221),i=r(7518),o=r(31167),s=o&&o.isSet,a=s?i(s):n;e.exports=a},33448:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:(e,t,r)=>{var n=r(38749),i=r(7518),o=r(31167),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},3674:(e,t,r)=>{var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},81704:(e,t,r)=>{var n=r(14636),i=r(10313),o=r(98612);e.exports=function(e){return o(e)?n(e,!0):i(e)}},96486:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",w="[object Error]",b="[object Function]",S="[object GeneratorFunction]",_="[object Map]",C="[object Number]",L="[object Object]",E="[object Promise]",k="[object RegExp]",A="[object Set]",T="[object String]",O="[object Symbol]",R="[object WeakMap]",I="[object ArrayBuffer]",x="[object DataView]",N="[object Float32Array]",D="[object Float64Array]",P="[object Int8Array]",W="[object Int16Array]",F="[object Int32Array]",j="[object Uint8Array]",M="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,q=RegExp($.source),Z=RegExp(G.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+Le+"]",ke="["+Se+"]",Ae="\\d+",Te="["+_e+"]",Oe="[^\\ud800-\\udfff"+Le+Ae+"\\u2700-\\u27bf"+_e+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+Ce+"]",Pe="(?:"+Te+"|"+Oe+")",We="(?:"+De+"|"+Oe+")",Fe="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+ke+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",ze=Be+Me+"(?:\\u200d(?:"+[Ie,xe,Ne].join("|")+")"+Be+Me+")*",Ue="(?:"+["[\\u2700-\\u27bf]",xe,Ne].join("|")+")"+ze,He="(?:"+[Ie+ke+"?",ke,xe,Ne,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['’]","g"),$e=RegExp(ke,"g"),Ge=RegExp(Re+"(?="+Re+")|"+He+ze,"g"),qe=RegExp([De+"?"+Te+"+"+Fe+"(?="+[Ee,De,"$"].join("|")+")",We+"+"+je+"(?="+[Ee,De+Pe,"$"].join("|")+")",De+"?"+Pe+"+"+Fe,De+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,Ue].join("|"),"g"),Ze=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Qe={};Qe[N]=Qe[D]=Qe[P]=Qe[W]=Qe[F]=Qe[j]=Qe[M]=Qe[B]=Qe[z]=!0,Qe[g]=Qe[m]=Qe[I]=Qe[v]=Qe[x]=Qe[y]=Qe[w]=Qe[b]=Qe[_]=Qe[C]=Qe[L]=Qe[k]=Qe[A]=Qe[T]=Qe[R]=!1;var Xe={};Xe[g]=Xe[m]=Xe[I]=Xe[x]=Xe[v]=Xe[y]=Xe[N]=Xe[D]=Xe[P]=Xe[W]=Xe[F]=Xe[_]=Xe[C]=Xe[L]=Xe[k]=Xe[A]=Xe[T]=Xe[O]=Xe[j]=Xe[M]=Xe[B]=Xe[z]=!0,Xe[w]=Xe[b]=Xe[R]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&nt.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,ht=ct&&ct.isMap,pt=ct&&ct.isRegExp,gt=ct&&ct.isSet,mt=ct&&ct.isTypedArray;function vt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function yt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function wt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function bt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function St(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function _t(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Lt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Et(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function kt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function At(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Tt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Rt=Ft("length");function It(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function xt(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):xt(e,Pt,r)}function Dt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Pt(e){return e!=e}function Wt(e,t){var r=null==e?0:e.length;return r?Bt(e,t)/r:f}function Ft(e){return function(t){return null==t?i:t[e]}}function jt(e){return function(t){return null==e?i:e[t]}}function Mt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Bt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ut(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function Ht(e){return function(t){return e(t)}}function Vt(e,t){return Et(t,(function(t){return e[t]}))}function $t(e,t){return e.has(t)}function Gt(e,t){for(var r=-1,n=e.length;++r<n&&Nt(t,e[r],0)>-1;);return r}function qt(e,t){for(var r=e.length;r--&&Nt(t,e[r],0)>-1;);return r}function Zt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Kt=jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yt=jt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Qt(e){return Ze.test(e)}function Xt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function ir(e){return Qt(e)?function(e){for(var t=Ge.lastIndex=0;Ge.test(e);)++t;return t}(e):Rt(e)}function or(e){return Qt(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ar=jt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ur=function e(t){var r,n=(t=null==t?ot:ur.defaults(ot.Object(),t,ur.pick(ot,Ye))).Array,ie=t.Date,Se=t.Error,_e=t.Function,Ce=t.Math,Le=t.Object,Ee=t.RegExp,ke=t.String,Ae=t.TypeError,Te=n.prototype,Oe=_e.prototype,Re=Le.prototype,Ie=t["__core-js_shared__"],xe=Oe.toString,Ne=Re.hasOwnProperty,De=0,Pe=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",We=Re.toString,Fe=xe.call(Le),je=ot._,Me=Ee("^"+xe.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,ze=t.Symbol,Ue=t.Uint8Array,He=Be?Be.allocUnsafe:i,Ge=er(Le.getPrototypeOf,Le),Ze=Le.create,et=Re.propertyIsEnumerable,nt=Te.splice,it=ze?ze.isConcatSpreadable:i,st=ze?ze.iterator:i,at=ze?ze.toStringTag:i,lt=function(){try{var e=lo(Le,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,lr=Ce.ceil,cr=Ce.floor,dr=Le.getOwnPropertySymbols,fr=Be?Be.isBuffer:i,hr=t.isFinite,pr=Te.join,gr=er(Le.keys,Le),mr=Ce.max,vr=Ce.min,yr=ie.now,wr=t.parseInt,br=Ce.random,Sr=Te.reverse,_r=lo(t,"DataView"),Cr=lo(t,"Map"),Lr=lo(t,"Promise"),Er=lo(t,"Set"),kr=lo(t,"WeakMap"),Ar=lo(Le,"create"),Tr=kr&&new kr,Or={},Rr=Mo(_r),Ir=Mo(Cr),xr=Mo(Lr),Nr=Mo(Er),Dr=Mo(kr),Pr=ze?ze.prototype:i,Wr=Pr?Pr.valueOf:i,Fr=Pr?Pr.toString:i;function jr(e){if(ra(e)&&!$s(e)&&!(e instanceof Ur)){if(e instanceof zr)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new zr(e)}var Mr=function(){function e(){}return function(t){if(!ta(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Br(){}function zr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new $r;++t<r;)this.add(e[t])}function qr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Zr(e,t){var r=$s(e),n=!r&&Vs(e),i=!r&&!n&&Ks(e),o=!r&&!n&&!i&&ca(e),s=r||n||i||o,a=s?zt(e.length,ke):[],u=a.length;for(var l in e)!t&&!Ne.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vo(l,u))||a.push(l);return a}function Kr(e){var t=e.length;return t?e[Gn(0,t-1)]:i}function Yr(e,t){return Do(Ai(e),sn(t,0,e.length))}function Jr(e){return Do(Ai(e))}function Qr(e,t,r){(r!==i&&!zs(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];Ne.call(e,t)&&zs(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(zs(e[r][0],t))return r;return-1}function tn(e,t,r,n){return dn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ti(t,xa(t),e)}function nn(e,t,r){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Aa(e,t[r]);return s}function sn(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function an(e,t,r,n,o,s){var a,u=1&t,l=2&t,c=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var d=$s(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ai(e,a)}else{var f=ho(e),h=f==b||f==S;if(Ks(e))return Si(e,u);if(f==L||f==g||h&&!o){if(a=l||h?{}:go(e),!u)return l?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Na(t),e)}(a,e)):function(e,t){return Ti(e,co(e),t)}(e,rn(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case I:return _i(e);case v:case y:return new i(+e);case x:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case D:case P:case W:case F:case j:case M:case B:case z:return Ci(e,r);case _:case A:return new i;case C:case T:return new i(e);case k:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return n=e,Wr?Le(Wr.call(n)):{}}}(e,f,u)}}s||(s=new qr);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var m=d?i:(c?l?ro:to:l?Na:xa)(e);return wt(m||e,(function(n,i){m&&(n=e[i=n]),Xr(a,i,an(n,t,r,i,e,s))})),a}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Le(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new Ae(o);return Ro((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=Ct,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;r&&(t=Et(t,Ht(r))),n?(o=Lt,s=!1):t.length>=200&&(o=$t,s=!1,t=new Gr(t));e:for(;++i<a;){var c=e[i],d=null==r?c:r(c);if(c=n||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,n)||u.push(c)}return u}jr.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:jr}},jr.prototype=Br.prototype,jr.prototype.constructor=jr,zr.prototype=Mr(Br.prototype),zr.prototype.constructor=zr,Ur.prototype=Mr(Br.prototype),Ur.prototype.constructor=Ur,Hr.prototype.clear=function(){this.__data__=Ar?Ar(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Ar){var r=t[e];return r===s?i:r}return Ne.call(t,e)?t[e]:i},Hr.prototype.has=function(e){var t=this.__data__;return Ar?t[e]!==i:Ne.call(t,e)},Hr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ar&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return en(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},$r.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Cr||Vr),string:new Hr}},$r.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},$r.prototype.get=function(e){return ao(this,e).get(e)},$r.prototype.has=function(e){return ao(this,e).has(e)},$r.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,s),this},Gr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.clear=function(){this.__data__=new Vr,this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},qr.prototype.get=function(e){return this.__data__.get(e)},qr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $r(n)}return r.set(e,t),this.size=r.size,this};var dn=Ii(wn),fn=Ii(bn,!0);function hn(e,t){var r=!0;return dn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function pn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!la(a):r(a,u)))var u=a,l=s}return l}function gn(e,t){var r=[];return dn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function mn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=mo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?mn(a,t-1,r,n,i):kt(i,a):n||(i[i.length]=a)}return i}var vn=xi(),yn=xi(!0);function wn(e,t){return e&&vn(e,t,xa)}function bn(e,t){return e&&yn(e,t,xa)}function Sn(e,t){return _t(t,(function(t){return Qs(e[t])}))}function _n(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[jo(t[r++])];return r&&r==n?e:i}function Cn(e,t,r){var n=t(e);return $s(e)?n:kt(n,r(e))}function Ln(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Le(e)?function(e){var t=Ne.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var o=We.call(e);return n&&(t?e[at]=r:delete e[at]),o}(e):function(e){return We.call(e)}(e)}function En(e,t){return e>t}function kn(e,t){return null!=e&&Ne.call(e,t)}function An(e,t){return null!=e&&t in Le(e)}function Tn(e,t,r){for(var o=r?Lt:Ct,s=e[0].length,a=e.length,u=a,l=n(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Et(f,Ht(t))),c=vr(f.length,c),l[u]=!r&&(t||s>=120&&f.length>=120)?new Gr(u&&f):i}f=e[0];var h=-1,p=l[0];e:for(;++h<s&&d.length<c;){var g=f[h],m=t?t(g):g;if(g=r||0!==g?g:0,!(p?$t(p,m):o(d,m,r))){for(u=a;--u;){var v=l[u];if(!(v?$t(v,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(g)}}return d}function On(e,t,r){var n=null==(e=ko(e,t=vi(t,e)))?e:e[jo(Jo(t))];return null==n?i:vt(n,e,r)}function Rn(e){return ra(e)&&Ln(e)==g}function In(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=$s(e),u=$s(t),l=a?m:ho(e),c=u?m:ho(t),d=(l=l==g?L:l)==L,f=(c=c==g?L:c)==L,h=l==c;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new qr),a||ca(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case v:case y:case C:return zs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case _:var a=Xt;case A:var u=1&n;if(a||(a=rr),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var c=Xi(a(e),a(t),n,i,o,s);return s.delete(e),c;case O:if(Wr)return Wr.call(e)==Wr.call(t)}return!1}(e,t,l,r,n,o,s);if(!(1&r)){var p=d&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(p||b){var S=p?e.value():e,E=b?t.value():t;return s||(s=new qr),o(S,E,r,n,s)}}return!!h&&(s||(s=new qr),function(e,t,r,n,o,s){var a=1&r,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Ne.call(t,d)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var g=a;++c<l;){var m=e[d=u[c]],v=t[d];if(n)var y=a?n(v,m,d,t,e,s):n(m,v,d,e,t,s);if(!(y===i?m===v||o(m,v,r,n,s):y)){p=!1;break}g||(g="constructor"==d)}if(p&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,o,s))}(e,t,r,n,In,o))}function xn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Le(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=r[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===i&&!(l in e))return!1}else{var f=new qr;if(n)var h=n(c,d,l,e,t,f);if(!(h===i?In(d,c,3,n,f):h))return!1}}return!0}function Nn(e){return!(!ta(e)||(t=e,Pe&&Pe in t))&&(Qs(e)?Me:ge).test(Mo(e));var t}function Dn(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?$s(e)?Mn(e[0],e[1]):jn(e):hu(e)}function Pn(e){if(!_o(e))return gr(e);var t=[];for(var r in Le(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Wn(e,t){return e<t}function Fn(e,t){var r=-1,i=qs(e)?n(e.length):[];return dn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function jn(e){var t=uo(e);return 1==t.length&&t[0][2]?Lo(t[0][0],t[0][1]):function(r){return r===e||xn(r,e,t)}}function Mn(e,t){return wo(e)&&Co(t)?Lo(jo(e),t):function(r){var n=Aa(r,e);return n===i&&n===t?Ta(r,e):In(t,n,3)}}function Bn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new qr),ta(s))!function(e,t,r,n,o,s,a){var u=To(e,r),l=To(t,r),c=a.get(l);if(c)Qr(e,r,c);else{var d=s?s(u,l,r+"",e,t,a):i,f=d===i;if(f){var h=$s(l),p=!h&&Ks(l),g=!h&&!p&&ca(l);d=l,h||p||g?$s(u)?d=u:Zs(u)?d=Ai(u):p?(f=!1,d=Si(l,!0)):g?(f=!1,d=Ci(l,!0)):d=[]:oa(l)||Vs(l)?(d=u,Vs(u)?d=ya(u):ta(u)&&!Qs(u)||(d=go(l))):f=!1}f&&(a.set(l,d),o(d,l,n,s,a),a.delete(l)),Qr(e,r,d)}}(e,t,a,r,Bn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Qr(e,a,u)}}),Na)}function zn(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?Et(t,(function(e){return $s(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[iu];var n=-1;t=Et(t,Ht(so()));var i=Fn(e,(function(e,r,i){var o=Et(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Li(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Hn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Jn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Dt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),r&&(a=Et(e,Ht(r)));++o<s;)for(var u=0,l=t[o],c=r?r(l):l;(u=i(a,c,u,n))>-1;)a!==e&&nt.call(a,u,1),nt.call(e,u,1);return e}function $n(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?nt.call(e,i,1):li(e,i)}}return e}function Gn(e,t){return e+cr(br()*(t-e+1))}function qn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=cr(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Io(Eo(e,t,iu),e+"")}function Kn(e){return Kr(za(e))}function Yn(e,t){var r=za(e);return Do(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=jo(t[o]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=n?n(d,l,u):i)===i&&(c=ta(d)?d:vo(t[o+1])?[]:{})}Xr(u,l,c),u=u[l]}return e}var Qn=Tr?function(e,t){return Tr.set(e,t),e}:iu,Xn=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Do(za(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return dn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!la(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,iu,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,l=la(t),c=t===i;o<s;){var d=cr((o+s)/2),f=r(e[d]),h=f!==i,p=null===f,g=f==f,m=la(f);if(a)var v=n||g;else v=c?g&&(n||h):u?g&&h&&(n||!p):l?g&&h&&!p&&(n||!m):!p&&!m&&(n?f<=t:f<t);v?o=d+1:s=d}return vr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!zs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:la(e)?f:+e}function ai(e){if("string"==typeof e)return e;if($s(e))return Et(e,ai)+"";if(la(e))return Fr?Fr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=Ct,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=Lt;else if(o>=200){var l=t?null:qi(e);if(l)return rr(l);s=!1,i=$t,u=new Gr}else u=t?[]:a;e:for(;++n<o;){var c=e[n],d=t?t(c):c;if(c=r||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else i(u,d,r)||(u!==a&&u.push(d),a.push(c))}return a}function li(e,t){return null==(e=ko(e,t=vi(t,e)))||delete e[jo(Jo(t))]}function ci(e,t,r,n){return Jn(e,t,r(_n(e,t)),n)}function di(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),r)}function hi(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ui(mn(s,1),t,r)}function pi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function gi(e){return Zs(e)?e:[]}function mi(e){return"function"==typeof e?e:iu}function vi(e,t){return $s(e)?e:wo(e,t)?[e]:Fo(wa(e))}var yi=Zn;function wi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var bi=ct||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ci(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=la(e),a=t!==i,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||n&&a&&l||!r&&l||!o)return 1;if(!n&&!s&&!c&&e<t||c&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!l)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,l=t.length,c=mr(s-a,0),d=n(l+c),f=!i;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[r[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function ki(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,l=-1,c=t.length,d=mr(s-u,0),f=n(d+c),h=!i;++o<d;)f[o]=e[o];for(var p=o;++l<c;)f[p+l]=t[l];for(;++a<u;)(h||o<s)&&(f[p+r[a]]=e[o++]);return f}function Ai(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ti(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=n?n(r[u],e[u],u,r,e):i;l===i&&(l=e[u]),o?nn(r,u,l):Xr(r,u,l)}return r}function Oi(e,t){return function(r,n){var i=$s(r)?yt:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function Ri(e){return Zn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Le(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ii(e,t){return function(r,n){if(null==r)return r;if(!qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Le(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function xi(e){return function(t,r,n){for(var i=-1,o=Le(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ni(e){return function(t){var r=Qt(t=wa(t))?or(t):i,n=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return n[e]()+o}}function Di(e){return function(t){return At(Qa(Va(t).replace(Ve,"")),e,"")}}function Pi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Mr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Wi(e){return function(t,r,n){var o=Le(t);if(!qs(t)){var s=so(r,3);t=xa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Fi(e){return eo((function(t){var r=t.length,n=r,s=zr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Ae(o);if(s&&!u&&"wrapper"==io(a))var u=new zr([],!0)}for(n=u?n:r;++n<r;){var l=io(a=t[n]),c="wrapper"==l?no(a):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[io(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&$s(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function ji(e,t,r,o,s,a,u,c,d,f){var h=t&l,p=1&t,g=2&t,m=24&t,v=512&t,y=g?i:Pi(e);return function i(){for(var l=arguments.length,w=n(l),b=l;b--;)w[b]=arguments[b];if(m)var S=oo(i),_=Zt(w,S);if(o&&(w=Ei(w,o,s,m)),a&&(w=ki(w,a,u,m)),l-=_,m&&l<f){var C=tr(w,S);return $i(e,t,ji,i.placeholder,r,w,C,c,d,f-l)}var L=p?r:this,E=g?L[e]:e;return l=w.length,c?w=Ao(w,c):v&&l>1&&w.reverse(),h&&d<l&&(w.length=d),this&&this!==ot&&this instanceof i&&(E=y||Pi(E)),E.apply(L,w)}}function Mi(e,t){return function(r,n){return function(e,t,r,n){return wn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Bi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=e(r,n)}return o}}function zi(e){return eo((function(t){return t=Et(t,Ht(so())),Zn((function(r){var n=this;return e(t,(function(e){return vt(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?qn(t,e):t;var n=qn(t,lr(e/ir(t)));return Qt(t)?wi(or(n),0,e).join(""):n.slice(0,e)}function Hi(e){return function(t,r,o){return o&&"number"!=typeof o&&yo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=mr(lr((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=va(t),r=va(r)),e(t,r)}}function $i(e,t,r,n,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var h=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,l,c,d],p=r.apply(i,h);return bo(e)&&Oo(p,h),p.placeholder=n,xo(p,e,t)}function Gi(e){var t=Ce[e];return function(e,r){if(e=va(e),(r=null==r?0:vr(ga(r),292))&&hr(e)){var n=(wa(e)+"e").split("e");return+((n=(wa(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var qi=Er&&1/rr(new Er([,-0]))[1]==c?function(e){return new Er(e)}:lu;function Zi(e){return function(t){var r=ho(t);return r==_?Xt(t):r==A?nr(t):function(e,t){return Et(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,s,c,d,f,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var g=s?s.length:0;if(g||(t&=-97,s=c=i),f=f===i?f:mr(ga(f),0),h=h===i?h:ga(h),g-=c?c.length:0,64&t){var m=s,v=c;s=c=i}var y=p?i:no(e),w=[e,t,r,s,c,m,v,d,f,h];if(y&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==l&&8==r||n==l&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ei(c,u,t[4]):u,e[4]=c?tr(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?ki(c,u,t[6]):u,e[6]=c?tr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&l&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,y),e=w[0],t=w[1],r=w[2],s=w[3],c=w[4],!(h=w[9]=w[9]===i?p?0:e.length:mr(w[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=Pi(e);return function s(){for(var a=arguments.length,u=n(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tr(u,c);return(a-=d.length)<r?$i(e,t,ji,s.placeholder,i,u,d,i,i,r-a):vt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,h):t!=u&&33!=t||c.length?ji.apply(i,w):function(e,t,r,i){var o=1&t,s=Pi(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=i.length,d=n(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++a];return vt(f,o?r:this,d)}}(e,t,r,s);else var b=function(e,t,r){var n=1&t,i=Pi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return xo((y?Qn:Oo)(b,w),e,t)}function Yi(e,t,r,n){return e===i||zs(e,Re[r])&&!Ne.call(n,r)?t:e}function Ji(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bn(e,t,i,Ji,s),s.delete(t)),e}function Qi(e){return oa(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=2&r?new Gr:i;for(s.set(e,t),s.set(t,e);++f<u;){var g=e[f],m=t[f];if(n)var v=a?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(v!==i){if(v)continue;h=!1;break}if(p){if(!Ot(t,(function(e,t){if(!$t(p,t)&&(g===e||o(g,e,r,n,s)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!o(g,m,r,n,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return Io(Eo(e,i,Go),e+"")}function to(e){return Cn(e,xa,co)}function ro(e){return Cn(e,Na,fo)}var no=Tr?function(e){return Tr.get(e)}:lu;function io(e){for(var t=e.name+"",r=Or[t],n=Ne.call(Or,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Ne.call(jr,"placeholder")?jr:e).placeholder}function so(){var e=jr.iteratee||ou;return e=e===ou?Dn:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=xa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Co(i)]}return t}function lo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Nn(r)?r:i}var co=dr?function(e){return null==e?[]:(e=Le(e),_t(dr(e),(function(t){return et.call(e,t)})))}:mu,fo=dr?function(e){for(var t=[];e;)kt(t,co(e)),e=Ge(e);return t}:mu,ho=Ln;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=jo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&vo(s,i)&&($s(e)||Vs(e))}function go(e){return"function"!=typeof e.constructor||_o(e)?{}:Mr(Ge(e))}function mo(e){return $s(e)||Vs(e)||!!(it&&e&&e[it])}function vo(e,t){var r=typeof e;return!!(t=null==t?d:t)&&("number"==r||"symbol"!=r&&ve.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?qs(r)&&vo(t,r.length):"string"==n&&t in r)&&zs(r[t],e)}function wo(e,t){if($s(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!la(e))||X.test(e)||!Q.test(e)||null!=t&&e in Le(t)}function bo(e){var t=io(e),r=jr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(_r&&ho(new _r(new ArrayBuffer(1)))!=x||Cr&&ho(new Cr)!=_||Lr&&ho(Lr.resolve())!=E||Er&&ho(new Er)!=A||kr&&ho(new kr)!=R)&&(ho=function(e){var t=Ln(e),r=t==L?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case Rr:return x;case Ir:return _;case xr:return E;case Nr:return A;case Dr:return R}return t});var So=Ie?Qs:vu;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Lo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Le(r))}}function Eo(e,t,r){return t=mr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=mr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),vt(e,this,u)}}function ko(e,t){return t.length<2?e:_n(e,ti(t,0,-1))}function Ao(e,t){for(var r=e.length,n=vr(t.length,r),o=Ai(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=No(Qn),Ro=jt||function(e,t){return ot.setTimeout(e,t)},Io=No(Xn);function xo(e,t,r){var n=t+"";return Io(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return wt(p,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Gn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Po,Wo,Fo=(Po=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(ce,"$1"):r||e)})),t}),(function(e){return 500===Wo.size&&Wo.clear(),e})),Wo=Po.cache,Po);function jo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Ur)return e.clone();var t=new zr(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Zn((function(e,t){return Zs(e)?cn(e,mn(t,1,Zs,!0)):[]})),Uo=Zn((function(e,t){var r=Jo(t);return Zs(r)&&(r=i),Zs(e)?cn(e,mn(t,1,Zs,!0),so(r,2)):[]})),Ho=Zn((function(e,t){var r=Jo(t);return Zs(r)&&(r=i),Zs(e)?cn(e,mn(t,1,Zs,!0),i,r):[]}));function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=mr(n+i,0)),xt(e,so(t,3),i)}function $o(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ga(r),o=r<0?mr(n+o,0):vr(o,n-1)),xt(e,so(t,3),o,!0)}function Go(e){return null!=e&&e.length?mn(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Zo=Zn((function(e){var t=Et(e,gi);return t.length&&t[0]===e[0]?Tn(t):[]})),Ko=Zn((function(e){var t=Jo(e),r=Et(e,gi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Tn(r,so(t,2)):[]})),Yo=Zn((function(e){var t=Jo(e),r=Et(e,gi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Tn(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Qo=Zn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return $n(e,Et(t,(function(e){return vo(e,r)?+e:e})).sort(Li)),n}));function ts(e){return null==e?e:Sr.call(e)}var rs=Zn((function(e){return ui(mn(e,1,Zs,!0))})),ns=Zn((function(e){var t=Jo(e);return Zs(t)&&(t=i),ui(mn(e,1,Zs,!0),so(t,2))})),is=Zn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(mn(e,1,Zs,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Zs(e))return t=mr(e.length,t),!0})),zt(t,(function(t){return Et(e,Ft(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:Et(r,(function(e){return vt(t,i,e)}))}var as=Zn((function(e,t){return Zs(e)?cn(e,t):[]})),us=Zn((function(e){return hi(_t(e,Zs))})),ls=Zn((function(e){var t=Jo(e);return Zs(t)&&(t=i),hi(_t(e,Zs),so(t,2))})),cs=Zn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,hi(_t(e,Zs),i,t)})),ds=Zn(os),fs=Zn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function hs(e){var t=jr(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var gs=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new zr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ms=Oi((function(e,t,r){Ne.call(e,r)?++e[r]:nn(e,r,1)})),vs=Wi(Vo),ys=Wi($o);function ws(e,t){return($s(e)?wt:dn)(e,so(t,3))}function bs(e,t){return($s(e)?bt:fn)(e,so(t,3))}var Ss=Oi((function(e,t,r){Ne.call(e,r)?e[r].push(t):nn(e,r,[t])})),_s=Zn((function(e,t,r){var i=-1,o="function"==typeof t,s=qs(e)?n(e.length):[];return dn(e,(function(e){s[++i]=o?vt(t,e,r):On(e,t,r)})),s})),Cs=Oi((function(e,t,r){nn(e,r,t)}));function Ls(e,t){return($s(e)?Et:Fn)(e,so(t,3))}var Es=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ks=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&yo(e,t[0],t[1])?t=[]:r>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,mn(t,1),[])})),As=Rt||function(){return ot.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,l,i,i,i,i,t)}function Os(e,t){var r;if("function"!=typeof t)throw new Ae(o);return e=ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Rs=Zn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(Rs));n|=u}return Ki(e,n,t,r,i)})),Is=Zn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(Is));n|=u}return Ki(t,n,e,r,i)}));function xs(e,t,r){var n,s,a,u,l,c,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function g(t){var r=n,o=s;return n=s=i,d=t,u=e.apply(o,r)}function m(e){return d=e,l=Ro(y,t),f?g(e):u}function v(e){var r=e-c;return c===i||r>=t||r<0||h&&e-d>=a}function y(){var e=As();if(v(e))return w(e);l=Ro(y,function(e){var r=t-(e-c);return h?vr(r,a-(e-d)):r}(e))}function w(e){return l=i,p&&n?g(e):(n=s=i,u)}function b(){var e=As(),r=v(e);if(n=arguments,s=this,c=e,r){if(l===i)return m(c);if(h)return bi(l),l=Ro(y,t),g(c)}return l===i&&(l=Ro(y,t)),u}return t=va(t)||0,ta(r)&&(f=!!r.leading,a=(h="maxWait"in r)?mr(va(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),b.cancel=function(){l!==i&&bi(l),d=0,n=c=s=l=i},b.flush=function(){return l===i?u:w(As())},b}var Ns=Zn((function(e,t){return ln(e,1,t)})),Ds=Zn((function(e,t,r){return ln(e,va(t)||0,r)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ps.Cache||$r),r}function Ws(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ps.Cache=$r;var Fs=yi((function(e,t){var r=(t=1==t.length&&$s(t[0])?Et(t[0],Ht(so())):Et(mn(t,1),Ht(so()))).length;return Zn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return vt(e,this,n)}))})),js=Zn((function(e,t){var r=tr(t,oo(js));return Ki(e,u,i,t,r)})),Ms=Zn((function(e,t){var r=tr(t,oo(Ms));return Ki(e,64,i,t,r)})),Bs=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var Us=Vi(En),Hs=Vi((function(e,t){return e>=t})),Vs=Rn(function(){return arguments}())?Rn:function(e){return ra(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},$s=n.isArray,Gs=dt?Ht(dt):function(e){return ra(e)&&Ln(e)==I};function qs(e){return null!=e&&ea(e.length)&&!Qs(e)}function Zs(e){return ra(e)&&qs(e)}var Ks=fr||vu,Ys=ft?Ht(ft):function(e){return ra(e)&&Ln(e)==y};function Js(e){if(!ra(e))return!1;var t=Ln(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Qs(e){if(!ta(e))return!1;var t=Ln(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=ht?Ht(ht):function(e){return ra(e)&&ho(e)==_};function ia(e){return"number"==typeof e||ra(e)&&Ln(e)==C}function oa(e){if(!ra(e)||Ln(e)!=L)return!1;var t=Ge(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&xe.call(r)==Fe}var sa=pt?Ht(pt):function(e){return ra(e)&&Ln(e)==k},aa=gt?Ht(gt):function(e){return ra(e)&&ho(e)==A};function ua(e){return"string"==typeof e||!$s(e)&&ra(e)&&Ln(e)==T}function la(e){return"symbol"==typeof e||ra(e)&&Ln(e)==O}var ca=mt?Ht(mt):function(e){return ra(e)&&ea(e.length)&&!!Qe[Ln(e)]},da=Vi(Wn),fa=Vi((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(qs(e))return ua(e)?or(e):Ai(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=ho(e);return(t==_?Xt:t==A?rr:za)(e)}function pa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ma(e){return e?sn(ga(e),0,h):0}function va(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var r=pe.test(e);return r||me.test(e)?rt(e.slice(2),r?2:8):he.test(e)?f:+e}function ya(e){return Ti(e,Na(e))}function wa(e){return null==e?"":ai(e)}var ba=Ri((function(e,t){if(_o(t)||qs(t))Ti(t,xa(t),e);else for(var r in t)Ne.call(t,r)&&Xr(e,r,t[r])})),Sa=Ri((function(e,t){Ti(t,Na(t),e)})),_a=Ri((function(e,t,r,n){Ti(t,Na(t),e,n)})),Ca=Ri((function(e,t,r,n){Ti(t,xa(t),e,n)})),La=eo(on),Ea=Zn((function(e,t){e=Le(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===i||zs(d,Re[c])&&!Ne.call(e,c))&&(e[c]=s[c])}return e})),ka=Zn((function(e){return e.push(i,Ji),vt(Pa,i,e)}));function Aa(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,An)}var Oa=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),e[t]=r}),tu(iu)),Ra=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),so),Ia=Zn(On);function xa(e){return qs(e)?Zr(e):Pn(e)}function Na(e){return qs(e)?Zr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Le(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}(e)}var Da=Ri((function(e,t,r){Bn(e,t,r)})),Pa=Ri((function(e,t,r,n){Bn(e,t,r,n)})),Wa=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=Et(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),Ti(e,ro(e),r),n&&(r=an(r,7,Qi));for(var i=t.length;i--;)li(r,t[i]);return r})),Fa=eo((function(e,t){return null==e?{}:function(e,t){return Hn(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function ja(e,t){if(null==e)return{};var r=Et(ro(e),(function(e){return[e]}));return t=so(t),Hn(e,r,(function(e,r){return t(e,r[0])}))}var Ma=Zi(xa),Ba=Zi(Na);function za(e){return null==e?[]:Vt(e,xa(e))}var Ua=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Ha(t):t)}));function Ha(e){return Ja(wa(e).toLowerCase())}function Va(e){return(e=wa(e))&&e.replace(ye,Kt).replace($e,"")}var $a=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ga=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),qa=Ni("toLowerCase"),Za=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ka=Di((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ya=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=Ni("toUpperCase");function Qa(e,t,r){return e=wa(e),(t=r?i:t)===i?function(e){return Ke.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Zn((function(e,t){try{return vt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=jo(t),nn(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Fi(),nu=Fi(!0);function iu(e){return e}function ou(e){return Dn("function"==typeof e?e:an(e,1))}var su=Zn((function(e,t){return function(r){return On(r,e,t)}})),au=Zn((function(e,t){return function(r){return On(e,r,t)}}));function uu(e,t,r){var n=xa(t),i=Sn(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Sn(t,xa(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Qs(e);return wt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Ai(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function lu(){}var cu=zi(Et),du=zi(St),fu=zi(Ot);function hu(e){return wo(e)?Ft(jo(e)):function(e){return function(t){return _n(t,e)}}(e)}var pu=Hi(),gu=Hi(!0);function mu(){return[]}function vu(){return!1}var yu,wu=Bi((function(e,t){return e+t}),0),bu=Gi("ceil"),Su=Bi((function(e,t){return e/t}),1),_u=Gi("floor"),Cu=Bi((function(e,t){return e*t}),1),Lu=Gi("round"),Eu=Bi((function(e,t){return e-t}),0);return jr.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},jr.ary=Ts,jr.assign=ba,jr.assignIn=Sa,jr.assignInWith=_a,jr.assignWith=Ca,jr.at=La,jr.before=Os,jr.bind=Rs,jr.bindAll=eu,jr.bindKey=Is,jr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $s(e)?e:[e]},jr.chain=hs,jr.chunk=function(e,t,r){t=(r?yo(e,t,r):t===i)?1:mr(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(lr(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},jr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},jr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return kt($s(r)?Ai(r):[r],mn(t,1))},jr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?Et(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var i=e[n];if(vt(i[0],this,r))return vt(i[1],this,r)}}))},jr.conforms=function(e){return function(e){var t=xa(e);return function(r){return un(r,e,t)}}(an(e,1))},jr.constant=tu,jr.countBy=ms,jr.create=function(e,t){var r=Mr(e);return null==t?r:rn(r,t)},jr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},jr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},jr.debounce=xs,jr.defaults=Ea,jr.defaultsDeep=ka,jr.defer=Ns,jr.delay=Ds,jr.difference=zo,jr.differenceBy=Uo,jr.differenceWith=Ho,jr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ga(t))<0?0:t,n):[]},jr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ga(t)))<0?0:t):[]},jr.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},jr.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},jr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ga(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ga(n))<0&&(n+=o),n=r>n?0:ma(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},jr.filter=function(e,t){return($s(e)?_t:gn)(e,so(t,3))},jr.flatMap=function(e,t){return mn(Ls(e,t),1)},jr.flatMapDeep=function(e,t){return mn(Ls(e,t),c)},jr.flatMapDepth=function(e,t,r){return r=r===i?1:ga(r),mn(Ls(e,t),r)},jr.flatten=Go,jr.flattenDeep=function(e){return null!=e&&e.length?mn(e,c):[]},jr.flattenDepth=function(e,t){return null!=e&&e.length?mn(e,t=t===i?1:ga(t)):[]},jr.flip=function(e){return Ki(e,512)},jr.flow=ru,jr.flowRight=nu,jr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},jr.functions=function(e){return null==e?[]:Sn(e,xa(e))},jr.functionsIn=function(e){return null==e?[]:Sn(e,Na(e))},jr.groupBy=Ss,jr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},jr.intersection=Zo,jr.intersectionBy=Ko,jr.intersectionWith=Yo,jr.invert=Oa,jr.invertBy=Ra,jr.invokeMap=_s,jr.iteratee=ou,jr.keyBy=Cs,jr.keys=xa,jr.keysIn=Na,jr.map=Ls,jr.mapKeys=function(e,t){var r={};return t=so(t,3),wn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},jr.mapValues=function(e,t){var r={};return t=so(t,3),wn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},jr.matches=function(e){return jn(an(e,1))},jr.matchesProperty=function(e,t){return Mn(e,an(t,1))},jr.memoize=Ps,jr.merge=Da,jr.mergeWith=Pa,jr.method=su,jr.methodOf=au,jr.mixin=uu,jr.negate=Ws,jr.nthArg=function(e){return e=ga(e),Zn((function(t){return zn(t,e)}))},jr.omit=Wa,jr.omitBy=function(e,t){return ja(e,Ws(so(t)))},jr.once=function(e){return Os(2,e)},jr.orderBy=function(e,t,r,n){return null==e?[]:($s(t)||(t=null==t?[]:[t]),$s(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},jr.over=cu,jr.overArgs=Fs,jr.overEvery=du,jr.overSome=fu,jr.partial=js,jr.partialRight=Ms,jr.partition=Es,jr.pick=Fa,jr.pickBy=ja,jr.property=hu,jr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},jr.pull=Qo,jr.pullAll=Xo,jr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,so(r,2)):e},jr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},jr.pullAt=es,jr.range=pu,jr.rangeRight=gu,jr.rearg=Bs,jr.reject=function(e,t){return($s(e)?_t:gn)(e,Ws(so(t,3)))},jr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return $n(e,i),r},jr.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Zn(e,t=t===i?t:ga(t))},jr.reverse=ts,jr.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===i)?1:ga(t),($s(e)?Yr:Yn)(e,t)},jr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},jr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},jr.shuffle=function(e){return($s(e)?Jr:ei)(e)},jr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=n):(t=null==t?0:ga(t),r=r===i?n:ga(r)),ti(e,t,r)):[]},jr.sortBy=ks,jr.sortedUniq=function(e){return e&&e.length?oi(e):[]},jr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},jr.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=i),(r=r===i?h:r>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Qt(e)?wi(or(e),0,r):e.split(t,r):[]},jr.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:mr(ga(t),0),Zn((function(r){var n=r[t],i=wi(r,0,t);return n&&kt(i,n),vt(e,this,i)}))},jr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},jr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ga(t))<0?0:t):[]},jr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ga(t)))<0?0:t,n):[]},jr.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},jr.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},jr.tap=function(e,t){return t(e),e},jr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),xs(e,t,{leading:n,maxWait:t,trailing:i})},jr.thru=ps,jr.toArray=ha,jr.toPairs=Ma,jr.toPairsIn=Ba,jr.toPath=function(e){return $s(e)?Et(e,jo):la(e)?[e]:Ai(Fo(wa(e)))},jr.toPlainObject=ya,jr.transform=function(e,t,r){var n=$s(e),i=n||Ks(e)||ca(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Qs(o)?Mr(Ge(e)):{}}return(i?wt:wn)(e,(function(e,n,i){return t(r,e,n,i)})),r},jr.unary=function(e){return Ts(e,1)},jr.union=rs,jr.unionBy=ns,jr.unionWith=is,jr.uniq=function(e){return e&&e.length?ui(e):[]},jr.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},jr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},jr.unset=function(e,t){return null==e||li(e,t)},jr.unzip=os,jr.unzipWith=ss,jr.update=function(e,t,r){return null==e?e:ci(e,t,mi(r))},jr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,mi(r),n)},jr.values=za,jr.valuesIn=function(e){return null==e?[]:Vt(e,Na(e))},jr.without=as,jr.words=Qa,jr.wrap=function(e,t){return js(mi(t),e)},jr.xor=us,jr.xorBy=ls,jr.xorWith=cs,jr.zip=ds,jr.zipObject=function(e,t){return pi(e||[],t||[],Xr)},jr.zipObjectDeep=function(e,t){return pi(e||[],t||[],Jn)},jr.zipWith=fs,jr.entries=Ma,jr.entriesIn=Ba,jr.extend=Sa,jr.extendWith=_a,uu(jr,jr),jr.add=wu,jr.attempt=Xa,jr.camelCase=Ua,jr.capitalize=Ha,jr.ceil=bu,jr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=va(r))==r?r:0),t!==i&&(t=(t=va(t))==t?t:0),sn(va(e),t,r)},jr.clone=function(e){return an(e,4)},jr.cloneDeep=function(e){return an(e,5)},jr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},jr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},jr.conformsTo=function(e,t){return null==t||un(e,t,xa(t))},jr.deburr=Va,jr.defaultTo=function(e,t){return null==e||e!=e?t:e},jr.divide=Su,jr.endsWith=function(e,t,r){e=wa(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ga(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},jr.eq=zs,jr.escape=function(e){return(e=wa(e))&&Z.test(e)?e.replace(G,Yt):e},jr.escapeRegExp=function(e){return(e=wa(e))&&re.test(e)?e.replace(te,"\\$&"):e},jr.every=function(e,t,r){var n=$s(e)?St:hn;return r&&yo(e,t,r)&&(t=i),n(e,so(t,3))},jr.find=vs,jr.findIndex=Vo,jr.findKey=function(e,t){return It(e,so(t,3),wn)},jr.findLast=ys,jr.findLastIndex=$o,jr.findLastKey=function(e,t){return It(e,so(t,3),bn)},jr.floor=_u,jr.forEach=ws,jr.forEachRight=bs,jr.forIn=function(e,t){return null==e?e:vn(e,so(t,3),Na)},jr.forInRight=function(e,t){return null==e?e:yn(e,so(t,3),Na)},jr.forOwn=function(e,t){return e&&wn(e,so(t,3))},jr.forOwnRight=function(e,t){return e&&bn(e,so(t,3))},jr.get=Aa,jr.gt=Us,jr.gte=Hs,jr.has=function(e,t){return null!=e&&po(e,t,kn)},jr.hasIn=Ta,jr.head=qo,jr.identity=iu,jr.includes=function(e,t,r,n){e=qs(e)?e:za(e),r=r&&!n?ga(r):0;var i=e.length;return r<0&&(r=mr(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Nt(e,t,r)>-1},jr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=mr(n+i,0)),Nt(e,t,i)},jr.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<mr(t,r)}(e=va(e),t,r)},jr.invoke=Ia,jr.isArguments=Vs,jr.isArray=$s,jr.isArrayBuffer=Gs,jr.isArrayLike=qs,jr.isArrayLikeObject=Zs,jr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&Ln(e)==v},jr.isBuffer=Ks,jr.isDate=Ys,jr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},jr.isEmpty=function(e){if(null==e)return!0;if(qs(e)&&($s(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||Vs(e)))return!e.length;var t=ho(e);if(t==_||t==A)return!e.size;if(_o(e))return!Pn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},jr.isEqual=function(e,t){return In(e,t)},jr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?In(e,t,i,r):!!n},jr.isError=Js,jr.isFinite=function(e){return"number"==typeof e&&hr(e)},jr.isFunction=Qs,jr.isInteger=Xs,jr.isLength=ea,jr.isMap=na,jr.isMatch=function(e,t){return e===t||xn(e,t,uo(t))},jr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,xn(e,t,uo(t),r)},jr.isNaN=function(e){return ia(e)&&e!=+e},jr.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nn(e)},jr.isNil=function(e){return null==e},jr.isNull=function(e){return null===e},jr.isNumber=ia,jr.isObject=ta,jr.isObjectLike=ra,jr.isPlainObject=oa,jr.isRegExp=sa,jr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},jr.isSet=aa,jr.isString=ua,jr.isSymbol=la,jr.isTypedArray=ca,jr.isUndefined=function(e){return e===i},jr.isWeakMap=function(e){return ra(e)&&ho(e)==R},jr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==Ln(e)},jr.join=function(e,t){return null==e?"":pr.call(e,t)},jr.kebabCase=$a,jr.last=Jo,jr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ga(r))<0?mr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):xt(e,Pt,o,!0)},jr.lowerCase=Ga,jr.lowerFirst=qa,jr.lt=da,jr.lte=fa,jr.max=function(e){return e&&e.length?pn(e,iu,En):i},jr.maxBy=function(e,t){return e&&e.length?pn(e,so(t,2),En):i},jr.mean=function(e){return Wt(e,iu)},jr.meanBy=function(e,t){return Wt(e,so(t,2))},jr.min=function(e){return e&&e.length?pn(e,iu,Wn):i},jr.minBy=function(e,t){return e&&e.length?pn(e,so(t,2),Wn):i},jr.stubArray=mu,jr.stubFalse=vu,jr.stubObject=function(){return{}},jr.stubString=function(){return""},jr.stubTrue=function(){return!0},jr.multiply=Cu,jr.nth=function(e,t){return e&&e.length?zn(e,ga(t)):i},jr.noConflict=function(){return ot._===this&&(ot._=je),this},jr.noop=lu,jr.now=As,jr.pad=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(cr(i),r)+e+Ui(lr(i),r)},jr.padEnd=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;return t&&n<t?e+Ui(t-n,r):e},jr.padStart=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;return t&&n<t?Ui(t-n,r)+e:e},jr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),wr(wa(e).replace(ne,""),t||0)},jr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=br();return vr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Gn(e,t)},jr.reduce=function(e,t,r){var n=$s(e)?At:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,dn)},jr.reduceRight=function(e,t,r){var n=$s(e)?Tt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},jr.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===i)?1:ga(t),qn(wa(e),t)},jr.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jr.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[jo(t[n])];s===i&&(n=o,s=r),e=Qs(s)?s.call(e):s}return e},jr.round=Lu,jr.runInContext=e,jr.sample=function(e){return($s(e)?Kr:Kn)(e)},jr.size=function(e){if(null==e)return 0;if(qs(e))return ua(e)?ir(e):e.length;var t=ho(e);return t==_||t==A?e.size:Pn(e).length},jr.snakeCase=Za,jr.some=function(e,t,r){var n=$s(e)?Ot:ri;return r&&yo(e,t,r)&&(t=i),n(e,so(t,3))},jr.sortedIndex=function(e,t){return ni(e,t)},jr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},jr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&zs(e[n],t))return n}return-1},jr.sortedLastIndex=function(e,t){return ni(e,t,!0)},jr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},jr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(zs(e[r],t))return r}return-1},jr.startCase=Ka,jr.startsWith=function(e,t,r){return e=wa(e),r=null==r?0:sn(ga(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},jr.subtract=Eu,jr.sum=function(e){return e&&e.length?Bt(e,iu):0},jr.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},jr.template=function(e,t,r){var n=jr.templateSettings;r&&yo(e,t,r)&&(t=i),e=wa(e),t=_a({},t,n,Yi);var o,s,a=_a({},t.imports,n.imports,Yi),u=xa(a),l=Vt(a,u),c=0,d=t.interpolate||we,f="__p += '",h=Ee((t.escape||we).source+"|"+d.source+"|"+(d===J?de:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(h,(function(t,r,n,i,a,u){return n||(n=i),f+=e.slice(c,u).replace(be,Jt),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(H,"$1").replace(V,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return _e(u,p+"return "+f).apply(i,l)}));if(m.source=f,Js(m))throw m;return m},jr.times=function(e,t){if((e=ga(e))<1||e>d)return[];var r=h,n=vr(e,h);t=so(t),e-=h;for(var i=zt(n,t);++r<e;)t(r);return i},jr.toFinite=pa,jr.toInteger=ga,jr.toLength=ma,jr.toLower=function(e){return wa(e).toLowerCase()},jr.toNumber=va,jr.toSafeInteger=function(e){return e?sn(ga(e),-9007199254740991,d):0===e?e:0},jr.toString=wa,jr.toUpper=function(e){return wa(e).toUpperCase()},jr.trim=function(e,t,r){if((e=wa(e))&&(r||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var n=or(e),o=or(t);return wi(n,Gt(n,o),qt(n,o)+1).join("")},jr.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===i))return e.slice(0,sr(e)+1);if(!e||!(t=ai(t)))return e;var n=or(e);return wi(n,0,qt(n,or(t))+1).join("")},jr.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=or(e);return wi(n,Gt(n,or(t))).join("")},jr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ga(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=wa(e)).length;if(Qt(e)){var a=or(e);s=a.length}if(r>=s)return e;var u=r-ir(n);if(u<1)return n;var l=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+n;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=Ee(o.source,wa(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===i?u:f)}}else if(e.indexOf(ai(o),u)!=u){var h=l.lastIndexOf(o);h>-1&&(l=l.slice(0,h))}return l+n},jr.unescape=function(e){return(e=wa(e))&&q.test(e)?e.replace($,ar):e},jr.uniqueId=function(e){var t=++De;return wa(e)+t},jr.upperCase=Ya,jr.upperFirst=Ja,jr.each=ws,jr.eachRight=bs,jr.first=qo,uu(jr,(yu={},wn(jr,(function(e,t){Ne.call(jr.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jr.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jr[e].placeholder=jr})),wt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:mr(ga(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,h),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),wt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(iu)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return On(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ws(so(e)))},Ur.prototype.slice=function(e,t){e=ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(h)},wn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=jr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(jr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Ur,l=a[0],c=u||$s(t),d=function(e){var t=o.apply(jr,kt([e],a));return n&&f?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=s&&!f,g=u&&!h;if(!s&&c){t=g?t:new Ur(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[d],thisArg:i}),new zr(m,f)}return p&&g?e.apply(this,a):(m=this.thru(d),p?n?m.value()[0]:m.value():m)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);jr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply($s(i)?i:[],e)}return this[r]((function(r){return t.apply($s(r)?r:[],e)}))}})),wn(Ur.prototype,(function(e,t){var r=jr[t];if(r){var n=r.name+"";Ne.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[ji(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=$s(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=mr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=n?a:s-1,c=this.__iteratees__,d=c.length,f=0,h=vr(u,this.__takeCount__);if(!r||!n&&i==u&&h==u)return fi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var g=-1,m=e[l+=t];++g<d;){var v=c[g],y=v.iteratee,w=v.type,b=y(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}p[f++]=m}return p},jr.prototype.at=gs,jr.prototype.chain=function(){return hs(this)},jr.prototype.commit=function(){return new zr(this.value(),this.__chain__)},jr.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},jr.prototype.plant=function(e){for(var t,r=this;r instanceof Br;){var n=Bo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},jr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:i}),new zr(t,this.__chain__)}return this.thru(ts)},jr.prototype.toJSON=jr.prototype.valueOf=jr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},jr.prototype.first=jr.prototype.head,st&&(jr.prototype[st]=function(){return this}),jr}();ot._=ur,(n=function(){return ur}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},88306:(e,t,r)=>{var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},7771:(e,t,r)=>{var n=r(55639);e.exports=function(){return n.Date.now()}},78718:(e,t,r)=>{var n=r(25970),i=r(99021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=i},36968:(e,t,r)=>{var n=r(10611);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,r)=>{var n=r(23279),i=r(13218);e.exports=function(e,t,r){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,r)=>{var n=r(27561),i=r(13218),o=r(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||u.test(e)?l(e.slice(2),r?2:8):s.test(e)?NaN:+e}},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},79684:function(e,t,r){"use strict";var n,i,o,s,a,u,l,c,d,f,h,p,g,m,v,y=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},w=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const S=b(r(62043)),_=r(63250),C=b(r(2518)),L=b(r(9381)),E=b(r(84795)),k=r(44137),A=r(87406),T=r(87406);class O{constructor(){n.set(this,12e4),i.set(this,null),o.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(y(this,i,"f")),C.default.system.debug("FinsembleDesktopAgent: heartbeat received"),w(this,i,setTimeout((()=>{C.default.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${y(this,n,"f")} milliseconds`),this.notifyDisconnect()}),y(this,n,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),y(this,o,"f").forEach((e=>{e(`No heartbeat received from interop service within ${y(this,n,"f")} milliseconds`)}))}onDisconnect(e){w(this,o,y(this,o,"f").concat(e),"f")}stop(){clearTimeout(y(this,i,"f"))}}n=new WeakMap,i=new WeakMap,o=new WeakMap;class R{constructor(e,t,r="app"){s.set(this,void 0),w(this,s,e,"f"),this.id=t,this.type=r}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");y(this,s,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return y(this,s,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return y(this,s,"f").channelAddContextListener(this.id,e,t)}}s=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){if(a.set(this,!1),u.set(this,new O),l.set(this,!1),c.set(this,""),d.set(this,`FSBL.FDC3.Client.${(0,S.default)()}`),f.set(this,{}),h.set(this,{}),p.set(this,[]),g.set(this,void 0),m.set(this,void 0),v.set(this,""),w(this,g,e,"f"),w(this,m,t,"f"),this.cacheFSBLVersion(),k.Globals.Event&&k.Globals.dispatchEvent){const e=new Event("fdc3Ready");k.Globals.dispatchEvent(e)}}async cacheFSBLVersion(){""==y(this,v,"f")&&w(this,v,"6.6.0","f");const{err:e,data:t}=await L.default.getValue({field:"finsemble.system.FSBLVersion"});e||w(this,v,t,"f")}fdc3Error(e){return new Error(e)}meta(){return{uuid:y(this,c,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){y(this,u,"f").registerHeartbeat()}triggerContextListeners(e){var t,r;const{context:n}=e.payload;let i;if(e.meta.targetSubscriberId){let t;Object.values(y(this,h,"f")).every((r=>(t=r.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),i=t?[t]:[]}else i=(null!==(t=y(this,h,"f")[null==n?void 0:n.type])&&void 0!==t?t:[]).concat(null!==(r=y(this,h,"f")["*"])&&void 0!==r?r:[]);i.forEach((({handler:t,channel:r})=>{e.meta.channel===r||!e.meta.channel&&!r?(C.default.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=r?r:"default"} channel`,e.type,e),t(n)):C.default.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=r?r:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:r}=e.payload,n=y(this,f,"f")[t];r&&(n||[]).forEach((e=>e(r)))}handleIncoming(e){switch(C.default.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=y(this,c,"f")),e};y(this,p,"f").forEach((async t=>{const{message:r,handler:n,resolve:i}=t,{err:o,receiveMessage:s}=await this.exchange(e(r),n);i({err:o,receiveMessage:s})})),w(this,p,[],"f")}exchange(e,t=(()=>{})){return new Promise((async r=>{if(y(this,a,"f")){const{err:n,response:i}=await y(this,g,"f").query(A.SERVER_CHANNEL,e,t);r({err:n,receiveMessage:null==i?void 0:i.data})}else y(this,p,"f").push({message:e,handler:t,resolve:r}),this.start()}))}async connect(){var e;const t=y(this,m,"f").getStartupData(),{windowName:r="Unknown window",authenticationToken:n}=t;C.default.system.log(`fdc3.connect StartupData for ${r}`,t),w(this,c,`fdc3-${null===(e=null==n?void 0:n.meta)||void 0===e?void 0:e.name}-${(0,S.default)()}`,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:y(this,d,"f"),windowName:r,authenticationToken:n}};E.default.waitForBootStage("kernel","stageCompleted",(e=>{e?C.default.system.error("connect error waitingForBootStage",e):y(this,g,"f").query(A.SERVER_CHANNEL,i,(e=>{e?C.default.system.error("connect error",e):(y(this,g,"f").addResponder(y(this,d,"f"),((e,t)=>{if(e||!t){const t=(0,T.errorAsString)(null!=e?e:"No request received on responder");C.default.system.error(`FinsembleDesktopAgent can't listen on channel ${y(this,d,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),w(this,a,!0,"f"),C.default.system.log(`FDC3 client connected for window ${r}`),this.releaseQueue(),y(this,u,"f").start())}))}))}async start(){y(this,l,"f")||(w(this,l,!0,"f"),await y(this,m,"f").onReady(),this.connect())}async stop(){y(this,u,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),w(this,l,!1,"f"),y(this,g,"f").removeResponder(y(this,d,"f")),w(this,a,!1,"f")}onDisconnect(e){y(this,u,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const r={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:n,receiveMessage:i}=await this.exchange(r);return n?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const r={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(r)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:r,receiveMessage:n}=await this.exchange(t);return r?[]:("systemChannels"===(null==n?void 0:n.type)?null===(e=null==n?void 0:n.payload)||void 0===e?void 0:e.channels:[]).map((e=>new R(this,e,"system")))}async open(e,t){if(!e)throw new Error("Invalid arguments. The required target parameter is missing.");const r={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.OpenError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error)}async findIntent(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.appIntent)throw this.fdc3Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:r}=await this.exchange(t),n=r;if(n.payload.error)throw this.fdc3Error(n.payload.error);return n.payload.intents||[]}async raiseIntent(e,t,r){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");const n={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:r}},{err:i,receiveMessage:o}=await this.exchange(n),s=o;if(i)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(s.payload.error)throw this.fdc3Error(s.payload.error);if(!s.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntent. No data.");return s.payload.data}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const r={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntentForContext. No data.");return o.payload.data}addIntentListener(e,t){if(!t)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required handler parameter is missing.");y(this,f,"f")[e]=(0,T.mmAdd)(y(this,f,"f"),e,t);const r={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(r),{unsubscribe:()=>{const r={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(r),y(this,f,"f")[e]=(0,T.mmRemove)(y(this,f,"f"),e,t)}}}channelAddContextListener(e,t,r){const n=r&&t||"*";r||(r=t);const i=`subscriberId.${Date.now()}_${Math.random()}`,o={handler:r,channel:e,targetSubscriberId:i};y(this,h,"f")[n]=(0,T.mmAdd)(y(this,h,"f"),n,o);let s={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:i}),payload:{contextType:n}};return e&&(s.meta.channel=e),this.exchange(s),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:n}};e&&(t.meta.channel=e),y(this,h,"f")[n]=(0,T.mmRemove)(y(this,h,"f"),n,o),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return this.channelAddContextListener(null,e,t)}async joinChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");return new R(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:r}=await this.exchange(e),n=r;if(t)throw this.fdc3Error(t);if(n.payload.error)throw this.fdc3Error(n.payload.error);if(!n.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return n.payload.data.map((e=>new R(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:y(this,v,"f")}}},a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,v=new WeakMap},87406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=(e,t,r)=>(e[t]||[]).concat([r]),t.concatNoDups=(e,t)=>{const r=Array.isArray(t)?t:[t],n=e?r.concat(e):r;return Array.from(new Set(n))},t.mmRemove=(e,t,r)=>(e[t]||[]).filter((e=>e!==r)),t.errorAsString=e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==r?r:null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.AnonymousAuthenticationToken={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}}},51806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=r(51848),o=r(47107),s=r(91374),a=r(10166),u=r(44137),l=r(79684),c=n(r(62043));t.FSBLService=class{async startApp(){var e,t,r,n,d,f,h,p;const g=await(0,o.getSystemStartupData)(),m=s.System.Window.getCurrent(),v=null!==(r=null!==(e=m.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==r?r:"Unknown App",y=null!==(f=null!==(n=m.name)&&void 0!==n?n:null===(d=null===document||void 0===document?void 0:document.location)||void 0===d?void 0:d.href)&&void 0!==f?f:`Unknown window-${(0,c.default)()}`,w=null!==(h=m.webContentsName)&&void 0!==h?h:y,b=null!==(p=(0,o.getManifestFromStartupData)(g))&&void 0!==p?p:{},S=(0,o.getRouterConfig)({windowName:y,systemManifest:b});await i.RouterController.start(S);const _=a.Startup.getInstance();_.setStartupData({windowName:y,webContentsName:w,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:v}}}),u.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.RouterClient,startup:_}),_.setReady()}async stopApp(){i.RouterController.stop()}}},47107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const n=r(2518),i=r(91374),o=r(64324),s={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},a=e=>{if(!e)return n.Logger.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=r&&o&&i;return n.Logger.system.debug(`Transport crossDomain=${a} (${r}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:r}=null==e?void 0:e.finsemble,{sameDomainTransport:n="SharedWorker",crossDomainTransport:i="IPCBus"}=null!=r?r:{};return a(t)?i:n},t.getRouterConfig=({windowName:e,systemManifest:r,transportSettings:i})=>r?((e,r)=>{var i,o,a;if(n.Logger.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const n=e.finsemble,s=null!==(a=null!==(o=null===(i=null==n?void 0:n.router)||void 0===i?void 0:i.transportSettings)&&void 0!==o?o:null==n?void 0:n.IAC)&&void 0!==a?a:{};return{windowName:r,routerDomainRoot:n.moduleRoot,transportName:(0,t.getRecommendedTransport)(e),transportSettings:s}}return n.Logger.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},s),{windowName:r})})(r,e):Object.assign(Object.assign({},s),{windowName:e,transportSettings:null!=i?i:{}}),t.getSystemStartupData=async()=>new Promise((e=>{i.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&o.ConfigUtilInstance.resolveManifestMacros(t,t.finsemble),t}},10166:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const i=r(87406),o=r(44137),s=n(r(62043)),a=r(7860),u=`Unknown window-${(0,s.default)()}`;class l{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.AnonymousAuthenticationToken,windowName:u,webContentsName:u}}static getInstance(){return l.instance?l.instance:l.instance=(0,a.singleton)("Startup",l)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),o.Globals.dispatchEvent&&o.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=l,l.instance=null},9381:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigClient=t.unsetPreference=t.getPreferences=t.setPreference=t.processAndSet=t.removeListeners=t.removeListener=t.addListeners=t.addListener=t.removeValues=t.removeValue=t.setValues=t.setValue=t.getValues=t.getValue=t.getManifest=void 0;const i=r(51848),o=n(r(84795)),s=n(r(2518)),a=r(7860);class u{constructor(){this.listeners={},this.subs={}}}const l=()=>(0,a.singleton)("ConfigClient",u),c=(e,t)=>{var r;(null!==(r=l().listeners[e])&&void 0!==r?r:[]).forEach((r=>{s.default.system.debug("ConfigClient.triggerListeners",e,t),r(null,{field:e,value:t})}))},d=(e,t)=>{if(e)s.default.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:r,value:n}=t.data;c(e||"configService",r||n)}},f=async e=>{const t=l();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,await o.default.waitForStartup("configService");const{err:r}=await i.RouterClient.query("configService.addListener",e);r&&s.default.system.error("Error adding listener to config service",r),await i.RouterClient.subscribe(e,d)}};t.getManifest=async e=>{await o.default.waitForStartup("configService");const{err:t,response:r}=await i.RouterClient.query("configService.getValues",{fields:null});return null==e||e(t,r.data),{err:t,data:r.data}},t.getValue=async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await o.default.waitForStartup("configService");const{err:r,response:n}=await i.RouterClient.query("configService.getValue",{field:e.field});return null==t||t(r,n.data),{err:r,data:n.data}},t.getValues=async(e,r)=>{if("function"==typeof e&&(r=e,e=null),e&&!Array.isArray(e))return(0,t.getValue)(e,r);await o.default.waitForStartup("configService");const{err:n,response:s}=await i.RouterClient.query("configService.getValues",{fields:e});return null==r||r(n,s.data),{err:n,data:s.data}},t.setValue=async(e,t)=>{const r={field:e.field,value:e.value};await o.default.waitForStartup("configService");const{err:n}=await i.RouterClient.query("configService.setValue",r);return null==t||t(n),{err:n}},t.setValues=async(e,t)=>{if(!e){const e="ConfigClient.SetValues. No params given";return s.default.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return s.default.system.error(e),null==t||t(e),{err:e}}await o.default.waitForStartup("configService");const{err:r}=await i.RouterClient.query("configService.setValues",e);return null==t||t(r),{err:r}},t.removeValue=async(e,r)=>{let n={};if("string"!=typeof e){const e="No field provided";return null==r||r(e),{err:e}}return n.field=e,n.value=null,await(0,t.setValue)(n,r)},t.removeValues=(e,r)=>new Promise((n=>{if(!Array.isArray(e)){const e="The passed in parameter must be an array";return null==r||r(e),n({err:e})}const i=e.map((e=>(0,t.removeValue)(e)));Promise.all(i).then((e=>{const t=e.some((e=>e.err))?"Some values couldn't be removed. Check central logger.":null;null==r||r(t),n({err:t})}))})),t.addListener=async(e,t,r)=>{var n;const i=l();let o=null;"function"==typeof e&&(t=e,e={field:null}),({field:o}=e);const s="configService"+(o?`.${o}`:"");i.listeners[s]=[t].concat(null!==(n=i.listeners[s])&&void 0!==n?n:[]),f(s),null==r||r()},t.addListeners=(e,r,n)=>{var i;const o=l();if(!Array.isArray(e))return s.default.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),(0,t.addListener)(e,r,n);const a="function"==typeof r?r:null;for(let t=0;t<e.length;t++){const r=e[t],n="string"==typeof r?r:r.field,s="string"!=typeof r?r.listener:a;if(s){const e="configService"+(n?`.${n}`:"");o.listeners[e]=[s].concat(null!==(i=o.listeners[e])&&void 0!==i?i:[]),f(e)}}null==n||n()},t.removeListener=(e,t,r)=>{const n=l();let i=null;"function"==typeof e&&(r=t,t=e,e={field:i}),({field:i}=e);const o="configService"+(i?`.${i}`:"");if(n.listeners[o])for(let e=0;e<n.listeners[o].length;e++)if(n.listeners[o][e]===t)return n.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)},t.removeListeners=(e,r,n)=>{const i=l();if(!Array.isArray(e))return"function"==typeof e?(0,t.removeListener)({},e,n):e.field&&r&&(0,t.removeListener)(e,r,n),null==n?void 0:n(null,!0);const o="function"==typeof r?r:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:o,n="configService"+(t?`.${t}`:"");i.listeners[n]=i.listeners[n].filter((e=>e!==r))})),null==n||n(null,!0)},t.processAndSet=async(e,t)=>{if(s.default.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return s.default.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await o.default.waitForStartup("configService");const{err:r,response:n}=await i.RouterClient.query("configService.processAndSet",e);return null==t||t(r,n),{err:r,data:n.data}}},t.setPreference=async(e,t)=>{const{err:r,response:n}=await i.RouterClient.query("PreferencesService.setPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},t.getPreferences=async e=>{await o.default.waitForStartup("preferencesService");const{err:t,response:r}=await i.RouterClient.query("PreferencesService.getPreferences",{});return s.default.system.debug("PreferencesService.getPreferences response",r),null==e||e(t,r.data),{err:t,data:r.data}},t.unsetPreference=async(e,t)=>{s.default.system.debug("ConfigClient.unsetPreference",e);const{err:r,response:n}=await i.RouterClient.query("PreferencesService.unsetPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},t.ConfigClient={initialize(){s.default.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{s.default.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){s.default.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),c(e,t)},handleChanges(e,t){s.default.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),d(e,t)},async changeSub(e){s.default.deprecated("Calling ConfigClient.changeSub() directly is not legal."),f(e)},addListener:t.addListener,addListeners:t.addListeners,getManifest:t.getManifest,getPreferences:t.getPreferences,getValue:t.getValue,getValues:t.getValues,processAndSet:t.processAndSet,removeListener:t.removeListener,removeListeners:t.removeListeners,removeValue:t.removeValue,removeValues:t.removeValues,setPreference:t.setPreference,setValue:t.setValue,setValues:t.setValues,unsetPreference:t.unsetPreference},t.default=t.ConfigClient},80752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotkeyClient=t.onClose=t.removeAllHotkeys=t.removeGlobalHotkey=t.addGlobalHotkey=t.removeLocalHotkey=t.addLocalHotkey=t.addBrowserHotkey=void 0;const n=r(2518),i=r(51848),o=r(10166),s=r(7860),a=r(17187),u={backspace:"Backspace",bs:"Backspace",bksp:"Backspace",tab:"Tab",escape:"Escape",esc:"Escape",clear:"Clear",enter:"Enter",return:"Enter",shift:"Shift",shft:"Shift",lshift:"Shift",lshft:"Shift","left shift":"Shift",leftshift:"Shift",rshift:"Shift",rshft:"Shift","right shift":"Shift",rightshift:"Shift",control:"Control",ctrl:"Control",commandorcontrol:"CommandOrControl",alt:"Alt",alternate:"Alt",pause:"Pause","caps lock":"Capslock",capslock:"Capslock",spacebar:"Space",space:"Space","space bar":"Space","page up":"PageUp",pgup:"PageUp","pg up":"PageUp","page down":"PageDown",pgdn:"PageDown","pg dn":"PageDown",pgdown:"PageDown",end:"End",home:"Home","left arrow":"Left",left:"Left","up arrow":"Up",up:"Up","right arrow":"Right",right:"Right","down arrow":"Down",down:"Down",select:"Select",slct:"Select",print:"PrintScreen",prnt:"PrintScreen",execute:"Execute","print screen":"PrintScreen",printscreen:"PrintScreen","print scrn":"PrintScreen",printscrn:"PrintScreen","prnt scrn":"PrintScreen",prntscrn:"PrintScreen","prt scrn":"PrintScreen",prtscrn:"PrintScreen","prt scn":"PrintScreen",prtscn:"PrintScreen","prt scr":"PrintScreen",prtscr:"PrintScreen","prt sc":"PrintScreen",prtsc:"PrintScreen","pr sc":"PrintScreen",prsc:"PrintScreen",insert:"Insert",ins:"Insert",delete:"Delete",del:"Delete",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",a:"A",b:"B",c:"C",d:"D",e:"E",f:"F",g:"G",h:"H",i:"I",j:"J",k:"K",l:"L",m:"M",n:"N",o:"O",p:"P",q:"Q",r:"R",s:"S",t:"T",u:"U",v:"V",w:"W",x:"X",y:"Y",z:"Z",windows:"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9",f1:"F1",fn1:"F1","function 1":"F1",f2:"F2",fn2:"F2","function 2":"F2",f3:"F3",fn3:"F3","function 3":"F3",f4:"F4",fn4:"F4","function 4":"F4",f5:"F5",fn5:"F5","function 5":"F5",f6:"F6",fn6:"F6","function 6":"F6",f7:"F7",fn7:"F7","function 7":"F7",f8:"F8",fn8:"F8","function 8":"F8",f9:"F9",fn9:"F9","function 9":"F9",f10:"F10",fn10:"F10","function 10":"F10",f11:"F11",fn11:"F11","function 11":"F11",f12:"F12",fn12:"F12","function 12":"F12",f13:"F13",fn:"F13","function 13":"F13",f14:"F14",fn14:"F14","function 14":"F14",f15:"F15",fn15:"F15","function 15":"F15",f16:"F16",fn16:"F16","function 16":"F16","num lock":"Numlock",numlock:"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock",sclk:"Scrolllock",scrlk:"Scrolllock",slk:"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",",_:"-",".":".","`":"`","[":"[","]":"]","'":"'"},l=e=>{const t=[];return e.keys.forEach((e=>{if("string"!=typeof e)return n.Logger.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=u[e];if(!r)return n.Logger.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);t.push(r)})),t};class c{constructor(){this.keyStrokeHandlers=[],this.key=null,this.shift=!1,this.ctrl=!1,this.alt=!1,this.cmd=!1,this.capsLock=!1,this.noKeyCapture=!1,this.downValue=null}registerKeyHandler(e){this.keyStrokeHandlers.push(e)}unregisterKeyHandler(e){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((t=>t.keyString!==e.keyString||t.handler!==e.handler))}unregisterAllUsersKeyHandlers(){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((e=>!0!==e.addedByUser))}keyup(e){switch(e.key){case"Shift":return this.shift=!1,void this.gotKeyStroke(e.key);case"Control":case"Alt":return this.ctrl=!1,void this.gotKeyStroke(e.key);case"Meta":case"Win":return this.cmd=!1,void this.gotKeyStroke(e.key)}this.key&&this.gotKeyStroke(this.key)}keydown(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.gotKeyStroke(e.key)}}keypress(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)}gotKeyStroke(e){const t=[e];this.ctrl&&t.push("control"),this.shift&&t.push("shift"),this.alt&&t.push("alt"),this.cmd&&t.push("command");const r=t.sort().toString();this.keyStrokeHandlers.forEach((e=>{const t=e.keyString.toUpperCase(),n=r.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))}initialize(){document.addEventListener("keyup",(e=>{this.keyup(e)})),document.addEventListener("keydown",(e=>{this.downValue=e.key,this.keydown(e)})),document.addEventListener("keypress",(e=>{this.keypress(e)})),window.addEventListener("blur",(()=>{this.ctrl=!1,this.gotKeyStroke("Control")}))}}class d{constructor(){this.localListeners={},this.keyStrokes=null,this.eventEmitter=new a.EventEmitter,this.initialize()}async initialize(){const{windowName:e}=await o.Startup.getInstance().getStartupData();i.RouterClient.addListener("HotkeyTriggered",((t,r)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):(null==r?void 0:r.data.windows.includes(e))&&this.eventEmitter.emit(r.data.keys)}))}}const f=()=>(0,s.singleton)("HotkeyClient",d);t.addBrowserHotkey=(e,t,r)=>{const n=f();n.keyStrokes||(n.keyStrokes=new c,n.keyStrokes.initialize());const i=l({keys:e}).sort().toString();n.keyStrokes.registerKeyHandler({keyString:i,handler:t,addedByUser:r})},t.addLocalHotkey=async(e,r,i)=>(n.Logger.system.info("HotkeyClient.addLocalHotkey"),n.Logger.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e),(0,t.addBrowserHotkey)(e,r,!0),null==i||i(null),{err:null}),t.removeLocalHotkey=async(e,t,r)=>(n.Logger.system.info("HotkeyClient.removeLocalHotkey"),n.Logger.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e),((e,t)=>{var r;const i=f();n.Logger.system.info("HotkeyClient.removeBrowserHotkey"),n.Logger.system.debug("HotkeyClient.removeBrowserHotkey, keyArr: ",e);const o=l({keys:e}).sort().toString();null===(r=i.keyStrokes)||void 0===r||r.unregisterKeyHandler({keyString:o,handler:t})})(e,t),null==r||r(null),{err:null}),t.addGlobalHotkey=async(e,t,r)=>{const s=f();n.Logger.system.info("HotkeyClient.addGlobalHotkey"),n.Logger.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const a=l({keys:e}).sort().join("+");s.eventEmitter.addListener(a,t);const{windowName:u}=await o.Startup.getInstance().getStartupData(),{err:c}=await i.RouterClient.query("hotkeysService.registerGlobalHotkey",{keys:a,windowName:u});return null==r||r(c),{err:c}},t.removeGlobalHotkey=async(e,t,r)=>{const s=f();n.Logger.system.info("HotkeyClient.removeGlobalHotkey"),n.Logger.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const a=l({keys:e}).sort().join("+");s.eventEmitter.removeListener(a,t);const{windowName:u}=await o.Startup.getInstance().getStartupData(),{err:c}=await i.RouterClient.query("hotkeysService.unregisterGlobalHotkey",{keys:a,windowName:u});return null==r||r(c),{err:c}},t.removeAllHotkeys=async e=>{var t;const r=f();r.eventEmitter.removeAllListeners();const{windowName:n}=await o.Startup.getInstance().getStartupData(),{err:s}=await i.RouterClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:n});return null===(t=r.keyStrokes)||void 0===t||t.unregisterAllUsersKeyHandlers(),null==e||e(s),{err:s}},t.onClose=e=>{(0,t.removeAllHotkeys)(e)},t.HotkeyClient={initialize:()=>{n.Logger.system.deprecated("It is no longer necessary to call HotkeyClient.initialize()")},onReady:e=>{n.Logger.system.deprecated("It is no longer necessary to call HotkeyClient.onReady()"),null==e||e()},onClose:t.onClose,addGlobalHotkey:t.addGlobalHotkey,removeAllHotkeys:t.removeAllHotkeys,removeGlobalHotkey:t.removeGlobalHotkey,addLocalHotkey:t.addLocalHotkey,removeLocalHotkey:t.removeLocalHotkey,addBrowserHotkey:t.addBrowserHotkey},t.default=t.HotkeyClient},2518:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerClient=t.LocalLogger=t.deprecated=t.verbose=t.debug=t.log=t.info=t.warn=t.error=t.LoggerConnection=void 0;const i=r(91374),o=r(10166),s=r(31219),a=n(r(51848)),u=n(r(9381)),l=r(7860),c=n(r(23493)),d=r(96486),f=r(44137),h={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let p=5e4;const g=`NOTE: LOG ARG STRIPPED since greater than ${p/1e3}KB. Check origin's local Console to see output of the complete object.`,m={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:h,system:h,perf:h},v=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const r=("\n",n=t,e.split("\n",n).join("\n").length);var n;return`Log Stack: \n${e.substring(r).substr(1)}`},y=e=>{const t=[],r=[e];let n=0,i=0;for(;r.length&&i<1e3;){i++;const e=r.pop();if("boolean"==typeof e)n+=4;else if("string"==typeof e)n+=2*e.length;else if("number"==typeof e)n+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)r.push(e[t])}}return n},w=(e,t,r=0,n=1)=>{const i=t/2,o=i/2,s="*STRIPPED*",a=e=>{let t=y(e);e.length>0&&t>o&&(e[0]=w(e[0],i,r,n+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let u=(0,d.cloneDeep)(e);if("object"!=typeof u)u=s,r+=y(u);else if(Array.isArray(u))a(u),r+=y(u);else{let e=Object.getOwnPropertyNames(u);for(let l=0;l<e.length;l++){let c=y(u[e[l]]);r>i&&c>100&&n>=3&&l>=1||r>p&&c>=10?u[e[l]]=s:c>o&&(Array.isArray(u[e[l]])?a(u[e[l]]):u[e[l]]=w(u[e[l]],t/1.2,r,n+1)),r+=y(u[e[l]])}}return u},b=e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e,S=console.error.bind(f.Globals.console);console.standardError=console.error;class _{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=i.System.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=m,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:250;this.transmitAndClearQueue=(0,c.default)((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:r,calibratedTimeStampOffset:n}=this;this.system.debug("Logger updateQueueBasedOnState",e,n,"QUEUE LENGTH",t.length,r),this.loggerQueue=t.flatMap((t=>{if(r[t.category][t.logType]){if(!r[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+n),[t];console.log(t.category,t.logType,t.logTimestamp-s.Performance.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,r=0;for(;e=t.shift();)console.log("Message "+r++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return v()}setting(){return this.currentLogState}outputToConsole(e,t){const r={Debug:console.debug,Info:console.info,Warn:console.warn,Error:S,Log:console.log,Verbose:console.log};try{r[e](...t)}catch(e){S("Error outputting log to console",e,v())}}formatAndQueueMessage(e,t,r){var n;const o="forceObjectsToLogger"===r[0],a=r.flatMap((e=>{const t=y(e);if(!o&&t>p){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${p/1e3}KB`,`Approx message size: ${t/1e3}KB`,...r]),this.skipLargeObjects)return[`Log argument greater than ${p/1e3}KB. Check local Console to see output of the object.`];{let t=w(e,p);return[g,`OldSize=${y(e)} NewSize=${y(t)}`,t]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let u=null;try{u=JSON.stringify(a)}catch(e){u=`*** Logger error can't JSON.stringify: ${v()}`}"Error"!==t&&"Warn"!==t&&"console"!==e||this.outputToConsole(t,r);const l=null!==(n=this.viewId)&&void 0!==n?n:i.System.isBrowserView()&&i.System.getWebContentsId(),c={category:"console"===e?"system":e,logType:t,logClientName:l?`${this.loggerClientName}: view-${l}`:this.loggerClientName,logData:u,logTimestamp:s.Performance.timing.navigationStart+s.Performance.now()+this.calibratedTimeStampOffset};l&&(c.viewId=l),this.addToQueue(c),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,r){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||r.push(v()),this.currentLogState[e].LocalOnly){const n=t.toLowerCase();r.unshift(`${e} ${n} (${s.Performance.now()}):`),this.outputToConsole(t,r)}else this.formatAndQueueMessage(e,t,r)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){u.default.getValue({field:"finsemble.servicesConfig.logger"},((e,t)=>{var r,n;e||(this.skipLargeObjects=null!==(r=null==t?void 0:t.skipLargeObjects)&&void 0!==r?r:this.skipLargeObjects,p=null!==(n=null==t?void 0:t.maxLogMessageSize)&&void 0!==n?n:p)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:r}=o.Startup.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const n=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&i.System.isBrowserView()&&(this.viewId=i.System.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),i.System.Window.getCurrent().getOptions((async e=>{var i,o;const s=null===(o=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:u}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:n,displayName:null!=r?r:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(u.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(n,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var r;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const n=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(r=this.routerClient)||void 0===r||r.query("logger.service.unregister",n,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,r)=>{var n,i;"ready"===r.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(n=this.routerClient)||void 0===n||n.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(i=this.routerClient)||void 0===i||i.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:a.default,this.startupTime=performance.now(),"routerService"===f.Globals.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();i.System.isBrowserView()&&f.Globals.addEventListener&&f.Globals.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}t.LoggerConnection=_,t.error=(...e)=>(0,l.singleton)("LoggerClient",_).error(...e),t.warn=(...e)=>(0,l.singleton)("LoggerClient",_).warn(...e),t.info=(...e)=>(0,l.singleton)("LoggerClient",_).info(...e),t.log=(...e)=>(0,l.singleton)("LoggerClient",_).log(...e),t.debug=(...e)=>(0,l.singleton)("LoggerClient",_).debug(...e),t.verbose=(...e)=>(0,l.singleton)("LoggerClient",_).verbose(...e),t.deprecated=(...e)=>(0,l.singleton)("LoggerClient",_).deprecated(...e);const C={error:t.error,warn:t.warn,info:t.info,log:t.log,debug:t.debug,verbose:t.verbose,deprecated:t.deprecated,start:e=>{(0,l.singleton)("LoggerClient",_).start(e)},channelFilter:e=>b(e),setting:()=>(0,l.singleton)("LoggerClient",_).setting(),callStack:()=>(0,l.singleton)("LoggerClient",_).callStack(),unregisterClient:(e,t)=>{(0,l.singleton)("LoggerClient",_).unregisterClient(e,t)},setRouterClient:e=>{(0,l.singleton)("LoggerClient",_).setRouterClient(e)},onStateChanged(e){(0,l.singleton)("LoggerClient",_).onStateChanged(e)},system:{error:(...e)=>(0,l.singleton)("LoggerClient",_).system.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).system.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).system.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).system.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).system.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).system.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).system.deprecated(...e)},perf:{error:(...e)=>(0,l.singleton)("LoggerClient",_).perf.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).perf.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).perf.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).perf.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).perf.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).perf.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).perf.deprecated(...e)},console:{error:(...e)=>(0,l.singleton)("LoggerClient",_).console.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).console.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).console.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).console.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).console.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).console.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).console.deprecated(...e)}};i.System.isBrowserView()?C.console.log("Logger client console.error is not wrapped to capture logs."):(C.console.log("Logger client console.error is wrapped to capture logs."),console.error=function(...e){let t;e.push("(console error)");try{t=JSON.parse(JSON.stringify(e))}catch(r){t="console.error: arguments could not be serialized for logging",e.push("arguments could not be serialized to send to Central Logger"),S(...e)}C.console.error(...t)}),f.Globals.addEventListener&&f.Globals.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?C.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(C.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),console.warn("Event Details (for above message)",e))}),!0),f.Globals.addEventListener&&f.Globals.addEventListener("unhandledrejection",(e=>{C.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),t.LocalLogger={start:()=>{},channelFilter:b,setting:()=>m,callStack:()=>v(),unregisterClient:()=>{},setRouterClient:()=>{},onStateChanged:()=>{},warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error,system:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},perf:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},console:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error}};const L="undefined"==typeof window;t.LoggerClient=L?t.LocalLogger:C,t.Logger=t.LoggerClient,t.default=t.LoggerClient},51848:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClient=t.calibrateTimeWithRouterService=t.disconnectAll=t.trustedMessage=t.unsubscribe=t.publish=t.subscribe=t.removePubSubResponder=t.addPubSubResponder=t.removeResponder=t.query=t.addResponder=t.removeListener=t.transmit=t.addListener=t.onReady=t.RouterController=t.RouterConnection=void 0;const i=n(r(87132)),o=r(44343),s=r(2518),a=r(44137),u=r(31219),l=r(7860),c=n(r(62043));function d(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?d(e[r],null):t[r];return t}class f{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(s.LoggerClient.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:r}=e.header,n=this.mapListeners[t]||[];Array.isArray(n)&&0!==n.length?(e.originatedHere=()=>this.originatedHere(e),n.forEach((n=>{s.LoggerClient.channelFilter(t)||s.LoggerClient.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",r,"MESSAGE",e),n(null,e)}))):s.LoggerClient.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${r}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:r,queryID:n,error:i}=e.header;s.LoggerClient.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",r,"QUERY MESSAGE",e);const o=(e,r)=>{s.LoggerClient.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",r,"QUERY ID",n);let i={header:{origin:this.clientName,queryID:n,type:"queryResponse"},data:r};i.header.error=e?e.toString():null,this.sendToRouterService(i)},a=this.mapQueryResponders[t];void 0===a?e.header.logWhenNoResponder&&s.LoggerClient.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${r}.`,e):i?(s.LoggerClient.system.warn("RouterClient: queryResponder error",e),a(i),delete this.mapQueryResponders[t]):a(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;s.LoggerClient.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:r}=e.header,n=this.mapQueryResponseTimeOut[r];delete this.mapQueryResponseTimeOut[r],n&&clearTimeout(n);const i=this.mapQueryResponses[r];i?(delete this.mapQueryResponses[r],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):s.LoggerClient.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:r}=e.header,n=this.mapSubscribersID[t];n?r?(s.LoggerClient.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(r,e)):(e.originatedHere=()=>this.originatedHere(e),s.LoggerClient.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(null,e)):s.LoggerClient.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let r=this.findResponder(t);if(r){const n=(e,r,n)=>{var i;r?s.LoggerClient.system.warn("RouterClient: incoming publish rejected by pubsub responder",r,n):(this.mapPubSubResponderState[t]=n,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{s.LoggerClient.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",n);const r={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:n};this.sendToRouterService(r)})))};if(s.LoggerClient.system.info("RouterClient: incoming PubSub publish "+(r.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),r.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,r)=>{n(e,t,r)}});r.publishCallback(null,t)}else n(e,null,e.data)}else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:r,error:n}=e.header;s.LoggerClient.system.info("RouterClient: PubSub subscribe","TOPIC",r);let i=this.mapPubSubResponders[r];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(r)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[r]=null!==(t=this.mapPubSubResponderState[r])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(n)s.LoggerClient.system.warn(`RouterClient: pubsub error received from router service: ${n}`,e);else if(i.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,r)=>{this.sendNotifyToSubscriber(e,t,r)}});e.data=this.mapPubSubResponderState[r],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[r]);else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:r}=e.header;let n=this.findResponder(t);if(!n)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){n=this.mapPubSubResponders[e];break}if(n)if(s.LoggerClient.system.info("RouterClient: incoming unsubscribe "+(n.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),n.unsubscribeCallback){const i=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,r)}});n.unsubscribeCallback(null,i)}else this.removeSubscribers(t,r);else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,r){const{topic:n,subscribeID:i}=e.header;if(void 0!==r){let e={header:{origin:this.clientName,type:"notify",topic:n,subscribeID:i},data:r};t&&(e.header.error=t),this.sendToRouterService(e)}t?s.LoggerClient.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",n,"MESSAGE",this):(n in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[n].push(i):this.pubsubListOfSubscribers[n]=[i],s.LoggerClient.system.info("RouterClient: incoming subscription added","TOPIC",n,"MESSAGE"))}removeSubscribers(e,t){let r=!1;if(e in this.pubsubListOfSubscribers){const n=this.pubsubListOfSubscribers[e];for(let i=0;i<n.length;i++)if(t===n[i]){n.splice(i,1),0===n.length&&delete this.pubsubListOfSubscribers[e],r=!0,s.LoggerClient.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}r||s.LoggerClient.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(s.LoggerClient.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,r){s.LoggerClient.system.debug(`Name of transport to establish: ${t}`);let n=null,a=0,u=!1,l=0,c=null;const d=()=>{s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a);const t={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(t),a++>50&&(()=>{if(clearInterval(n),l++,l<=3)s.LoggerClient.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",l,e),null==c||c();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";s.LoggerClient.console.error(t,e),(0,o.toast)("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},f=()=>{if(!u){s.LoggerClient.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),u=!0,clearInterval(n);for(let e=0;e<this.queue.length;e++){s.LoggerClient.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==r||r()}},h=e=>{a=0,s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=f,d(),n=setInterval(d,200)};c=()=>{s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),i.default.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(h).catch((e=>{s.LoggerClient.console.error("RouterClient getTransport error",e)}))},c()}addPubSubResponderCallBack(e,t,r,n){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,s.LoggerClient.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:r,unsubscribeCallback:n},!0)}calibrateTimeWithRouterService(e){let t=0,r=0,n=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:o}=t;let a=0;for(let e=1;e<5;e++){const t=i[e-1],u=i[e]-t,l=o[e-1]-(t+u/2);u<n&&(n=u,r=l),a+=l,s.LoggerClient.system.debug("calibrationCalculation Intermediate Values","lastRRT",u,"lastOffset",l,"fastestOffset",r,"fastestRRT",n)}a/=4,s.LoggerClient.system.debug("RouterClient calibrationCalculation","Average Offset",a,"Chosen FastestOffset",r,t),e(r)})(i);else{i.clientBaseTime.push(u.Performance.timing.navigationStart+u.Performance.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return s.LoggerClient.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${(0,c.default)()}`;const r=`"RouterClient Check: connecting new client for ${this.clientName}`;s.LoggerClient.system.debug(r),console.debug(r),i.default.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){s.LoggerClient.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),i.default.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const r=()=>{e&&e(),t()};this.isRouterReady?r():this.parentReadyCallbackQueue.push(r)}))}addListener(e,t){s.LoggerClient.system.info("RouterClient.addListener","CHANNEL",e);const r=this.mapListeners[e];if(r&&0!==r.length)r.some((e=>t===e))?s.LoggerClient.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):r.push(t);else{this.mapListeners[e]=[t];const r={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(r)}return()=>{this.removeListener(e,t)}}transmit(e,t,r){s.LoggerClient.channelFilter(e)||s.LoggerClient.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const n={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:r};this.sendToRouterService(n)}removeListener(e,t){if(s.LoggerClient.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return s.LoggerClient.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(s.LoggerClient.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const r=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;s.LoggerClient.system.warn(r),t(r)}else{this.mapQueryResponders[e]=t;const r={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(r)}}query(e,t,r,n){var i,o;const l=`${this.clientName}.${(0,c.default)()}.${e}`,d=u.Performance.timing.navigationStart+u.Performance.now(),f=u.Performance.timing.navigationStart,h=u.Performance.now();s.LoggerClient.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",r,"QUERY ID",l,{timestamp:d,navstart:f,timenow:h});const p=null!=n?n:"function"==typeof r?r:null,g=null!==(i=null==r?void 0:r.timeout)&&void 0!==i?i:2e4,m=null===(o=null==r?void 0:r.logWhenNoResponder)||void 0===o||o;return new Promise((r=>{this.mapQueryResponses[l]=(e,t)=>{null==p||p(e,t),r({err:e,response:t})},!a.Globals.runningInFSBLUnitTest&&g>0&&(this.mapQueryResponseTimeOut[l]=setTimeout((()=>{s.LoggerClient.system.warn(`RouterClient: timeout after ${g} ms waiting on query response on channel ${e} for queryID ${l}`),delete this.mapQueryResponseTimeOut[l]}),g));const n={header:{origin:this.clientName,type:"query",queryID:l,channel:e,logWhenNoResponder:m},data:t};this.sendToRouterService(n)}))}removeResponder(e){if(s.LoggerClient.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,r,n){let i,o;if(s.LoggerClient.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",r),void 0===(r=r||{}).subscribeCallback&&void 0===r.publishCallback&&void 0===r.unsubscribeCallback){t=t||{};const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(r),o="success"}else if(this.addPubSubResponderCallBack(e,r.subscribeCallback,r.publishCallback,r.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=d(t);const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(r),o="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,s.LoggerClient.system.error(i);n&&n(i,o)}removePubSubResponder(e){s.LoggerClient.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const r={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(r)}else s.LoggerClient.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){s.LoggerClient.system.info("RouterClient.subscribe","TOPIC",e);const r=`${this.clientName}.${(0,c.default)()}`;this.mapSubscribersID[r]=t,this.mapSubscribersTopic[r]=e;const n={header:{origin:this.clientName,type:"subscribe",subscribeID:r,topic:e}};return this.sendToRouterService(n),{subscribeID:r,topic:e}}publish(e,t){s.LoggerClient.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const r={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(r)}unsubscribe(e){s.LoggerClient.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const r={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(r)}else s.LoggerClient.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){let t=!1;return s.LoggerClient.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t}disconnectAll(){s.LoggerClient.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}t.RouterConnection=f,t.RouterController={start:e=>{const t=(0,l.singleton)("RouterClient",f);return s.LoggerClient.setRouterClient(t),t.start(e)},stop:()=>{(0,l.singleton)("RouterClient",f).stop()},calibrateTimeWithRouterService(e){(0,l.singleton)("RouterClient",f).calibrateTimeWithRouterService(e)}},t.onReady=e=>(0,l.singleton)("RouterClient",f).onReady(e),t.addListener=(e,t)=>(0,l.singleton)("RouterClient",f).addListener(e,t),t.transmit=(e,t,r)=>{(0,l.singleton)("RouterClient",f).transmit(e,t,r)},t.removeListener=(e,t)=>{(0,l.singleton)("RouterClient",f).removeListener(e,t)},t.addResponder=(e,t)=>{(0,l.singleton)("RouterClient",f).addResponder(e,t)},t.query=(e,t,r,n)=>(0,l.singleton)("RouterClient",f).query(e,t,r,n),t.removeResponder=e=>{(0,l.singleton)("RouterClient",f).removeResponder(e)},t.addPubSubResponder=(e,t,r,n)=>{(0,l.singleton)("RouterClient",f).addPubSubResponder(e,t,r,n)},t.removePubSubResponder=e=>{(0,l.singleton)("RouterClient",f).removePubSubResponder(e)},t.subscribe=(e,t)=>(0,l.singleton)("RouterClient",f).subscribe(e,t),t.publish=(e,t)=>{(0,l.singleton)("RouterClient",f).publish(e,t)},t.unsubscribe=e=>{(0,l.singleton)("RouterClient",f).unsubscribe(e)},t.trustedMessage=e=>(0,l.singleton)("RouterClient",f).trustedMessage(e),t.disconnectAll=()=>{(0,l.singleton)("RouterClient",f).disconnectAll()},t.calibrateTimeWithRouterService=e=>{(0,l.singleton)("RouterClient",f).calibrateTimeWithRouterService(e)},t.RouterClient={onReady:t.onReady,addListener:t.addListener,transmit:t.transmit,removeListener:t.removeListener,addResponder:t.addResponder,query:t.query,removeResponder:t.removeResponder,addPubSubResponder:t.addPubSubResponder,removePubSubResponder:t.removePubSubResponder,subscribe:t.subscribe,publish:t.publish,unsubscribe:t.unsubscribe,trustedMessage:t.trustedMessage,disconnectAll:t.disconnectAll,calibrateTimeWithRouterService:t.calibrateTimeWithRouterService},t.default=t.RouterClient},31755:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.bringAllWindowsToFront=t.minimizeAll=t.autoArrange=t.minimizeWindows=t.bringWindowsToFront=t.restartApplication=t.shutdownApplication=void 0;const i=r(51848),o=n(r(84795)),s=r(23099);t.shutdownApplication=()=>{i.RouterClient.transmit("Application.shutdown",{})},t.restartApplication=e=>{i.RouterClient.transmit("Application.restart",e||{})},t.bringWindowsToFront=async(e={},t=Function.prototype)=>(e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await o.default.waitForStartup("windowService"),i.RouterClient.query("LauncherService.bringWindowsToFront",e,((e,r)=>{t(e,r)})),Promise.resolve()),t.minimizeWindows=async(e,t)=>{e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await o.default.waitForStartup("windowService"),i.RouterClient.transmit("LauncherService.minimizeWindows",e),null==t||t()},t.autoArrange=async(e,t)=>{e=e||{},await o.default.waitForStartup("windowService");const r=await(0,s.getMyWindowIdentifier)(),{err:n}=await i.RouterClient.query("DockingService.autoArrange",{windowIdentifier:r});return null==t||t(n),{err:n}},t.minimizeAll=async(e,t)=>{var r;await o.default.waitForStartup("windowService");const n=await(0,s.getMyWindowIdentifier)();let a=null!=e?e:{monitor:"all"};a.windowIdentifier=null!==(r=a.windowIdentifier)&&void 0!==r?r:n;const{err:u}=await i.RouterClient.query("WorkspaceService.minimizeAll",a);return null==t||t(u),{err:u}},t.bringAllWindowsToFront=async(e,t)=>{var r;await o.default.waitForStartup("windowService");const n=await(0,s.getMyWindowIdentifier)(),a=null!=e?e:{monitor:"all"};a.windowIdentifier=null!==(r=a.windowIdentifier)&&void 0!==r?r:n;const{err:u}=await i.RouterClient.query("WorkspaceService.bringWindowsToFront",a);return null==t||t(u),{err:u}}},83823:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=r(51848),u=r(2518),l=o(r(23099)),c=s(r(9060)),d=r(26604),f=r(91374),h=r(44137),p=s(r(50361));class g{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class m extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=d.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,r=!1){if("closed"!==e||!h.FEAGlobals.finsembleWindow||this.name!==h.FEAGlobals.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,r)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const r=m;r.types||(r.types={}),r.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var r;const{uuid:n,windowType:i}=t;if(!1!==t.waitForReady)try{await m._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}u.Logger.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=m.cache[e];return o?(u.Logger.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await m._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(r=t.windowIdentifier)&&void 0!==r?r:{uuid:n,name:e,windowName:e,windowType:i}}))).wrap}}static getInstance(e,t){var r;const n=f.System.Window.getCurrent().name,i=null!==(r=null==(e=(0,p.default)(e))?void 0:e.windowName)&&void 0!==r?r:null==e?void 0:e.name;return new Promise((async(r,o)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=i;let s=m.cache[i];if(s)return u.Logger.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void r({wrap:s});if(e.name){const{err:n,data:s}=await m.createWrapFromUUIDAndName(i,e);return n||!s?(null==t||t(n),void o(n)):(null==t||t(null,s),void r({wrap:s}))}if(!1!==e.waitForReady)try{await m._windowReady(i),e.wrapState="ready"}catch(l){return null==t||t(l,null),void o(l)}const{err:l,response:c}=await a.RouterClient.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:n});if(l)return u.Logger.system.error(l),null==t||t(l,null),void o(l);if(s=m.cache[i],s)return u.Logger.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void r({wrap:s});u.Logger.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:d}=c.data;d.windowName&&(d.name=d.windowName),e.retrievedIdentifier=d,({wrap:s}=await m._createWrap(e)),c.data.descriptor&&(s.descriptor=c.data.descriptor),null==t||t(null,s),r({wrap:s})}))}static _createWrap(e){return new Promise((async t=>{const r=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||r.windowType)&&"WebApplication"!==r.windowType||(r.windowType="WebWindow");let n=Object.assign({},r);n=Object.assign(n,e),n.setWindowType=n.windowType,delete n.windowType,u.Logger.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",r.windowName);let i=new m(n);m.cache[r.windowName]=i,i.windowType=r.windowType,i.identifier=r,i.addEventListener("closed",i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=d.WINDOWSTATE.MAXIMIZED,i.windowOptions.windowState=d.WINDOWSTATE.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState===d.WINDOWSTATE.MAXIMIZED?(i.windowState=d.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=d.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED):i.windowState===d.WINDOWSTATE.NORMAL?(i.windowState=d.WINDOWSTATE.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=d.WINDOWSTATE.MINIMIZED_WAS_NORMAL):u.Logger.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=d.WINDOWSTATE.NORMAL,i.windowOptions.windowState=d.WINDOWSTATE.NORMAL}));const o=a.RouterClient.subscribe(`Finsemble.Component.State.${r.windowName}`,((e,t)=>{if(e)u.Logger.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,a.RouterClient.unsubscribe(o)}}));await(async(e,t)=>new Promise((r=>{e.parentSubscribeID=a.RouterClient.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,n)=>{if(t)u.Logger.system.error("FinsembleWindow parent change notification error",t);else{const t=n.data||{};"Added"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&u.Logger.system.error("FinsembleWindow Parent Notification: unknown type",t)}r()}))})))(i,r),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${f.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.Logger.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==h.FEAGlobals.name&&this.name&&delete m.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(m.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.RouterClient.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.RouterClient.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.RouterClient.unsubscribe(this.parentSubscribeID)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,r=Function.prototype){return"function"==typeof t&&(r=t,t={}),t=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),u.Logger.setting().system.Debug&&(t.callstack=u.Logger.callStack()),new Promise((async(n,i)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void n(await this.queryWindowService(e,t));u.Logger.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:l}=await a.RouterClient.query(this.windowServiceChannelName(e),t);let c=null!==(o=l.data)&&void 0!==o?o:null;if(s){if(u.Logger.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void i(s)}else u.Logger.system.debug(`${this.windowServiceChannelName(e)} successful`,c),console.debug(`${this.windowServiceChannelName(e)} successful`,c);n(c),r(s,c)}))}minimize(e=null,t){return new Promise((r=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),r({err:e})}))}))}maximize(e=null,t){return new Promise((r=>{this.getBounds(((n,i)=>{n||!i?u.Logger.system.warn(`Error getting bounds, cached bounds will not be set: ${n}`):this.updateOptions({options:{defaultLeft:i.left,defaultTop:i.top,defaultWidth:i.width,defaultHeight:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),r({err:e})}))}))}))}restore(e=null,t){return new Promise((r=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),r({err:e})}))}))}blur(e=null,t){return new Promise((r=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),r({err:e})}))}))}focus(e=null,t){return new Promise((r=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),r({err:e})}))}))}bringToFront(e=null,t){return new Promise((r=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),r({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((r=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),r({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,r=Function.prototype){const n={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",n,r)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const r=await this.queryWindowService("addBrowserView",e,t);return new g({id:r,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((r=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),r({err:e})}))}))}getBounds(e,t){return new Promise((r=>{const n="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==n||n(e,t),r({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((r=>{this.queryWindowService("hide",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((r=>{this.queryWindowService("show",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((r=>{u.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{u.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),r({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.RouterClient.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.RouterClient.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},r=Function.prototype){const n=()=>{a.RouterClient.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),r()};e?this.registerWithDocking(t,n):n()}wrapReady(){a.RouterClient.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.Logger.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.RouterClient.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.Logger.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.RouterClient.query("TabTile.stopTabTile",{params:e},(function(e,r){e?u.Logger.system.warn("TabTile.stopTabTile: query failed",e):u.Logger.system.debug("TabTile.stopTabTile results",r.data);const n=r.data;t?t(e,n,this.defaultStopTrackingAction):this.defaultTabTileAction(n)}))}defaultTabTileAction(e){const t=this;switch(u.Logger.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(r){t.Group.addWindow(this.identifier,r,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.Logger.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},r={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,r),this.windowOptions.bounds=t}startMove(e={}){u.Logger.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.Logger.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.RouterClient.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,r)=>r?e(r.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.Logger.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.RouterClient.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,r)=>{e(null,r)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((r=>{this.settingParent?this.getParent(((e,n)=>{null==t||t(e,n),r({err:e,data:n})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.Logger.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),r({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{u.Logger.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((n,i)=>{n?u.Logger.system.error("FinsembleWindow.setParent error",n):(u.Logger.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||this.parentWindow.windowName.includes("StackedWindow")||u.Logger.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.RouterClient.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(n,i),r({err:n,data:i})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.Logger.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.Logger.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((r,n)=>{r?u.Logger.system.error("FinsembleWindow.setParentOnWrap error",r):(u.Logger.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=n,!1===this.parentWindow.windowType.includes("StackedWindow")&&!1===this.parentWindow.windowName.includes("StackedWindow")&&u.Logger.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(r,n)}))}))}clearParent(){u.Logger.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.Logger.system.debug("Title change",e),a.RouterClient.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((r,n)=>{null==e||e(r,n),t({err:r,data:n})}))}))}_privateManagementPreface(e,t){var r,n;return"function"==typeof t&&u.Logger.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(r=this.identifier)||void 0===r?void 0:r.windowName,windowType:null===(n=this.identifier)||void 0===n?void 0:n.windowType},u.Logger.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.addWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.addWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.removeWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.removeWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.deleteWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.deleteWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.setVisibleWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.setVisibleWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((r=>{a.RouterClient.query("StackedWindow.reorder",e,((e,n)=>{u.Logger.system.debug("StackedWindow.reorder callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE=d.WINDOWSTATE,m.wrap=m.getInstance,m.cache={},m._windowReady=function(e){let t;return u.Logger.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(r,n)=>{u.Logger.system.debug(`windowServiceReady: ${e} waiting`),t=a.RouterClient.subscribe(`Finsemble.Component.State.${e}`,((n,i)=>{const{state:o}=i.data;switch(u.Logger.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.Logger.system.debug(`windowServiceReady: ${e} ${o}`),a.RouterClient.unsubscribe(t),r()}}))}))}},44137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FreestandingGlobals=t.FEAGlobals=t.Globals=void 0,t.Globals="undefined"==typeof window?r.g:window,t.FEAGlobals="undefined"==typeof window?r.g:window,t.FreestandingGlobals="undefined"==typeof window?r.g:window},31219:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Performance=void 0;const i=r(44137),o={navigationStart:Date.now()};t.Performance={now:()=>{var e;return i.Globals.performance?null===(e=i.Globals.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(n=i.Globals.performance)||void 0===n?void 0:n.timing)?i.Globals.performance.timing:o}},59059:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpDelete=t.httpPatch=t.httpPut=t.httpPost=t.httpGet=void 0;const r=200;t.httpGet=async function(e){let t=null,n=null;try{const i=await fetch(e);i.status!=r?t=`HTTP get error for ${e}: ${i.status} ${i.statusText}`:n=await i.json()}catch(e){t=e}return{err:t,getData:n}},t.httpPost=async function(e,t){let n=null;try{const i=await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP post error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpPut=async function(e,t){let n=null;try{const i=await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP put error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpPatch=async function(e,t){let n=null;try{const i=await fetch(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP patch error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpDelete=async function(e){let t=null;try{const n=await fetch(e,{method:"DELETE"});n.status!=r&&(t=`HTTP delete error for ${e}: ${n.status} ${n.statusText}`)}catch(e){t=e}return{err:t}}},7860:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t,...n)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(r.g).indexOf(i)>-1||(r.g[i]=new t(...n)),r.g[i]}},64324:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=t.ConfigUtil=void 0;const i=n(r(2518)),o=r(91374),s=n(r(96486)),a=async()=>new Promise((e=>{o.System.getManifest((t=>{e({err:null,data:t})}))})),u=(e,t)=>{var r,n;return null!==(r=e.finsemble[t])&&void 0!==r?r:null===(n=e.finsemble)||void 0===n?void 0:n.custom[t]},l=(e,t)=>{let r=!1;const n=t.split(/[/\\:?=&\s]/);for(let o=0;o<n.length;o++)if("$"===n[o][0]){const s=n[o].substring(1),a=u(e,s);if(void 0===a)i.default.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(n[o],a);i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",n[o],s,a,"old value=",t,"value=",e),r=!0,t=e}}return{configString:t,replacedMacro:r}},c=(e,t,r)=>{let n=!1;if(r>1e3)return i.default.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:n};i.default.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",r,"configArray:",t);for(let i=0;i<t.length;i++){const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=l(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?c(e,o,r+1):"object"==typeof o&&d(e,o,r+1)}return{replacedMacro:n}},d=(e,t,r)=>{let n=!1;return r>1e3?(i.default.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:n}):(t=t||{},i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",r,"configObject:",t),Object.keys(t).forEach((i=>{const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=l(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?c(e,o,r+1):"object"==typeof o&&d(e,o,r+1)})),{replacedMacro:n})};class f{resolveManifestMacros(e,t){let r;for(r=0;r<100;r++){const{replacedMacro:r}=d(e,t,1);if(!r)break}r>=100&&i.default.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){i.default.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await a();return e||!t?i.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,r=null;i.default.system.debug(`captureAndLogBadFileData for ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}}`:t=await n.text()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}r?i.default.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,r):i.default.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,r=null;i.default.system.debug(`fetching import ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:t=await n.json()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}return r&&(i.default.system.error("forceObjectsToLogger",r),this.captureAndLogBadFileData(e)),{err:r,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((r=>{if("importConfig"===r){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let r=0;r<t.importConfig.length;r++)e.finsemble.importConfig.unshift(t.importConfig[r])}else if("importThirdPartyConfig"===r){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let r=0;r<t.importThirdPartyConfig.length;r++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[r])}else e.finsemble[r]=t[r]})),this.resolveManifestMacros(e,e.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await a();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||i.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:r,data:n}=await this.fetchConfigFile(e);!r&&n?this.graftImportOnToManifest(t,n):i.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,r)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){i.default.system.debug("saveJSONToLocalFile",e,t);const r=JSON.stringify(t,null,"\t"),n=`data:application/json;charset=utf-8,${encodeURIComponent(r)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",n),s.setAttribute("download",o),s.click()}configFormatForExport(e,t){i.default.system.debug("configFormatForExport starting",e,t);let r=s.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete r.importConfig,delete r.comment;else if("application"===e)delete r.importConfig,delete r.comment,delete r.system,delete r.services;else if("workspace"===e)r={workspace:r};else if("workspaceTemplate"===e){const e={};e[r.name]=r,r={workspaceTemplates:e}}else"services"===e?r=r.services:"components"===e&&(r=r.components);return r}getDefault(e,t,r){let n=r;if(e){try{const r=t.split(".");let i=e;for(let e=1;e<r.length;e++)i=i[r[e]];n=i}catch(e){n=r}void 0===n&&(n=r)}return n}}t.ConfigUtil=f,t.ConfigUtilInstance=new f},26604:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(r=t.WINDOWSTATE||(t.WINDOWSTATE={}))[r.NORMAL=0]="NORMAL",r[r.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",r[r.MAXIMIZED=2]="MAXIMIZED",r[r.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",r[r.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},25495:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=r(17187),o=r(51848),s=r(26604),a=n(r(84795)),u=r(2518);class l extends i.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,r){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new l({dependencies:e,callback:t,whoAmI:r});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let r=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(r=`${r} Waiting for these clients: ${t.join(", ")}.`),u.Logger.system.warn(r),e.emit("err",r)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:r,callback:n}=t;(!r.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(r.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),n&&n())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:r}=this.dependencies[t];e=e.concat(r.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,r)=>e.indexOf(t)===r))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.Logger.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const r=c();this.dependencies[r]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:r}=this.dependencies[e];(u.Logger.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],r&&r())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.Logger.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends i.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.RouterClient,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.RouterClient.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:r}=e[t];"closed"===r&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.Logger.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.Logger.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.Logger.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.Logger.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const r={};r[t.data.name]={state:"closed"},this.onServiceStateChange(r)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{"closing"===t.data.state&&this.shutdown.checkDependencies()}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},28936:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=r(51848),a=o(r(26604));t.default=class{constructor(e,t){var r;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?s.RouterClient.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},9060:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(51848),o=r(2518),s=n(r(28936));t.default=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.handlers=[],this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){o.Logger.system.debug("PublicEventmanager.addEventListener:",e);const r=`${this.name}_public_${Date.now()}_${Math.random()}`;this.handlers.push({event:e,handler:t,listenerGuid:r}),i.RouterClient.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:r,windowName:this.thisWindowName});const n=`Finsemble.Interrupt.${r}`;return i.RouterClient.addResponder(n,((n,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:r,handler:t,event:e},i)})),this.openResponders.push(n),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,r=!0){if(o.Logger.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const n=this.handlers.findIndex((r=>r.event===e&&r.handler===t));if(-1===n)return void(r&&o.Logger.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:s}=this.handlers[n];i.RouterClient.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:s,windowName:this.thisWindowName}),i.RouterClient.removeResponder(`Finsemble.Interrupt.${s}`),this.handlers.splice(n,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{i.RouterClient.removeResponder(e)}))}}},26892:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Desktop=t.REST=void 0,o(r(44137),t),t.REST=s(r(59059)),t.Desktop=s(r(31755))},91374:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const n=r(10166),i=r(2518),o=r(51848);class s{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class a{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=n.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class u{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,r,n)}static writeHTML(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,r,n)}static writeRTF(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,r,n)}static readText(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,r)}static readHTML(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,r)}static readRTF(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,r)}}class l{static get Application(){return{getCurrent:()=>(i.Logger.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{o.RouterClient.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,r,n)=>{fin.desktop.Window.addEventListener(e,t,r,n)},close:(e,t,r)=>{fin.desktop.Window.close(e,t,r)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{l.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{l.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,r,n)=>{null==r||r()},removeEventListener:(e,t,r,n)=>{fin.desktop.Window.removeEventListener(e,t,r,n)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,r,n)=>{fin.desktop.Window.setTrayIcon(e,t,r,n)},terminate:(e,t)=>{l.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return l.isFreestanding()?a:s}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return u}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((r=>{null==e||e(r),t(r)}))}))}static async getMousePosition(e){return new Promise(((t,r)=>{fin.desktop.System.getMousePosition((r=>{(r.left||0===r.left)&&(r.x=r.left),(r.top||0===r.top)&&(r.y=r.top),null==e||e(null,r),t(r)}),(t=>{null==e||e(t),r(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((r=>{t(r),e(r)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((r=>{t(r),e&&e(r)}))}))}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return i.Logger.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return i.Logger.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),l.isTitlebarWindow()}static isTitlebarWindow(){return!l.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((r=>{t(r),e(r)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((r=>{null==e||e(r),t(r)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((r=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),r(e)}))}))}}t.System=l},84795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51848),i=r(2518),o=r(38144),s=r(38144),a=r(37331),u=new class{publishBootStatus(e,t,r,o){i.Logger.system.debug("publishBootStatus",e,t,r),n.RouterClient.publish((0,a.statusChannel)(e),{name:e,type:t,state:r,error:o})}waitForBootStage(e,t,r=Function.prototype){return new Promise(((a,u)=>{i.Logger.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=o.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&i.Logger.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=n.RouterClient.subscribe(s.STAGE_CHANNEL,((s,d)=>{if(i.Logger.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),s)i.Logger.system.error("SystemManagerClient.waitForBootStage subscribe error",s),r(s),u(s);else if(-1===l)s="illegal stage argument",i.Logger.system.debug("SystemManagerClient.waitForBootStage subscribe error",s,e),r(s),u(s);else{const s=o.ALL_BOOT_STAGES.indexOf(d.data.stage);i.Logger.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&s+1>=l?(i.Logger.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,r.name),r(),a(),n.RouterClient.unsubscribe(c)):"stageCompleted"===t&&s>=l?(i.Logger.system.debug("SystemManagerClient.waitForBootStage completed",e,c),r(),a(),n.RouterClient.unsubscribe(c)):i.Logger.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${s} stageIndex=${l} `,s,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((r,o)=>{i.Logger.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=n.RouterClient.subscribe((0,a.statusChannel)(e),((a,u)=>{i.Logger.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(i.Logger.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),o()):u.data.name===e&&"completed"===u.data.state&&(i.Logger.system.debug("SystemManagerClient.waitForStartup completed",e),t(),r(),n.RouterClient.unsubscribe(s))}))}))}publishCheckpointState(e,t,r){i.Logger.system.debug("publishCheckpoint",e,t,r,(0,a.checkpointChannel)(e,t)),n.RouterClient.publish((0,a.checkpointChannel)(e,t),{windowName:e,checkpointName:t,state:r})}showSystemLog(){i.Logger.system.debug("SystemManagerClient.showSystemLog"),n.RouterClient.transmit(s.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){i.Logger.system.debug("SystemManagerClient.systemLog",e,t),n.RouterClient.transmit(s.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=u},44343:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toast=void 0;const i=r(2518),o=r(91374),s=n(r(84795)),a=r(7860);class u{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}t.toast=(e,t,r,n,l)=>{const c=(0,a.singleton)("Toast",u);let d=!1;const f=`toast.${r}`,h=(l=l||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":f in c.alertOnceSinceStartUp?d=!1:(d=!0,c.alertOnceSinceStartUp[f]=!0);break;case"MAX-COUNT":{let e=0;const t=l.maxCount||1;f in c.alertCurrentCount&&(e=c.alertCurrentCount[f]),c.alertCurrentCount[f]=++e,e<=t&&(d=!0);break}default:d=!0}if(i.Logger.log("toast",e,d,t,r,n,l),d){const t=Object.assign(Object.assign({message:n,timeout:h},l),{devModeOnly:"devModeOnly"===e});s.default.systemLog({notification:!0},`Notification: ${n}`),o.System.Notification.send(t)}},t.default={toast:t.toast,alert:t.toast}},23099:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.promisify=t.identity=t.fastClone=t.isMouseOverDOMElement=t.isPointInBox=t.getDesktopBoundingBox=t.getWindowType=t.isWindows=t.camelCase=t.getMyWindowIdentifier=t.getWindowDescriptor=t.getFinWindow=t.crossDomain=t.isPercentage=t.clone=void 0;const i=r(91374),o=r(2518),s=r(10166),a=r(83823),u=n(r(27361)),l=n(r(78718)),c=n(r(18446)),d=n(r(28368));function f(e,t){return new Promise(((r,n)=>{const o=i.System.Window.getCurrent();if(null==e?void 0:e.windowName)try{const n=i.System.Window.wrap(e.windowName);null==t||t(n),r(n)}catch(r){null==t||t(null),n(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}else if(null==e?void 0:e.componentType){const i="LauncherService";if(void 0!==window[i]){const o=window[i].componentFinder(e);o?(r(o),null==t||t(o)):(n(`util.getFinWindow: Component ${e.componentType} not found.`),null==t||t(null))}else n("getFinWindow by componentType is currently only operable within LaunchService"),null==t||t(null)}else null==t||t(o),r(o)}))}function h(e,t){return new Promise(((r,n)=>{const i=setTimeout((()=>{clearTimeout(i),n(t)}),e)}))}t.clone=function e(t,r={}){if(null===t||"object"!=typeof t)return t;if(t.constructor==Date||t.constructor==RegExp||t.constructor==Function||t.constructor==String||t.constructor==Number||t.constructor==Boolean)return new t.constructor(t);r=r||new t.constructor;for(const n in t)r[n]=void 0===r[n]?e(t[n],null):r[n];return r},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,n=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=!(r&&i&&n);return o.Logger.system.debug(`Launcher crossDomain=${s} (${r}:${n}:${i})`),s},t.getFinWindow=f,t.getWindowDescriptor=function(e,t){return new Promise(((r,n)=>{f(e).then((e=>{e.getOptions((e=>{null==t||t(e),r(e)}))})).catch((e=>{console.warn(e),null==t||t(null),n(e)}))}))},t.getMyWindowIdentifier=e=>{const t=i.System.Window.getCurrent();return new Promise((r=>{t.getOptions((n=>{let i=null;const{customData:o}=n;o&&o.component&&(i=o.component.type);const s={windowName:t.name,componentType:i};null==e||e(s),r(s)}))}))},t.camelCase=function(...e){let t="";for(let r=0;r<e.length;r++)t=`${t} ${e[r]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.isWindows=async function(e){const t=(await i.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return null==e||e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow","Citrix"].includes(e.windowType))return o.Logger.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let r=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":r="NativeWindow";break;case"native":r="FinsembleNativeWindow";break;case"application":r="WebApplication";break;case"Web":r="WebWindow";break;case"StackedWindow":r="StackedWindow"}return e.compound&&(r="CompoundWindow"),r},t.getDesktopBoundingBox=async e=>{var t,r;const n="string"==typeof e?document.querySelector(e):e;n||o.Logger.system.error("getDesktopBoundingBox can't find element",e);const i=n?n.getBoundingClientRect():{top:0,left:0,width:0,height:0},{windowName:u}=s.Startup.getInstance().getStartupData(),{wrap:l}=await a.FinsembleWindow.getInstance({name:u}),c=await l.getBounds(),d=c.data;c.err&&o.Logger.system.error("getDesktopBoundingBox: finsembleWindow.getBounds() error",c.err);const f=null!==(t=null==d?void 0:d.top)&&void 0!==t?t:0,h=null!==(r=null==d?void 0:d.left)&&void 0!==r?r:0,p={top:f+i.top,left:h+i.left,width:i.width,height:i.height,right:0,bottom:0};return p.right=p.left+p.width,p.bottom=p.top+p.height,p},t.isPointInBox=(e,t)=>(t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top),t.isMouseOverDOMElement=async(e,r=Function.prototype)=>{const n=await(0,t.getDesktopBoundingBox)(e),o=await i.System.getMousePosition(),s=(0,t.isPointInBox)(o,n);return r(s),s},t.fastClone=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){o.Logger.error("fastClone error, falling back to structured clone",e)}try{return structuredClone(e)}catch(e){o.Logger.error("fastClone error, structured clone failed",e)}},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const r=Array.prototype.slice.call(arguments);return new Promise(((n,i)=>{r.push(((e,t)=>e?i(e):n(t))),e.apply(t,r)}))}},t.timeoutPromise=h,t.wrapWithTimeout=function(e,t,r){return Promise.race([e,h(t,r)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===((0,u.default)(e,"windowIdentifier.windowType")||e.windowType)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const r=["left","right","top","bottom","width","height"],n=(0,l.default)(e,r),i=(0,l.default)(t,r);return(0,c.default)(n,i)},t.sleep=function(e,t=!1){return new Promise(((r,n)=>{t?setTimeout((()=>{try{n("timeout expired")}catch(e){}}),e):setTimeout(r,e)}))},t.isEqualIgnoringArrayOrder=(e,r)=>{const n=(0,t.fastClone)(e),i=(0,t.fastClone)(r);return(0,d.default)(n,i,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return(0,d.default)(e.sort(),t.sort())}))}},25478:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=r(1641),u=r(25495),l=r(2518),c=s(r(84795)),d=r(91374),f=o(r(26604)),h=r(44137),p=r(51848),g=r(51806),{SERVICE_INITIALIZING_CHANNEL:m,SERVICE_READY_CHANNEL:v,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:w,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=f,_={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};t.BaseService=class{constructor(e=_){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=_.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=_.startupDependencies.clients)):e.startupDependencies=_.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=_.shutdownDependencies.services):e.shutdownDependencies=_.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.Logger,this.RouterClient=p.RouterClient,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),h.Globals.finsembleServices?h.Globals.finsembleServices.push(this):h.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function r(e){l.Logger.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((r=>{t.customData=r.customData,e()}))}async function n(){await(new g.FSBLService).startApp(),p.RouterClient.addResponder(y(e.name),((t,r)=>{(e.status="ready")?null==r||r.sendQueryResponse(null):null==r||r.sendQueryResponse("service not ready")})),"routerService"!==t.name&&p.RouterClient.transmit(m,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const r=t.customData.debugServiceDelay||0;if(l.Logger.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(r))r>0&&l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${r} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${r}") for ${t.name}. Value must be an integer.`;l.Logger.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),c.default.systemLog({error:!0},e)}setTimeout(e,r)}function o(e){l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),l.Logger.console.log("Startup Dependencies for",t.name,t.startupDependencies),l.Logger.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),p.RouterClient.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{l.Logger.system.error(e)}))}function s(e){const r=d.System.Window.getCurrent();r.isShowing((n=>{n&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(r.name,null,e):(l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.Logger.system.debug(`${this.name} starting`),new Promise((e=>{(0,a.series)([n,r,s,i,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",p.RouterClient.transmit(v,{serviceName:this.name},{suppressWarnings:!0}),l.Logger.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),c.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.Logger.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.Logger.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(p.RouterClient.transmit(w,{waitForMe:!0,name:this.name}),(0,a.each)(this.listeners.onShutdown,(function(e,t){(0,a.asyncify)(e)(null,t)}),(function(t){t&&l.Logger.system.error(t),e.shutdownComplete()}))):(p.RouterClient.transmit(w,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.Logger.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),p.RouterClient.transmit(b,{name:this.name})}}},58755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLogMessage=void 0,t.formatLogMessage=e=>{let t,r=Object.assign(Object.assign({},e),{highlightFlag:[],parsedLogArgs:[],allLogArgs:"",previousRowTimeDelta:0,timeElapsedFromStartup:0}),n=[];try{t=JSON.parse(e.logData)}catch(r){t={Note:"*** LoggingService: error parsing data (see local console warning for data) ***"},console.warn(t,e.logData,r)}for(const e in t)if(t.hasOwnProperty(e)){r.parsedLogArgs.push(t[e]);const i=JSON.stringify(t[e]);n.push(i)}return r.allLogArgs=n.join(" ").replace(""," ").replace('" "'," "),delete r.logData,r}},51305:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(25478),o=r(2518),s=r(9381),a=r(51848),u=r(64324),l=r(44343),c=n(r(84795)),d=n(r(32785)),f=r(50981),h=r(26892),p=r(91374);class g extends i.BaseService{constructor(){super({name:"loggerService",startupDependencies:{},shutdownDependencies:{services:["workspaceService","windowService","linkerService","interopService","storageService","configService","dataStoreService","authenticationService","assimilationService"]}}),this.logToDiskLevels=[],this.onBaseServiceReady((async e=>{await this.initialize(),this.createRouterEndpoints(),o.Logger.start(),e()}))}async initialize(){const{err:e,data:t}=await u.ConfigUtilInstance.getInitialManifest();!e&&t&&(this.maybeSetLogLevelsFromManifest(t),this.maybeSetLogLevelsToDisk(t),this.maybeStartLoggingFromFEA(t)),this.getLogLevelsToThrowErrorsFor().then((()=>{p.System.notifyLoggerReady()}))}createRouterEndpoints(){a.RouterClient.addListener("CentralConsole-Show",(()=>{window.showConsole()})),a.RouterClient.addResponder("logger.service.unregister",((e,t)=>{e||!t?console.error(e):(d.default.unRegisterClient(t.data),t.sendQueryResponse(null,{status:"success"}))})),a.RouterClient.addResponder("logger.service.register",(async(e,t)=>{if(e||!t)console.error(e);else{const e=d.default.onClientRegistered(t.data);t.sendQueryResponse(null,e)}})),a.RouterClient.addListener("logger.service.logMessages",((e,t)=>{e&&console.error(e);const{data:r}=t;null==r||r.forEach((e=>{this.maybeLogToDisk(e)})),d.default.onNewMessage(r)})),a.RouterClient.addListener("Application.shutdown",(()=>{d.default.removeUnregisteredClientsFromPersistState()})),a.RouterClient.addListener("Application.restart",(()=>{d.default.removeUnregisteredClientsFromPersistState()})),a.RouterClient.addListener("finsemble.logger.client.finsemble-electron-adapter",((e,t)=>{p.System.updateCentralLoggerState(t.data)}))}maybeLogToDisk(e){const t=e.logType.toLowerCase();this.logToDiskLevels.includes(t)&&h.FEAGlobals.fin.desktop.System.logToDisk(t,"Central Logger",e)}maybeSetLogLevelsToDisk(e){var t,r,n,i,o,s,a,u;this.logToDiskLevels=null!==(u=null!==(n=null===(r=null===(t=e.finsemble)||void 0===t?void 0:t.logger)||void 0===r?void 0:r.logToDiskLevels)&&void 0!==n?n:null===(a=null===(s=null===(o=null===(i=e.finsemble)||void 0===i?void 0:i.system)||void 0===o?void 0:o.requiredServicesConfig)||void 0===s?void 0:s.loggerService)||void 0===a?void 0:a.logToDiskLevels)&&void 0!==u?u:[]}maybeSetLogLevelsFromManifest(e){var t,r,n,i,o,s,a,u;if(d.default.persistState.get("isPersisted"))return;const l=null!==(u=null!==(n=null===(r=null===(t=e.finsemble)||void 0===t?void 0:t.logger)||void 0===r?void 0:r.defaultClientLogLevels)&&void 0!==n?n:null===(a=null===(s=null===(o=null===(i=e.finsemble)||void 0===i?void 0:i.system)||void 0===o?void 0:o.requiredServicesConfig)||void 0===s?void 0:s.loggerService)||void 0===a?void 0:a.defaultClientLogLevels)&&void 0!==u?u:f.defaultLogLevels;d.default.persistState.set("initialClientStateDefault",l),d.default.emit("newInitialClientStateDefault");const c={console:l,system:l,perf:l,dev:l};let h=d.default.persistState.get("clientState");Object.keys(h).forEach((e=>{h[e]=Object.assign(Object.assign({},c),h[e])})),d.default.persistState.set("clientState",h),d.default.emit("newClientState"),d.default.persistState.set("isPersisted",!0)}maybeStartLoggingFromFEA(e){var t,r;if(!0===(null===(r=null===(t=e["finsemble-electron-adapter"])||void 0===t?void 0:t.logger)||void 0===r?void 0:r.transmitToCentralLogger)){const e="Finsemble Electron Adapter",t="finsembleElectronAdapter",r=e=>({category:"system",logClientName:t,logType:e.level,logData:e.logData,logTimestamp:e.time});p.System.addEventListener("log-fea",(e=>{Array.isArray(e)?d.default.onNewMessage(e.map((e=>r(e)))):d.default.onNewMessage([r(e)])}));const n=d.default.onClientRegistered({centralLoggerNamePrefix:"",clientChannel:"finsemble.logger.client.finsemble-electron-adapter",clientName:t,displayName:e,viewId:null,windowName:"System Manager"});p.System.updateCentralLoggerState(n)}}async getLogLevelsToThrowErrorsFor(){var e,t,r,n,i,a,u,f;await c.default.waitForStartup("configService");const{err:h,data:p}=await s.ConfigClient.getValue({field:"finsemble"});if(h)return;const g=null!==(u=null!==(r=null===(t=null===(e=null==p?void 0:p.servicesConfig)||void 0===e?void 0:e.logger)||void 0===t?void 0:t.showWarningForLogStates)&&void 0!==r?r:null===(a=null===(i=null===(n=null==p?void 0:p.system)||void 0===n?void 0:n.requiredServicesConfig)||void 0===i?void 0:i.loggerService)||void 0===a?void 0:a.showWarningForLogStates)&&void 0!==u?u:[],m=null!==(f=d.default.persistState.get("clientState"))&&void 0!==f?f:[];o.Logger.system.log("Checking for high logging level warning",g,m);const v=Object.values(m).some((e=>((e,t)=>e.some((e=>{var r;return!0===(null===(r=t.system)||void 0===r?void 0:r[e])})))(g,e)));if(v){const e="Warning: diagnostic logging detected, which can slow performance. Check that 'info', 'debug', `verbose` are off in the central logger.";(0,l.toast)("dev","ONCE-SINCE-STARTUP","Unnecessary-Logging-States-Error",e,{duration:5e3})}}}t.default=new g},4189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CtrlFSearch=void 0;const r=(e=[])=>{let t=0,r=!0,n=null;return{getActiveIndex:()=>t+1,values:e,length:e.length,setActiveIndex:e=>t=e,next:()=>("prev"===n&&(t+=2),n="next",r&&(r=!1),t===e.length?t=0:-1===t&&(t=e.length-1),{searchResultNumber:t+1,value:e[t++],done:!1}),previous:()=>("next"===n&&(t-=2),n="prev",r&&(r=!1,t=e.length-1),t===e.length&&(t=0),-1===t&&(t=e.length-1),{searchResultNumber:t+1,value:e[t--],done:!1})}};t.CtrlFSearch=class{constructor(){this.searchString="",this.iterator=r([])}performLogSearch(e,t){this.searchString=t;const n=[];if(""!==t)for(let r=0;r<e.length;r++)e[r].allLogArgs.toLowerCase().includes(t.toLowerCase())&&n.push(r);this.iterator=r(n)}performStringSearch(e,t){this.searchString=t;const n=[];if(""!==t)for(let r=0;r<e.length;r++)e[r].toLowerCase().includes(t.toLowerCase())&&n.push(r);this.iterator=r(n)}getIterator(){return this.iterator}}},32785:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.showFocusBTF=void 0;const a=r(51848),u=o(r(23099)),l=r(58755),c=r(4189),d=s(r(9381)),f=r(91374),h=s(r(80752)),p=s(r(84795)),g=r(44343),m=r(50981),v=r(50981),y=s(r(55733)),w=r(17187),b=s(r(23279)),S=s(r(23493)),_=s(r(66678)),C=r(93162),L=r(1641),E=200,k=1e5;t.showFocusBTF=e=>{e.restore(),e.show(),e.bringToFront((()=>{e.focus()}))};const A=(e,t)=>t.length>0&&-1!==e.allLogArgs.toLowerCase().indexOf(t.toLowerCase());let T=0,O=1/0,R=!1,I=[],x={},N=[],D=[],P=0,W=0;const F={console:v.defaultLogLevels,dev:v.defaultLogLevels,system:v.defaultLogLevels,perf:v.defaultLogLevels,clientChannel:"",showAdvancedViewFilters:!0,wrapLog:!0,showStackStraceInLog:!0,filter:{logic:"OR"},showTimeElapsedFromStartup:!1,clientListVisible:!0,colDefs:{}},j={console:v.defaultLogLevels,dev:v.defaultLogLevels,system:v.defaultLogLevels,perf:v.defaultLogLevels,clientChannel:"",showAdvancedViewFilters:!0,wrapLog:!0,showStackStraceInLog:!0,filter:{logic:"OR"},showTimeElapsedFromStartup:!1,clientListVisible:!0,colDefs:{}},M={Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1},B={Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1,LocalOnly:!1};class z extends w.EventEmitter{constructor(){super(),this.modifierKeys={ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this.windowVisibility="visible",this.activeView="logger",this.Search=new c.CtrlFSearch,this.showOnError=!1,this.showOnStartup=!1,this.activeRowIndex=0,this.rowTimediff=null,this.initialized=!1,this.shouldShowSearchBox=!1,this.broadCastNewMessageUpdateThrottled=(0,S.default)(this.broadCastNewMessageUpdate.bind(this),1e3),this.persistState=new m.State,this.activeConfigSearchMatch="",this.stringifiedManifest=[],this.currentMasterSize=1e4,this.setMaxListeners(100),this.bindCorrectContext(),this.registerGlobalHotkey(),this.setDefaults()}bindCorrectContext(){this.setFilter1=(0,b.default)(this.setFilter1,E),this.setFilter2=(0,b.default)(this.setFilter2,E),this.setFilter3=(0,b.default)(this.setFilter3,E),this.setFilter4=(0,b.default)(this.setFilter4,E),this.setLogSearchBoxString=this.setLogSearchBoxString.bind(this),this.setLogSearchBoxString=(0,b.default)(this.setLogSearchBoxString,0),this.setWindowHidden=this.setWindowHidden.bind(this),this.setWindowVisible=this.setWindowVisible.bind(this),this.emitResizeTimeout=this.emitResizeTimeout.bind(this),this.setConfigVisible=this.setConfigVisible.bind(this),this.setLoggerVisible=this.setLoggerVisible.bind(this),this.clearData=this.clearData.bind(this),this.toggleShowOnError=this.toggleShowOnError.bind(this),this.toggleShowOnStartup=this.toggleShowOnStartup.bind(this),this.configureLoggerForDefaults=this.configureLoggerForDefaults.bind(this),this.configureLoggerForErrors=this.configureLoggerForErrors.bind(this),this.configureLoggerForFieldCapture=this.configureLoggerForFieldCapture.bind(this)}initialize(){P=window.innerWidth,W=window.innerHeight,this.addHotkeys(),this.addWindowListeners()}addWindowListeners(){const e=f.System.Window.getCurrent();e.addEventListener("bounds-change-end",(e=>{this.processSizeChange(e.width,e.height)})),e.addEventListener("maximized",(()=>{this.processSizeChange(window.outerWidth,window.outerHeight)})),e.addEventListener("restored",(()=>{this.processSizeChange(window.outerWidth,window.outerHeight)})),e.addEventListener("shown",this.setWindowVisible),e.addEventListener("restored",this.setWindowVisible),e.addEventListener("hidden",this.setWindowHidden),e.addEventListener("minimized",this.setWindowHidden)}getRegisteredClientNames(){return I}getState(){return this.persistState.data}getRegisteredClients(){return x}getWindowWidth(){return P}getWindowHeight(){return W}async registerGlobalHotkey(){await p.default.waitForStartup("configService");const{data:e}=await d.default.getValue({field:"finsemble.servicesConfig.logger.hotkeyShowCentralLogger"});e&&(await p.default.waitForStartup("hotkeysService"),h.default.addGlobalHotkey(e,(()=>{window.showConsole()})))}addHotkeys(){const e=e=>{this.modifierKeys={ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}};window.addEventListener("blur",(()=>{this.modifierKeys={ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1}})),window.addEventListener("keydown",e),window.addEventListener("keyup",e),window.addEventListener("keydown",(e=>{if(e.ctrlKey&&e.altKey)switch(e.key){case"c":this.toggleClientListVisible();break;case"d":this.configureLoggerForDefaults();break;case"e":this.configureLoggerForErrors();break;case"s":this.configureLoggerForFieldCapture();break;case"x":this.clearData()}}))}getFileMode(){return R}getFirstMessageTime(){return O}broadCastNewMessageUpdate(){"hidden"!==this.windowVisibility&&this.emit("loggerNewMessages")}getMasterLog(){return N}getFilteredLog(){return D}getLogCounts(){return{master:N.length,display:D.length}}maybeOpenClient({windowName:e,viewId:r}){if(r||e){const n=f.System.Window.wrap(e);this.modifierKeys.altKey?(0,t.showFocusBTF)(n):f.System.showDeveloperTools(e,r)}}getRowTimeDiff(){return this.rowTimediff}setRowTimeDiff(e){this.rowTimediff=e,this.emit("rowTimeDiffChange")}getClientListVisible(){return this.persistState.get("clientListVisible")}triggerRowheightRecalculation(){this.emit("recalculateHeight")}triggerLogRerender(){this.emit("rerenderList")}toggleClientListVisible(){this.persistState.toggle("clientListVisible"),this.emit("clientListVisibleChange")}emitResizeTimeout(){setTimeout((()=>{this.emit("WindowResize"),this.emit("rerenderList")}),400)}getLogState(){return this.persistState.get("logState")}getClientState(e){return this.persistState.get(`clientState[${e}]`)}getShowClientState(e){return this.persistState.get(`showClientState[${e}]`)}getLogCategoriesAllowed(){return{perf:this.persistState.get("perfModeState"),dev:this.persistState.get("devModeState"),system:this.persistState.get("systemModeState")}}getAllShowClientState(){return this.persistState.get("showClientState")}getClientMode(){return this.persistState.get("currentCategory")}clearData(){N=[],D=[],this.emit("loggerNewMessages")}setTop(){this.emit("SetTop")}setBottom(){this.emit("SetBottom")}scrollToActiveRow(){this.emit("scrollToActiveRow")}setActiveRowIndex(e){this.activeRowIndex=e,this.emit("activeRowChanged")}setActiveConfigSearchMatch(e){this.activeConfigSearchMatch=e,this.emit("activeConfigSearchMatch")}getActiveConfigSearchMatch(){return this.activeConfigSearchMatch}getActiveRowIndex(){return this.activeRowIndex}getHideInactiveState(){return this.persistState.get("hideInactiveState")}toggleHideInactive(){this.persistState.toggle("hideInactiveState"),this.emit("newHideInactiveState")}getCurrentCategory(){return this.persistState.get("currentCategory")}toggleShowClient(e){this.persistState.toggle(`showClientState[${e}]`),this.filterData(),this.emit("newShowClientState"),this.broadCastNewMessageUpdate()}toggleShowAllClients(){let e=!0;for(const t in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(t)&&(e=e&&this.persistState.data.showClientState[t],!e))break;const t=!e;for(const e in this.persistState.data.showClientState)this.persistState.data.showClientState.hasOwnProperty(e)&&this.persistState.set(`showClientState[${e}]`,t);this.filterData(),this.emit("newShowClientState"),this.broadCastNewMessageUpdateThrottled()}getShowSearchBox(){return this.shouldShowSearchBox}showSearchBox(){this.shouldShowSearchBox=!0,this.emit("showSearchBoxChange")}hideSearchBox(){this.shouldShowSearchBox=!1,this.setLogSearchBoxString(""),this.emit("showSearchBoxChange")}getSearchBoxString(){return this.Search.searchString}getSearchMatches(){return this.Search.iterator}setLogSearchBoxString(e){this.Search.performLogSearch(D,e),this.emit("searchBoxTextChange")}async setConfigSearchBoxString(e){this.stringifiedManifest?(this.Search.performStringSearch(this.stringifiedManifest,e),this.emit("searchBoxTextChange")):(await this.getFullConfig(),this.Search.performStringSearch(this.stringifiedManifest,e),this.emit("searchBoxTextChange"))}setWindowVisible(){this.windowVisibility="visible",this.broadCastNewMessageUpdate(),this.emit("WindowVisibilityChange")}setWindowHidden(){this.windowVisibility="hidden",this.emit("WindowVisibilityChange")}getWindowVisibility(){return this.windowVisibility}setAllLogStateOn(){this.persistState.set("logState",{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0}),this.emit("newDisplayState")}setLogState(e){this.persistState.set("logState",Object.assign(this.persistState.data.logState,e)),this.emit("newDisplayState")}configureLoggerForDefaults(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!1),this.persistState.set("initialClientStateDefault.Debug",!1),this.persistState.set("initialClientStateDefault.Verbose",!1),this.setAllLogStateOn(),this.defaultShowClientAll(),this.filterData(),this.emit("newInitialClientStateDefault")}configureLoggerForErrors(){this.persistState.set("initialClientStateDefault.Error",!0),this.emit("newInitialClientStateDefault"),this.setLogState({Error:!0,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1}),this.defaultShowClientAll(),this.filterData()}configureLoggerForFieldCapture(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!0),this.persistState.set("initialClientStateDefault.Debug",!0),this.persistState.set("initialClientStateDefault.Verbose",!1),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll(),this.persistState.persist(),this.filterData(),setTimeout((()=>{alert("Logger is now configured for field capture. Please restart your application if needed, recreate problem, export the log, and send it to Finsemble Support with description of the problem. IMPORTANT: Once your log is exported, revert to the default logger settings; otherwise, you may see degraded performance due to the extra logging.")}),200)}configureLoggerForStartup(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!0),this.persistState.set("initialClientStateDefault.Debug",!0),this.setFilter1("Service Online"),this.emit("NewHighlightValues1"),this.setFilter2("not online"),this.emit("NewHighlightValues2"),this.setFilter3(""),this.emit("NewHighlightValues3"),this.setFilter4(""),this.emit("NewHighlightValues4"),this.setFilterLogic("OR"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}setFilteredLog(e){D=(0,_.default)(e)}chunk(e,t){const r=[];let n=0;for(;n<e.length;)r.push(e.slice(n,t+n)),n+=t;return r}saveToFile(){const e={registeredClientNames:I,registeredClients:x,persistState:this.persistState.data},t=JSON.stringify(e),r=new Blob([t],{type:"application/json"}),n=new y.default;n.file("log_state.json",r),N.length>5e4&&(0,g.toast)("dev","ALWAYS","system","Currently exporting a large log, this may take some time... (Check developer console for progress)");const i=this.chunk(N,1e3);this.emit("toggleOverlay","Creating log export file. Please wait...");for(let e=0;e<i.length;e++){const t=i[e];console.log("adding to zip",e,t);const r=JSON.stringify({partial_log:t}),o=new Blob([r],{type:"application/json"});n.file(`log${e}.json`,o)}const o=(new Date).toLocaleString();n.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}).then((e=>{this.emit("toggleOverlay"),(0,C.saveAs)(e,`logs-${o}.zip`)}))}setMasterLog(e){N=e}setRegisteredClientNames(e){I=e}setRegisteredClients(e){x=e}fileMode(){R=!0;const e=document.createElement("div");e.innerHTML='<input type="file">';const t=e.firstChild;t.addEventListener("change",(async()=>{var e,r;const n=null===(e=t.files)||void 0===e?void 0:e[0];if(!n.name.match(/\.(zip)$/)){const e="File not supported. Import must be from a .zip file generated by the Central Logger";return alert(e),void console.error(e)}for(const e in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(e)&&(!this.persistState.data.hideInactiveState||this.persistState.data.showClientState[e])){const t=Object.assign({},j);t.clientChannel=null===(r=this.persistState.data.clientState[e])||void 0===r?void 0:r.clientChannel,a.RouterClient.transmit(t.clientChannel,t),console.debug("disabledClientState",t.clientChannel,t)}const i=await y.default.loadAsync(n),o=Object.keys(i.files).length;if(!("log_state.json"in i.files))return void(0,g.toast)("dev","ALWAYS","system","Not a valid central logger zip file. Perhaps it was double zipped?");this.emit("toggleOverlay","Importing log file. Please wait..."),o>8&&(0,g.toast)("dev","ALWAYS","system",`Currently importing a large log (${o} files). This may take some time... (Check developer console for progress)`);const{outOfOrder:s,messages:u,persistState:l}=await(async e=>new Promise((t=>{const{filenames:r,outOfOrder:n}=(e=>{let t=!1;return{filenames:Object.keys(e.files).sort(((e,r)=>{const n=/\/log[0-9]*.json$/;if(n.test(e)){if(n.test(r)){const i=Number(e.substring(e.search(n)+4,e.length-5)),o=Number(r.substring(r.search(n)+4,r.length-5));return Number.isNaN(i)||Number.isNaN(o)?(t=!0,0):i-o}return-1}return 1})),outOfOrder:t}})(e),i=[];let o;(0,L.eachSeries)(r,(async t=>new Promise((async r=>{const n=e.files[t],s=await n.async("blob"),a=new FileReader;a.onload=()=>{const e=(e=>{try{return JSON.parse(e)}catch(e){return}})(a.result),{length:n}=a.result;if(console.log(`Processing logfile ${t} - ${n} bytes`),e&&"log_state.json"===t){const{registeredClientNames:t}=e;(e=>{I=null!=I?I:e,x={},I.forEach((e=>{x[e]={name:e,viewId:0,centralLoggerNamePrefix:"",displayName:e}}))})(t),({persistState:o}=e)}else if(e&&e.partial_log){const t=e.partial_log;t.sort(((e,t)=>e.logTimestamp-t.logTimestamp)),Array.prototype.push.apply(i,t)}r()},a.readAsText(s)}))),(()=>{t({outOfOrder:n,messages:i,persistState:o})}))})))(i);u.length?(s?(0,g.toast)("dev","ALWAYS","system","There was a problem sorting file names, logs may appear out of order"):(0,g.toast)("dev","ALWAYS","system","Log successfully imported!"),this.persistState.data=l,this.currentMasterSize=k,N=u,O=u[0].logTimestamp,this.filterData(),this.emit("newFirstMessageTime"),this.emit("FileMode"),this.emit("LoggerRegister"),this.emit("newFilterHighlights"),this.emit("newDisplayState"),this.emit("LoggerUnregister"),this.emit("newShowClientState"),this.emit("toggleOverlay")):(0,g.toast)("dev","ALWAYS","system","Failure to import log - message list is empty!")})),t.click()}async getFullConfig(e){const{data:t}=await d.default.getManifest(),r=JSON.stringify(t,null,4);this.stringifiedManifest=r.split(/\n/g),null==e||e(this.stringifiedManifest)}getActiveView(){return this.activeView}setLoggerVisible(){this.activeView="logger",this.emit("viewChange")}setConfigVisible(){this.activeView="config",this.emit("viewChange")}findIndexByTimestamp(e,t){for(var r=e.length-1;r>0&&!(e[r].logTimestamp<t);r--);return r}toggleShowOnStartup(){this.setShowOnStartup(!this.showOnStartup)}getShowOnStartup(){return this.showOnStartup}setShowOnStartup(e,t=!0){this.showOnStartup=e,this.emit("showOnStartup",this.showOnStartup),t&&d.default.setPreference({field:"finsemble.preferences.loggerService.showOnStartup",value:this.showOnStartup})}toggleShowOnError(){this.setShowOnError(!this.showOnError)}getShowOnError(){return this.showOnError}setShowOnError(e,t=!0){this.showOnError=e,this.emit("showOnError",this.showOnError),t&&d.default.setPreference({field:"finsemble.preferences.loggerService.showOnError",value:this.showOnError})}processSizeChange(e,t){P!==e&&(P=window.innerWidth,this.emit("WindowResize"),this.emit("newShowClientState")),W!==t&&(W=window.innerHeight,this.emit("WindowResize"),this.emit("newShowClientState"))}sortNewLogMessages(e){function t(e,t){let r=0;return e.logTimestamp<t.logTimestamp&&(r=-1),e.logTimestamp>t.logTimestamp&&(r=1),r}let r=this.findIndexByTimestamp(N,e),n=N.splice(r,N.length);n.sort(t),N=N.concat(n),this.shouldFilterData()?(r=this.findIndexByTimestamp(D,e),r!==D.length-1&&(n=D.splice(r,D.length),n.sort(t),D=D.concat(n))):D=(0,_.default)(N)}adjustCurrentMasterLogSize(){var e;const t=["Info","Debug","Verbose"],r=null!==(e=this.persistState.get("clientState"))&&void 0!==e?e:[],n=Object.values(r).some((e=>((e,t)=>e.some((e=>{var r;return!0===(null===(r=t.system)||void 0===r?void 0:r[e])}))||e.some((e=>{var r;return!0===(null===(r=t.dev)||void 0===r?void 0:r[e])})))(t,e)));n&&(this.currentMasterSize=k),N.length>this.currentMasterSize&&(N=N.slice(N.length-this.currentMasterSize))}onNewMessage(e){const t=D.length;if(R)return;let r,n=1/0;for(let t=0;t<e.length;t++)this.showOnError&&"Error"===e[t].logType&&window.showConsole(),r=(0,l.formatLogMessage)(e[t]),T++<1e4&&r.logTimestamp<O&&(O=r.logTimestamp,this.emit("newFirstMessageTime")),r.logTimestamp<n&&(n=r.logTimestamp),r.timeElapsedFromStartup=Math.round(r.logTimestamp-O),N.push(r),this.shouldFilterData()&&this.filterData(r).length&&D.push(r);this.sortNewLogMessages(n),this.adjustCurrentMasterLogSize(),t!==D.length&&this.broadCastNewMessageUpdateThrottled()}onClientRegistered(e){const{clientName:t,displayName:r,viewId:n,centralLoggerNamePrefix:i}=e,o=n?`${t}: view-${n}`:t;if(R){console.debug("Registration in FileMode");const t=Object.assign({},j);return t.clientChannel=e.clientChannel,t}{if(console.debug("LoggerStore.registerClient",o,e),I.includes(o)||(I.push(o),x[o]={name:t,viewId:n,centralLoggerNamePrefix:i,displayName:r}),o in this.persistState.data.showClientState||this.persistState.set(`showClientState[${o}]`,!0),!(o in this.persistState.data.clientState)){const t=u.clone(F);this.persistState.set(`clientState[${o}]`,t),this.persistState.set(`clientState[${o}].clientChannel`,e.clientChannel),this.persistState.set(`clientState[${o}].windowName`,e.windowName)}const s=this.persistState.data.clientState[o];return this.filterData(),this.emit("LoggerRegister"),this.emit("newClientState"),this.emit("newShowClientState"),s}}unRegisterClient(e){const t=e.viewId?`${e.clientName}: view-${e.viewId}`:e.clientName,{deleteFromPersistence:r}=e;for(let e=0;e<I.length;e++)I[e]===t&&(I.splice(e,1),e--,delete x[t]);r&&(delete this.persistState.data.clientState[t],delete this.persistState.data.showClientState[t],this.persistState.persist()),this.emit("LoggerUnregister")}setDefaults(){F.console=this.persistState.data.initialClientStateDefault,F.dev=this.persistState.data.initialClientStateDefault,F.system=this.persistState.data.initialClientStateDefault,F.perf=this.persistState.data.initialClientStateDefault,F.clientChannel="",F.showAdvancedViewFilters=this.persistState.data.showAdvancedViewFilters,F.wrapLog=this.persistState.data.wrapLog,F.showStackStraceInLog=this.persistState.data.showStackStraceInLog,F.filter=this.persistState.data.filter,F.showTimeElapsedFromStartup=this.persistState.data.showTimeElapsedFromStartup,F.clientListVisible=this.persistState.data.clientListVisible,F.colDefs=this.persistState.data.colDefs,j.console=M,j.dev=B,j.system=B,j.perf=B,j.clientChannel=""}removeUnregisteredClientsFromPersistState(){Object.keys(this.persistState.data.clientState).forEach((e=>{I.includes(e)||(delete this.persistState.data.clientState[e],delete this.persistState.data.showClientState[e])})),this.persistState.persist()}setFilter1(e){this.persistState.set("highlightString[0]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues1")}setFilter2(e){this.persistState.set("highlightString[1]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues2")}setFilter3(e){this.persistState.set("highlightString[2]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues3")}setFilter4(e){this.persistState.set("highlightString[3]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues4")}getFilterStrings(e={removeEmpty:!1}){let t=this.persistState.get("highlightString");return t||(t=[]),t=t.map((e=>("string"==typeof e&&(e={str:e}),e))),e.removeEmpty?t.filter((e=>{const{str:t}=e;return""!==t})):t}toggleDisplayAll(){const{logState:e}=this.persistState.data;e.Error&&e.Warn&&e.Info&&e.Log&&e.Debug&&e.Verbose?this.persistState.set("logState",{Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1}):this.persistState.set("logState",{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0}),this.filterData(),this.emit("newDisplayState")}toggleDisplayErrors(){this.persistState.toggle("logState.Error"),this.filterData(),this.emit("newDisplayState")}toggleDisplayWarnings(){this.persistState.toggle("logState.Warn"),this.filterData(),this.emit("newDisplayState")}toggleDisplayInfo(){this.persistState.toggle("logState.Info"),this.filterData(),this.emit("newDisplayState")}toggleDisplayLogs(){this.persistState.toggle("logState.Log"),this.filterData(),this.emit("newDisplayState")}toggleDisplayDebug(){this.persistState.toggle("logState.Debug"),this.filterData(),this.emit("newDisplayState")}toggleDisplayVerbose(){this.persistState.toggle("logState.Verbose"),this.filterData(),this.emit("newDisplayState")}getDevModeState(){return this.persistState.get("devModeState")}getSystemModeState(){return this.persistState.get("systemModeState")}getPerfModeState(){return this.persistState.get("perfModeState")}devModeToggle(){this.persistState.toggle("devModeState"),this.filterData(),this.emit("ModeStateChange")}systemModeToggle(){this.persistState.toggle("systemModeState"),this.filterData(),this.emit("ModeStateChange")}perfModeToggle(){this.persistState.toggle("perfModeState"),this.filterData(),this.emit("ModeStateChange")}devMode(){this.persistState.set("currentCategory","dev"),this.emit("ChangeClientMode"),this.emit("newClientState")}systemMode(){this.persistState.set("currentCategory","system"),this.emit("ChangeClientMode"),this.emit("newClientState")}perfMode(){this.persistState.set("currentCategory","perf"),this.emit("ChangeClientMode"),this.emit("newClientState")}getFilterLogic(){return this.persistState.get("filter.logic")}setFilterLogic(e){this.persistState.set("filter.logic",e),this.emit("filterLogicChange"),this.filterData()}shouldFilterData(){const e=0===this.getFilterStrings({removeEmpty:!0}).length,t=this.getLogCategoriesAllowed(),r=this.getLogState(),n=this.getAllShowClientState(),i=Object.keys(r).every((e=>r[e])),o=Object.keys(t).every((e=>t[e])),s=Object.keys(n).every((e=>n[e]));return!(o&&s&&e&&i)}shouldNotFilterData(){return!this.shouldFilterData()}filterData(e){const t=void 0===e,r=void 0===e?N:[e],n=this.getFilterStrings({removeEmpty:!0}),i=0!==n.length,o=this.getAllShowClientState(),s=this.getLogCategoriesAllowed(),a=this.getLogState(),u=this.shouldNotFilterData(),l=Object.keys(o).every((e=>o[e]));if(u)return this.setFilteredLog(N),t&&this.broadCastNewMessageUpdate(),D;const c=this.getFilterLogic(),d=r.filter((e=>{if(!l&&!o[e.logClientName])return!1;const t=a[e.logType],r=s[e.category];return!(!t||!r)&&(!i||("AND"===c?((e,t)=>{for(let r=0;r<e.length;r++){let{str:n}=e[r];const i="-"===n.charAt(0);n=i?n:n.substr(1);const o=!n||A(t,n);if(!o&&!i)return!1;if(i&&o)return!1}return!0})(n,e):((e,t)=>{let r=!1;for(let n=0;n<e.length;n++){let{str:i}=e[n];const o="-"===i.charAt(0);i=o?i:i.substr(1);const s=!i||A(t,i);if(s&&o)return!1;s&&(r=!0)}return r})(n,e)))}));return t&&(this.setFilteredLog(d),this.broadCastNewMessageUpdate()),d}showClientAllCategory(e){for(const t in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(t)&&(!this.persistState.data.hideInactiveState||this.persistState.data.showClientState[t])){const r=this.persistState.data.clientState[t];r[e]=Object.assign({},this.persistState.data.initialClientStateDefault),a.RouterClient.transmit(r.clientChannel,r)}this.emit("newClientState")}defaultShowClientAll(){this.showClientAllCategory("console"),this.showClientAllCategory("dev"),this.showClientAllCategory("system"),this.showClientAllCategory("perf"),this.emit("newClientState")}toggleClientStateAllCategories(e,t){this.persistState.toggle(`clientState[${e}].dev[${t}]`),this.persistState.toggle(`clientState[${e}].system[${t}]`),this.persistState.toggle(`clientState[${e}].perf[${t}]`)}toggleClientErrors(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Error"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientWarnings(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Warn"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientInfo(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Info"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientLogs(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Log"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientDebug(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Debug"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientVerbose(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Verbose"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientLocalOnly(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"LocalOnly"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleInitialClientErrorsDefault(){this.persistState.toggle("initialClientStateDefault.Error"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientWarningsDefault(){this.persistState.toggle("initialClientStateDefault.Warn"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientInfoDefault(){this.persistState.toggle("initialClientStateDefault.Info"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientLogsDefault(){this.persistState.toggle("initialClientStateDefault.Log"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientDebugDefault(){this.persistState.toggle("initialClientStateDefault.Debug"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientVerboseDefault(){this.persistState.toggle("initialClientStateDefault.Verbose"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientLocalOnlyDefault(){this.persistState.toggle("initialClientStateDefault.LocalOnly"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}getInitialClientStateDefault(){return this.persistState.get("initialClientStateDefault")}}const U=new z;t.default=U},50981:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.State=t.defaultLogLevels=void 0;const i=n(r(23279)),o=n(r(27361)),s=n(r(36968));t.defaultLogLevels={Error:!0,Warn:!0,Log:!0,Info:!1,Debug:!1,Verbose:!1,LocalOnly:!1},t.State=class{constructor(){var e,r,n;this.data={logState:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0},clientState:{},showClientState:{},plainTextConsole:!0,filterHighlights:!0,highlightString:[{str:""},{str:""},{str:""},{str:""}],hideInactiveState:!1,currentCategory:"system",devModeState:!0,systemModeState:!0,perfModeState:!0,initialClientStateDefault:t.defaultLogLevels,showAdvancedViewFilters:!1,wrapLog:!1,showStackStraceInLog:!1,filter:{logic:"OR"},showTimeElapsedFromStartup:!0,colDefs:[{field:"timeElapsedFromStartup",name:"Time"},{field:"previousRowTimeDelta",name:"Row Delta"},{field:"category",name:"Category"}],visibleCols:["timeElapsedFromStartup"],clientListVisible:!0,isPersisted:!1};let o={};const s=localStorage.getItem("finsemble.loggerStore.mainkey");if(s)try{o=JSON.parse(s)}catch(e){o={}}this.data=Object.assign(Object.assign({},this.data),o),this.data=Object.assign(Object.assign({},this.data),{filterHighlights:!0,highlightString:null!==(e=this.data.highlightString)&&void 0!==e?e:[],filter:null!==(r=this.data.filter)&&void 0!==r?r:{logic:"OR"},clientListVisible:null===(n=this.data.clientListVisible)||void 0===n||n}),this.persist=(0,i.default)(this.persist.bind(this),500)}toggle(e){const t=this.get(e);this.set(e,!t)}get(e){return(0,o.default)(this.data,e)}set(e,t){(0,s.default)(this.data,e,t),this.persist()}persist(){try{this.data&&localStorage.setItem("finsemble.loggerStore.mainkey",JSON.stringify(this.data))}catch(e){console.error("Error saving logger state to local storage",e,'key="finsemble.loggerStore.mainkey"',"value=",this.data)}}}},87132:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(2518)),o=r(91374),s={},a={activeTransports:{},liveTransport:null,setTransports(){a.addTransport("SharedWorker",s.SharedWorkerTransport),a.addTransport("IPCBus",s.IPCTransport),a.addTransport("FinsembleTransport",s.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],r=e=>{-1===t.indexOf(e)&&t.push(e)};return o.System.InterApplicationBus&&r("IPCBus"),r("FinsembleTransport"),SharedWorker&&r("SharedWorker"),r(e.sameDomainTransport),r(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,r,n,o)=>new Promise(((s,u)=>{const l=a.activeTransports[t];if(l)a.liveTransport=new l(e,r,n,o,(e=>{s(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;i.default.warn(e),u(e)}})),close(){a.liveTransport&&(a.liveTransport.close(),a.liveTransport=null)}};s.SharedWorkerTransport=function(e,t,r,n,o){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const a=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.console.log(`SharedWorker Transport Initializing for ${r} using ${a}`),s=new SharedWorker(a,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const r=e.data[0],n=e.data[1],o={transportID:this.identifier(),port:r};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",n),t(o,n)},s.onerror=e=>{i.default.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===r&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==o||o(this)},s.IPCTransport=function(e,t,r,n,s){this.send=function(e,t){let r;1===arguments.length?(r=n,t=arguments[0]):(r=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",r,"Message",t),o.System.InterApplicationBus.publish(r,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",i.default.console.log(`IPCBus Transport Initializing for ${r}`);const a=o.System.InterApplicationBus.subscribe("*",r,(e=>{const r={transportID:this.identifier(),name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(e=>i.default.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>o.System.InterApplicationBus.unsubscribe(a),null==s||s(this)},s.FinsembleTransport=function(e,t,r,n,o){var s,a,u,l,c;const d=`${null!==(c=null!==(u=null===(a=null===(s=null==e?void 0:e.transportSettings)||void 0===s?void 0:s.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==u?u:null===(l=null==e?void 0:e.transportSettings)||void 0===l?void 0:l.serverAddress)&&void 0!==c?c:"ws://127.0.0.1:3376"}/router`;let f;const h=e=>{const r={transportID:this.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",r,"Message",e),t(r,e.clientMessage)},p=()=>{i.default.console.error(`FinsembleTransport Connection Timeout for ${r}`),null==o||o(this)},g=()=>{i.default.console.log(`FinsembleTransport Transport Initializing for ${r} using ${d}`),d.startsWith("ws:")||d.startsWith("wss:")||i.default.system.error(`Illegal WebSocket address "${d}" (Missing ws:// or wss:// ?)`),f=new WebSocket(d);const e=setTimeout(p,3e3);f.addEventListener("open",(()=>{clearTimeout(e),i.default.console.log("FinsembleTransport connected to server"),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);(r===t.message.client||"RouterService"===r&&"ROUTER_SERVICE"==t.dest)&&h(t.message)})),null==o||o(this)}))};this.send=function(e,t){let r,n;1===arguments.length?(r="ROUTER_SERVICE",n={clientMessage:t=arguments[0]}):(r="ROUTER_CLIENT",t=arguments[1],n={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",r,"NewMessage",n),f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({dest:r,message:n})),f.readyState===WebSocket.CONNECTING&&f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))})),f.readyState===WebSocket.CLOSED&&(g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))}))),f.readyState===WebSocket.CLOSING&&(f.onclose=()=>{g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))}))})},this.identifier=()=>"FinsembleTransport",this.close=()=>f.close(),g()},t.default=a},38144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","pre-authentication","authentication","system-preuser","preuser","preuser2","preuser3","preuser4","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},37331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=void 0;const n=r(38144);t.statusChannel=function(e){return`${n.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${n.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},10600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95281:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(n=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",n.ResolverUnavailable="ResolverUnavailable",n.ResolverTimeout="ResolverTimeout",(r=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",r.AccessDenied="AccessDenied",r.CreationFailed="CreationFailed"},14414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22225:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},896:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(r=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",r.ContactList="fdc3.contactList",r.Country="fdc3.country",r.Instrument="fdc3.instrument",r.Organization="fdc3.organization",r.Portfolio="fdc3.portfolio",r.Position="fdc3.position"},80976:(e,t)=>{"use strict";function r(e,t,r=""){if(r)throw Error(`Invalid value for key "${r}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function n(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,n,i=""){if("any"===t)return e;if(null===t)return null===e?e:r(t,e);if(!1===t)return r(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:r(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let r=0;r<i;r++){const i=e[r];try{return o(t,i,n)}catch(e){}}return r(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,n))):r("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return r("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const r=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[r.key]=o(a,r.typ,n,r.key)})),Object.getOwnPropertyNames(i).forEach((r=>{Object.prototype.hasOwnProperty.call(e,r)||(s[r]=o(i[r],t,n,r))})),s}(n(t),t.additional,e):r(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?r("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:r(e,t,i)}(t,e)}function s(e,t){return o(e,t,n)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const h={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},63250:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10600),t),i(r(57746),t),i(r(24508),t),i(r(22225),t),i(r(74443),t),i(r(46888),t),i(r(95281),t),i(r(56911),t),i(r(27154),t),i(r(86414),t),i(r(14414),t),i(r(896),t),i(r(80976),t),i(r(59579),t)},59579:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(r=t.Intents||(t.Intents={})).StartCall="StartCall",r.StartChat="StartChat",r.ViewChart="ViewChart",r.ViewContact="ViewContact",r.ViewQuote="ViewQuote",r.ViewNews="ViewNews",r.ViewInstrument="ViewInstrument",r.ViewAnalysis="ViewAnalysis"},62043:(e,t,r)=>{"use strict";!function(){var t,n,i,o=0,s=[];for(n=0;n<256;n++)s[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||o+16>u.BUFFER_SIZE)&&(o=0,t=u.randomBytes(u.BUFFER_SIZE)),t.slice(o,o+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function u(){var e=a();return s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}u.BUFFER_SIZE=4096,u.bin=a,u.clearBuffer=function(){t=null,o=0},u.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||r(39061),e.exports=u,u.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,r=[];for(t=0;t<e;t++)r.push(Math.floor(256*Math.random()));return r}}()}()},39061:()=>{},1641:(e,t,r)=>{"use strict";function n(e,...t){return(...r)=>e(...t,...r)}function i(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}r.r(t),r.d(t,{all:()=>pe,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>rt,apply:()=>n,applyEach:()=>R,applyEachSeries:()=>N,asyncify:()=>d,auto:()=>W,autoInject:()=>z,cargo:()=>$,cargoQueue:()=>G,compose:()=>K,concat:()=>Q,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,default:()=>pt,detect:()=>re,detectLimit:()=>ne,detectSeries:()=>ie,dir:()=>se,doDuring:()=>ae,doUntil:()=>ue,doWhilst:()=>ae,during:()=>dt,each:()=>ce,eachLimit:()=>de,eachOf:()=>T,eachOfLimit:()=>E,eachOfSeries:()=>I,eachSeries:()=>fe,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>_e,find:()=>re,findLimit:()=>ne,findSeries:()=>ie,flatMap:()=>Q,flatMapLimit:()=>J,flatMapSeries:()=>X,foldl:()=>q,foldr:()=>Ue,forEach:()=>ce,forEachLimit:()=>de,forEachOf:()=>T,forEachOfLimit:()=>E,forEachOfSeries:()=>I,forEachSeries:()=>fe,forever:()=>Ce,groupBy:()=>Ee,groupByLimit:()=>Le,groupBySeries:()=>ke,inject:()=>q,log:()=>Ae,map:()=>O,mapLimit:()=>Y,mapSeries:()=>x,mapValues:()=>Oe,mapValuesLimit:()=>Te,mapValuesSeries:()=>Re,memoize:()=>Ie,nextTick:()=>xe,parallel:()=>De,parallelLimit:()=>Pe,priorityQueue:()=>Be,queue:()=>We,race:()=>ze,reduce:()=>q,reduceRight:()=>Ue,reflect:()=>He,reflectAll:()=>Ve,reject:()=>Ge,rejectLimit:()=>qe,rejectSeries:()=>Ze,retry:()=>Ye,retryable:()=>Qe,select:()=>be,selectLimit:()=>Se,selectSeries:()=>_e,seq:()=>Z,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>rt,sortBy:()=>nt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>ht,whilst:()=>dt,wrapSync:()=>d});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function u(e){setTimeout(e,0)}function l(e){return(t,...r)=>e((()=>t(...r)))}var c=l(o?queueMicrotask:s?setImmediate:a?process.nextTick:u);function d(e){return p(e)?function(...t){const r=t.pop();return f(e.apply(this,t),r)}:i((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return f(n,r);r(null,n)}))}function f(e,t){return e.then((e=>{h(t,null,e)}),(e=>{h(t,e&&e.message?e:new Error(e))}))}function h(e,t,r){try{e(t,r)}catch(e){c((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function g(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?d(e):e}function m(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function v(e){return function(t,...r){return m((function(n){var i=this;return e(t,((e,t)=>{g(e).apply(i,r.concat(t))}),n)}))}}function y(e,t,r,n){t=t||[];var i=[],o=0,s=g(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function w(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function S(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function _(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function C(e,t,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===b||i&&a<=0?(i=!0,n(null)):void l()}function d(e){o||(s=!1,i=!0,n(e))}l()}var L=e=>(t,r,n)=>{if(n=S(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,r,n);var i=function(e){if(w(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,n(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,_(l))}u=!1}c()},E=m((function(e,t,r,n){return L(t)(e,g(r),n)}),4);function k(e,t,r){r=S(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==b||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,_(a))}function A(e,t,r){return E(e,1/0,t,r)}var T=m((function(e,t,r){return(w(e)?k:A)(e,g(t),r)}),3),O=m((function(e,t,r){return y(T,e,t,r)}),3),R=v(O),I=m((function(e,t,r){return E(e,1,t,r)}),3),x=m((function(e,t,r){return y(I,e,t,r)}),3),N=v(x);const D=Symbol("promiseCallback");function P(){let e,t;function r(r,...n){if(r)return t(r);e(n.length>1?n:n[0])}return r[D]=new Promise(((r,n)=>{e=r,t=n})),r}function W(e,t,r){"number"!=typeof t&&(r=t,t=null),r=S(r||P());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var i={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var n=_(((t,...n)=>{if(o--,!1!==t)if(n.length<2&&([n]=n),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=n,a=!0,u=Object.create(null),s)return;r(t,l)}else i[e]=n,(u[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var l=g(t[t.length-1]);t.length>1?l(i,n):l(n)}}(e,t)))}function h(){if(!s){if(0===l.length&&0===o)return r(null,i);for(;l.length&&o<t;)l.shift()()}}function p(t){var r=[];return Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.indexOf(t)>=0&&r.push(n)})),r}return Object.keys(e).forEach((t=>{var r=e[t];if(!Array.isArray(r))return f(t,[r]),void c.push(t);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return f(t,r),void c.push(t);d[t]=i,n.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&f(t,r)}))}))})),function(){for(var e=0;c.length;)e++,p(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),r[D]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,j=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,M=/,/,B=/(=.+)?(\s*)$/;function z(e,t){var r={};return Object.keys(e).forEach((t=>{var n,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[t]=n.concat(n.length>0?a:i);else if(s)r[t]=i;else{if(n=function(e){const t=function(e){let t="",r=0,n=e.indexOf("*/");for(;r<e.length;)if("/"===e[r]&&"/"===e[r+1]){let t=e.indexOf("\n",r);r=-1===t?e.length:t}else if(-1!==n&&"/"===e[r]&&"*"===e[r+1]){let i=e.indexOf("*/",r);-1!==i?(r=i+2,n=e.indexOf("*/",r)):(t+=e[r],r++)}else t+=e[r],r++;return t}(e.toString());let r=t.match(F);if(r||(r=t.match(j)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=r;return n.replace(/\s/g,"").split(M).map((e=>e.replace(B,"").trim()))}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(a)}function a(e,t){var r=n.map((t=>e[t]));r.push(t),g(i)(...r)}})),W(r,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):H(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):H(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function H(e,t){e.length=1,e.head=e.tail=t}function V(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=g(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var l=!1;function d(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}v.started=!0;var a=v._createTaskItem(e,r?s:n||s);if(t?v._tasks.unshift(a):v._tasks.push(a),l||(l=!0,c((()=>{l=!1,v.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...r){i-=1;for(var n=0,s=e.length;n<s;n++){var a=e[n],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...r),null!=t&&u("error",t,a.data)}i<=v.concurrency-v.buffer&&u("unsaturated"),v.idle()&&u("drain"),v.process()}}function h(e){return!(0!==e.length||!v.idle()||(c((()=>u("drain"))),0))}const p=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,n){const i=(...n)=>{a(e,i),((e,n)=>{if(e)return r(e);t(n)})(...n)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,v={_tasks:new U,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*v._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),v._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){v._tasks.remove(e)},process(){if(!m){for(m=!0;!v.paused&&i<v.concurrency&&v._tasks.length;){var e=[],t=[],r=v._tasks.length;v.payload&&(r=Math.min(r,v.payload));for(var s=0;s<r;s++){var a=v._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===v._tasks.length&&u("empty"),i===v.concurrency&&u("saturated");var l=_(f(e));n(t,l)}m=!1}},length:()=>v._tasks.length,running:()=>i,workersList:()=>o,idle:()=>v._tasks.length+i===0,pause(){v.paused=!0},resume(){!1!==v.paused&&(v.paused=!1,c(v.process))}};return Object.defineProperties(v,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),v}function $(e,t){return V(e,1,t)}function G(e,t,r){return V(e,t,r)}var q=m((function(e,t,r,n){n=S(n);var i=g(r);return I(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);function Z(...e){var t=e.map(g);return function(...e){var r=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=P(),q(t,e,((e,t,n)=>{t.apply(r,e.concat(((e,...t)=>{n(e,t)})))}),((e,t)=>n(e,...t))),n[D]}}function K(...e){return Z(...e.reverse())}var Y=m((function(e,t,r,n){return y(L(t),e,r,n)}),4),J=m((function(e,t,r,n){var i=g(r);return Y(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4),Q=m((function(e,t,r){return J(e,1/0,t,r)}),3),X=m((function(e,t,r){return J(e,1,t,r)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(r,n,i,o)=>{var s,a=!1;const u=g(i);r(n,((r,n,i)=>{u(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,b)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var re=m((function(e,t,r){return te((e=>e),((e,t)=>t))(T,e,t,r)}),3),ne=m((function(e,t,r,n){return te((e=>e),((e,t)=>t))(L(t),e,r,n)}),4),ie=m((function(e,t,r){return te((e=>e),((e,t)=>t))(L(1),e,t,r)}),3);function oe(e){return(t,...r)=>g(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,r){r=_(r);var n,i=g(e),o=g(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function ue(e,t,r){const n=g(t);return ae(e,((...e)=>{const t=e.pop();n(...e,((e,r)=>t(e,!r)))}),r)}function le(e){return(t,r,n)=>e(t,n)}var ce=m((function(e,t,r){return T(e,le(g(t)),r)}),3),de=m((function(e,t,r,n){return L(t)(e,le(g(r)),n)}),4),fe=m((function(e,t,r){return de(e,1,t,r)}),3);function he(e){return p(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?c((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}var pe=m((function(e,t,r){return te((e=>!e),(e=>!e))(T,e,t,r)}),3),ge=m((function(e,t,r,n){return te((e=>!e),(e=>!e))(L(t),e,r,n)}),4),me=m((function(e,t,r){return te((e=>!e),(e=>!e))(I,e,t,r)}),3);function ve(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ye(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,r,n){return(w(t)?ve:ye)(e,t,g(r),n)}var be=m((function(e,t,r){return we(T,e,t,r)}),3),Se=m((function(e,t,r,n){return we(L(t),e,r,n)}),4),_e=m((function(e,t,r){return we(I,e,t,r)}),3),Ce=m((function(e,t){var r=_(t),n=g(he(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2),Le=m((function(e,t,r,n){var i=g(r);return Y(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4);function Ee(e,t,r){return Le(e,1/0,t,r)}function ke(e,t,r){return Le(e,1,t,r)}var Ae=oe("log"),Te=m((function(e,t,r,n){n=S(n);var i={},o=g(r);return L(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);function Oe(e,t,r){return Te(e,1/0,t,r)}function Re(e,t,r){return Te(e,1,t,r)}function Ie(e,t=(e=>e)){var r=Object.create(null),n=Object.create(null),o=g(e),s=i(((e,i)=>{var s=t(...e);s in r?c((()=>i(null,...r[s]))):s in n?n[s].push(i):(n[s]=[i],o(...e,((e,...t)=>{e||(r[s]=t);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=r,s.unmemoized=e,s}var xe=l(a?process.nextTick:s?setImmediate:u),Ne=m(((e,t,r)=>{var n=w(t)?[]:{};e(t,((e,t,r)=>{g(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function De(e,t){return Ne(T,e,t)}function Pe(e,t,r){return Ne(L(t),e,r)}function We(e,t){var r=g(e);return V(((e,t)=>{r(e[0],t)}),t,1)}class Fe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Me(this.heap[e],this.heap[t=je(e)]);){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Me(this.heap[t+1],this.heap[t])&&(t+=1),!Me(this.heap[e],this.heap[t]));){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let r=0;r<this.heap.length;r++)e(this.heap[r])||(this.heap[t]=this.heap[r],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function Me(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var r=We(e,t),{push:n,pushAsync:i}=r;function o(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return r._tasks=new Fe,r._createTaskItem=({data:e,priority:t},r)=>({data:e,priority:t,callback:r}),r.push=function(e,t=0,r){return n(o(e,t),r)},r.pushAsync=function(e,t=0,r){return i(o(e,t),r)},delete r.unshift,delete r.unshiftAsync,r}var ze=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)g(e[r])(t)}),2);function Ue(e,t,r,n){var i=[...e].reverse();return q(i,t,r,n)}function He(e){var t=g(e);return i((function(e,r){return e.push(((e,...t)=>{let n={};if(e&&(n.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),n.value=i}r(null,n)})),t.apply(this,e)}))}function Ve(e){var t;return Array.isArray(e)?t=e.map(He):(t={},Object.keys(e).forEach((r=>{t[r]=He.call(this,e[r])}))),t}function $e(e,t,r,n){const i=g(r);return we(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}var Ge=m((function(e,t,r){return $e(T,e,t,r)}),3),qe=m((function(e,t,r,n){return $e(L(t),e,r,n)}),4),Ze=m((function(e,t,r){return $e(I,e,t,r)}),3);function Ke(e){return function(){return e}}function Ye(e,t,r){var n={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(r=t||P(),t=e):(Je(n,e),r=r||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=g(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(e))?setTimeout(s,n.intervalFunc(o-1)):r(e,...t))}))}return s(),r[D]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Qe(e,t){t||(t=e,e=null);let r=e&&e.arity||t.length;p(t)&&(r+=1);var n=g(t);return i(((t,i)=>{function o(e){n(...t,e)}return(t.length<r-1||null==i)&&(t.push(i),i=P()),e?Ye(e,o,i):Ye(o,i),i[D]}))}function Xe(e,t){return Ne(I,e,t)}var et=m((function(e,t,r){return te(Boolean,(e=>e))(T,e,t,r)}),3),tt=m((function(e,t,r,n){return te(Boolean,(e=>e))(L(t),e,r,n)}),4),rt=m((function(e,t,r){return te(Boolean,(e=>e))(I,e,t,r)}),3),nt=m((function(e,t,r){var n=g(t);return O(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);function it(e,t,r){var n=g(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),t),n(...i)}))}function ot(e,t,r,n){var i=g(r);return Y(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,n)}function st(e,t,r){return ot(e,1/0,t,r)}function at(e,t,r){return ot(e,1,t,r)}function ut(e,t,r,n){arguments.length<=3&&"function"==typeof t&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=S(n||P());var i=g(r);return T(e,((e,r,n)=>{i(t,e,r,n)}),(e=>n(e,t))),n[D]}var lt=m((function(e,t){var r,n=null;return fe(e,((e,t)=>{g(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=m((function(e,t,r){r=_(r);var n=g(t),i=g(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3);function ft(e,t,r){const n=g(e);return dt((e=>n(((t,r)=>e(t,!r)))),t,r)}var ht=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){g(e[r++])(...t,_(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));const pt={apply:n,applyEach:R,applyEachSeries:N,asyncify:d,auto:W,autoInject:z,cargo:$,cargoQueue:G,compose:K,concat:Q,concatLimit:J,concatSeries:X,constant:ee,detect:re,detectLimit:ne,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:T,eachOfLimit:E,eachOfSeries:I,eachSeries:fe,ensureAsync:he,every:pe,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:_e,forever:Ce,groupBy:Ee,groupByLimit:Le,groupBySeries:ke,log:Ae,map:O,mapLimit:Y,mapSeries:x,mapValues:Oe,mapValuesLimit:Te,mapValuesSeries:Re,memoize:Ie,nextTick:xe,parallel:De,parallelLimit:Pe,priorityQueue:Be,queue:We,race:ze,reduce:q,reduceRight:Ue,reflect:He,reflectAll:Ve,reject:Ge,rejectLimit:qe,rejectSeries:Ze,retry:Ye,retryable:Qe,seq:Z,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:rt,sortBy:nt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:ht,whilst:dt,all:pe,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:rt,find:re,findLimit:ne,findSeries:ie,flatMap:Q,flatMapLimit:J,flatMapSeries:X,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:T,forEachOfSeries:I,forEachOfLimit:E,inject:q,foldl:q,foldr:Ue,select:be,selectLimit:Se,selectSeries:_e,wrapSync:d,during:dt,doDuring:ae}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(51305)})();
|
|
2
|
+
(()=>{var e={17187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,c=p(u,l);for(r=0;r<l;++r)n(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},93162:function(e,t,r){var n;void 0===(n=function(){"use strict";function t(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,r,s){var a=o.URL||o.webkitURL,u=document.createElement("a");r=r||e.name||"download",u.download=r,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?i(u):n(u.href)?t(e,r,s):i(u,u.target="_blank")):(u.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(u.href)}),4e4),setTimeout((function(){i(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,o){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),r);else if(n(e))t(e,r,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,r,n);var a="application/octet-stream"===e.type,u=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&u||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a}.apply(t,[]))||(e.exports=n)},55733:(e,t,r)=>{e.exports=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return i(t[s][1][e]||e)}),l,l.exports,e,t,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,i,s,a,u,l,c=[],d=0,f=e.length,h=f,p="string"!==n.getTypeOf(e);d<e.length;)h=f-d,i=p?(t=e[d++],r=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),r=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),s=t>>2,a=(3&t)<<4|r>>4,u=1<h?(15&r)<<2|i>>6:64,l=2<h?63&i:64,c.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(l));return c.join("")},r.decode=function(e){var t,r,n,s,a,u,l=0,c=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var f,h=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=i.uint8array?new Uint8Array(0|h):new Array(0|h);l<e.length;)t=o.indexOf(e.charAt(l++))<<2|(s=o.indexOf(e.charAt(l++)))>>4,r=(15&s)<<4|(a=o.indexOf(e.charAt(l++)))>>2,n=(3&a)<<6|(u=o.indexOf(e.charAt(l++))),f[c++]=t,64!==a&&(f[c++]=r),64!==u&&(f[c++]=n);return f}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var o=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r,n){var o=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function u(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new u("Deflate",e)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,r,i,s,c){var d,f,h=e.file,p=e.compression,g=c!==a.utf8encode,m=o.transformTo("string",c(h.name)),v=o.transformTo("string",a.utf8encode(h.name)),y=h.comment,w=o.transformTo("string",c(y)),b=o.transformTo("string",a.utf8encode(y)),S=v.length!==h.name.length,_=b.length!==y.length,C="",L="",E="",k=h.dir,A=h.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),g||!S&&!_||(O|=2048);var R=0,I=0;k&&(R|=16),"UNIX"===s?(I=798,R|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,k)):(I=20,R|=function(e){return 63&(e||0)}(h.dosPermissions)),d=A.getUTCHours(),d<<=6,d|=A.getUTCMinutes(),d<<=5,d|=A.getUTCSeconds()/2,f=A.getUTCFullYear()-1980,f<<=4,f|=A.getUTCMonth()+1,f<<=5,f|=A.getUTCDate(),S&&(L=n(1,1)+n(u(m),4)+v,C+="up"+n(L.length,2)+L),_&&(E=n(1,1)+n(u(w),4)+b,C+="uc"+n(E.length,2)+E);var x="";return x+="\n\0",x+=n(O,2),x+=p.magic,x+=n(d,2),x+=n(f,2),x+=n(T.crc32,4),x+=n(T.compressedSize,4),x+=n(T.uncompressedSize,4),x+=n(m.length,2),x+=n(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+x+m+C,dirRecord:l.CENTRAL_FILE_HEADER+n(I,2)+x+n(w.length,2)+"\0\0\0\0"+n(R,4)+n(i,4)+m+C+w}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),u=e("../crc32"),l=e("../signature");function c(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,s),c.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=function(e,t,r,i,s){var a=o.transformTo("string",s(i));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},c.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},c.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var o=new i(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach((function(e,r){s++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},u=r.dir,l=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:e,dir:u,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./external"),o=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function l(e){return new i.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new s(t);return r.load(e),r})).then((function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var o=0;o<n.length;o++)r.push(l(n[o]));return i.Promise.all(r)})).then((function(e){for(var i=e.shift(),o=i.files,s=0;s<o.length;s++){var a=o[s],u=a.fileNameStr,l=n.resolve(a.fileNameStr);r.file(l,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(l).unsafeOriginalName=u)}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var n=e("readable-stream").Readable;function i(e,t,r){n.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),r&&r(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function n(e,t,r){var n,i=o.getTypeOf(t),a=o.extend(r||{},u);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=g(e)),a.createFolders&&(n=p(e))&&m.call(this,n,!0);var d="string"===i&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!d),(t instanceof l&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var v;v=t instanceof l||t instanceof s?t:f.isNode&&f.isStream(t)?new h(e,t):o.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var y=new c(e,v,a);this.files[e]=y}var i=e("./utf8"),o=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),u=e("./defaults"),l=e("./compressedObject"),c=e("./zipObject"),d=e("./generate"),f=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:u.createFolders,e=g(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(v(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");o.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=d.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function o(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,n),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,n),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),s=e("../base64"),a=e("../support"),u=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new i(s)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}c.prototype={accumulate:function(e){return function(e,t){return new u.Promise((function(r,i){var o=[],a=e._internalType,u=e._outputType,l=e._mimeType;e.on("data",(function(e,r){o.push(e),t&&t(r)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,o),l);r(e)}catch(e){i(e)}o=[]})).resume()}))}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){"use strict";for(var n=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,r,n,o,s,a=e.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),o=s=0;s<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,o,s=e.length,u=new Array(2*s);for(t=r=0;t<s;)if((i=e[t++])<128)u[r++]=i;else if(4<(o=a[i]))u[r++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<s;)i=i<<6|63&e[t++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(l,s),l.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),u=t;s!==t.length&&(i.uint8array?(u=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(u=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(u),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(c,s),c.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),s=e("./external");function a(e){return e}function u(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,r){var n=[],i=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=l.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return l.stringifyByChar(e)}function d(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=c;var f={};f.string={string:a,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},f.array={string:c,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},f.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:c,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return o.newBufferFrom(e)}},f.nodebuffer={string:c,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return f[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&o.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,o,a,l){return s.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new s.Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var c=r.getTypeOf(t);return c?("arraybuffer"===c?t=r.transformTo("uint8array",t):"string"===c&&(l?t=i.decode(t):o&&!0!==a&&(t=function(e){return u(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),s=e("./zipEntry"),a=(e("./utf8"),e("./support"));function u(e){this.files=[],this.loadOptions=e}u.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),u=e("./compressions"),l=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),u=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!o&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<l.length;d++)n.prototype[l[d]]=c;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var u=new e.MessageChannel;u.port1.onmessage=c,r=function(){u.port2.postMessage(0)}}var l=[];function c(){var e,t;n=!0;for(var r=l.length;r;){for(t=l,l=[],e=-1;++e<r;)t[e]();r=l.length}n=!1}t.exports=function(e){1!==l.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var n=e("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n((function(){var n;try{n=t(r)}catch(n){return o.reject(e,n)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var s=p((function(){t(i,n)}));"error"===s.status&&n(s.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=l).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(i);return this.state!==u?d(r,this.state===a?e:t,this.outcome):this.queue.push(new c(r,e,t)),r},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,u=-1,l=new this(i);++u<r;)c(e[u],u);return l;function c(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==r||n||(n=!0,o.resolve(l,s))}),(function(e){n||(n=!0,o.reject(l,e))}))}},l.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,s=-1,a=new this(i);++s<t;)n=e[s],this.resolve(n).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}));return a}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var n=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),u=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,c)))throw new Error(s[r]);this._dict_set=!0}}function c(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(e,t){var r,s,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=l,r.deflate=c,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),u=e("./zlib/zstream"),l=e("./zlib/gzheader"),c=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function f(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,u,l,d,f,h=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===c.call(g)?new Uint8Array(g):g,r=n.inflateSetDictionary(this.strm,f)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),l=h.next_out-u,d=o.buf2string(h.output,u),h.next_out=l,h.avail_out=p-l,l&&i.arraySet(h.output,h.output,u,l,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(h.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=d,r.inflate=f,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var n=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,i,o,s,a=e.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),o=s=0;s<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,a=t||e.length,l=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)l[n++]=i;else if(4<(o=s[i]))l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&e[r++],o--;1<o?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+t[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,s=i+r;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),u=e("./messages"),l=-2,c=258,d=262,f=113;function h(e,t){return e.msg=u[t],t}function p(e){return(e<<1)-(4<e?9:0)}function g(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function b(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,l=e.window,f=e.w_mask,h=e.prev,p=e.strstart+c,g=l[o+s-1],m=l[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(r=t)+s]===m&&l[r+s-1]===g&&l[r]===l[o]&&l[++r]===l[o+1]){o+=2,r++;do{}while(l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&o<p);if(n=c-(p-o),o=p-c,s<n){if(e.match_start=t,a<=(s=n))break;g=l[o+s-1],m=l[o+s]}}}while((t=h[t&f])>u&&0!=--i);return s<=e.lookahead?s:e.lookahead}function S(e){var t,r,n,o,u,l,c,f,h,p,g=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-d)){for(i.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=r=e.hash_size;n=e.head[--t],e.head[t]=g<=n?n-g:0,--r;);for(t=r=g;n=e.prev[--t],e.prev[t]=g<=n?n-g:0,--r;);o+=g}if(0===e.strm.avail_in)break;if(l=e.strm,c=e.window,f=e.strstart+e.lookahead,p=void 0,(h=o)<(p=l.avail_in)&&(p=h),r=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,f),1===l.state.wrap?l.adler=s(l.adler,c,p,f):2===l.state.wrap&&(l.adler=a(l.adler,c,p,f)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+3-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<d){if(S(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-d&&(e.match_length=b(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t){for(var r,n,i;;){if(e.lookahead<d){if(S(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-d&&(e.match_length=b(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function L(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function E(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),g(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):h(e,l)}function A(e){var t=k(e);return 0===t&&function(e){e.window_size=2*e.w_size,g(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function T(e,t,r,n,o,s){if(!e)return l;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return h(e,l);8===n&&(n=9);var u=new E;return(e.state=u).strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=r,A(e)}n=[new L(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)})),new L(4,4,8,4,_),new L(4,5,16,8,_),new L(4,6,32,32,_),new L(4,4,16,16,C),new L(8,16,32,32,C),new L(8,16,128,128,C),new L(8,32,128,256,C),new L(32,128,258,1024,C),new L(32,258,258,4096,C)],r.deflateInit=function(e,t){return T(e,t,8,15,8,0)},r.deflateInit2=T,r.deflateReset=A,r.deflateResetKeep=k,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},r.deflate=function(e,t){var r,i,s,u;if(!e||!e.state||5<t||t<0)return e?h(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return h(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=f);else{var d=8+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=f,w(i,d),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(r)&&4!==t)return h(e,-5);if(666===i.status&&0!==e.avail_in)return h(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var b=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=c){if(S(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+c;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=c-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==b&&4!==b||(i.status=666),1===b||3===b)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),m(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==f&&666!==t?h(e,l):(e.state=null,t===f?h(e,-3):0):l},r.deflateSetDictionary=function(e,t){var r,n,o,a,u,c,d,f,h=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===a&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,h-r.w_size,r.w_size,0),t=f,h=r.w_size),u=e.avail_in,c=e.next_in,d=e.input,e.avail_in=h,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=2,S(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=c,e.input=d,e.avail_in=u,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,o,s,a,u,l,c,d,f,h,p,g,m,v,y,w,b,S,_,C,L,E,k;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),o=e.next_out,k=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,d=r.wnext,f=r.window,h=r.hold,p=r.bits,g=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(h+=E[n++]<<p,p+=8,h+=E[n++]<<p,p+=8),w=g[h&v];t:for(;;){if(h>>>=b=w>>>24,p-=b,0==(b=w>>>16&255))k[o++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=g[(65535&w)+(h&(1<<b)-1)];continue t}if(32&b){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}S=65535&w,(b&=15)&&(p<b&&(h+=E[n++]<<p,p+=8),S+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=E[n++]<<p,p+=8,h+=E[n++]<<p,p+=8),w=m[h&y];r:for(;;){if(h>>>=b=w>>>24,p-=b,!(16&(b=w>>>16&255))){if(0==(64&b)){w=m[(65535&w)+(h&(1<<b)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&w,p<(b&=15)&&(h+=E[n++]<<p,(p+=8)<b&&(h+=E[n++]<<p,p+=8)),u<(_+=h&(1<<b)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=b,p-=b,(b=o-s)<_){if(c<(b=_-b)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(L=f,(C=0)===d){if(C+=l-b,b<S){for(S-=b;k[o++]=f[C++],--b;);C=o-_,L=k}}else if(d<b){if(C+=l+d-b,(b-=d)<S){for(S-=b;k[o++]=f[C++],--b;);if(C=0,d<S){for(S-=b=d;k[o++]=f[C++],--b;);C=o-_,L=k}}}else if(C+=d-b,b<S){for(S-=b;k[o++]=f[C++],--b;);C=o-_,L=k}for(;2<S;)k[o++]=L[C++],k[o++]=L[C++],k[o++]=L[C++],S-=3;S&&(k[o++]=L[C++],1<S&&(k[o++]=L[C++]))}else{for(C=o-_;k[o++]=k[C++],k[o++]=k[C++],k[o++]=k[C++],2<(S-=3););S&&(k[o++]=k[C++],1<S&&(k[o++]=k[C++]))}break}}break}}while(n<i&&o<a);n-=S=p>>3,h&=(1<<(p-=S<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=h,r.bits=p}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),u=-2;function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):u}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,f(e))):u}function p(e,t){var r,n;return e?(n=new c,(e.state=n).window=null,0!==(r=h(e,t))&&(e.state=null),r):u}var g,m,v=!0;function y(e){if(v){var t;for(g=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=g,e.lenbits=9,e.distcode=m,e.distbits=5}function w(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=f,r.inflateReset2=h,r.inflateResetKeep=d,r.inflateInit=function(e){return p(e,15)},r.inflateInit2=p,r.inflate=function(e,t){var r,c,d,f,h,p,g,m,v,b,S,_,C,L,E,k,A,T,O,R,I,x,N,D,P=0,W=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(r=e.state).mode&&(r.mode=13),h=e.next_out,d=e.output,g=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,m=r.hold,v=r.bits,b=p,S=g,x=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(2&r.wrap&&35615===m){W[r.check=0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,W[2]=m>>>16&255,W[3]=m>>>24&255,r.check=o(r.check,W,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(W[0]=255&m,W[1]=m>>>8&255,r.check=o(r.check,W,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(_=r.length)&&(_=p),_&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,f,_,I)),512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break e;for(_=0;I=c[f+_++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I)),I&&_<p;);if(512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,I)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break e;for(_=0;I=c[f+_++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I)),I&&_<p;);if(512&r.flags&&(r.check=o(r.check,c,_,f)),p-=_,f+=_,I)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}e.adler=r.check=l(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break e;n.arraySet(d,c,f,_,h),p-=_,f+=_,g-=_,h+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;v<3;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.lens[F[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},x=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;k=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(A<16)m>>>=E,v-=E,r.lens[r.have++]=A;else{if(16===A){for(D=E+2;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m>>>=E,v-=E,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===A){for(D=E+3;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}v-=E,I=0,_=3+(7&(m>>>=E)),m>>>=3,v-=3}else{for(D=E+7;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}v-=E,I=0,_=11+(127&(m>>>=E)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},x=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},x=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=p&&258<=g){e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,s(e,S),h=e.next_out,d=e.output,g=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;k=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(k&&0==(240&k)){for(T=E,O=k,R=A;k=(P=r.lencode[R+((m&(1<<T+O)-1)>>T)])>>>16&255,A=65535&P,!(T+(E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}m>>>=T,v-=T,r.back+=T}if(m>>>=E,v-=E,r.back+=E,r.length=A,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=12;break}if(64&k){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(D=r.extra;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,A=65535&P,!((E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(0==(240&k)){for(T=E,O=k,R=A;k=(P=r.distcode[R+((m&(1<<T+O)-1)>>T)])>>>16&255,A=65535&P,!(T+(E=P>>>24)<=v);){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}m>>>=T,v-=T,r.back+=T}if(m>>>=E,v-=E,r.back+=E,64&k){e.msg="invalid distance code",r.mode=30;break}r.offset=A,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(D=r.extra;v<D;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break e;if(_=S-g,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}C=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),L=r.window}else L=d,C=h-r.offset,_=r.length;for(g<_&&(_=g),g-=_,r.length-=_;d[h++]=L[C++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;d[h++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===p)break e;p--,m|=c[f++]<<v,v+=8}if(S-=g,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?o(r.check,d,S,h-S):i(r.check,d,S,h-S)),S=g,(r.flags?m:l(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===p)break e;p--,m+=c[f++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return u}return e.next_out=h,e.avail_out=g,e.next_in=f,e.avail_in=p,r.hold=m,r.bits=v,(r.wsize||S!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(b-=e.avail_in,S-=e.avail_out,e.total_in+=b,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?o(r.check,d,S,e.next_out-S):i(r.check,d,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==b&&0===S||4===t)&&0===x&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?u:((r.head=t).done=!1,0):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,l,c,d,f){var h,p,g,m,v,y,w,b,S,_=f.bits,C=0,L=0,E=0,k=0,A=0,T=0,O=0,R=0,I=0,x=0,N=null,D=0,P=new n.Buf16(16),W=new n.Buf16(16),F=null,j=0;for(C=0;C<=15;C++)P[C]=0;for(L=0;L<u;L++)P[t[r+L]]++;for(A=_,k=15;1<=k&&0===P[k];k--);if(k<A&&(A=k),0===k)return l[c++]=20971520,l[c++]=20971520,f.bits=1,0;for(E=1;E<k&&0===P[E];E++);for(A<E&&(A=E),C=R=1;C<=15;C++)if(R<<=1,(R-=P[C])<0)return-1;if(0<R&&(0===e||1!==k))return-1;for(W[1]=0,C=1;C<15;C++)W[C+1]=W[C]+P[C];for(L=0;L<u;L++)0!==t[r+L]&&(d[W[t[r+L]]++]=L);if(y=0===e?(N=F=d,19):1===e?(N=i,D-=257,F=o,j-=257,256):(N=s,F=a,-1),C=E,v=c,O=L=x=0,g=-1,m=(I=1<<(T=A))-1,1===e&&852<I||2===e&&592<I)return 1;for(;;){for(w=C-O,S=d[L]<y?(b=0,d[L]):d[L]>y?(b=F[j+d[L]],N[D+d[L]]):(b=96,0),h=1<<C-O,E=p=1<<T;l[v+(x>>O)+(p-=h)]=w<<24|b<<16|S|0,0!==p;);for(h=1<<C-1;x&h;)h>>=1;if(0!==h?(x&=h-1,x+=h):x=0,L++,0==--P[C]){if(C===k)break;C=t[r+d[L]]}if(A<C&&(x&m)!==g){for(0===O&&(O=A),v+=E,R=1<<(T=C-O);T+O<k&&!((R-=P[T+O])<=0);)T++,R<<=1;if(I+=1<<T,1===e&&852<I||2===e&&592<I)return 1;l[g=x&m]=A<<24|T<<16|v-c|0}}return 0!==x&&(l[v+x]=C-O<<24|64<<16|0),f.bits=A,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var n=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var o=256,s=286,a=30,u=15,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var p=new Array(60);i(p);var g=new Array(512);i(g);var m=new Array(256);i(m);var v=new Array(29);i(v);var y,w,b,S=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function C(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function L(e){return e<256?g[e]:g[256+(e>>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function A(e,t,r){k(e,r[2*t],r[2*t+1])}function T(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function O(e,t,r){var n,i,o=new Array(16),s=0;for(n=1;n<=u;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=T(o[a]++,a))}}function R(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){8<e.bi_valid?E(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&x(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!x(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function D(e,t,r){var n,i,s,a,u=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?A(e,i,t):(A(e,(s=m[i])+o+1,t),0!==(a=l[s])&&k(e,i-=v[s],a),A(e,s=L(--n),r),0!==(a=c[s])&&k(e,n-=S[s],a)),u<e.last_lit;);A(e,256,t)}function P(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;1<=r;r--)N(e,o,r);for(i=l;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,l=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(o=0;o<=u;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)g<(o=l[2*l[2*(n=e.heap[r])+1]+1]+1)&&(o=g,m++),l[2*n+1]=o,c<n||(e.bl_count[o]++,s=0,p<=n&&(s=h[n-p]),a=l[2*n],e.opt_len+=a*(o+s),f&&(e.static_len+=a*(d[2*n+1]+s)));if(0!==m){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,m-=2}while(0<m);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)c<(i=e.heap[--r])||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}}(e,t),O(o,c,e.bl_count)}function W(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<u&&i===s||(a<l?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4))}function F(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<u&&i===s)){if(a<l)for(;A(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(A(e,i,e.bl_tree),a--),A(e,16,e.bl_tree),k(e,a-3,2)):a<=10?(A(e,17,e.bl_tree),k(e,a-3,3)):(A(e,18,e.bl_tree),k(e,a-11,7));o=i,l=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4)}}i(S);var j=!1;function M(e,t,r,i){k(e,0+(i?1:0),3),function(e,t,r,i){I(e),E(e,r),E(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}r._tr_init=function(e){j||(function(){var e,t,r,n,i,o=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<l[n];e++)m[r++]=n;for(m[r-1]=n,n=i=0;n<16;n++)for(S[n]=i,e=0;e<1<<c[n];e++)g[i++]=n;for(i>>=7;n<a;n++)for(S[n]=i<<7,e=0;e<1<<c[n]-7;e++)g[256+i++]=n;for(t=0;t<=u;t++)o[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,o[8]++;for(;e<=255;)h[2*e+1]=9,e++,o[9]++;for(;e<=279;)h[2*e+1]=7,e++,o[7]++;for(;e<=287;)h[2*e+1]=8,e++,o[8]++;for(O(h,287,o),e=0;e<a;e++)p[2*e+1]=5,p[2*e]=T(e,5);y=new _(h,l,257,s,u),w=new _(p,c,0,a,u),b=new _(new Array(0),d,0,19,7)}(),j=!0),e.l_desc=new C(e.dyn_ltree,y),e.d_desc=new C(e.dyn_dtree,w),e.bl_desc=new C(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,R(e)},r._tr_stored_block=M,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?M(e,t,r,n):4===e.strategy||s===i?(k(e,2+(n?1:0),3),D(e,h,p)):(k(e,4+(n?1:0),3),function(e,t,r,n){var i;for(k(e,t-257,5),k(e,r-1,5),k(e,n-4,4),i=0;i<n;i++)k(e,e.bl_tree[2*f[i]+1],3);F(e,e.dyn_ltree,t-1),F(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),D(e,e.dyn_ltree,e.dyn_dtree)),R(e),n&&I(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+o+1)]++,e.dyn_dtree[2*L(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){k(e,2,3),A(e,256,h),function(e){16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,n,i,o,s=1,a={},u=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){f(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(f,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return a[s]=i,r(s),s++},c.clearImmediate=d}function d(e){delete a[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=a[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(undefined,r)}}(t)}finally{d(e),u=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},18552:(e,t,r)=>{var n=r(10852)(r(55639),"DataView");e.exports=n},1989:(e,t,r)=>{var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},38407:(e,t,r)=>{var n=r(27040),i=r(14125),o=r(82117),s=r(67518),a=r(54705);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},57071:(e,t,r)=>{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),i=r(11285),o=r(96e3),s=r(49916),a=r(95265);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},53818:(e,t,r)=>{var n=r(10852)(r(55639),"Promise");e.exports=n},58525:(e,t,r)=>{var n=r(10852)(r(55639),"Set");e.exports=n},88668:(e,t,r)=>{var n=r(83369),i=r(90619),o=r(72385);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},46384:(e,t,r)=>{var n=r(38407),i=r(37465),o=r(63779),s=r(67599),a=r(44758),u=r(34309);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},11149:(e,t,r)=>{var n=r(55639).Uint8Array;e.exports=n},70577:(e,t,r)=>{var n=r(10852)(r(55639),"WeakMap");e.exports=n},96874:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},77412:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},34963:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},14636:(e,t,r)=>{var n=r(22545),i=r(35694),o=r(1469),s=r(44144),a=r(65776),u=r(36719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),c=!r&&i(e),d=!r&&!c&&s(e),f=!r&&!c&&!d&&u(e),h=r||c||d||f,p=h?n(e.length,String):[],g=p.length;for(var m in e)!t&&!l.call(e,m)||h&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},29932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},62488:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},82908:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},34865:(e,t,r)=>{var n=r(89465),i=r(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},18470:(e,t,r)=>{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},44037:(e,t,r)=>{var n=r(98363),i=r(3674);e.exports=function(e,t){return e&&n(t,i(t),e)}},63886:(e,t,r)=>{var n=r(98363),i=r(81704);e.exports=function(e,t){return e&&n(t,i(t),e)}},89465:(e,t,r)=>{var n=r(38777);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},85990:(e,t,r)=>{var n=r(46384),i=r(77412),o=r(34865),s=r(44037),a=r(63886),u=r(64626),l=r(278),c=r(18805),d=r(1911),f=r(58234),h=r(46904),p=r(64160),g=r(43824),m=r(29148),v=r(38517),y=r(1469),w=r(44144),b=r(56688),S=r(13218),_=r(72928),C=r(3674),L=r(81704),E="[object Arguments]",k="[object Function]",A="[object Object]",T={};T[E]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[A]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[k]=T["[object WeakMap]"]=!1,e.exports=function e(t,r,O,R,I,x){var N,D=1&r,P=2&r,W=4&r;if(O&&(N=I?O(t,R,I,x):O(t)),void 0!==N)return N;if(!S(t))return t;var F=y(t);if(F){if(N=g(t),!D)return l(t,N)}else{var j=p(t),M=j==k||"[object GeneratorFunction]"==j;if(w(t))return u(t,D);if(j==A||j==E||M&&!I){if(N=P||M?{}:v(t),!D)return P?d(t,a(N,t)):c(t,s(N,t))}else{if(!T[j])return I?t:{};N=m(t,j,D)}}x||(x=new n);var B=x.get(t);if(B)return B;x.set(t,N),_(t)?t.forEach((function(n){N.add(e(n,r,O,n,t,x))})):b(t)&&t.forEach((function(n,i){N.set(i,e(n,r,O,i,t,x))}));var z=F?void 0:(W?P?h:f:P?L:C)(t);return i(z||t,(function(n,i){z&&(n=t[i=n]),o(N,i,e(n,r,O,i,t,x))})),N}},3118:(e,t,r)=>{var n=r(13218),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},21078:(e,t,r)=>{var n=r(62488),i=r(37285);e.exports=function e(t,r,o,s,a){var u=-1,l=t.length;for(o||(o=i),a||(a=[]);++u<l;){var c=t[u];r>0&&o(c)?r>1?e(c,r-1,o,s,a):n(a,c):s||(a[a.length]=c)}return a}},97786:(e,t,r)=>{var n=r(71811),i=r(40327);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},68866:(e,t,r)=>{var n=r(62488),i=r(1469);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},44239:(e,t,r)=>{var n=r(62705),i=r(89607),o=r(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},90939:(e,t,r)=>{var n=r(2492),i=r(37005);e.exports=function e(t,r,o,s,a){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,s,e,a))}},2492:(e,t,r)=>{var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),u=r(1469),l=r(44144),c=r(36719),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,g,m,v){var y=u(e),w=u(t),b=y?f:a(e),S=w?f:a(t),_=(b=b==d?h:b)==h,C=(S=S==d?h:S)==h,L=b==S;if(L&&l(e)){if(!l(t))return!1;y=!0,_=!1}if(L&&!_)return v||(v=new n),y||c(e)?i(e,t,r,g,m,v):o(e,t,b,r,g,m,v);if(!(1&r)){var E=_&&p.call(e,"__wrapped__"),k=C&&p.call(t,"__wrapped__");if(E||k){var A=E?e.value():e,T=k?t.value():t;return v||(v=new n),m(A,T,r,g,v)}}return!!L&&(v||(v=new n),s(e,t,r,g,m,v))}},25588:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},28458:(e,t,r)=>{var n=r(23560),i=r(15346),o=r(13218),s=r(80346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:a).test(s(e))}},29221:(e,t,r)=>{var n=r(64160),i=r(37005);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},38749:(e,t,r)=>{var n=r(44239),i=r(41780),o=r(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[n(e)]}},280:(e,t,r)=>{var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},10313:(e,t,r)=>{var n=r(13218),i=r(25726),o=r(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},25970:(e,t,r)=>{var n=r(63012),i=r(79095);e.exports=function(e,t){return n(e,t,(function(t,r){return i(e,r)}))}},63012:(e,t,r)=>{var n=r(97786),i=r(10611),o=r(71811);e.exports=function(e,t,r){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=n(e,l);r(c,l)&&i(u,o(l,e),c)}return u}},10611:(e,t,r)=>{var n=r(34865),i=r(71811),o=r(65776),s=r(13218),a=r(40327);e.exports=function(e,t,r,u){if(!s(e))return e;for(var l=-1,c=(t=i(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var h=a(t[l]),p=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(l!=d){var g=f[h];void 0===(p=u?u(g,h,f):void 0)&&(p=s(g)?g:o(t[l+1])?[]:{})}n(f,h,p),f=f[h]}return e}},56560:(e,t,r)=>{var n=r(75703),i=r(38777),o=r(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},80531:(e,t,r)=>{var n=r(62705),i=r(29932),o=r(1469),s=r(33448),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},27561:(e,t,r)=>{var n=r(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},74757:e=>{e.exports=function(e,t){return e.has(t)}},71811:(e,t,r)=>{var n=r(1469),i=r(15403),o=r(55514),s=r(79833);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(s(e))}},74318:(e,t,r)=>{var n=r(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},64626:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},57157:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},93147:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},40419:(e,t,r)=>{var n=r(62705),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},77133:(e,t,r)=>{var n=r(74318);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},98363:(e,t,r)=>{var n=r(34865),i=r(89465);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),s?i(r,l,c):n(r,l,c)}return r}},18805:(e,t,r)=>{var n=r(98363),i=r(99551);e.exports=function(e,t){return n(e,i(e),t)}},1911:(e,t,r)=>{var n=r(98363),i=r(51442);e.exports=function(e,t){return n(e,i(e),t)}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},38777:(e,t,r)=>{var n=r(10852),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},67114:(e,t,r)=>{var n=r(88668),i=r(82908),o=r(74757);e.exports=function(e,t,r,s,a,u){var l=1&r,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),h=u.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,m=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p<c;){var v=e[p],y=t[p];if(s)var w=l?s(y,v,p,t,e,u):s(v,y,p,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(v===e||a(v,e,r,s,u)))return m.push(t)}))){g=!1;break}}else if(v!==y&&!a(v,y,r,s,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},18351:(e,t,r)=>{var n=r(62705),i=r(11149),o=r(77813),s=r(67114),a=r(68776),u=r(21814),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&n;if(h||(h=u),e.size!=t.size&&!p)return!1;var g=f.get(e);if(g)return g==t;n|=2,f.set(e,t);var m=s(h(e),h(t),n,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},16096:(e,t,r)=>{var n=r(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,s,a){var u=1&r,l=n(e),c=l.length;if(c!=n(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:i.call(t,f)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=u;++d<c;){var v=e[f=l[d]],y=t[f];if(o)var w=u?o(y,v,f,t,e,a):o(v,y,f,e,t,a);if(!(void 0===w?v===y||s(v,y,r,o,a):w)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},99021:(e,t,r)=>{var n=r(85564),i=r(45357),o=r(30061);e.exports=function(e){return o(i(e,void 0,n),e+"")}},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},58234:(e,t,r)=>{var n=r(68866),i=r(99551),o=r(3674);e.exports=function(e){return n(e,o,i)}},46904:(e,t,r)=>{var n=r(68866),i=r(51442),o=r(81704);e.exports=function(e){return n(e,o,i)}},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),i=r(47801);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},85924:(e,t,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);e.exports=n},89607:(e,t,r)=>{var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},99551:(e,t,r)=>{var n=r(34963),i=r(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},51442:(e,t,r)=>{var n=r(62488),i=r(85924),o=r(99551),s=r(70479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s;e.exports=a},64160:(e,t,r)=>{var n=r(18552),i=r(57071),o=r(53818),s=r(58525),a=r(70577),u=r(44239),l=r(80346),c="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",g=l(n),m=l(i),v=l(o),y=l(s),w=l(a),b=u;(n&&b(new n(new ArrayBuffer(1)))!=p||i&&b(new i)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=h)&&(b=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case g:return p;case m:return c;case v:return d;case y:return f;case w:return h}return t}),e.exports=b},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,r)=>{var n=r(71811),i=r(35694),o=r(1469),s=r(65776),a=r(41780),u=r(40327);e.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&r(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||i(e))}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},43824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},29148:(e,t,r)=>{var n=r(74318),i=r(57157),o=r(93147),s=r(40419),a=r(77133);e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Symbol]":return s(e)}}},38517:(e,t,r)=>{var n=r(3118),i=r(85924),o=r(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},37285:(e,t,r)=>{var n=r(62705),i=r(35694),o=r(1469),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},15403:(e,t,r)=>{var n=r(1469),i=r(33448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,i=r(14429),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},86916:(e,t,r)=>{var n=r(5569)(Object.keys,Object);e.exports=n},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},31167:(e,t,r)=>{e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},45357:(e,t,r)=>{var n=r(96874),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=r(u),n(e,this,l)}}},55639:(e,t,r)=>{var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},30061:(e,t,r)=>{var n=r(56560),i=r(21275)(n);e.exports=i},21275:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},37465:(e,t,r)=>{var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,r)=>{var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(e,t),this.size=r.size,this}},55514:(e,t,r)=>{var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=s},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},67990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},66678:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,4)}},50361:(e,t,r)=>{var n=r(85990);e.exports=function(e){return n(e,5)}},75703:e=>{e.exports=function(e){return function(){return e}}},23279:(e,t,r)=>{var n=r(13218),i=r(7771),o=r(14841),s=Math.max,a=Math.min;e.exports=function(e,t,r){var u,l,c,d,f,h,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=u,n=l;return u=l=void 0,p=t,d=e.apply(n,r)}function w(e){return p=e,f=setTimeout(S,t),g?y(e):d}function b(e){var r=e-h;return void 0===h||r>=t||r<0||m&&e-p>=c}function S(){var e=i();if(b(e))return _(e);f=setTimeout(S,function(e){var r=t-(e-h);return m?a(r,c-(e-p)):r}(e))}function _(e){return f=void 0,v&&u?y(e):(u=l=void 0,d)}function C(){var e=i(),r=b(e);if(u=arguments,l=this,h=e,r){if(void 0===f)return w(h);if(m)return clearTimeout(f),f=setTimeout(S,t),y(h)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,n(r)&&(g=!!r.leading,c=(m="maxWait"in r)?s(o(r.maxWait)||0,t):c,v="trailing"in r?!!r.trailing:v),C.cancel=function(){void 0!==f&&clearTimeout(f),p=0,u=h=l=f=void 0},C.flush=function(){return void 0===f?d:_(i())},C}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},85564:(e,t,r)=>{var n=r(21078);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},79095:(e,t,r)=>{var n=r(13),i=r(222);e.exports=function(e,t){return null!=e&&i(e,t,n)}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,r)=>{var n=r(9454),i=r(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,r)=>{var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},18446:(e,t,r)=>{var n=r(90939);e.exports=function(e,t){return n(e,t)}},28368:(e,t,r)=>{var n=r(90939);e.exports=function(e,t,r){var i=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===i?n(e,t,void 0,r):!!i}},23560:(e,t,r)=>{var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56688:(e,t,r)=>{var n=r(25588),i=r(7518),o=r(31167),s=o&&o.isMap,a=s?i(s):n;e.exports=a},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},72928:(e,t,r)=>{var n=r(29221),i=r(7518),o=r(31167),s=o&&o.isSet,a=s?i(s):n;e.exports=a},33448:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},36719:(e,t,r)=>{var n=r(38749),i=r(7518),o=r(31167),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},3674:(e,t,r)=>{var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},81704:(e,t,r)=>{var n=r(14636),i=r(10313),o=r(98612);e.exports=function(e){return o(e)?n(e,!0):i(e)}},96486:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",w="[object Error]",b="[object Function]",S="[object GeneratorFunction]",_="[object Map]",C="[object Number]",L="[object Object]",E="[object Promise]",k="[object RegExp]",A="[object Set]",T="[object String]",O="[object Symbol]",R="[object WeakMap]",I="[object ArrayBuffer]",x="[object DataView]",N="[object Float32Array]",D="[object Float64Array]",P="[object Int8Array]",W="[object Int16Array]",F="[object Int32Array]",j="[object Uint8Array]",M="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,q=RegExp($.source),Z=RegExp(G.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+Le+"]",ke="["+Se+"]",Ae="\\d+",Te="["+_e+"]",Oe="[^\\ud800-\\udfff"+Le+Ae+"\\u2700-\\u27bf"+_e+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+Ce+"]",Pe="(?:"+Te+"|"+Oe+")",We="(?:"+De+"|"+Oe+")",Fe="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me="(?:"+ke+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",ze=Be+Me+"(?:\\u200d(?:"+[Ie,xe,Ne].join("|")+")"+Be+Me+")*",Ue="(?:"+["[\\u2700-\\u27bf]",xe,Ne].join("|")+")"+ze,He="(?:"+[Ie+ke+"?",ke,xe,Ne,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['’]","g"),$e=RegExp(ke,"g"),Ge=RegExp(Re+"(?="+Re+")|"+He+ze,"g"),qe=RegExp([De+"?"+Te+"+"+Fe+"(?="+[Ee,De,"$"].join("|")+")",We+"+"+je+"(?="+[Ee,De+Pe,"$"].join("|")+")",De+"?"+Pe+"+"+Fe,De+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,Ue].join("|"),"g"),Ze=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Qe={};Qe[N]=Qe[D]=Qe[P]=Qe[W]=Qe[F]=Qe[j]=Qe[M]=Qe[B]=Qe[z]=!0,Qe[g]=Qe[m]=Qe[I]=Qe[v]=Qe[x]=Qe[y]=Qe[w]=Qe[b]=Qe[_]=Qe[C]=Qe[L]=Qe[k]=Qe[A]=Qe[T]=Qe[R]=!1;var Xe={};Xe[g]=Xe[m]=Xe[I]=Xe[x]=Xe[v]=Xe[y]=Xe[N]=Xe[D]=Xe[P]=Xe[W]=Xe[F]=Xe[_]=Xe[C]=Xe[L]=Xe[k]=Xe[A]=Xe[T]=Xe[O]=Xe[j]=Xe[M]=Xe[B]=Xe[z]=!0,Xe[w]=Xe[b]=Xe[R]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&nt.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,ht=ct&&ct.isMap,pt=ct&&ct.isRegExp,gt=ct&&ct.isSet,mt=ct&&ct.isTypedArray;function vt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function yt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function wt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function bt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function St(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function _t(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Lt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Et(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function kt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function At(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Tt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Rt=Ft("length");function It(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function xt(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):xt(e,Pt,r)}function Dt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Pt(e){return e!=e}function Wt(e,t){var r=null==e?0:e.length;return r?Bt(e,t)/r:f}function Ft(e){return function(t){return null==t?i:t[e]}}function jt(e){return function(t){return null==e?i:e[t]}}function Mt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Bt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ut(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function Ht(e){return function(t){return e(t)}}function Vt(e,t){return Et(t,(function(t){return e[t]}))}function $t(e,t){return e.has(t)}function Gt(e,t){for(var r=-1,n=e.length;++r<n&&Nt(t,e[r],0)>-1;);return r}function qt(e,t){for(var r=e.length;r--&&Nt(t,e[r],0)>-1;);return r}function Zt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Kt=jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yt=jt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Qt(e){return Ze.test(e)}function Xt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function ir(e){return Qt(e)?function(e){for(var t=Ge.lastIndex=0;Ge.test(e);)++t;return t}(e):Rt(e)}function or(e){return Qt(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ar=jt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ur=function e(t){var r,n=(t=null==t?ot:ur.defaults(ot.Object(),t,ur.pick(ot,Ye))).Array,ie=t.Date,Se=t.Error,_e=t.Function,Ce=t.Math,Le=t.Object,Ee=t.RegExp,ke=t.String,Ae=t.TypeError,Te=n.prototype,Oe=_e.prototype,Re=Le.prototype,Ie=t["__core-js_shared__"],xe=Oe.toString,Ne=Re.hasOwnProperty,De=0,Pe=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",We=Re.toString,Fe=xe.call(Le),je=ot._,Me=Ee("^"+xe.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,ze=t.Symbol,Ue=t.Uint8Array,He=Be?Be.allocUnsafe:i,Ge=er(Le.getPrototypeOf,Le),Ze=Le.create,et=Re.propertyIsEnumerable,nt=Te.splice,it=ze?ze.isConcatSpreadable:i,st=ze?ze.iterator:i,at=ze?ze.toStringTag:i,lt=function(){try{var e=lo(Le,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,lr=Ce.ceil,cr=Ce.floor,dr=Le.getOwnPropertySymbols,fr=Be?Be.isBuffer:i,hr=t.isFinite,pr=Te.join,gr=er(Le.keys,Le),mr=Ce.max,vr=Ce.min,yr=ie.now,wr=t.parseInt,br=Ce.random,Sr=Te.reverse,_r=lo(t,"DataView"),Cr=lo(t,"Map"),Lr=lo(t,"Promise"),Er=lo(t,"Set"),kr=lo(t,"WeakMap"),Ar=lo(Le,"create"),Tr=kr&&new kr,Or={},Rr=Mo(_r),Ir=Mo(Cr),xr=Mo(Lr),Nr=Mo(Er),Dr=Mo(kr),Pr=ze?ze.prototype:i,Wr=Pr?Pr.valueOf:i,Fr=Pr?Pr.toString:i;function jr(e){if(ra(e)&&!$s(e)&&!(e instanceof Ur)){if(e instanceof zr)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new zr(e)}var Mr=function(){function e(){}return function(t){if(!ta(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Br(){}function zr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new $r;++t<r;)this.add(e[t])}function qr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Zr(e,t){var r=$s(e),n=!r&&Vs(e),i=!r&&!n&&Ks(e),o=!r&&!n&&!i&&ca(e),s=r||n||i||o,a=s?zt(e.length,ke):[],u=a.length;for(var l in e)!t&&!Ne.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vo(l,u))||a.push(l);return a}function Kr(e){var t=e.length;return t?e[Gn(0,t-1)]:i}function Yr(e,t){return Do(Ai(e),sn(t,0,e.length))}function Jr(e){return Do(Ai(e))}function Qr(e,t,r){(r!==i&&!zs(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];Ne.call(e,t)&&zs(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(zs(e[r][0],t))return r;return-1}function tn(e,t,r,n){return dn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ti(t,xa(t),e)}function nn(e,t,r){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Aa(e,t[r]);return s}function sn(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function an(e,t,r,n,o,s){var a,u=1&t,l=2&t,c=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var d=$s(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Ai(e,a)}else{var f=ho(e),h=f==b||f==S;if(Ks(e))return Si(e,u);if(f==L||f==g||h&&!o){if(a=l||h?{}:go(e),!u)return l?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Na(t),e)}(a,e)):function(e,t){return Ti(e,co(e),t)}(e,rn(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case I:return _i(e);case v:case y:return new i(+e);case x:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case D:case P:case W:case F:case j:case M:case B:case z:return Ci(e,r);case _:case A:return new i;case C:case T:return new i(e);case k:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return n=e,Wr?Le(Wr.call(n)):{}}}(e,f,u)}}s||(s=new qr);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var m=d?i:(c?l?ro:to:l?Na:xa)(e);return wt(m||e,(function(n,i){m&&(n=e[i=n]),Xr(a,i,an(n,t,r,i,e,s))})),a}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Le(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new Ae(o);return Ro((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=Ct,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;r&&(t=Et(t,Ht(r))),n?(o=Lt,s=!1):t.length>=200&&(o=$t,s=!1,t=new Gr(t));e:for(;++i<a;){var c=e[i],d=null==r?c:r(c);if(c=n||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,n)||u.push(c)}return u}jr.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:jr}},jr.prototype=Br.prototype,jr.prototype.constructor=jr,zr.prototype=Mr(Br.prototype),zr.prototype.constructor=zr,Ur.prototype=Mr(Br.prototype),Ur.prototype.constructor=Ur,Hr.prototype.clear=function(){this.__data__=Ar?Ar(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Ar){var r=t[e];return r===s?i:r}return Ne.call(t,e)?t[e]:i},Hr.prototype.has=function(e){var t=this.__data__;return Ar?t[e]!==i:Ne.call(t,e)},Hr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ar&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return en(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},$r.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Cr||Vr),string:new Hr}},$r.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},$r.prototype.get=function(e){return ao(this,e).get(e)},$r.prototype.has=function(e){return ao(this,e).has(e)},$r.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,s),this},Gr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.clear=function(){this.__data__=new Vr,this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},qr.prototype.get=function(e){return this.__data__.get(e)},qr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $r(n)}return r.set(e,t),this.size=r.size,this};var dn=Ii(wn),fn=Ii(bn,!0);function hn(e,t){var r=!0;return dn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function pn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!la(a):r(a,u)))var u=a,l=s}return l}function gn(e,t){var r=[];return dn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function mn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=mo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?mn(a,t-1,r,n,i):kt(i,a):n||(i[i.length]=a)}return i}var vn=xi(),yn=xi(!0);function wn(e,t){return e&&vn(e,t,xa)}function bn(e,t){return e&&yn(e,t,xa)}function Sn(e,t){return _t(t,(function(t){return Qs(e[t])}))}function _n(e,t){for(var r=0,n=(t=vi(t,e)).length;null!=e&&r<n;)e=e[jo(t[r++])];return r&&r==n?e:i}function Cn(e,t,r){var n=t(e);return $s(e)?n:kt(n,r(e))}function Ln(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Le(e)?function(e){var t=Ne.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var o=We.call(e);return n&&(t?e[at]=r:delete e[at]),o}(e):function(e){return We.call(e)}(e)}function En(e,t){return e>t}function kn(e,t){return null!=e&&Ne.call(e,t)}function An(e,t){return null!=e&&t in Le(e)}function Tn(e,t,r){for(var o=r?Lt:Ct,s=e[0].length,a=e.length,u=a,l=n(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Et(f,Ht(t))),c=vr(f.length,c),l[u]=!r&&(t||s>=120&&f.length>=120)?new Gr(u&&f):i}f=e[0];var h=-1,p=l[0];e:for(;++h<s&&d.length<c;){var g=f[h],m=t?t(g):g;if(g=r||0!==g?g:0,!(p?$t(p,m):o(d,m,r))){for(u=a;--u;){var v=l[u];if(!(v?$t(v,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(g)}}return d}function On(e,t,r){var n=null==(e=ko(e,t=vi(t,e)))?e:e[jo(Jo(t))];return null==n?i:vt(n,e,r)}function Rn(e){return ra(e)&&Ln(e)==g}function In(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=$s(e),u=$s(t),l=a?m:ho(e),c=u?m:ho(t),d=(l=l==g?L:l)==L,f=(c=c==g?L:c)==L,h=l==c;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new qr),a||ca(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case v:case y:case C:return zs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case _:var a=Xt;case A:var u=1&n;if(a||(a=rr),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var c=Xi(a(e),a(t),n,i,o,s);return s.delete(e),c;case O:if(Wr)return Wr.call(e)==Wr.call(t)}return!1}(e,t,l,r,n,o,s);if(!(1&r)){var p=d&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(p||b){var S=p?e.value():e,E=b?t.value():t;return s||(s=new qr),o(S,E,r,n,s)}}return!!h&&(s||(s=new qr),function(e,t,r,n,o,s){var a=1&r,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Ne.call(t,d)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var g=a;++c<l;){var m=e[d=u[c]],v=t[d];if(n)var y=a?n(v,m,d,t,e,s):n(m,v,d,e,t,s);if(!(y===i?m===v||o(m,v,r,n,s):y)){p=!1;break}g||(g="constructor"==d)}if(p&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,o,s))}(e,t,r,n,In,o))}function xn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Le(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=r[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===i&&!(l in e))return!1}else{var f=new qr;if(n)var h=n(c,d,l,e,t,f);if(!(h===i?In(d,c,3,n,f):h))return!1}}return!0}function Nn(e){return!(!ta(e)||(t=e,Pe&&Pe in t))&&(Qs(e)?Me:ge).test(Mo(e));var t}function Dn(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?$s(e)?Mn(e[0],e[1]):jn(e):hu(e)}function Pn(e){if(!_o(e))return gr(e);var t=[];for(var r in Le(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Wn(e,t){return e<t}function Fn(e,t){var r=-1,i=qs(e)?n(e.length):[];return dn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function jn(e){var t=uo(e);return 1==t.length&&t[0][2]?Lo(t[0][0],t[0][1]):function(r){return r===e||xn(r,e,t)}}function Mn(e,t){return wo(e)&&Co(t)?Lo(jo(e),t):function(r){var n=Aa(r,e);return n===i&&n===t?Ta(r,e):In(t,n,3)}}function Bn(e,t,r,n,o){e!==t&&vn(t,(function(s,a){if(o||(o=new qr),ta(s))!function(e,t,r,n,o,s,a){var u=To(e,r),l=To(t,r),c=a.get(l);if(c)Qr(e,r,c);else{var d=s?s(u,l,r+"",e,t,a):i,f=d===i;if(f){var h=$s(l),p=!h&&Ks(l),g=!h&&!p&&ca(l);d=l,h||p||g?$s(u)?d=u:Zs(u)?d=Ai(u):p?(f=!1,d=Si(l,!0)):g?(f=!1,d=Ci(l,!0)):d=[]:oa(l)||Vs(l)?(d=u,Vs(u)?d=ya(u):ta(u)&&!Qs(u)||(d=go(l))):f=!1}f&&(a.set(l,d),o(d,l,n,s,a),a.delete(l)),Qr(e,r,d)}}(e,t,a,r,Bn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Qr(e,a,u)}}),Na)}function zn(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?Et(t,(function(e){return $s(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[iu];var n=-1;t=Et(t,Ht(so()));var i=Fn(e,(function(e,r,i){var o=Et(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Li(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Hn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Jn(o,vi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Dt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),r&&(a=Et(e,Ht(r)));++o<s;)for(var u=0,l=t[o],c=r?r(l):l;(u=i(a,c,u,n))>-1;)a!==e&&nt.call(a,u,1),nt.call(e,u,1);return e}function $n(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;vo(i)?nt.call(e,i,1):li(e,i)}}return e}function Gn(e,t){return e+cr(br()*(t-e+1))}function qn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=cr(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Io(Eo(e,t,iu),e+"")}function Kn(e){return Kr(za(e))}function Yn(e,t){var r=za(e);return Do(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=jo(t[o]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=n?n(d,l,u):i)===i&&(c=ta(d)?d:vo(t[o+1])?[]:{})}Xr(u,l,c),u=u[l]}return e}var Qn=Tr?function(e,t){return Tr.set(e,t),e}:iu,Xn=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Do(za(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return dn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!la(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,iu,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,l=la(t),c=t===i;o<s;){var d=cr((o+s)/2),f=r(e[d]),h=f!==i,p=null===f,g=f==f,m=la(f);if(a)var v=n||g;else v=c?g&&(n||h):u?g&&h&&(n||!p):l?g&&h&&!p&&(n||!m):!p&&!m&&(n?f<=t:f<t);v?o=d+1:s=d}return vr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!zs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:la(e)?f:+e}function ai(e){if("string"==typeof e)return e;if($s(e))return Et(e,ai)+"";if(la(e))return Fr?Fr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=Ct,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=Lt;else if(o>=200){var l=t?null:qi(e);if(l)return rr(l);s=!1,i=$t,u=new Gr}else u=t?[]:a;e:for(;++n<o;){var c=e[n],d=t?t(c):c;if(c=r||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else i(u,d,r)||(u!==a&&u.push(d),a.push(c))}return a}function li(e,t){return null==(e=ko(e,t=vi(t,e)))||delete e[jo(Jo(t))]}function ci(e,t,r,n){return Jn(e,t,r(_n(e,t)),n)}function di(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),r)}function hi(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ui(mn(s,1),t,r)}function pi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function gi(e){return Zs(e)?e:[]}function mi(e){return"function"==typeof e?e:iu}function vi(e,t){return $s(e)?e:wo(e,t)?[e]:Fo(wa(e))}var yi=Zn;function wi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var bi=ct||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ci(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=la(e),a=t!==i,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||n&&a&&l||!r&&l||!o)return 1;if(!n&&!s&&!c&&e<t||c&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!l)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,l=t.length,c=mr(s-a,0),d=n(l+c),f=!i;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[r[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function ki(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,l=-1,c=t.length,d=mr(s-u,0),f=n(d+c),h=!i;++o<d;)f[o]=e[o];for(var p=o;++l<c;)f[p+l]=t[l];for(;++a<u;)(h||o<s)&&(f[p+r[a]]=e[o++]);return f}function Ai(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ti(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=n?n(r[u],e[u],u,r,e):i;l===i&&(l=e[u]),o?nn(r,u,l):Xr(r,u,l)}return r}function Oi(e,t){return function(r,n){var i=$s(r)?yt:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function Ri(e){return Zn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Le(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ii(e,t){return function(r,n){if(null==r)return r;if(!qs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Le(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function xi(e){return function(t,r,n){for(var i=-1,o=Le(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ni(e){return function(t){var r=Qt(t=wa(t))?or(t):i,n=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return n[e]()+o}}function Di(e){return function(t){return At(Qa(Va(t).replace(Ve,"")),e,"")}}function Pi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Mr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Wi(e){return function(t,r,n){var o=Le(t);if(!qs(t)){var s=so(r,3);t=xa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Fi(e){return eo((function(t){var r=t.length,n=r,s=zr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Ae(o);if(s&&!u&&"wrapper"==io(a))var u=new zr([],!0)}for(n=u?n:r;++n<r;){var l=io(a=t[n]),c="wrapper"==l?no(a):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[io(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&$s(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function ji(e,t,r,o,s,a,u,c,d,f){var h=t&l,p=1&t,g=2&t,m=24&t,v=512&t,y=g?i:Pi(e);return function i(){for(var l=arguments.length,w=n(l),b=l;b--;)w[b]=arguments[b];if(m)var S=oo(i),_=Zt(w,S);if(o&&(w=Ei(w,o,s,m)),a&&(w=ki(w,a,u,m)),l-=_,m&&l<f){var C=tr(w,S);return $i(e,t,ji,i.placeholder,r,w,C,c,d,f-l)}var L=p?r:this,E=g?L[e]:e;return l=w.length,c?w=Ao(w,c):v&&l>1&&w.reverse(),h&&d<l&&(w.length=d),this&&this!==ot&&this instanceof i&&(E=y||Pi(E)),E.apply(L,w)}}function Mi(e,t){return function(r,n){return function(e,t,r,n){return wn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Bi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=e(r,n)}return o}}function zi(e){return eo((function(t){return t=Et(t,Ht(so())),Zn((function(r){var n=this;return e(t,(function(e){return vt(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?qn(t,e):t;var n=qn(t,lr(e/ir(t)));return Qt(t)?wi(or(n),0,e).join(""):n.slice(0,e)}function Hi(e){return function(t,r,o){return o&&"number"!=typeof o&&yo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=mr(lr((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=va(t),r=va(r)),e(t,r)}}function $i(e,t,r,n,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var h=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,l,c,d],p=r.apply(i,h);return bo(e)&&Oo(p,h),p.placeholder=n,xo(p,e,t)}function Gi(e){var t=Ce[e];return function(e,r){if(e=va(e),(r=null==r?0:vr(ga(r),292))&&hr(e)){var n=(wa(e)+"e").split("e");return+((n=(wa(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var qi=Er&&1/rr(new Er([,-0]))[1]==c?function(e){return new Er(e)}:lu;function Zi(e){return function(t){var r=ho(t);return r==_?Xt(t):r==A?nr(t):function(e,t){return Et(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,s,c,d,f,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var g=s?s.length:0;if(g||(t&=-97,s=c=i),f=f===i?f:mr(ga(f),0),h=h===i?h:ga(h),g-=c?c.length:0,64&t){var m=s,v=c;s=c=i}var y=p?i:no(e),w=[e,t,r,s,c,m,v,d,f,h];if(y&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==l&&8==r||n==l&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ei(c,u,t[4]):u,e[4]=c?tr(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?ki(c,u,t[6]):u,e[6]=c?tr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&l&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,y),e=w[0],t=w[1],r=w[2],s=w[3],c=w[4],!(h=w[9]=w[9]===i?p?0:e.length:mr(w[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=Pi(e);return function s(){for(var a=arguments.length,u=n(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tr(u,c);return(a-=d.length)<r?$i(e,t,ji,s.placeholder,i,u,d,i,i,r-a):vt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,h):t!=u&&33!=t||c.length?ji.apply(i,w):function(e,t,r,i){var o=1&t,s=Pi(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=i.length,d=n(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++a];return vt(f,o?r:this,d)}}(e,t,r,s);else var b=function(e,t,r){var n=1&t,i=Pi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return xo((y?Qn:Oo)(b,w),e,t)}function Yi(e,t,r,n){return e===i||zs(e,Re[r])&&!Ne.call(n,r)?t:e}function Ji(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bn(e,t,i,Ji,s),s.delete(t)),e}function Qi(e){return oa(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=2&r?new Gr:i;for(s.set(e,t),s.set(t,e);++f<u;){var g=e[f],m=t[f];if(n)var v=a?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(v!==i){if(v)continue;h=!1;break}if(p){if(!Ot(t,(function(e,t){if(!$t(p,t)&&(g===e||o(g,e,r,n,s)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!o(g,m,r,n,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return Io(Eo(e,i,Go),e+"")}function to(e){return Cn(e,xa,co)}function ro(e){return Cn(e,Na,fo)}var no=Tr?function(e){return Tr.get(e)}:lu;function io(e){for(var t=e.name+"",r=Or[t],n=Ne.call(Or,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Ne.call(jr,"placeholder")?jr:e).placeholder}function so(){var e=jr.iteratee||ou;return e=e===ou?Dn:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=xa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Co(i)]}return t}function lo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Nn(r)?r:i}var co=dr?function(e){return null==e?[]:(e=Le(e),_t(dr(e),(function(t){return et.call(e,t)})))}:mu,fo=dr?function(e){for(var t=[];e;)kt(t,co(e)),e=Ge(e);return t}:mu,ho=Ln;function po(e,t,r){for(var n=-1,i=(t=vi(t,e)).length,o=!1;++n<i;){var s=jo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&vo(s,i)&&($s(e)||Vs(e))}function go(e){return"function"!=typeof e.constructor||_o(e)?{}:Mr(Ge(e))}function mo(e){return $s(e)||Vs(e)||!!(it&&e&&e[it])}function vo(e,t){var r=typeof e;return!!(t=null==t?d:t)&&("number"==r||"symbol"!=r&&ve.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?qs(r)&&vo(t,r.length):"string"==n&&t in r)&&zs(r[t],e)}function wo(e,t){if($s(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!la(e))||X.test(e)||!Q.test(e)||null!=t&&e in Le(t)}function bo(e){var t=io(e),r=jr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(_r&&ho(new _r(new ArrayBuffer(1)))!=x||Cr&&ho(new Cr)!=_||Lr&&ho(Lr.resolve())!=E||Er&&ho(new Er)!=A||kr&&ho(new kr)!=R)&&(ho=function(e){var t=Ln(e),r=t==L?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case Rr:return x;case Ir:return _;case xr:return E;case Nr:return A;case Dr:return R}return t});var So=Ie?Qs:vu;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Lo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Le(r))}}function Eo(e,t,r){return t=mr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=mr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),vt(e,this,u)}}function ko(e,t){return t.length<2?e:_n(e,ti(t,0,-1))}function Ao(e,t){for(var r=e.length,n=vr(t.length,r),o=Ai(e);n--;){var s=t[n];e[n]=vo(s,r)?o[s]:i}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=No(Qn),Ro=jt||function(e,t){return ot.setTimeout(e,t)},Io=No(Xn);function xo(e,t,r){var n=t+"";return Io(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return wt(p,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function No(e){var t=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Gn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Po,Wo,Fo=(Po=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(ce,"$1"):r||e)})),t}),(function(e){return 500===Wo.size&&Wo.clear(),e})),Wo=Po.cache,Po);function jo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Ur)return e.clone();var t=new zr(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Zn((function(e,t){return Zs(e)?cn(e,mn(t,1,Zs,!0)):[]})),Uo=Zn((function(e,t){var r=Jo(t);return Zs(r)&&(r=i),Zs(e)?cn(e,mn(t,1,Zs,!0),so(r,2)):[]})),Ho=Zn((function(e,t){var r=Jo(t);return Zs(r)&&(r=i),Zs(e)?cn(e,mn(t,1,Zs,!0),i,r):[]}));function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=mr(n+i,0)),xt(e,so(t,3),i)}function $o(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ga(r),o=r<0?mr(n+o,0):vr(o,n-1)),xt(e,so(t,3),o,!0)}function Go(e){return null!=e&&e.length?mn(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Zo=Zn((function(e){var t=Et(e,gi);return t.length&&t[0]===e[0]?Tn(t):[]})),Ko=Zn((function(e){var t=Jo(e),r=Et(e,gi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Tn(r,so(t,2)):[]})),Yo=Zn((function(e){var t=Jo(e),r=Et(e,gi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Tn(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Qo=Zn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return $n(e,Et(t,(function(e){return vo(e,r)?+e:e})).sort(Li)),n}));function ts(e){return null==e?e:Sr.call(e)}var rs=Zn((function(e){return ui(mn(e,1,Zs,!0))})),ns=Zn((function(e){var t=Jo(e);return Zs(t)&&(t=i),ui(mn(e,1,Zs,!0),so(t,2))})),is=Zn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(mn(e,1,Zs,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Zs(e))return t=mr(e.length,t),!0})),zt(t,(function(t){return Et(e,Ft(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:Et(r,(function(e){return vt(t,i,e)}))}var as=Zn((function(e,t){return Zs(e)?cn(e,t):[]})),us=Zn((function(e){return hi(_t(e,Zs))})),ls=Zn((function(e){var t=Jo(e);return Zs(t)&&(t=i),hi(_t(e,Zs),so(t,2))})),cs=Zn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,hi(_t(e,Zs),i,t)})),ds=Zn(os),fs=Zn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function hs(e){var t=jr(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var gs=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&vo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new zr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ms=Oi((function(e,t,r){Ne.call(e,r)?++e[r]:nn(e,r,1)})),vs=Wi(Vo),ys=Wi($o);function ws(e,t){return($s(e)?wt:dn)(e,so(t,3))}function bs(e,t){return($s(e)?bt:fn)(e,so(t,3))}var Ss=Oi((function(e,t,r){Ne.call(e,r)?e[r].push(t):nn(e,r,[t])})),_s=Zn((function(e,t,r){var i=-1,o="function"==typeof t,s=qs(e)?n(e.length):[];return dn(e,(function(e){s[++i]=o?vt(t,e,r):On(e,t,r)})),s})),Cs=Oi((function(e,t,r){nn(e,r,t)}));function Ls(e,t){return($s(e)?Et:Fn)(e,so(t,3))}var Es=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ks=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&yo(e,t[0],t[1])?t=[]:r>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,mn(t,1),[])})),As=Rt||function(){return ot.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,l,i,i,i,i,t)}function Os(e,t){var r;if("function"!=typeof t)throw new Ae(o);return e=ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Rs=Zn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(Rs));n|=u}return Ki(e,n,t,r,i)})),Is=Zn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(Is));n|=u}return Ki(t,n,e,r,i)}));function xs(e,t,r){var n,s,a,u,l,c,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function g(t){var r=n,o=s;return n=s=i,d=t,u=e.apply(o,r)}function m(e){return d=e,l=Ro(y,t),f?g(e):u}function v(e){var r=e-c;return c===i||r>=t||r<0||h&&e-d>=a}function y(){var e=As();if(v(e))return w(e);l=Ro(y,function(e){var r=t-(e-c);return h?vr(r,a-(e-d)):r}(e))}function w(e){return l=i,p&&n?g(e):(n=s=i,u)}function b(){var e=As(),r=v(e);if(n=arguments,s=this,c=e,r){if(l===i)return m(c);if(h)return bi(l),l=Ro(y,t),g(c)}return l===i&&(l=Ro(y,t)),u}return t=va(t)||0,ta(r)&&(f=!!r.leading,a=(h="maxWait"in r)?mr(va(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),b.cancel=function(){l!==i&&bi(l),d=0,n=c=s=l=i},b.flush=function(){return l===i?u:w(As())},b}var Ns=Zn((function(e,t){return ln(e,1,t)})),Ds=Zn((function(e,t,r){return ln(e,va(t)||0,r)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ps.Cache||$r),r}function Ws(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ps.Cache=$r;var Fs=yi((function(e,t){var r=(t=1==t.length&&$s(t[0])?Et(t[0],Ht(so())):Et(mn(t,1),Ht(so()))).length;return Zn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return vt(e,this,n)}))})),js=Zn((function(e,t){var r=tr(t,oo(js));return Ki(e,u,i,t,r)})),Ms=Zn((function(e,t){var r=tr(t,oo(Ms));return Ki(e,64,i,t,r)})),Bs=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var Us=Vi(En),Hs=Vi((function(e,t){return e>=t})),Vs=Rn(function(){return arguments}())?Rn:function(e){return ra(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},$s=n.isArray,Gs=dt?Ht(dt):function(e){return ra(e)&&Ln(e)==I};function qs(e){return null!=e&&ea(e.length)&&!Qs(e)}function Zs(e){return ra(e)&&qs(e)}var Ks=fr||vu,Ys=ft?Ht(ft):function(e){return ra(e)&&Ln(e)==y};function Js(e){if(!ra(e))return!1;var t=Ln(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Qs(e){if(!ta(e))return!1;var t=Ln(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=ht?Ht(ht):function(e){return ra(e)&&ho(e)==_};function ia(e){return"number"==typeof e||ra(e)&&Ln(e)==C}function oa(e){if(!ra(e)||Ln(e)!=L)return!1;var t=Ge(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&xe.call(r)==Fe}var sa=pt?Ht(pt):function(e){return ra(e)&&Ln(e)==k},aa=gt?Ht(gt):function(e){return ra(e)&&ho(e)==A};function ua(e){return"string"==typeof e||!$s(e)&&ra(e)&&Ln(e)==T}function la(e){return"symbol"==typeof e||ra(e)&&Ln(e)==O}var ca=mt?Ht(mt):function(e){return ra(e)&&ea(e.length)&&!!Qe[Ln(e)]},da=Vi(Wn),fa=Vi((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(qs(e))return ua(e)?or(e):Ai(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=ho(e);return(t==_?Xt:t==A?rr:za)(e)}function pa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ma(e){return e?sn(ga(e),0,h):0}function va(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var r=pe.test(e);return r||me.test(e)?rt(e.slice(2),r?2:8):he.test(e)?f:+e}function ya(e){return Ti(e,Na(e))}function wa(e){return null==e?"":ai(e)}var ba=Ri((function(e,t){if(_o(t)||qs(t))Ti(t,xa(t),e);else for(var r in t)Ne.call(t,r)&&Xr(e,r,t[r])})),Sa=Ri((function(e,t){Ti(t,Na(t),e)})),_a=Ri((function(e,t,r,n){Ti(t,Na(t),e,n)})),Ca=Ri((function(e,t,r,n){Ti(t,xa(t),e,n)})),La=eo(on),Ea=Zn((function(e,t){e=Le(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===i||zs(d,Re[c])&&!Ne.call(e,c))&&(e[c]=s[c])}return e})),ka=Zn((function(e){return e.push(i,Ji),vt(Pa,i,e)}));function Aa(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,An)}var Oa=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),e[t]=r}),tu(iu)),Ra=Mi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),so),Ia=Zn(On);function xa(e){return qs(e)?Zr(e):Pn(e)}function Na(e){return qs(e)?Zr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Le(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}(e)}var Da=Ri((function(e,t,r){Bn(e,t,r)})),Pa=Ri((function(e,t,r,n){Bn(e,t,r,n)})),Wa=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=Et(t,(function(t){return t=vi(t,e),n||(n=t.length>1),t})),Ti(e,ro(e),r),n&&(r=an(r,7,Qi));for(var i=t.length;i--;)li(r,t[i]);return r})),Fa=eo((function(e,t){return null==e?{}:function(e,t){return Hn(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function ja(e,t){if(null==e)return{};var r=Et(ro(e),(function(e){return[e]}));return t=so(t),Hn(e,r,(function(e,r){return t(e,r[0])}))}var Ma=Zi(xa),Ba=Zi(Na);function za(e){return null==e?[]:Vt(e,xa(e))}var Ua=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Ha(t):t)}));function Ha(e){return Ja(wa(e).toLowerCase())}function Va(e){return(e=wa(e))&&e.replace(ye,Kt).replace($e,"")}var $a=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ga=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),qa=Ni("toLowerCase"),Za=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ka=Di((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ya=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=Ni("toUpperCase");function Qa(e,t,r){return e=wa(e),(t=r?i:t)===i?function(e){return Ke.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Zn((function(e,t){try{return vt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=jo(t),nn(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Fi(),nu=Fi(!0);function iu(e){return e}function ou(e){return Dn("function"==typeof e?e:an(e,1))}var su=Zn((function(e,t){return function(r){return On(r,e,t)}})),au=Zn((function(e,t){return function(r){return On(e,r,t)}}));function uu(e,t,r){var n=xa(t),i=Sn(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Sn(t,xa(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Qs(e);return wt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Ai(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function lu(){}var cu=zi(Et),du=zi(St),fu=zi(Ot);function hu(e){return wo(e)?Ft(jo(e)):function(e){return function(t){return _n(t,e)}}(e)}var pu=Hi(),gu=Hi(!0);function mu(){return[]}function vu(){return!1}var yu,wu=Bi((function(e,t){return e+t}),0),bu=Gi("ceil"),Su=Bi((function(e,t){return e/t}),1),_u=Gi("floor"),Cu=Bi((function(e,t){return e*t}),1),Lu=Gi("round"),Eu=Bi((function(e,t){return e-t}),0);return jr.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},jr.ary=Ts,jr.assign=ba,jr.assignIn=Sa,jr.assignInWith=_a,jr.assignWith=Ca,jr.at=La,jr.before=Os,jr.bind=Rs,jr.bindAll=eu,jr.bindKey=Is,jr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $s(e)?e:[e]},jr.chain=hs,jr.chunk=function(e,t,r){t=(r?yo(e,t,r):t===i)?1:mr(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(lr(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},jr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},jr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return kt($s(r)?Ai(r):[r],mn(t,1))},jr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?Et(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var i=e[n];if(vt(i[0],this,r))return vt(i[1],this,r)}}))},jr.conforms=function(e){return function(e){var t=xa(e);return function(r){return un(r,e,t)}}(an(e,1))},jr.constant=tu,jr.countBy=ms,jr.create=function(e,t){var r=Mr(e);return null==t?r:rn(r,t)},jr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},jr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},jr.debounce=xs,jr.defaults=Ea,jr.defaultsDeep=ka,jr.defer=Ns,jr.delay=Ds,jr.difference=zo,jr.differenceBy=Uo,jr.differenceWith=Ho,jr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ga(t))<0?0:t,n):[]},jr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ga(t)))<0?0:t):[]},jr.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},jr.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},jr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&yo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ga(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ga(n))<0&&(n+=o),n=r>n?0:ma(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},jr.filter=function(e,t){return($s(e)?_t:gn)(e,so(t,3))},jr.flatMap=function(e,t){return mn(Ls(e,t),1)},jr.flatMapDeep=function(e,t){return mn(Ls(e,t),c)},jr.flatMapDepth=function(e,t,r){return r=r===i?1:ga(r),mn(Ls(e,t),r)},jr.flatten=Go,jr.flattenDeep=function(e){return null!=e&&e.length?mn(e,c):[]},jr.flattenDepth=function(e,t){return null!=e&&e.length?mn(e,t=t===i?1:ga(t)):[]},jr.flip=function(e){return Ki(e,512)},jr.flow=ru,jr.flowRight=nu,jr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},jr.functions=function(e){return null==e?[]:Sn(e,xa(e))},jr.functionsIn=function(e){return null==e?[]:Sn(e,Na(e))},jr.groupBy=Ss,jr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},jr.intersection=Zo,jr.intersectionBy=Ko,jr.intersectionWith=Yo,jr.invert=Oa,jr.invertBy=Ra,jr.invokeMap=_s,jr.iteratee=ou,jr.keyBy=Cs,jr.keys=xa,jr.keysIn=Na,jr.map=Ls,jr.mapKeys=function(e,t){var r={};return t=so(t,3),wn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},jr.mapValues=function(e,t){var r={};return t=so(t,3),wn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},jr.matches=function(e){return jn(an(e,1))},jr.matchesProperty=function(e,t){return Mn(e,an(t,1))},jr.memoize=Ps,jr.merge=Da,jr.mergeWith=Pa,jr.method=su,jr.methodOf=au,jr.mixin=uu,jr.negate=Ws,jr.nthArg=function(e){return e=ga(e),Zn((function(t){return zn(t,e)}))},jr.omit=Wa,jr.omitBy=function(e,t){return ja(e,Ws(so(t)))},jr.once=function(e){return Os(2,e)},jr.orderBy=function(e,t,r,n){return null==e?[]:($s(t)||(t=null==t?[]:[t]),$s(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},jr.over=cu,jr.overArgs=Fs,jr.overEvery=du,jr.overSome=fu,jr.partial=js,jr.partialRight=Ms,jr.partition=Es,jr.pick=Fa,jr.pickBy=ja,jr.property=hu,jr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},jr.pull=Qo,jr.pullAll=Xo,jr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,so(r,2)):e},jr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},jr.pullAt=es,jr.range=pu,jr.rangeRight=gu,jr.rearg=Bs,jr.reject=function(e,t){return($s(e)?_t:gn)(e,Ws(so(t,3)))},jr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return $n(e,i),r},jr.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Zn(e,t=t===i?t:ga(t))},jr.reverse=ts,jr.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===i)?1:ga(t),($s(e)?Yr:Yn)(e,t)},jr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},jr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},jr.shuffle=function(e){return($s(e)?Jr:ei)(e)},jr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=n):(t=null==t?0:ga(t),r=r===i?n:ga(r)),ti(e,t,r)):[]},jr.sortBy=ks,jr.sortedUniq=function(e){return e&&e.length?oi(e):[]},jr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},jr.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=i),(r=r===i?h:r>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Qt(e)?wi(or(e),0,r):e.split(t,r):[]},jr.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:mr(ga(t),0),Zn((function(r){var n=r[t],i=wi(r,0,t);return n&&kt(i,n),vt(e,this,i)}))},jr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},jr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ga(t))<0?0:t):[]},jr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ga(t)))<0?0:t,n):[]},jr.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},jr.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},jr.tap=function(e,t){return t(e),e},jr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),xs(e,t,{leading:n,maxWait:t,trailing:i})},jr.thru=ps,jr.toArray=ha,jr.toPairs=Ma,jr.toPairsIn=Ba,jr.toPath=function(e){return $s(e)?Et(e,jo):la(e)?[e]:Ai(Fo(wa(e)))},jr.toPlainObject=ya,jr.transform=function(e,t,r){var n=$s(e),i=n||Ks(e)||ca(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Qs(o)?Mr(Ge(e)):{}}return(i?wt:wn)(e,(function(e,n,i){return t(r,e,n,i)})),r},jr.unary=function(e){return Ts(e,1)},jr.union=rs,jr.unionBy=ns,jr.unionWith=is,jr.uniq=function(e){return e&&e.length?ui(e):[]},jr.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},jr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},jr.unset=function(e,t){return null==e||li(e,t)},jr.unzip=os,jr.unzipWith=ss,jr.update=function(e,t,r){return null==e?e:ci(e,t,mi(r))},jr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,mi(r),n)},jr.values=za,jr.valuesIn=function(e){return null==e?[]:Vt(e,Na(e))},jr.without=as,jr.words=Qa,jr.wrap=function(e,t){return js(mi(t),e)},jr.xor=us,jr.xorBy=ls,jr.xorWith=cs,jr.zip=ds,jr.zipObject=function(e,t){return pi(e||[],t||[],Xr)},jr.zipObjectDeep=function(e,t){return pi(e||[],t||[],Jn)},jr.zipWith=fs,jr.entries=Ma,jr.entriesIn=Ba,jr.extend=Sa,jr.extendWith=_a,uu(jr,jr),jr.add=wu,jr.attempt=Xa,jr.camelCase=Ua,jr.capitalize=Ha,jr.ceil=bu,jr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=va(r))==r?r:0),t!==i&&(t=(t=va(t))==t?t:0),sn(va(e),t,r)},jr.clone=function(e){return an(e,4)},jr.cloneDeep=function(e){return an(e,5)},jr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},jr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},jr.conformsTo=function(e,t){return null==t||un(e,t,xa(t))},jr.deburr=Va,jr.defaultTo=function(e,t){return null==e||e!=e?t:e},jr.divide=Su,jr.endsWith=function(e,t,r){e=wa(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ga(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},jr.eq=zs,jr.escape=function(e){return(e=wa(e))&&Z.test(e)?e.replace(G,Yt):e},jr.escapeRegExp=function(e){return(e=wa(e))&&re.test(e)?e.replace(te,"\\$&"):e},jr.every=function(e,t,r){var n=$s(e)?St:hn;return r&&yo(e,t,r)&&(t=i),n(e,so(t,3))},jr.find=vs,jr.findIndex=Vo,jr.findKey=function(e,t){return It(e,so(t,3),wn)},jr.findLast=ys,jr.findLastIndex=$o,jr.findLastKey=function(e,t){return It(e,so(t,3),bn)},jr.floor=_u,jr.forEach=ws,jr.forEachRight=bs,jr.forIn=function(e,t){return null==e?e:vn(e,so(t,3),Na)},jr.forInRight=function(e,t){return null==e?e:yn(e,so(t,3),Na)},jr.forOwn=function(e,t){return e&&wn(e,so(t,3))},jr.forOwnRight=function(e,t){return e&&bn(e,so(t,3))},jr.get=Aa,jr.gt=Us,jr.gte=Hs,jr.has=function(e,t){return null!=e&&po(e,t,kn)},jr.hasIn=Ta,jr.head=qo,jr.identity=iu,jr.includes=function(e,t,r,n){e=qs(e)?e:za(e),r=r&&!n?ga(r):0;var i=e.length;return r<0&&(r=mr(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Nt(e,t,r)>-1},jr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=mr(n+i,0)),Nt(e,t,i)},jr.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<mr(t,r)}(e=va(e),t,r)},jr.invoke=Ia,jr.isArguments=Vs,jr.isArray=$s,jr.isArrayBuffer=Gs,jr.isArrayLike=qs,jr.isArrayLikeObject=Zs,jr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&Ln(e)==v},jr.isBuffer=Ks,jr.isDate=Ys,jr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},jr.isEmpty=function(e){if(null==e)return!0;if(qs(e)&&($s(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||Vs(e)))return!e.length;var t=ho(e);if(t==_||t==A)return!e.size;if(_o(e))return!Pn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},jr.isEqual=function(e,t){return In(e,t)},jr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?In(e,t,i,r):!!n},jr.isError=Js,jr.isFinite=function(e){return"number"==typeof e&&hr(e)},jr.isFunction=Qs,jr.isInteger=Xs,jr.isLength=ea,jr.isMap=na,jr.isMatch=function(e,t){return e===t||xn(e,t,uo(t))},jr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,xn(e,t,uo(t),r)},jr.isNaN=function(e){return ia(e)&&e!=+e},jr.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nn(e)},jr.isNil=function(e){return null==e},jr.isNull=function(e){return null===e},jr.isNumber=ia,jr.isObject=ta,jr.isObjectLike=ra,jr.isPlainObject=oa,jr.isRegExp=sa,jr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},jr.isSet=aa,jr.isString=ua,jr.isSymbol=la,jr.isTypedArray=ca,jr.isUndefined=function(e){return e===i},jr.isWeakMap=function(e){return ra(e)&&ho(e)==R},jr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==Ln(e)},jr.join=function(e,t){return null==e?"":pr.call(e,t)},jr.kebabCase=$a,jr.last=Jo,jr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ga(r))<0?mr(n+o,0):vr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):xt(e,Pt,o,!0)},jr.lowerCase=Ga,jr.lowerFirst=qa,jr.lt=da,jr.lte=fa,jr.max=function(e){return e&&e.length?pn(e,iu,En):i},jr.maxBy=function(e,t){return e&&e.length?pn(e,so(t,2),En):i},jr.mean=function(e){return Wt(e,iu)},jr.meanBy=function(e,t){return Wt(e,so(t,2))},jr.min=function(e){return e&&e.length?pn(e,iu,Wn):i},jr.minBy=function(e,t){return e&&e.length?pn(e,so(t,2),Wn):i},jr.stubArray=mu,jr.stubFalse=vu,jr.stubObject=function(){return{}},jr.stubString=function(){return""},jr.stubTrue=function(){return!0},jr.multiply=Cu,jr.nth=function(e,t){return e&&e.length?zn(e,ga(t)):i},jr.noConflict=function(){return ot._===this&&(ot._=je),this},jr.noop=lu,jr.now=As,jr.pad=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(cr(i),r)+e+Ui(lr(i),r)},jr.padEnd=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;return t&&n<t?e+Ui(t-n,r):e},jr.padStart=function(e,t,r){e=wa(e);var n=(t=ga(t))?ir(e):0;return t&&n<t?Ui(t-n,r)+e:e},jr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),wr(wa(e).replace(ne,""),t||0)},jr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=br();return vr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Gn(e,t)},jr.reduce=function(e,t,r){var n=$s(e)?At:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,dn)},jr.reduceRight=function(e,t,r){var n=$s(e)?Tt:Mt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},jr.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===i)?1:ga(t),qn(wa(e),t)},jr.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jr.result=function(e,t,r){var n=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[jo(t[n])];s===i&&(n=o,s=r),e=Qs(s)?s.call(e):s}return e},jr.round=Lu,jr.runInContext=e,jr.sample=function(e){return($s(e)?Kr:Kn)(e)},jr.size=function(e){if(null==e)return 0;if(qs(e))return ua(e)?ir(e):e.length;var t=ho(e);return t==_||t==A?e.size:Pn(e).length},jr.snakeCase=Za,jr.some=function(e,t,r){var n=$s(e)?Ot:ri;return r&&yo(e,t,r)&&(t=i),n(e,so(t,3))},jr.sortedIndex=function(e,t){return ni(e,t)},jr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},jr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&zs(e[n],t))return n}return-1},jr.sortedLastIndex=function(e,t){return ni(e,t,!0)},jr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},jr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(zs(e[r],t))return r}return-1},jr.startCase=Ka,jr.startsWith=function(e,t,r){return e=wa(e),r=null==r?0:sn(ga(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},jr.subtract=Eu,jr.sum=function(e){return e&&e.length?Bt(e,iu):0},jr.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},jr.template=function(e,t,r){var n=jr.templateSettings;r&&yo(e,t,r)&&(t=i),e=wa(e),t=_a({},t,n,Yi);var o,s,a=_a({},t.imports,n.imports,Yi),u=xa(a),l=Vt(a,u),c=0,d=t.interpolate||we,f="__p += '",h=Ee((t.escape||we).source+"|"+d.source+"|"+(d===J?de:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(h,(function(t,r,n,i,a,u){return n||(n=i),f+=e.slice(c,u).replace(be,Jt),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(H,"$1").replace(V,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return _e(u,p+"return "+f).apply(i,l)}));if(m.source=f,Js(m))throw m;return m},jr.times=function(e,t){if((e=ga(e))<1||e>d)return[];var r=h,n=vr(e,h);t=so(t),e-=h;for(var i=zt(n,t);++r<e;)t(r);return i},jr.toFinite=pa,jr.toInteger=ga,jr.toLength=ma,jr.toLower=function(e){return wa(e).toLowerCase()},jr.toNumber=va,jr.toSafeInteger=function(e){return e?sn(ga(e),-9007199254740991,d):0===e?e:0},jr.toString=wa,jr.toUpper=function(e){return wa(e).toUpperCase()},jr.trim=function(e,t,r){if((e=wa(e))&&(r||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var n=or(e),o=or(t);return wi(n,Gt(n,o),qt(n,o)+1).join("")},jr.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===i))return e.slice(0,sr(e)+1);if(!e||!(t=ai(t)))return e;var n=or(e);return wi(n,0,qt(n,or(t))+1).join("")},jr.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=or(e);return wi(n,Gt(n,or(t))).join("")},jr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ga(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=wa(e)).length;if(Qt(e)){var a=or(e);s=a.length}if(r>=s)return e;var u=r-ir(n);if(u<1)return n;var l=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+n;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=Ee(o.source,wa(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===i?u:f)}}else if(e.indexOf(ai(o),u)!=u){var h=l.lastIndexOf(o);h>-1&&(l=l.slice(0,h))}return l+n},jr.unescape=function(e){return(e=wa(e))&&q.test(e)?e.replace($,ar):e},jr.uniqueId=function(e){var t=++De;return wa(e)+t},jr.upperCase=Ya,jr.upperFirst=Ja,jr.each=ws,jr.eachRight=bs,jr.first=qo,uu(jr,(yu={},wn(jr,(function(e,t){Ne.call(jr.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jr.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jr[e].placeholder=jr})),wt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:mr(ga(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,h),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),wt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(iu)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return On(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ws(so(e)))},Ur.prototype.slice=function(e,t){e=ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(h)},wn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=jr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(jr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Ur,l=a[0],c=u||$s(t),d=function(e){var t=o.apply(jr,kt([e],a));return n&&f?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=s&&!f,g=u&&!h;if(!s&&c){t=g?t:new Ur(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[d],thisArg:i}),new zr(m,f)}return p&&g?e.apply(this,a):(m=this.thru(d),p?n?m.value()[0]:m.value():m)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);jr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply($s(i)?i:[],e)}return this[r]((function(r){return t.apply($s(r)?r:[],e)}))}})),wn(Ur.prototype,(function(e,t){var r=jr[t];if(r){var n=r.name+"";Ne.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[ji(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=$s(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=mr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=n?a:s-1,c=this.__iteratees__,d=c.length,f=0,h=vr(u,this.__takeCount__);if(!r||!n&&i==u&&h==u)return fi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var g=-1,m=e[l+=t];++g<d;){var v=c[g],y=v.iteratee,w=v.type,b=y(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}p[f++]=m}return p},jr.prototype.at=gs,jr.prototype.chain=function(){return hs(this)},jr.prototype.commit=function(){return new zr(this.value(),this.__chain__)},jr.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},jr.prototype.plant=function(e){for(var t,r=this;r instanceof Br;){var n=Bo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},jr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:i}),new zr(t,this.__chain__)}return this.thru(ts)},jr.prototype.toJSON=jr.prototype.valueOf=jr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},jr.prototype.first=jr.prototype.head,st&&(jr.prototype[st]=function(){return this}),jr}();ot._=ur,(n=function(){return ur}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},88306:(e,t,r)=>{var n=r(83369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},7771:(e,t,r)=>{var n=r(55639);e.exports=function(){return n.Date.now()}},78718:(e,t,r)=>{var n=r(25970),i=r(99021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=i},36968:(e,t,r)=>{var n=r(10611);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},23493:(e,t,r)=>{var n=r(23279),i=r(13218);e.exports=function(e,t,r){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}},14841:(e,t,r)=>{var n=r(27561),i=r(13218),o=r(33448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||u.test(e)?l(e.slice(2),r?2:8):s.test(e)?NaN:+e}},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},79684:function(e,t,r){"use strict";var n,i,o,s,a,u,l,c,d,f,h,p,g,m,v,y=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},w=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const S=b(r(62043)),_=r(63250),C=b(r(2518)),L=b(r(9381)),E=b(r(84795)),k=r(44137),A=r(87406),T=r(87406);class O{constructor(){n.set(this,12e4),i.set(this,null),o.set(this,[])}start(){this.registerHeartbeat()}registerHeartbeat(){clearTimeout(y(this,i,"f")),C.default.system.debug("FinsembleDesktopAgent: heartbeat received"),w(this,i,setTimeout((()=>{C.default.system.warn(`FinsembleDesktopAgent: No heartbeat received within ${y(this,n,"f")} milliseconds`),this.notifyDisconnect()}),y(this,n,"f")),"f")}notifyDisconnect(){console.warn("fdc3 has lost connectivity to the interop service. You may need to restart this app."),y(this,o,"f").forEach((e=>{e(`No heartbeat received from interop service within ${y(this,n,"f")} milliseconds`)}))}onDisconnect(e){w(this,o,y(this,o,"f").concat(e),"f")}stop(){clearTimeout(y(this,i,"f"))}}n=new WeakMap,i=new WeakMap,o=new WeakMap;class R{constructor(e,t,r="app"){s.set(this,void 0),w(this,s,e,"f"),this.id=t,this.type=r}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");y(this,s,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return y(this,s,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return y(this,s,"f").channelAddContextListener(this.id,e,t)}}s=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){if(a.set(this,!1),u.set(this,new O),l.set(this,!1),c.set(this,""),d.set(this,`FSBL.FDC3.Client.${(0,S.default)()}`),f.set(this,{}),h.set(this,{}),p.set(this,[]),g.set(this,void 0),m.set(this,void 0),v.set(this,""),w(this,g,e,"f"),w(this,m,t,"f"),this.cacheFSBLVersion(),k.Globals.Event&&k.Globals.dispatchEvent){const e=new Event("fdc3Ready");k.Globals.dispatchEvent(e)}}async cacheFSBLVersion(){""==y(this,v,"f")&&w(this,v,"6.6.0","f");const{err:e,data:t}=await L.default.getValue({field:"finsemble.system.FSBLVersion"});e||w(this,v,t,"f")}fdc3Error(e){return new Error(e)}meta(){return{uuid:y(this,c,"f"),href:window.document?document.location.href:""}}handleHeartbeat(){y(this,u,"f").registerHeartbeat()}triggerContextListeners(e){var t,r;const{context:n}=e.payload;let i;if(e.meta.targetSubscriberId){let t;Object.values(y(this,h,"f")).every((r=>(t=r.find((t=>t.targetSubscriberId===e.meta.targetSubscriberId)),void 0===t))),i=t?[t]:[]}else i=(null!==(t=y(this,h,"f")[null==n?void 0:n.type])&&void 0!==t?t:[]).concat(null!==(r=y(this,h,"f")["*"])&&void 0!==r?r:[]);i.forEach((({handler:t,channel:r})=>{e.meta.channel===r||!e.meta.channel&&!r?(C.default.system.debug(`FDC3 Client: triggerContextListeners for all on ${null!=r?r:"default"} channel`,e.type,e),t(n)):C.default.system.debug(`FDC3 Client: triggerContextListeners skipped for all on ${null!=r?r:"default"} channel`,e.type,e)}))}triggerIntentListeners(e){const{intent:t,context:r}=e.payload,n=y(this,f,"f")[t];r&&(n||[]).forEach((e=>e(r)))}handleIncoming(e){switch(C.default.system.debug("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e);break;case"heartbeat":this.handleHeartbeat()}}releaseQueue(){const e=e=>{var t;return void 0!==(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.uuid)&&(e.meta.uuid=y(this,c,"f")),e};y(this,p,"f").forEach((async t=>{const{message:r,handler:n,resolve:i}=t,{err:o,receiveMessage:s}=await this.exchange(e(r),n);i({err:o,receiveMessage:s})})),w(this,p,[],"f")}exchange(e,t=(()=>{})){return new Promise((async r=>{if(y(this,a,"f")){const{err:n,response:i}=await y(this,g,"f").query(A.SERVER_CHANNEL,e,t);r({err:n,receiveMessage:null==i?void 0:i.data})}else y(this,p,"f").push({message:e,handler:t,resolve:r}),this.start()}))}async connect(){var e;const t=y(this,m,"f").getStartupData(),{windowName:r="Unknown window",authenticationToken:n}=t;C.default.system.log(`fdc3.connect StartupData for ${r}`,t),w(this,c,`fdc3-${null===(e=null==n?void 0:n.meta)||void 0===e?void 0:e.name}-${(0,S.default)()}`,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:y(this,d,"f"),windowName:r,authenticationToken:n}};E.default.waitForBootStage("kernel","stageCompleted",(e=>{e?C.default.system.error("connect error waitingForBootStage",e):y(this,g,"f").query(A.SERVER_CHANNEL,i,(e=>{e?C.default.system.error("connect error",e):(y(this,g,"f").addResponder(y(this,d,"f"),((e,t)=>{if(e||!t){const t=(0,T.errorAsString)(null!=e?e:"No request received on responder");C.default.system.error(`FinsembleDesktopAgent can't listen on channel ${y(this,d,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),w(this,a,!0,"f"),C.default.system.log(`FDC3 client connected for window ${r}`),this.releaseQueue(),y(this,u,"f").start())}))}))}async start(){y(this,l,"f")||(w(this,l,!0,"f"),await y(this,m,"f").onReady(),this.connect())}async stop(){y(this,u,"f").stop();const e={type:"unregister",meta:this.meta()};await this.exchange(e),w(this,l,!1,"f"),y(this,g,"f").removeResponder(y(this,d,"f")),w(this,a,!1,"f")}onDisconnect(e){y(this,u,"f").onDisconnect(e)}async channelGetCurrentContext(e,t){const r={type:"currentContextRequest",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{contextType:t}},{err:n,receiveMessage:i}=await this.exchange(r);return n?null:"currentContext"===(null==i?void 0:i.type)?i.payload.context:null}broadcast(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const r={type:"broadcast",meta:Object.assign(Object.assign({},this.meta()),{channel:e}),payload:{context:t}};this.exchange(r)}async getSystemChannels(){var e;const t={type:"systemChannelRequest",meta:this.meta()},{err:r,receiveMessage:n}=await this.exchange(t);return r?[]:("systemChannels"===(null==n?void 0:n.type)?null===(e=null==n?void 0:n.payload)||void 0===e?void 0:e.channels:[]).map((e=>new R(this,e,"system")))}async open(e,t){if(!e)throw new Error("Invalid arguments. The required target parameter is missing.");const r={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.OpenError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error)}async findIntent(e,t){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");const r={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.appIntent)throw this.fdc3Error("Invalid response returned from InteropService for findIntent. No appIntent and no error.");return o.payload.appIntent}async findIntentsByContext(e){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:r}=await this.exchange(t),n=r;if(n.payload.error)throw this.fdc3Error(n.payload.error);return n.payload.intents||[]}async raiseIntent(e,t,r){if(!e)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required context parameter is missing.");const n={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:r}},{err:i,receiveMessage:o}=await this.exchange(n),s=o;if(i)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(s.payload.error)throw this.fdc3Error(s.payload.error);if(!s.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntent. No data.");return s.payload.data}async raiseIntentForContext(e,t){if(!e)throw new Error("Invalid arguments. The required context parameter is missing.");const r={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:n,receiveMessage:i}=await this.exchange(r),o=i;if(n)throw this.fdc3Error(_.ResolveError.ResolverUnavailable);if(o.payload.error)throw this.fdc3Error(o.payload.error);if(!o.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for raiseIntentForContext. No data.");return o.payload.data}addIntentListener(e,t){if(!t)throw new Error("Invalid arguments. The required intent parameter is missing.");if(!t)throw new Error("Invalid arguments. The required handler parameter is missing.");y(this,f,"f")[e]=(0,T.mmAdd)(y(this,f,"f"),e,t);const r={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(r),{unsubscribe:()=>{const r={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(r),y(this,f,"f")[e]=(0,T.mmRemove)(y(this,f,"f"),e,t)}}}channelAddContextListener(e,t,r){const n=r&&t||"*";r||(r=t);const i=`subscriberId.${Date.now()}_${Math.random()}`,o={handler:r,channel:e,targetSubscriberId:i};y(this,h,"f")[n]=(0,T.mmAdd)(y(this,h,"f"),n,o);let s={type:"subscribeContext",meta:Object.assign(Object.assign({},this.meta()),{targetSubscriberId:i}),payload:{contextType:n}};return e&&(s.meta.channel=e),this.exchange(s),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:n}};e&&(t.meta.channel=e),y(this,h,"f")[n]=(0,T.mmRemove)(y(this,h,"f"),n,o),this.exchange(t)}}}addContextListener(e,t){if(void 0===e)throw new Error("Invalid arguments. The contextTypeOrHandler parameter shouldn't be undefined.");if("function"!=typeof e&&!t)throw new Error("Invalid arguments. The required handler parameter is missing.");return this.channelAddContextListener(null,e,t)}async joinChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){if(!e)throw new Error("Invalid arguments. The required channelId parameter is missing.");return new R(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:r}=await this.exchange(e),n=r;if(t)throw this.fdc3Error(t);if(n.payload.error)throw this.fdc3Error(n.payload.error);if(!n.payload.data)throw this.fdc3Error("Invalid response returned from InteropService for getCurrentChannels. No data.");return n.payload.data.map((e=>new R(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:y(this,v,"f")}}},a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,v=new WeakMap},87406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=(e,t,r)=>(e[t]||[]).concat([r]),t.concatNoDups=(e,t)=>{const r=Array.isArray(t)?t:[t],n=e?r.concat(e):r;return Array.from(new Set(n))},t.mmRemove=(e,t,r)=>(e[t]||[]).filter((e=>e!==r)),t.errorAsString=e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e)&&void 0!==r?r:null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.AnonymousAuthenticationToken={signatureString:"",signatureStringType:"unauthenticated",meta:{name:"Anonymous app",appId:"Anonymous appId"}}},51806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=r(51848),o=r(47107),s=r(91374),a=r(10166),u=r(44137),l=r(79684),c=n(r(62043));t.FSBLService=class{async startApp(){var e,t,r,n,d,f,h,p;const g=await(0,o.getSystemStartupData)(),m=s.System.Window.getCurrent(),v=null!==(r=null!==(e=m.name)&&void 0!==e?e:null===(t=null===document||void 0===document?void 0:document.location)||void 0===t?void 0:t.href)&&void 0!==r?r:"Unknown App",y=null!==(f=null!==(n=m.name)&&void 0!==n?n:null===(d=null===document||void 0===document?void 0:document.location)||void 0===d?void 0:d.href)&&void 0!==f?f:`Unknown window-${(0,c.default)()}`,w=null!==(h=m.webContentsName)&&void 0!==h?h:y,b=null!==(p=(0,o.getManifestFromStartupData)(g))&&void 0!==p?p:{},S=(0,o.getRouterConfig)({windowName:y,systemManifest:b});await i.RouterController.start(S);const _=a.Startup.getInstance();_.setStartupData({windowName:y,webContentsName:w,authenticationToken:{signatureString:"",signatureStringType:"unauthenticated",meta:{name:v}}}),u.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.RouterClient,startup:_}),_.setReady()}async stopApp(){i.RouterController.stop()}}},47107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const n=r(2518),i=r(91374),o=r(64324),s={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},a=e=>{if(!e)return n.Logger.system.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=r&&o&&i;return n.Logger.system.debug(`Transport crossDomain=${a} (${r}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:r}=null==e?void 0:e.finsemble,{sameDomainTransport:n="SharedWorker",crossDomainTransport:i="IPCBus"}=null!=r?r:{};return a(t)?i:n},t.getRouterConfig=({windowName:e,systemManifest:r,transportSettings:i})=>r?((e,r)=>{var i,o,a;if(n.Logger.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const n=e.finsemble,s=null!==(a=null!==(o=null===(i=null==n?void 0:n.router)||void 0===i?void 0:i.transportSettings)&&void 0!==o?o:null==n?void 0:n.IAC)&&void 0!==a?a:{};return{windowName:r,routerDomainRoot:n.moduleRoot,transportName:(0,t.getRecommendedTransport)(e),transportSettings:s}}return n.Logger.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),Object.assign(Object.assign({},s),{windowName:r})})(r,e):Object.assign(Object.assign({},s),{windowName:e,transportSettings:null!=i?i:{}}),t.getSystemStartupData=async()=>new Promise((e=>{i.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=null==e?void 0:e.manifest;return(null==t?void 0:t.finsemble)&&o.ConfigUtilInstance.resolveManifestMacros(t,t.finsemble),t}},10166:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const i=r(87406),o=r(44137),s=n(r(62043)),a=r(7860),u=`Unknown window-${(0,s.default)()}`;class l{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.AnonymousAuthenticationToken,windowName:u,webContentsName:u}}static getInstance(){return l.instance?l.instance:l.instance=(0,a.singleton)("Startup",l)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}setReady(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),o.Globals.dispatchEvent&&o.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=l,l.instance=null},9381:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigClient=t.unsetPreference=t.getPreferences=t.setPreference=t.processAndSet=t.removeListeners=t.removeListener=t.addListeners=t.addListener=t.removeValues=t.removeValue=t.setValues=t.setValue=t.getValues=t.getValue=t.getManifest=void 0;const i=r(51848),o=n(r(84795)),s=n(r(2518)),a=r(7860);class u{constructor(){this.listeners={},this.subs={}}}const l=()=>(0,a.singleton)("ConfigClient",u),c=(e,t)=>{var r;(null!==(r=l().listeners[e])&&void 0!==r?r:[]).forEach((r=>{s.default.system.debug("ConfigClient.triggerListeners",e,t),r(null,{field:e,value:t})}))},d=(e,t)=>{if(e)s.default.system.error("ConfigClient handleChanges() error",e);else{t.data.field||(t.data.field=null);const{field:e,storeData:r,value:n}=t.data;c(e||"configService",r||n)}},f=async e=>{const t=l();if(t.subs||(t.subs={}),!t.subs[e]){t.subs[e]=!0,await o.default.waitForStartup("configService");const{err:r}=await i.RouterClient.query("configService.addListener",e);r&&s.default.system.error("Error adding listener to config service",r),await i.RouterClient.subscribe(e,d)}};t.getManifest=async e=>{await o.default.waitForStartup("configService");const{err:t,response:r}=await i.RouterClient.query("configService.getValues",{fields:null});return null==e||e(t,r.data),{err:t,data:r.data}},t.getValue=async(e,t)=>{if("string"==typeof e&&(e={field:e}),!e.field){const e="no field provided";return null==t||t(e),{err:e}}await o.default.waitForStartup("configService");const{err:r,response:n}=await i.RouterClient.query("configService.getValue",{field:e.field});return null==t||t(r,n.data),{err:r,data:n.data}},t.getValues=async(e,r)=>{if("function"==typeof e&&(r=e,e=null),e&&!Array.isArray(e))return(0,t.getValue)(e,r);await o.default.waitForStartup("configService");const{err:n,response:s}=await i.RouterClient.query("configService.getValues",{fields:e});return null==r||r(n,s.data),{err:n,data:s.data}},t.setValue=async(e,t)=>{const r={field:e.field,value:e.value};await o.default.waitForStartup("configService");const{err:n}=await i.RouterClient.query("configService.setValue",r);return null==t||t(n),{err:n}},t.setValues=async(e,t)=>{if(!e){const e="ConfigClient.SetValues. No params given";return s.default.system.error(e),null==t||t(e),{err:e}}if(!Array.isArray(e)){const e="ConfigClient.SetValues. Params must be an array";return s.default.system.error(e),null==t||t(e),{err:e}}await o.default.waitForStartup("configService");const{err:r}=await i.RouterClient.query("configService.setValues",e);return null==t||t(r),{err:r}},t.removeValue=async(e,r)=>{let n={};if("string"!=typeof e){const e="No field provided";return null==r||r(e),{err:e}}return n.field=e,n.value=null,await(0,t.setValue)(n,r)},t.removeValues=(e,r)=>new Promise((n=>{if(!Array.isArray(e)){const e="The passed in parameter must be an array";return null==r||r(e),n({err:e})}const i=e.map((e=>(0,t.removeValue)(e)));Promise.all(i).then((e=>{const t=e.some((e=>e.err))?"Some values couldn't be removed. Check central logger.":null;null==r||r(t),n({err:t})}))})),t.addListener=async(e,t,r)=>{var n;const i=l();let o=null;"function"==typeof e&&(t=e,e={field:null}),({field:o}=e);const s="configService"+(o?`.${o}`:"");i.listeners[s]=[t].concat(null!==(n=i.listeners[s])&&void 0!==n?n:[]),f(s),null==r||r()},t.addListeners=(e,r,n)=>{var i;const o=l();if(!Array.isArray(e))return s.default.deprecated("configClient - addListeners() with an object instead of an array is deprecated. Please use addListener() instead."),(0,t.addListener)(e,r,n);const a="function"==typeof r?r:null;for(let t=0;t<e.length;t++){const r=e[t],n="string"==typeof r?r:r.field,s="string"!=typeof r?r.listener:a;if(s){const e="configService"+(n?`.${n}`:"");o.listeners[e]=[s].concat(null!==(i=o.listeners[e])&&void 0!==i?i:[]),f(e)}}null==n||n()},t.removeListener=(e,t,r)=>{const n=l();let i=null;"function"==typeof e&&(r=t,t=e,e={field:i}),({field:i}=e);const o="configService"+(i?`.${i}`:"");if(n.listeners[o])for(let e=0;e<n.listeners[o].length;e++)if(n.listeners[o][e]===t)return n.listeners[o].splice(e,1),void(null==r||r(null,!0));null==r||r(null,!1)},t.removeListeners=(e,r,n)=>{const i=l();if(!Array.isArray(e))return"function"==typeof e?(0,t.removeListener)({},e,n):e.field&&r&&(0,t.removeListener)(e,r,n),null==n?void 0:n(null,!0);const o="function"==typeof r?r:null;e.forEach((e=>{const t="string"==typeof e?e:e.field,r="string"!=typeof e?e.listener:o,n="configService"+(t?`.${t}`:"");i.listeners[n]=i.listeners[n].filter((e=>e!==r))})),null==n||n(null,!0)},t.processAndSet=async(e,t)=>{if(s.default.system.debug("ConfigClient.processAndSet",e),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";return s.default.system.warn("ConfigClient.processAndSet:",e),null==t||t(e),{err:e}}{await o.default.waitForStartup("configService");const{err:r,response:n}=await i.RouterClient.query("configService.processAndSet",e);return null==t||t(r,n),{err:r,data:n.data}}},t.setPreference=async(e,t)=>{const{err:r,response:n}=await i.RouterClient.query("PreferencesService.setPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},t.getPreferences=async e=>{await o.default.waitForStartup("preferencesService");const{err:t,response:r}=await i.RouterClient.query("PreferencesService.getPreferences",{});return s.default.system.debug("PreferencesService.getPreferences response",r),null==e||e(t,r.data),{err:t,data:r.data}},t.unsetPreference=async(e,t)=>{s.default.system.debug("ConfigClient.unsetPreference",e);const{err:r,response:n}=await i.RouterClient.query("PreferencesService.unsetPreference",e);return null==t||t(r,n.data),{err:r,data:n.data}},t.ConfigClient={initialize(){s.default.deprecated("There is no need to call ConfigClient.initialize() anymore.")},onReady:e=>{s.default.system.deprecated("It is no longer necessary to call ConfigClient.onReady()"),null==e||e()},triggerListeners(e,t){s.default.deprecated("Calling ConfigClient.triggerListeners() directly is not legal."),c(e,t)},handleChanges(e,t){s.default.deprecated("It is illegal to call ConfigClient.handleChanges() directly."),d(e,t)},async changeSub(e){s.default.deprecated("Calling ConfigClient.changeSub() directly is not legal."),f(e)},addListener:t.addListener,addListeners:t.addListeners,getManifest:t.getManifest,getPreferences:t.getPreferences,getValue:t.getValue,getValues:t.getValues,processAndSet:t.processAndSet,removeListener:t.removeListener,removeListeners:t.removeListeners,removeValue:t.removeValue,removeValues:t.removeValues,setPreference:t.setPreference,setValue:t.setValue,setValues:t.setValues,unsetPreference:t.unsetPreference},t.default=t.ConfigClient},80752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotkeyClient=t.onClose=t.removeAllHotkeys=t.removeGlobalHotkey=t.addGlobalHotkey=t.removeLocalHotkey=t.addLocalHotkey=t.addBrowserHotkey=void 0;const n=r(2518),i=r(51848),o=r(10166),s=r(7860),a=r(17187),u={backspace:"Backspace",bs:"Backspace",bksp:"Backspace",tab:"Tab",escape:"Escape",esc:"Escape",clear:"Clear",enter:"Enter",return:"Enter",shift:"Shift",shft:"Shift",lshift:"Shift",lshft:"Shift","left shift":"Shift",leftshift:"Shift",rshift:"Shift",rshft:"Shift","right shift":"Shift",rightshift:"Shift",control:"Control",ctrl:"Control",commandorcontrol:"CommandOrControl",alt:"Alt",alternate:"Alt",pause:"Pause","caps lock":"Capslock",capslock:"Capslock",spacebar:"Space",space:"Space","space bar":"Space","page up":"PageUp",pgup:"PageUp","pg up":"PageUp","page down":"PageDown",pgdn:"PageDown","pg dn":"PageDown",pgdown:"PageDown",end:"End",home:"Home","left arrow":"Left",left:"Left","up arrow":"Up",up:"Up","right arrow":"Right",right:"Right","down arrow":"Down",down:"Down",select:"Select",slct:"Select",print:"PrintScreen",prnt:"PrintScreen",execute:"Execute","print screen":"PrintScreen",printscreen:"PrintScreen","print scrn":"PrintScreen",printscrn:"PrintScreen","prnt scrn":"PrintScreen",prntscrn:"PrintScreen","prt scrn":"PrintScreen",prtscrn:"PrintScreen","prt scn":"PrintScreen",prtscn:"PrintScreen","prt scr":"PrintScreen",prtscr:"PrintScreen","prt sc":"PrintScreen",prtsc:"PrintScreen","pr sc":"PrintScreen",prsc:"PrintScreen",insert:"Insert",ins:"Insert",delete:"Delete",del:"Delete",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",a:"A",b:"B",c:"C",d:"D",e:"E",f:"F",g:"G",h:"H",i:"I",j:"J",k:"K",l:"L",m:"M",n:"N",o:"O",p:"P",q:"Q",r:"R",s:"S",t:"T",u:"U",v:"V",w:"W",x:"X",y:"Y",z:"Z",windows:"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9",f1:"F1",fn1:"F1","function 1":"F1",f2:"F2",fn2:"F2","function 2":"F2",f3:"F3",fn3:"F3","function 3":"F3",f4:"F4",fn4:"F4","function 4":"F4",f5:"F5",fn5:"F5","function 5":"F5",f6:"F6",fn6:"F6","function 6":"F6",f7:"F7",fn7:"F7","function 7":"F7",f8:"F8",fn8:"F8","function 8":"F8",f9:"F9",fn9:"F9","function 9":"F9",f10:"F10",fn10:"F10","function 10":"F10",f11:"F11",fn11:"F11","function 11":"F11",f12:"F12",fn12:"F12","function 12":"F12",f13:"F13",fn:"F13","function 13":"F13",f14:"F14",fn14:"F14","function 14":"F14",f15:"F15",fn15:"F15","function 15":"F15",f16:"F16",fn16:"F16","function 16":"F16","num lock":"Numlock",numlock:"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock",sclk:"Scrolllock",scrlk:"Scrolllock",slk:"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",",_:"-",".":".","`":"`","[":"[","]":"]","'":"'"},l=e=>{const t=[];return e.keys.forEach((e=>{if("string"!=typeof e)return n.Logger.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=u[e];if(!r)return n.Logger.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);t.push(r)})),t};class c{constructor(){this.keyStrokeHandlers=[],this.key=null,this.shift=!1,this.ctrl=!1,this.alt=!1,this.cmd=!1,this.capsLock=!1,this.noKeyCapture=!1,this.downValue=null}registerKeyHandler(e){this.keyStrokeHandlers.push(e)}unregisterKeyHandler(e){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((t=>t.keyString!==e.keyString||t.handler!==e.handler))}unregisterAllUsersKeyHandlers(){this.keyStrokeHandlers=this.keyStrokeHandlers.filter((e=>!0!==e.addedByUser))}keyup(e){switch(e.key){case"Shift":return this.shift=!1,void this.gotKeyStroke(e.key);case"Control":case"Alt":return this.ctrl=!1,void this.gotKeyStroke(e.key);case"Meta":case"Win":return this.cmd=!1,void this.gotKeyStroke(e.key)}this.key&&this.gotKeyStroke(this.key)}keydown(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.gotKeyStroke(e.key)}}keypress(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)}gotKeyStroke(e){const t=[e];this.ctrl&&t.push("control"),this.shift&&t.push("shift"),this.alt&&t.push("alt"),this.cmd&&t.push("command");const r=t.sort().toString();this.keyStrokeHandlers.forEach((e=>{const t=e.keyString.toUpperCase(),n=r.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))}initialize(){document.addEventListener("keyup",(e=>{this.keyup(e)})),document.addEventListener("keydown",(e=>{this.downValue=e.key,this.keydown(e)})),document.addEventListener("keypress",(e=>{this.keypress(e)})),window.addEventListener("blur",(()=>{this.ctrl=!1,this.gotKeyStroke("Control")}))}}class d{constructor(){this.localListeners={},this.keyStrokes=null,this.eventEmitter=new a.EventEmitter,this.initialize()}async initialize(){const{windowName:e}=await o.Startup.getInstance().getStartupData();i.RouterClient.addListener("HotkeyTriggered",((t,r)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):(null==r?void 0:r.data.windows.includes(e))&&this.eventEmitter.emit(r.data.keys)}))}}const f=()=>(0,s.singleton)("HotkeyClient",d);t.addBrowserHotkey=(e,t,r)=>{const n=f();n.keyStrokes||(n.keyStrokes=new c,n.keyStrokes.initialize());const i=l({keys:e}).sort().toString();n.keyStrokes.registerKeyHandler({keyString:i,handler:t,addedByUser:r})},t.addLocalHotkey=async(e,r,i)=>(n.Logger.system.info("HotkeyClient.addLocalHotkey"),n.Logger.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e),(0,t.addBrowserHotkey)(e,r,!0),null==i||i(null),{err:null}),t.removeLocalHotkey=async(e,t,r)=>(n.Logger.system.info("HotkeyClient.removeLocalHotkey"),n.Logger.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e),((e,t)=>{var r;const i=f();n.Logger.system.info("HotkeyClient.removeBrowserHotkey"),n.Logger.system.debug("HotkeyClient.removeBrowserHotkey, keyArr: ",e);const o=l({keys:e}).sort().toString();null===(r=i.keyStrokes)||void 0===r||r.unregisterKeyHandler({keyString:o,handler:t})})(e,t),null==r||r(null),{err:null}),t.addGlobalHotkey=async(e,t,r)=>{const s=f();n.Logger.system.info("HotkeyClient.addGlobalHotkey"),n.Logger.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const a=l({keys:e}).sort().join("+");s.eventEmitter.addListener(a,t);const{windowName:u}=await o.Startup.getInstance().getStartupData(),{err:c}=await i.RouterClient.query("hotkeysService.registerGlobalHotkey",{keys:a,windowName:u});return null==r||r(c),{err:c}},t.removeGlobalHotkey=async(e,t,r)=>{const s=f();n.Logger.system.info("HotkeyClient.removeGlobalHotkey"),n.Logger.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const a=l({keys:e}).sort().join("+");s.eventEmitter.removeListener(a,t);const{windowName:u}=await o.Startup.getInstance().getStartupData(),{err:c}=await i.RouterClient.query("hotkeysService.unregisterGlobalHotkey",{keys:a,windowName:u});return null==r||r(c),{err:c}},t.removeAllHotkeys=async e=>{var t;const r=f();r.eventEmitter.removeAllListeners();const{windowName:n}=await o.Startup.getInstance().getStartupData(),{err:s}=await i.RouterClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:n});return null===(t=r.keyStrokes)||void 0===t||t.unregisterAllUsersKeyHandlers(),null==e||e(s),{err:s}},t.onClose=e=>{(0,t.removeAllHotkeys)(e)},t.HotkeyClient={initialize:()=>{n.Logger.system.deprecated("It is no longer necessary to call HotkeyClient.initialize()")},onReady:e=>{n.Logger.system.deprecated("It is no longer necessary to call HotkeyClient.onReady()"),null==e||e()},onClose:t.onClose,addGlobalHotkey:t.addGlobalHotkey,removeAllHotkeys:t.removeAllHotkeys,removeGlobalHotkey:t.removeGlobalHotkey,addLocalHotkey:t.addLocalHotkey,removeLocalHotkey:t.removeLocalHotkey,addBrowserHotkey:t.addBrowserHotkey},t.default=t.HotkeyClient},2518:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerClient=t.LocalLogger=t.deprecated=t.verbose=t.debug=t.log=t.info=t.warn=t.error=t.LoggerConnection=void 0;const i=r(91374),o=r(10166),s=r(31219),a=n(r(51848)),u=n(r(9381)),l=r(7860),c=n(r(23493)),d=r(96486),f=r(44137),h={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1};let p=5e4;const g=`NOTE: LOG ARG STRIPPED since greater than ${p/1e3}KB. Check origin's local Console to see output of the complete object.`,m={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},dev:h,system:h,perf:h},v=()=>{const{stack:e}=function(){try{throw Error("")}catch(e){return e}}();let t=6;e.includes("console.error")&&t++;const r=("\n",n=t,e.split("\n",n).join("\n").length);var n;return`Log Stack: \n${e.substring(r).substr(1)}`},y=e=>{const t=[],r=[e];let n=0,i=0;for(;r.length&&i<1e3;){i++;const e=r.pop();if("boolean"==typeof e)n+=4;else if("string"==typeof e)n+=2*e.length;else if("number"==typeof e)n+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)r.push(e[t])}}return n},w=(e,t,r=0,n=1)=>{const i=t/2,o=i/2,s="*STRIPPED*",a=e=>{let t=y(e);e.length>0&&t>o&&(e[0]=w(e[0],i,r,n+1),e[1]=`*STRIPPED* from size ${e.length}`,e.length=2)};let u=(0,d.cloneDeep)(e);if("object"!=typeof u)u=s,r+=y(u);else if(Array.isArray(u))a(u),r+=y(u);else{let e=Object.getOwnPropertyNames(u);for(let l=0;l<e.length;l++){let c=y(u[e[l]]);r>i&&c>100&&n>=3&&l>=1||r>p&&c>=10?u[e[l]]=s:c>o&&(Array.isArray(u[e[l]])?a(u[e[l]]):u[e[l]]=w(u[e[l]],t/1.2,r,n+1)),r+=y(u[e[l]])}}return u},b=e=>"logger.service.logMessages"===e||"Finsemble.heartbeat"===e,S=console.error.bind(f.Globals.console);console.standardError=console.error;class _{constructor(){this.routerClient=null,this.viewId=null,this.isRegistering=!1,this.isRegistered=!1,this.calibratedTimeStampOffset=0,this.newCalibratedTimeStampOffset=0,this.filteredMessagesCounter=0,this.startupTime=0,this.loggerQueue=[],this.loggerClientName=i.System.Window.getCurrent().name,this.onLogStateChangeCallback=[],this.currentLogState=m,this.skipLargeObjects=!0,this.setRouterClient=e=>{this.routerClient=e},this.system={error:(...e)=>{this.logIt("system","Error",e)},warn:(...e)=>{this.logIt("system","Warn",e)},info:(...e)=>{this.logIt("system","Info",e)},log:(...e)=>{this.logIt("system","Log",e)},debug:(...e)=>{this.logIt("system","Debug",e)},verbose:(...e)=>{this.logIt("system","Verbose",e)},deprecated:(...e)=>{this.logIt("system","Error",e)}},this.perf={error:(...e)=>{this.logIt("perf","Error",e)},warn:(...e)=>{this.logIt("perf","Warn",e)},info:(...e)=>{this.logIt("perf","Info",e)},log:(...e)=>{this.logIt("perf","Log",e)},debug:(...e)=>{this.logIt("perf","Debug",e)},verbose:(...e)=>{this.logIt("perf","Verbose",e)},deprecated:(...e)=>{this.logIt("perf","Error",e)}},this.console={error:(...e)=>{this.logIt("console","Error",e)},warn:(...e)=>{this.logIt("console","Warn",e)},info:(...e)=>{this.logIt("console","Info",e)},log:(...e)=>{this.logIt("console","Log",e)},debug:(...e)=>{this.logIt("console","Debug",e)},verbose:(...e)=>{this.logIt("console","Verbose",e)},deprecated:(...e)=>{this.logIt("console","Error",e)}};const e="routerService"===this.loggerClientName?100:250;this.transmitAndClearQueue=(0,c.default)((()=>{var e;this.loggerQueue.length>0&&(null===(e=this.routerClient)||void 0===e||e.transmit("logger.service.logMessages",this.loggerQueue),this.loggerQueue=[])}),e,{leading:!1})}updateQueueBasedOnState(e){const{loggerQueue:t,currentLogState:r,calibratedTimeStampOffset:n}=this;this.system.debug("Logger updateQueueBasedOnState",e,n,"QUEUE LENGTH",t.length,r),this.loggerQueue=t.flatMap((t=>{if(r[t.category][t.logType]){if(!r[t.category].LocalOnly)return e&&(t.logTimestamp=t.logTimestamp+n),[t];console.log(t.category,t.logType,t.logTimestamp-s.Performance.timing.navigationStart,t.logData,"(Previously queued!)")}return[]}))}onStateChanged(e){-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)}setLogState(e,t){e&&e.dev&&(this.currentLogState=e,this.onLogStateChangeCallback.forEach((t=>{t(e)}))),this.updateQueueBasedOnState(t)}addToQueue(e){const{loggerQueue:t}=this;if(t.length<2e4)t.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing",t.length);let e,r=0;for(;e=t.shift();)console.log("Message "+r++,e);this.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}callStack(){return v()}setting(){return this.currentLogState}outputToConsole(e,t){const r={Debug:console.debug,Info:console.info,Warn:console.warn,Error:S,Log:console.log,Verbose:console.log};try{r[e](...t)}catch(e){S("Error outputting log to console",e,v())}}formatAndQueueMessage(e,t,r){var n;const o="forceObjectsToLogger"===r[0],a=r.flatMap((e=>{const t=y(e);if(!o&&t>p){if(this.outputToConsole("Warn",[`Message too large to send to the logger. Max message size:${p/1e3}KB`,`Approx message size: ${t/1e3}KB`,...r]),this.skipLargeObjects)return[`Log argument greater than ${p/1e3}KB. Check local Console to see output of the object.`];{let t=w(e,p);return[g,`OldSize=${y(e)} NewSize=${y(t)}`,t]}}return e instanceof Error?[e.toString()]:"forceObjectsToLogger"===e?[]:[e]}));let u=null;try{u=JSON.stringify(a)}catch(e){u=`*** Logger error can't JSON.stringify: ${v()}`}"Error"!==t&&"Warn"!==t&&"console"!==e||this.outputToConsole(t,r);const l=null!==(n=this.viewId)&&void 0!==n?n:i.System.isBrowserView()&&i.System.getWebContentsId(),c={category:"console"===e?"system":e,logType:t,logClientName:l?`${this.loggerClientName}: view-${l}`:this.loggerClientName,logData:u,logTimestamp:s.Performance.timing.navigationStart+s.Performance.now()+this.calibratedTimeStampOffset};l&&(c.viewId=l),this.addToQueue(c),this.isRegistered&&this.transmitAndClearQueue()}logIt(e,t,r){if(this.currentLogState[e][t])if("Warn"!==t&&"Error"!==t||r.push(v()),this.currentLogState[e].LocalOnly){const n=t.toLowerCase();r.unshift(`${e} ${n} (${s.Performance.now()}):`),this.outputToConsole(t,r)}else this.formatAndQueueMessage(e,t,r)}error(...e){this.logIt("dev","Error",e)}warn(...e){this.logIt("dev","Warn",e)}info(...e){this.logIt("dev","Info",e)}log(...e){this.logIt("dev","Log",e)}debug(...e){this.logIt("dev","Debug",e)}verbose(...e){this.logIt("dev","Verbose",e)}deprecated(...e){this.logIt("dev","Error",e)}completeRegistration(e){u.default.getValue({field:"finsemble.servicesConfig.logger"},((e,t)=>{var r,n;e||(this.skipLargeObjects=null!==(r=null==t?void 0:t.skipLargeObjects)&&void 0!==r?r:this.skipLargeObjects,p=null!==(n=null==t?void 0:t.maxLogMessageSize)&&void 0!==n?n:p)})),this.loggerQueue.forEach((e=>{this.viewId&&(e.viewId=this.viewId)})),this.isRegistered=!0,e?"routerService"!==this.loggerClientName?(this.calibratedTimeStampOffset=this.newCalibratedTimeStampOffset,this.setLogState(e,!0)):this.setLogState(e,!1):console.error("Logger.startLogger() Initial state not received from logger service"),this.formatAndQueueMessage("system","Debug",["Logger Registered"]),this.transmitAndClearQueue()}registerWithLoggerService(){var e;const{windowName:t,webContentsName:r}=o.Startup.getInstance().getStartupData();this.loggerClientName="undefined"!=typeof window&&window.top!==window?`${t}.Frame`:t;const n=`finsemble.logger.client.${this.loggerClientName}`;!this.viewId&&i.System.isBrowserView()&&(this.viewId=i.System.getWebContentsId()),this.system.debug("logger.service.registering",this.loggerClientName),i.System.Window.getCurrent().getOptions((async e=>{var i,o;const s=null===(o=null===(i=null==e?void 0:e.customData)||void 0===i?void 0:i.component)||void 0===o?void 0:o.centralLoggerNamePrefix;if(!this.routerClient)return;const{err:a,response:u}=await this.routerClient.query("logger.service.register",{clientName:this.loggerClientName,clientChannel:n,displayName:null!=r?r:t,windowName:t,viewId:this.viewId,centralLoggerNamePrefix:s});a?(console.warn("Logger service not available. Trying to connect again in 750ms.",a),setTimeout((()=>{this.registerWithLoggerService()}),750)):this.completeRegistration(u.data)})),null===(e=this.routerClient)||void 0===e||e.addListener(n,((e,t)=>{this.system.debug("logger.client.setLogState",t.data),this.setLogState(t.data,!1)}))}unregisterClient(e,t){var r;this.system.debug("logger.service.unregister",this.loggerClientName,e,this.viewId),this.transmitAndClearQueue();const n=e||{clientName:this.loggerClientName,viewId:this.viewId};null===(r=this.routerClient)||void 0===r||r.query("logger.service.unregister",n,t)}waitForServiceAndCalibrate(){var e;const t=null===(e=this.routerClient)||void 0===e?void 0:e.subscribe("Finsemble.Service.State.loggerService",((e,r)=>{var n,i;"ready"===r.data.state&&(this.system.debug("Logger onReady",this.loggerClientName),null===(n=this.routerClient)||void 0===n||n.calibrateTimeWithRouterService((e=>{this.newCalibratedTimeStampOffset=e,this.isRegistering||(this.isRegistering=!0,this.startupTime=performance.now()-this.startupTime,this.registerWithLoggerService())})),t&&(null===(i=this.routerClient)||void 0===i||i.unsubscribe(t)))}))}async start(e){if(this.routerClient=null!=e?e:a.default,this.startupTime=performance.now(),"routerService"===f.Globals.name){const{err:e}=await this.routerClient.query("logger.service.register",{});e?setTimeout((()=>{this.waitForServiceAndCalibrate()}),750):this.waitForServiceAndCalibrate()}else this.waitForServiceAndCalibrate();i.System.isBrowserView()&&f.Globals.addEventListener&&f.Globals.addEventListener("beforeunload",(()=>{this.unregisterClient()}))}}t.LoggerConnection=_,t.error=(...e)=>(0,l.singleton)("LoggerClient",_).error(...e),t.warn=(...e)=>(0,l.singleton)("LoggerClient",_).warn(...e),t.info=(...e)=>(0,l.singleton)("LoggerClient",_).info(...e),t.log=(...e)=>(0,l.singleton)("LoggerClient",_).log(...e),t.debug=(...e)=>(0,l.singleton)("LoggerClient",_).debug(...e),t.verbose=(...e)=>(0,l.singleton)("LoggerClient",_).verbose(...e),t.deprecated=(...e)=>(0,l.singleton)("LoggerClient",_).deprecated(...e);const C={error:t.error,warn:t.warn,info:t.info,log:t.log,debug:t.debug,verbose:t.verbose,deprecated:t.deprecated,start:e=>{(0,l.singleton)("LoggerClient",_).start(e)},channelFilter:e=>b(e),setting:()=>(0,l.singleton)("LoggerClient",_).setting(),callStack:()=>(0,l.singleton)("LoggerClient",_).callStack(),unregisterClient:(e,t)=>{(0,l.singleton)("LoggerClient",_).unregisterClient(e,t)},setRouterClient:e=>{(0,l.singleton)("LoggerClient",_).setRouterClient(e)},onStateChanged(e){(0,l.singleton)("LoggerClient",_).onStateChanged(e)},system:{error:(...e)=>(0,l.singleton)("LoggerClient",_).system.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).system.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).system.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).system.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).system.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).system.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).system.deprecated(...e)},perf:{error:(...e)=>(0,l.singleton)("LoggerClient",_).perf.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).perf.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).perf.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).perf.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).perf.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).perf.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).perf.deprecated(...e)},console:{error:(...e)=>(0,l.singleton)("LoggerClient",_).console.error(...e),warn:(...e)=>(0,l.singleton)("LoggerClient",_).console.warn(...e),info:(...e)=>(0,l.singleton)("LoggerClient",_).console.info(...e),log:(...e)=>(0,l.singleton)("LoggerClient",_).console.log(...e),debug:(...e)=>(0,l.singleton)("LoggerClient",_).console.debug(...e),verbose:(...e)=>(0,l.singleton)("LoggerClient",_).console.verbose(...e),deprecated:(...e)=>(0,l.singleton)("LoggerClient",_).console.deprecated(...e)}};i.System.isBrowserView()?C.console.log("Logger client console.error is not wrapped to capture logs."):(C.console.log("Logger client console.error is wrapped to capture logs."),console.error=function(...e){let t;e.push("(console error)");try{t=JSON.parse(JSON.stringify(e))}catch(r){t="console.error: arguments could not be serialized for logging",e.push("arguments could not be serialized to send to Central Logger"),S(...e)}C.console.error(...t)}),f.Globals.addEventListener&&f.Globals.addEventListener("error",(e=>{(null==e?void 0:e.message)&&(null==e?void 0:e.filename)?C.console.error(`Logger client caught ErrorEvent. Error: ${e.message}`,`File: ${e.filename}`,`Line number: ${e.lineno}`):(C.console.warn(`Logger client caught what is likely a DOM error event where type=${null==e?void 0:e.type} and target=${null==e?void 0:e.target}. Probably due to <img> or <script> failing to load. See component's browserView window for more details.`),console.warn("Event Details (for above message)",e))}),!0),f.Globals.addEventListener&&f.Globals.addEventListener("unhandledrejection",(e=>{C.console.error("Logger client caught Unhandled rejection","reason",e.reason,JSON.stringify(e))}),!0),t.LocalLogger={start:()=>{},channelFilter:b,setting:()=>m,callStack:()=>v(),unregisterClient:()=>{},setRouterClient:()=>{},onStateChanged:()=>{},warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error,system:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},perf:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error},console:{warn:console.warn,info:console.info,log:console.log,debug:console.debug,error:console.error,verbose:console.debug,deprecated:console.error}};const L="undefined"==typeof window;t.LoggerClient=L?t.LocalLogger:C,t.Logger=t.LoggerClient,t.default=t.LoggerClient},51848:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClient=t.calibrateTimeWithRouterService=t.disconnectAll=t.trustedMessage=t.unsubscribe=t.publish=t.subscribe=t.removePubSubResponder=t.addPubSubResponder=t.removeResponder=t.query=t.addResponder=t.removeListener=t.transmit=t.addListener=t.onReady=t.RouterController=t.RouterConnection=void 0;const i=n(r(87132)),o=r(44343),s=r(2518),a=r(44137),u=r(31219),l=r(7860),c=n(r(62043));function d(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const r in e)t[r]=void 0===t[r]?d(e[r],null):t[r];return t}class f{constructor(){this.queue=[],this.started=!1,this.clientName="RouterClient.clientName not yet set",this.transport=null,this.isRouterReady=!1,this.parentReadyCallbackQueue=[],this.mapListeners={},this.mapQueryResponders={},this.mapPubSubResponders={},this.mapPubSubResponderState={},this.mapPubSubResponderRegEx={},this.pubsubListOfSubscribers={},this.mapSubscribersID={},this.mapSubscribersTopic={},this.mapQueryResponses={},this.mapQueryResponseTimeOut={}}onReadyCallBack(){for(s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),this.isRouterReady=!0;this.parentReadyCallbackQueue.length>0;){s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked");const e=this.parentReadyCallbackQueue.shift();null==e||e()}}sendToRouterService(e){this.transport?this.transport.send(e):(s.LoggerClient.system.info("RouterClient: Queuing message since router initialization not complete",e),this.queue.push(e))}originatedHere(e){return e.header.origin===this.clientName}invokeListeners(e){const{channel:t,origin:r}=e.header,n=this.mapListeners[t]||[];Array.isArray(n)&&0!==n.length?(e.originatedHere=()=>this.originatedHere(e),n.forEach((n=>{s.LoggerClient.channelFilter(t)||s.LoggerClient.system.info("RouterClient: incoming transmit","CHANNEL",t,"FROM",r,"MESSAGE",e),n(null,e)}))):s.LoggerClient.system.log(`RouterClient: no listener for incoming transmit on channel ${t} from ${r}. Possibly the listener was removed while this message was in transit.`,e)}invokeResponder(e){const{channel:t,origin:r,queryID:n,error:i}=e.header;s.LoggerClient.system.info("RouterClient: incoming query","CHANNEL",t,"FROM",r,"QUERY MESSAGE",e);const o=(e,r)=>{s.LoggerClient.system.info("RouterClient: outgoing query response","CHANNEL",t,"RESPONSE DATA",r,"QUERY ID",n);let i={header:{origin:this.clientName,queryID:n,type:"queryResponse"},data:r};i.header.error=e?e.toString():null,this.sendToRouterService(i)},a=this.mapQueryResponders[t];void 0===a?e.header.logWhenNoResponder&&s.LoggerClient.system.warn(`RouterClient: No query responder defined on channel ${t} for incoming from ${r}.`,e):i?(s.LoggerClient.system.warn("RouterClient: queryResponder error",e),a(i),delete this.mapQueryResponders[t]):a(null,Object.assign(Object.assign({},e),{originatedHere:()=>this.originatedHere(e),sendQueryResponse:(e,t)=>{o(e,t)}}))}invokeQueryResponse(e){var t;s.LoggerClient.system.info("RouterClient: incoming query response","CHANNEL",e.header.channel,"QUERY ID",e.header.queryID,"message",e);const{queryID:r}=e.header,n=this.mapQueryResponseTimeOut[r];delete this.mapQueryResponseTimeOut[r],n&&clearTimeout(n);const i=this.mapQueryResponses[r];i?(delete this.mapQueryResponses[r],i(null!==(t=e.header.error)&&void 0!==t?t:null,e)):s.LoggerClient.system.warn("Invariant: RouterClient: no handler found for incoming query response.",e)}invokeNotifyCallback(e){const{subscribeID:t,error:r}=e.header,n=this.mapSubscribersID[t];n?r?(s.LoggerClient.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(r,e)):(e.originatedHere=()=>this.originatedHere(e),s.LoggerClient.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t,"NOTIFY MESSAGE",e),n(null,e)):s.LoggerClient.system.info("RouterClient: no subscription handler defined for incoming notify for subscriberID. Possibly the subscription was removed while this publish was in transit.",t,e)}findResponder(e){const t=this.mapPubSubResponders[e];if(t)return t;for(const t in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[t].test(e))return this.mapPubSubResponders[t]}invokePublishEvent(e){const{topic:t}=e.header;let r=this.findResponder(t);if(r){const n=(e,r,n)=>{var i;r?s.LoggerClient.system.warn("RouterClient: incoming publish rejected by pubsub responder",r,n):(this.mapPubSubResponderState[t]=n,(null!==(i=this.pubsubListOfSubscribers[t])&&void 0!==i?i:[]).forEach((e=>{s.LoggerClient.system.info("RouterClient: sending pubsub notify","TOPIC",t,"NOTIFY DATA",n);const r={header:{origin:this.clientName,type:"notify",topic:t,subscribeID:e},data:n};this.sendToRouterService(r)})))};if(s.LoggerClient.system.info("RouterClient: incoming PubSub publish "+(r.publishCallback?"(publishCallback hook invoked)":""),"TOPIC",t,"PUBLISH MESSAGE",e),r.publishCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToAllSubscribers:(t,r)=>{n(e,t,r)}});r.publishCallback(null,t)}else n(e,null,e.data)}else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",t,"PUBLISH MESSAGE",e)}invokeSubscribeEvent(e){var t;const{topic:r,error:n}=e.header;s.LoggerClient.system.info("RouterClient: PubSub subscribe","TOPIC",r);let i=this.mapPubSubResponders[r];if(!i)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(r)){i=this.mapPubSubResponders[e],this.mapPubSubResponderState[r]=null!==(t=this.mapPubSubResponderState[r])&&void 0!==t?t:this.mapPubSubResponderState[e];break}if(i)if(n)s.LoggerClient.system.warn(`RouterClient: pubsub error received from router service: ${n}`,e);else if(i.subscribeCallback){const t=Object.assign(Object.assign({},e),{sendNotifyToSubscriber:(t,r)=>{this.sendNotifyToSubscriber(e,t,r)}});e.data=this.mapPubSubResponderState[r],i.subscribeCallback(null,t)}else this.sendNotifyToSubscriber(e,null,this.mapPubSubResponderState[r]);else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming subscribe event",e)}invokeUnsubscribeEvent(e){const{topic:t,subscribeID:r}=e.header;let n=this.findResponder(t);if(!n)for(const e in this.mapPubSubResponderRegEx)if(this.mapPubSubResponderRegEx[e].test(t)){n=this.mapPubSubResponders[e];break}if(n)if(s.LoggerClient.system.info("RouterClient: incoming unsubscribe "+(n.unsubscribeCallback?"with unsubscribeCallback hook":""),"TOPIC",t,"UNSUBSCRIBE MESSAGE",e),n.unsubscribeCallback){const i=Object.assign(Object.assign({},e),{removeSubscriber:()=>{this.removeSubscribers(t,r)}});n.unsubscribeCallback(null,i)}else this.removeSubscribers(t,r);else s.LoggerClient.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe event","TOPIC",t,"UNSUBSCRIBE MESSAGE",e)}sendNotifyToSubscriber(e,t,r){const{topic:n,subscribeID:i}=e.header;if(void 0!==r){let e={header:{origin:this.clientName,type:"notify",topic:n,subscribeID:i},data:r};t&&(e.header.error=t),this.sendToRouterService(e)}t?s.LoggerClient.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",n,"MESSAGE",this):(n in this.pubsubListOfSubscribers?this.pubsubListOfSubscribers[n].push(i):this.pubsubListOfSubscribers[n]=[i],s.LoggerClient.system.info("RouterClient: incoming subscription added","TOPIC",n,"MESSAGE"))}removeSubscribers(e,t){let r=!1;if(e in this.pubsubListOfSubscribers){const n=this.pubsubListOfSubscribers[e];for(let i=0;i<n.length;i++)if(t===n[i]){n.splice(i,1),0===n.length&&delete this.pubsubListOfSubscribers[e],r=!0,s.LoggerClient.system.info("RouterClient: PubSub removeListener","TOPIC",e,"FROM",t);break}}r||s.LoggerClient.system.warn(`RouterClient: tried to remove non-existent listener on ${e} from ${t}`)}routeIncomingMessage(e){const t=()=>{this.timeCalibrationHandler?this.timeCalibrationHandler(e):setTimeout((()=>{t()}),10)};switch(s.LoggerClient.system.verbose("Incoming Message Type",e.header.type,e),e.header.type){case"transmit":this.invokeListeners(e);break;case"query":this.invokeResponder(e);break;case"queryResponse":this.invokeQueryResponse(e);break;case"notify":this.invokeNotifyCallback(e);break;case"publish":this.invokePublishEvent(e);break;case"subscribe":this.invokeSubscribeEvent(e);break;case"unsubscribe":this.invokeUnsubscribeEvent(e);break;case"timeCalibration":t();break;case"initialHandshakeResponse":this.handshakeHandler()}}asyncConnectToEventRouter(e,t,r){s.LoggerClient.system.debug(`Name of transport to establish: ${t}`);let n=null,a=0,u=!1,l=0,c=null;const d=()=>{s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a);const t={header:{origin:this.clientName,type:"initialHandshake"}};this.sendToRouterService(t),a++>50&&(()=>{if(clearInterval(n),l++,l<=3)s.LoggerClient.console.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",l,e),null==c||c();else{const t="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";s.LoggerClient.console.error(t,e),(0,o.toast)("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",t)}})()},f=()=>{if(!u){s.LoggerClient.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${this.clientName} with transport ${this.transport.identifier()}`),u=!0,clearInterval(n);for(let e=0;e<this.queue.length;e++){s.LoggerClient.system.debug("RouterClient: releasing queued msg");const t=this.queue[e];this.transport.send(Object.assign(Object.assign({},t),{header:Object.assign(Object.assign({},t.header),{origin:this.clientName})}))}null==r||r()}},h=e=>{a=0,s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",e),this.transport=e,this.handshakeHandler=f,d(),n=setInterval(d,200)};c=()=>{s.LoggerClient.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",e),i.default.getTransport(e,t,((e,t)=>{t.header.lastClient=this.clientName,t.header.incomingTransportInfo=e,this.routeIncomingMessage(t)}),this.clientName,"RouterService").then(h).catch((e=>{s.LoggerClient.console.error("RouterClient getTransport error",e)}))},c()}addPubSubResponderCallBack(e,t,r,n){const i=e.toString();return!this.mapPubSubResponders[i]&&(e instanceof RegExp&&(this.mapPubSubResponderRegEx[i]=e,s.LoggerClient.system.info(`RouterClient: PubSub RegEx added for topic ${i}`)),this.mapPubSubResponders[i]={subscribeCallback:t,publishCallback:r,unsubscribeCallback:n},!0)}calibrateTimeWithRouterService(e){let t=0,r=0,n=1/0;const i={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:[],serviceBaseTime:[]};this.timeCalibrationHandler=i=>{if(t++,t>5)(t=>{const{clientBaseTime:i,serviceBaseTime:o}=t;let a=0;for(let e=1;e<5;e++){const t=i[e-1],u=i[e]-t,l=o[e-1]-(t+u/2);u<n&&(n=u,r=l),a+=l,s.LoggerClient.system.debug("calibrationCalculation Intermediate Values","lastRRT",u,"lastOffset",l,"fastestOffset",r,"fastestRRT",n)}a/=4,s.LoggerClient.system.debug("RouterClient calibrationCalculation","Average Offset",a,"Chosen FastestOffset",r,t),e(r)})(i);else{i.clientBaseTime.push(u.Performance.timing.navigationStart+u.Performance.now());const e={header:{origin:this.clientName,type:"timeCalibration"},clientBaseTime:i.clientBaseTime,serviceBaseTime:i.serviceBaseTime};this.sendToRouterService(e)}},this.timeCalibrationHandler(i)}start(e){return new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return s.LoggerClient.system.warn(e),t(e)}this.started=!0,this.clientName=`RouterClient.${e.windowName}.${(0,c.default)()}`;const r=`"RouterClient Check: connecting new client for ${this.clientName}`;s.LoggerClient.system.debug(r),console.debug(r),i.default.setTransports(),this.asyncConnectToEventRouter(e,e.transportName,(()=>{this.onReadyCallBack(),t(null)}))}))}disconnectFromService(){s.LoggerClient.system.info("RouterClient.disconnectFromService");const e={header:{origin:this.clientName,type:"disconnectFromService"}};this.sendToRouterService(e)}stop(){this.disconnectAll(),i.default.close(),this.started=!1,this.disconnectFromService()}onReady(e){return new Promise((t=>{const r=()=>{e&&e(),t()};this.isRouterReady?r():this.parentReadyCallbackQueue.push(r)}))}addListener(e,t){s.LoggerClient.system.info("RouterClient.addListener","CHANNEL",e);const r=this.mapListeners[e];if(r&&0!==r.length)r.some((e=>t===e))?s.LoggerClient.debug("RouterClient.addListener() Ignoring duplicate listener with identical callback",e,t):r.push(t);else{this.mapListeners[e]=[t];const r={header:{origin:this.clientName,type:"addListener",channel:e}};this.sendToRouterService(r)}return()=>{this.removeListener(e,t)}}transmit(e,t,r){s.LoggerClient.channelFilter(e)||s.LoggerClient.system.info("RouterClient.transmit","TO CHANNEL",e,"DATA",t);const n={header:{origin:this.clientName,type:"transmit",channel:e},data:t,options:r};this.sendToRouterService(n)}removeListener(e,t){if(s.LoggerClient.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),!this.mapListeners[e])return s.LoggerClient.system.debug("Attempt to remove non existent listener",e,t),void console.log("Attempt to remove non existent listener",e,t);if(this.mapListeners[e]=this.mapListeners[e].flatMap((e=>e===t?[]:[e])),!this.mapListeners[e].length){delete this.mapListeners[e];const t={header:{origin:this.clientName,type:"removeListener",channel:e}};this.sendToRouterService(t)}}addResponder(e,t){if(s.LoggerClient.system.info("RouterClient.addResponder","CHANNEL",e),this.mapQueryResponders[e]){const r=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;s.LoggerClient.system.warn(r),t(r)}else{this.mapQueryResponders[e]=t;const r={header:{origin:this.clientName,type:"addResponder",channel:e}};this.sendToRouterService(r)}}query(e,t,r,n){var i,o;const l=`${this.clientName}.${(0,c.default)()}.${e}`,d=u.Performance.timing.navigationStart+u.Performance.now(),f=u.Performance.timing.navigationStart,h=u.Performance.now();s.LoggerClient.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",r,"QUERY ID",l,{timestamp:d,navstart:f,timenow:h});const p=null!=n?n:"function"==typeof r?r:null,g=null!==(i=null==r?void 0:r.timeout)&&void 0!==i?i:2e4,m=null===(o=null==r?void 0:r.logWhenNoResponder)||void 0===o||o;return new Promise((r=>{this.mapQueryResponses[l]=(e,t)=>{null==p||p(e,t),r({err:e,response:t})},!a.Globals.runningInFSBLUnitTest&&g>0&&(this.mapQueryResponseTimeOut[l]=setTimeout((()=>{s.LoggerClient.system.warn(`RouterClient: timeout after ${g} ms waiting on query response on channel ${e} for queryID ${l}`),delete this.mapQueryResponseTimeOut[l]}),g));const n={header:{origin:this.clientName,type:"query",queryID:l,channel:e,logWhenNoResponder:m},data:t};this.sendToRouterService(n)}))}removeResponder(e){if(s.LoggerClient.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),this.mapQueryResponders[e]){delete this.mapQueryResponders[e];const t={header:{origin:this.clientName,type:"removeResponder",channel:e}};this.sendToRouterService(t)}}addPubSubResponder(e,t,r,n){let i,o;if(s.LoggerClient.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",r),void 0===(r=r||{}).subscribeCallback&&void 0===r.publishCallback&&void 0===r.unsubscribeCallback){t=t||{};const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!0},data:t};this.sendToRouterService(r),o="success"}else if(this.addPubSubResponderCallBack(e,r.subscribeCallback,r.publishCallback,r.unsubscribeCallback)){t=t||{},this.mapPubSubResponderState[e.toString()]=d(t);const r={header:{origin:this.clientName,type:"addPubSubResponder",topic:e.toString(),handleOnServer:!1},data:t};this.sendToRouterService(r),o="success"}else i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,s.LoggerClient.system.error(i);n&&n(i,o)}removePubSubResponder(e){s.LoggerClient.system.info("RouterClient.removePubSubResponder","TOPIC",e);const t=e.toString();if(this.mapPubSubResponders[t]){delete this.mapPubSubResponders[t],delete this.mapPubSubResponderState[t],delete this.mapPubSubResponderRegEx[t];const r={header:{origin:this.clientName,type:"removePubSubResponder",topic:e}};this.sendToRouterService(r)}else s.LoggerClient.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)}subscribe(e,t){s.LoggerClient.system.info("RouterClient.subscribe","TOPIC",e);const r=`${this.clientName}.${(0,c.default)()}`;this.mapSubscribersID[r]=t,this.mapSubscribersTopic[r]=e;const n={header:{origin:this.clientName,type:"subscribe",subscribeID:r,topic:e}};return this.sendToRouterService(n),{subscribeID:r,topic:e}}publish(e,t){s.LoggerClient.system.info("RouterClient.publish","TOPIC",e,"EVENT",t);const r={header:{origin:this.clientName,type:"publish",topic:e},data:t};this.sendToRouterService(r)}unsubscribe(e){s.LoggerClient.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e);const{subscribeID:t}=e;if(this.mapSubscribersID[t]){delete this.mapSubscribersID[t],delete this.mapSubscribersTopic[t];const r={header:{origin:this.clientName,type:"unsubscribe",subscribeID:e.subscribeID,topic:e.topic}};this.sendToRouterService(r)}else s.LoggerClient.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`)}trustedMessage(e){let t=!1;return s.LoggerClient.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t}disconnectAll(){s.LoggerClient.system.info("RouterClient.disconnectAll"),Object.keys(this.mapListeners).forEach((e=>{Array.from(new Set(this.mapListeners[e])).forEach((t=>{this.removeListener(e,t)}))})),Object.keys(this.mapQueryResponders).forEach((e=>{this.removeResponder(e)})),Object.keys(this.mapPubSubResponders).forEach((e=>{this.removePubSubResponder(e)})),Object.keys(this.mapSubscribersID).forEach((e=>{const t=this.mapSubscribersTopic[e];this.unsubscribe({topic:t,subscribeID:e})}))}}t.RouterConnection=f,t.RouterController={start:e=>{const t=(0,l.singleton)("RouterClient",f);return s.LoggerClient.setRouterClient(t),t.start(e)},stop:()=>{(0,l.singleton)("RouterClient",f).stop()},calibrateTimeWithRouterService(e){(0,l.singleton)("RouterClient",f).calibrateTimeWithRouterService(e)}},t.onReady=e=>(0,l.singleton)("RouterClient",f).onReady(e),t.addListener=(e,t)=>(0,l.singleton)("RouterClient",f).addListener(e,t),t.transmit=(e,t,r)=>{(0,l.singleton)("RouterClient",f).transmit(e,t,r)},t.removeListener=(e,t)=>{(0,l.singleton)("RouterClient",f).removeListener(e,t)},t.addResponder=(e,t)=>{(0,l.singleton)("RouterClient",f).addResponder(e,t)},t.query=(e,t,r,n)=>(0,l.singleton)("RouterClient",f).query(e,t,r,n),t.removeResponder=e=>{(0,l.singleton)("RouterClient",f).removeResponder(e)},t.addPubSubResponder=(e,t,r,n)=>{(0,l.singleton)("RouterClient",f).addPubSubResponder(e,t,r,n)},t.removePubSubResponder=e=>{(0,l.singleton)("RouterClient",f).removePubSubResponder(e)},t.subscribe=(e,t)=>(0,l.singleton)("RouterClient",f).subscribe(e,t),t.publish=(e,t)=>{(0,l.singleton)("RouterClient",f).publish(e,t)},t.unsubscribe=e=>{(0,l.singleton)("RouterClient",f).unsubscribe(e)},t.trustedMessage=e=>(0,l.singleton)("RouterClient",f).trustedMessage(e),t.disconnectAll=()=>{(0,l.singleton)("RouterClient",f).disconnectAll()},t.calibrateTimeWithRouterService=e=>{(0,l.singleton)("RouterClient",f).calibrateTimeWithRouterService(e)},t.RouterClient={onReady:t.onReady,addListener:t.addListener,transmit:t.transmit,removeListener:t.removeListener,addResponder:t.addResponder,query:t.query,removeResponder:t.removeResponder,addPubSubResponder:t.addPubSubResponder,removePubSubResponder:t.removePubSubResponder,subscribe:t.subscribe,publish:t.publish,unsubscribe:t.unsubscribe,trustedMessage:t.trustedMessage,disconnectAll:t.disconnectAll,calibrateTimeWithRouterService:t.calibrateTimeWithRouterService},t.default=t.RouterClient},31755:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.bringAllWindowsToFront=t.minimizeAll=t.autoArrange=t.minimizeWindows=t.bringWindowsToFront=t.restartApplication=t.shutdownApplication=void 0;const i=r(51848),o=n(r(84795)),s=r(23099);t.shutdownApplication=()=>{i.RouterClient.transmit("Application.shutdown",{})},t.restartApplication=e=>{i.RouterClient.transmit("Application.restart",e||{})},t.bringWindowsToFront=async(e={},t=Function.prototype)=>(e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await o.default.waitForStartup("windowService"),i.RouterClient.query("LauncherService.bringWindowsToFront",e,((e,r)=>{t(e,r)})),Promise.resolve()),t.minimizeWindows=async(e,t)=>{e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),await o.default.waitForStartup("windowService"),i.RouterClient.transmit("LauncherService.minimizeWindows",e),null==t||t()},t.autoArrange=async(e,t)=>{e=e||{},await o.default.waitForStartup("windowService");const r=await(0,s.getMyWindowIdentifier)(),{err:n}=await i.RouterClient.query("DockingService.autoArrange",{windowIdentifier:r});return null==t||t(n),{err:n}},t.minimizeAll=async(e,t)=>{var r;await o.default.waitForStartup("windowService");const n=await(0,s.getMyWindowIdentifier)();let a=null!=e?e:{monitor:"all"};a.windowIdentifier=null!==(r=a.windowIdentifier)&&void 0!==r?r:n;const{err:u}=await i.RouterClient.query("WorkspaceService.minimizeAll",a);return null==t||t(u),{err:u}},t.bringAllWindowsToFront=async(e,t)=>{var r;await o.default.waitForStartup("windowService");const n=await(0,s.getMyWindowIdentifier)(),a=null!=e?e:{monitor:"all"};a.windowIdentifier=null!==(r=a.windowIdentifier)&&void 0!==r?r:n;const{err:u}=await i.RouterClient.query("WorkspaceService.bringWindowsToFront",a);return null==t||t(u),{err:u}}},83823:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=r(51848),u=r(2518),l=o(r(23099)),c=s(r(9060)),d=r(26604),f=r(91374),h=r(44137),p=s(r(50361));class g{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}class m extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=d.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t,r=!1){if("closed"!==e||!h.FEAGlobals.finsembleWindow||this.name!==h.FEAGlobals.finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t,r)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const r=m;r.types||(r.types={}),r.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static async createWrapFromUUIDAndName(e,t){var r;const{uuid:n,windowType:i}=t;if(!1!==t.waitForReady)try{await m._windowReady(e),t.wrapState="ready"}catch(e){return{err:e}}u.Logger.system.debug("WRAP LIFECYCLE:",e,"All information for wrap passed in, creating wrap locally");const o=m.cache[e];return o?(u.Logger.system.debug("WRAP LIFECYCLE:",e,"Window found in the cache, returning without going to the Launcher"),{data:o}):{data:(await m._createWrap(Object.assign(Object.assign({},t),{windowIdentifier:null!==(r=t.windowIdentifier)&&void 0!==r?r:{uuid:n,name:e,windowName:e,windowType:i}}))).wrap}}static getInstance(e,t){var r;const n=f.System.Window.getCurrent().name,i=null!==(r=null==(e=(0,p.default)(e))?void 0:e.windowName)&&void 0!==r?r:null==e?void 0:e.name;return new Promise((async(r,o)=>{if(!i){const e='"name" is a required param';return null==t||t(e),void o(e)}e.windowName=i;let s=m.cache[i];if(s)return u.Logger.system.debug("WRAP LIFECYCLE:",i,"Window found in the cache, returning without going to the Launcher"),null==t||t(null,s),void r({wrap:s});if(e.name){const{err:n,data:s}=await m.createWrapFromUUIDAndName(i,e);return n||!s?(null==t||t(n),void o(n)):(null==t||t(null,s),void r({wrap:s}))}if(!1!==e.waitForReady)try{await m._windowReady(i),e.wrapState="ready"}catch(l){return null==t||t(l,null),void o(l)}const{err:l,response:c}=await a.RouterClient.query("WindowService-Request-getWindowIdentifier",{windowName:i,requester:n});if(l)return u.Logger.system.error(l),null==t||t(l,null),void o(l);if(s=m.cache[i],s)return u.Logger.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),null==t||t(null,s),void r({wrap:s});u.Logger.system.debug("WRAP LIFECYCLE:",i,"Information received from launcher. Creating wrap.");const{identifier:d}=c.data;d.windowName&&(d.name=d.windowName),e.retrievedIdentifier=d,({wrap:s}=await m._createWrap(e)),c.data.descriptor&&(s.descriptor=c.data.descriptor),null==t||t(null,s),r({wrap:s})}))}static _createWrap(e){return new Promise((async t=>{const r=e.retrievedIdentifier||e.windowIdentifier;(e.setWindowType||r.windowType)&&"WebApplication"!==r.windowType||(r.windowType="WebWindow");let n=Object.assign({},r);n=Object.assign(n,e),n.setWindowType=n.windowType,delete n.windowType,u.Logger.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",r.windowName);let i=new m(n);m.cache[r.windowName]=i,i.windowType=r.windowType,i.identifier=r,i.addEventListener("closed",i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=d.WINDOWSTATE.MAXIMIZED,i.windowOptions.windowState=d.WINDOWSTATE.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState===d.WINDOWSTATE.MAXIMIZED?(i.windowState=d.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED,i.windowOptions.windowState=d.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED):i.windowState===d.WINDOWSTATE.NORMAL?(i.windowState=d.WINDOWSTATE.MINIMIZED_WAS_NORMAL,i.windowOptions.windowState=d.WINDOWSTATE.MINIMIZED_WAS_NORMAL):u.Logger.system.warn("Invalid window state received listening to window minimize",i.windowState)})),i.addEventListener("restored",(()=>{i.windowState=d.WINDOWSTATE.NORMAL,i.windowOptions.windowState=d.WINDOWSTATE.NORMAL}));const o=a.RouterClient.subscribe(`Finsemble.Component.State.${r.windowName}`,((e,t)=>{if(e)u.Logger.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,a.RouterClient.unsubscribe(o)}}));await(async(e,t)=>new Promise((r=>{e.parentSubscribeID=a.RouterClient.subscribe(`Finsemble.parentChange.${t.windowName}`,(async(t,n)=>{if(t)u.Logger.system.error("FinsembleWindow parent change notification error",t);else{const t=n.data||{};"Added"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",t),await e.setParent(t.stackedWindowIdentifier)):"Exists"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",t),await e.setParentOnWrap(t.stackedWindowIdentifier)):"Removed"===t.type?(u.Logger.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",t),e.clearParent()):t.type&&u.Logger.system.error("FinsembleWindow Parent Notification: unknown type",t)}r()}))})))(i,r),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${f.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.Logger.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==h.FEAGlobals.name&&this.name&&delete m.cache[this.name],e&&e.done()}static closeAllWraps(){Object.values(m.cache).forEach((e=>{e.handleWrapRemoveRequest()}))}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.RouterClient.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.RouterClient.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.RouterClient.unsubscribe(this.parentSubscribeID)}onReady(e){return new Promise((t=>{if("ready"===this.wrapState)return null==e||e(),void t();this.addEventListener("ready",(()=>{null==e||e(),t()}))}))}queryWindowService(e,t,r=Function.prototype){return"function"==typeof t&&(r=t,t={}),t=Object.assign(Object.assign({},t),{windowIdentifier:this.identifier}),u.Logger.setting().system.Debug&&(t.callstack=u.Logger.callStack()),new Promise((async(n,i)=>{var o;if("close"!==e&&"setParent"!==e&&"ready"!==this.wrapState)return await this.onReady(),this.wrapState="ready",void n(await this.queryWindowService(e,t));u.Logger.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);const{err:s,response:l}=await a.RouterClient.query(this.windowServiceChannelName(e),t);let c=null!==(o=l.data)&&void 0!==o?o:null;if(s){if(u.Logger.system.debug(`WindowService.${e}: failed`,s),console.debug(`WindowService.${e}: failed`,s),"getComponentState"!==e&&"Not found"!==s)return void i(s)}else u.Logger.system.debug(`${this.windowServiceChannelName(e)} successful`,c),console.debug(`${this.windowServiceChannelName(e)} successful`,c);n(c),r(s,c)}))}minimize(e=null,t){return new Promise((r=>{this.queryWindowService("minimize",e,(e=>{null==t||t(e),r({err:e})}))}))}maximize(e=null,t){return new Promise((r=>{this.getBounds(((n,i)=>{n||!i?u.Logger.system.warn(`Error getting bounds, cached bounds will not be set: ${n}`):this.updateOptions({options:{defaultLeft:i.left,defaultTop:i.top,defaultWidth:i.width,defaultHeight:i.height}}),this.queryWindowService("maximize",e,(e=>{null==t||t(e),r({err:e})}))}))}))}restore(e=null,t){return new Promise((r=>{this.queryWindowService("restore",e,(e=>{null==t||t(e),r({err:e})}))}))}blur(e=null,t){return new Promise((r=>{this.queryWindowService("blur",e,(e=>{null==t||t(e),r({err:e})}))}))}focus(e=null,t){return new Promise((r=>{this.queryWindowService("focus",e,(e=>{null==t||t(e),r({err:e})}))}))}bringToFront(e=null,t){return new Promise((r=>{this.queryWindowService("bringToFront",e,(e=>{null==t||t(e),r({err:e})}))}))}setAlwaysOnTop(e={alwaysOnTop:!0},t){return new Promise((r=>{this.queryWindowService("setAlwaysOnTop",e,(e=>{null==t||t(e),r({err:e})}))}))}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",e,t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,r=Function.prototype){const n={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",n,r)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const r=await this.queryWindowService("addBrowserView",e,t);return new g({id:r,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t){return new Promise((r=>{"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,(e=>{null==t||t(e),r({err:e})}))}))}getBounds(e,t){return new Promise((r=>{const n="function"==typeof e?e:t;this.queryWindowService("getBounds",{},((e,t)=>{null==n||n(e,t),r({err:e,data:t})}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t){return new Promise((r=>{this.queryWindowService("hide",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t){return new Promise((r=>{this.queryWindowService("show",e,((e,n)=>{null==t||t(e,n),r({err:e})}))}))}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t){return new Promise((r=>{u.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(e=>{u.Logger.system.debug("WRAP CLOSE. Public close initiated for",this.name),null==t||t(e),r({err:e})}))}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.RouterClient.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.RouterClient.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},r=Function.prototype){const n=()=>{a.RouterClient.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),r()};e?this.registerWithDocking(t,n):n()}wrapReady(){a.RouterClient.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.Logger.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.RouterClient.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.Logger.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.RouterClient.query("TabTile.stopTabTile",{params:e},(function(e,r){e?u.Logger.system.warn("TabTile.stopTabTile: query failed",e):u.Logger.system.debug("TabTile.stopTabTile results",r.data);const n=r.data;t?t(e,n,this.defaultStopTrackingAction):this.defaultTabTileAction(n)}))}defaultTabTileAction(e){const t=this;switch(u.Logger.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(r){t.Group.addWindow(this.identifier,r,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.Logger.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},r={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,r),this.windowOptions.bounds=t}startMove(e={}){u.Logger.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.Logger.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.RouterClient.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.RouterClient.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,r)=>r?e(r.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.Logger.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.RouterClient.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,r)=>{e(null,r)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}async setParent(e,t){return new Promise((r=>{this.settingParent?this.getParent(((e,n)=>{null==t||t(e,n),r({err:e,data:n})})):(this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.Logger.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,null==t||t(null,this.parentWindow),r({data:this.parentWindow})):this.queryWindowService("setParent",e,(()=>{u.Logger.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((n,i)=>{n?u.Logger.system.error("FinsembleWindow.setParent error",n):(u.Logger.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||this.parentWindow.windowName.includes("StackedWindow")||u.Logger.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.RouterClient.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const o=()=>{this.removeEventListener("parent-set",o),null==t||t(n,i),r({err:n,data:i})};this.addEventListener("parent-set",o)}))})))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.Logger.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.Logger.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((r,n)=>{r?u.Logger.system.error("FinsembleWindow.setParentOnWrap error",r):(u.Logger.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=n,!1===this.parentWindow.windowType.includes("StackedWindow")&&!1===this.parentWindow.windowName.includes("StackedWindow")&&u.Logger.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(r,n)}))}))}clearParent(){u.Logger.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.Logger.system.debug("Title change",e),a.RouterClient.publish(this.TITLE_CHANGED_CHANNEL,{title:e,windowName:this.windowName})}getOptions(e){return new Promise((t=>{this.queryWindowService("getOptions",{},((r,n)=>{null==e||e(r,n),t({err:r,data:n})}))}))}_privateManagementPreface(e,t){var r,n;return"function"==typeof t&&u.Logger.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:null===(r=this.identifier)||void 0===r?void 0:r.windowName,windowType:null===(n=this.identifier)||void 0===n?void 0:n.windowType},u.Logger.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.addWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.addWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.removeWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.removeWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.deleteWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.deleteWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((r=>{a.RouterClient.query("StackedWindow.setVisibleWindow",e,((e,n)=>{u.Logger.system.debug("StackedWindow.setVisibleWindow callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((r=>{a.RouterClient.query("StackedWindow.reorder",e,((e,n)=>{u.Logger.system.debug("StackedWindow.reorder callback",e,n),t(e,n.data),r({err:e,data:n.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.RouterClient.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE=d.WINDOWSTATE,m.wrap=m.getInstance,m.cache={},m._windowReady=function(e){let t;return u.Logger.system.debug(`windowServiceReady: ${e} starting`),new Promise((async(r,n)=>{u.Logger.system.debug(`windowServiceReady: ${e} waiting`),t=a.RouterClient.subscribe(`Finsemble.Component.State.${e}`,((n,i)=>{const{state:o}=i.data;switch(u.Logger.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.Logger.system.debug(`windowServiceReady: ${e} ${o}`),a.RouterClient.unsubscribe(t),r()}}))}))}},44137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FreestandingGlobals=t.FEAGlobals=t.Globals=void 0,t.Globals="undefined"==typeof window?r.g:window,t.FEAGlobals="undefined"==typeof window?r.g:window,t.FreestandingGlobals="undefined"==typeof window?r.g:window},31219:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Performance=void 0;const i=r(44137),o={navigationStart:Date.now()};t.Performance={now:()=>{var e;return i.Globals.performance?null===(e=i.Globals.performance)||void 0===e?void 0:e.now():Date.now()},timing:(null===(n=i.Globals.performance)||void 0===n?void 0:n.timing)?i.Globals.performance.timing:o}},59059:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpDelete=t.httpPatch=t.httpPut=t.httpPost=t.httpGet=void 0;const r=200;t.httpGet=async function(e){let t=null,n=null;try{const i=await fetch(e);i.status!=r?t=`HTTP get error for ${e}: ${i.status} ${i.statusText}`:n=await i.json()}catch(e){t=e}return{err:t,getData:n}},t.httpPost=async function(e,t){let n=null;try{const i=await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP post error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpPut=async function(e,t){let n=null;try{const i=await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP put error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpPatch=async function(e,t){let n=null;try{const i=await fetch(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});i.status!=r&&(n=`HTTP patch error for ${e}: ${i.status} ${i.statusText}`)}catch(e){n=e}return{err:n}},t.httpDelete=async function(e){let t=null;try{const n=await fetch(e,{method:"DELETE"});n.status!=r&&(t=`HTTP delete error for ${e}: ${n.status} ${n.statusText}`)}catch(e){t=e}return{err:t}}},7860:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t,...n)=>{const i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(r.g).indexOf(i)>-1||(r.g[i]=new t(...n)),r.g[i]}},64324:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=t.ConfigUtil=void 0;const i=n(r(2518)),o=r(91374),s=n(r(96486)),a=async()=>new Promise((e=>{o.System.getManifest((t=>{e({err:null,data:t})}))})),u=(e,t)=>{var r,n;return null!==(r=e.finsemble[t])&&void 0!==r?r:null===(n=e.finsemble)||void 0===n?void 0:n.custom[t]},l=(e,t)=>{let r=!1;const n=t.split(/[/\\:?=&\s]/);for(let o=0;o<n.length;o++)if("$"===n[o][0]){const s=n[o].substring(1),a=u(e,s);if(void 0===a)i.default.system.warn("ConfigUtil.resolveString",`Missing [${s}] variable from finsemble.custom configuration object`);else{const e=t.replace(n[o],a);i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveString configString",n[o],s,a,"old value=",t,"value=",e),r=!0,t=e}}return{configString:t,replacedMacro:r}},c=(e,t,r)=>{let n=!1;if(r>1e3)return i.default.system.error("ConfigUtil resolveArray maxiumum recursion level reached"),{replacedMacro:n};i.default.system.verbose("forceObjectsToLogger","resolveArray","recursionLevel",r,"configArray:",t);for(let i=0;i<t.length;i++){const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=l(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?c(e,o,r+1):"object"==typeof o&&d(e,o,r+1)}return{replacedMacro:n}},d=(e,t,r)=>{let n=!1;return r>1e3?(i.default.system.error("ConfigUtil resolveObject maxiumum recursion level reached"),{replacedMacro:n}):(t=t||{},i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveManifestMacros:resolveObject","recursionLevel",r,"configObject:",t),Object.keys(t).forEach((i=>{const o=t[i];if("string"==typeof o&&o.indexOf("$")>-1){const r=l(e,o);t[i]=r.configString,n=n||r.replacedMacro}else o instanceof Array?c(e,o,r+1):"object"==typeof o&&d(e,o,r+1)})),{replacedMacro:n})};class f{resolveManifestMacros(e,t){let r;for(r=0;r<100;r++){const{replacedMacro:r}=d(e,t,1);if(!r)break}r>=100&&i.default.system.error("forceObjectsToLogger","resolveManifestMacros exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)}async getExpandedRawManifest(){i.default.system.debug("ConfigUtil.getExpandedRawManifest starting");const{err:e,data:t}=await a();return e||!t?i.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e):(i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",t),this.resolveManifestMacros(t,t.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",t)),{err:e,data:t}}async captureAndLogBadFileData(e){let t,r=null;i.default.system.debug(`captureAndLogBadFileData for ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}}`:t=await n.text()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}r?i.default.system.error("forceObjectsToLogger",`captureAndLogBadFileData failed for ${e}`,r):i.default.system.error("forceObjectsToLogger",`captureAndLogBadFileData successful for ${e}`,t)}async fetchConfigFile(e){let t,r=null;i.default.system.debug(`fetching import ${e}`);try{const n=await fetch(e,{credentials:"include",cache:"no-cache"});200!=n.status?r=`HTTP get error for ${e}: ${n.status} ${n.statusText}`:t=await n.json()}catch(t){r=`Failure importing config from ${e} ${t.toString()}`}return r&&(i.default.system.error("forceObjectsToLogger",r),this.captureAndLogBadFileData(e)),{err:r,data:t}}graftImportOnToManifest(e,t){Object.keys(t).forEach((r=>{if("importConfig"===r){e.finsemble.importConfig=e.finsemble.importConfig||[];for(let r=0;r<t.importConfig.length;r++)e.finsemble.importConfig.unshift(t.importConfig[r])}else if("importThirdPartyConfig"===r){e.finsemble.importThirdPartyConfig=e.finsemble.importThirdPartyConfig||[];for(let r=0;r<t.importThirdPartyConfig.length;r++)e.finsemble.importThirdPartyConfig.unshift(t.importThirdPartyConfig[r])}else e.finsemble[r]=t[r]})),this.resolveManifestMacros(e,e.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",e)}async getInitialManifest(){const{err:e,data:t}=await a();if(!e&&t){t.finsemble=t.finsemble||{},this.resolveManifestMacros(t,t.finsemble),t.finsemble.applicationRoot||i.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const e=`${t.finsemble.moduleRoot}/configs/core/config.json`,{err:r,data:n}=await this.fetchConfigFile(e);!r&&n?this.graftImportOnToManifest(t,n):i.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${t.finsemble.moduleRoot}; Full Path=${e}`,r)}return{err:e,data:t}}promptAndSaveJSONToLocalFile(e,t){i.default.system.debug("saveJSONToLocalFile",e,t);const r=JSON.stringify(t,null,"\t"),n=`data:application/json;charset=utf-8,${encodeURIComponent(r)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",n),s.setAttribute("download",o),s.click()}configFormatForExport(e,t){i.default.system.debug("configFormatForExport starting",e,t);let r=s.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete r.importConfig,delete r.comment;else if("application"===e)delete r.importConfig,delete r.comment,delete r.system,delete r.services;else if("workspace"===e)r={workspace:r};else if("workspaceTemplate"===e){const e={};e[r.name]=r,r={workspaceTemplates:e}}else"services"===e?r=r.services:"components"===e&&(r=r.components);return r}getDefault(e,t,r){let n=r;if(e){try{const r=t.split(".");let i=e;for(let e=1;e<r.length;e++)i=i[r[e]];n=i}catch(e){n=r}void 0===n&&(n=r)}return n}}t.ConfigUtil=f,t.ConfigUtilInstance=new f},26604:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeyClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(r=t.WINDOWSTATE||(t.WINDOWSTATE={}))[r.NORMAL=0]="NORMAL",r[r.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",r[r.MAXIMIZED=2]="MAXIMIZED",r[r.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",r[r.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","launchGroupComponentData","allowAutoArrange"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},25495:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=r(17187),o=r(51848),s=r(26604),a=n(r(84795)),u=r(2518);class l extends i.EventEmitter{constructor(e){var t;super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.whoAmI=null!==(t=e.whoAmI)&&void 0!==t?t:"Source unknown. Look for `waitFor()` and add third parameter",this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),this.startupTimer=null}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout"),this.callback("StartupDependency timeout error")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t,r){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new l({dependencies:e,callback:t,whoAmI:r});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}onDependencyTimeout(e){const t=this.getOfflineClients();let r=`APPLICATION LIFECYCLE:STARTUP:Dependency (${e.whoAmI}) not online after 10 seconds.`;t.length&&(r=`${r} Waiting for these clients: ${t.join(", ")}.`),u.Logger.system.warn(r),e.emit("err",r)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:r,callback:n}=t;(!r.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(r.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),n&&n())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:r}=this.dependencies[t];e=e.concat(r.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,r)=>e.indexOf(t)===r))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.Logger.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const r=c();this.dependencies[r]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:r}=this.dependencies[e];(u.Logger.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],r&&r())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.Logger.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends i.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.RouterClient,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.RouterClient.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:r}=e[t];"closed"===r&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.Logger.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.Logger.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.Logger.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.Logger.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const r={};r[t.data.name]={state:"closed"},this.onServiceStateChange(r)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{"closing"===t.data.state&&this.shutdown.checkDependencies()}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},28936:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=r(51848),a=o(r(26604));t.default=class{constructor(e,t){var r;this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),a[this.sourceType.toUpperCase()]&&a[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.guid,this.internalHandler()}async internalHandler(){var e,t;this.data=null===(t=null===(e=this.queryMessage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){var e;this.allowDelay?(this.delayed=!0,null===(e=this.queryMessage)||void 0===e||e.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){var t;this.completed=!0,this.delayed?s.RouterClient.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):null===(t=this.queryMessage)||void 0===t||t.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},9060:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(51848),o=r(2518),s=n(r(28936));t.default=class{constructor(e){var t;this.eventList=[],this.cleanedUp=!1,this.openResponders=[],this.handlers=[],this.name=e.name,this.thisWindowName=window.name,this.sourceType=null!==(t=e.sourceType)&&void 0!==t?t:"undefined",window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){o.Logger.system.debug("PublicEventmanager.addEventListener:",e);const r=`${this.name}_public_${Date.now()}_${Math.random()}`;this.handlers.push({event:e,handler:t,listenerGuid:r}),i.RouterClient.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:r,windowName:this.thisWindowName});const n=`Finsemble.Interrupt.${r}`;return i.RouterClient.addResponder(n,((n,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:r,handler:t,event:e},i)})),this.openResponders.push(n),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t,r=!0){if(o.Logger.system.debug("PublicEventManager.removeEventListener:",e),this.cleanedUp)return;const n=this.handlers.findIndex((r=>r.event===e&&r.handler===t));if(-1===n)return void(r&&o.Logger.system.warn(`PublicEventManager.removeEventListener() attempt to remove unregistered event "${e}"`));const{listenerGuid:s}=this.handlers[n];i.RouterClient.transmit(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:s,windowName:this.thisWindowName}),i.RouterClient.removeResponder(`Finsemble.Interrupt.${s}`),this.handlers.splice(n,1)}cleanup(){this.cleanedUp=!0,this.handlers=[],this.openResponders.forEach((e=>{i.RouterClient.removeResponder(e)}))}}},26892:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Desktop=t.REST=void 0,o(r(44137),t),t.REST=s(r(59059)),t.Desktop=s(r(31755))},91374:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const n=r(10166),i=r(2518),o=r(51848);class s{static createNew(e,t){fin.desktop.Window.createNew(e,t)}static getCurrent(){return fin.desktop.Window.getCurrent()}static wrap(e){return fin.desktop.Window.wrap(e)}}class a{static createNew(e,t){t("Cannot create freestanding windows")}static getCurrent(){const{windowName:e}=n.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{null==e||e({})},addEventListener:()=>{},removeEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return this.getCurrent()}}class u{constructor(){return new fin.desktop.System.Clipboard}static writeText(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeText is deprecated"),fin.desktop.System.Clipboard.writeText(e,t,r,n)}static writeHTML(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeHTML is deprecated"),fin.desktop.System.Clipboard.writeHTML(e,t,r,n)}static writeRTF(e,t,r,n){return i.Logger.deprecated("FSBL.System.Clipboard.writeRTF is deprecated"),fin.desktop.System.Clipboard.writeRTF(e,t,r,n)}static readText(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readText is deprecated"),fin.desktop.System.Clipboard.readText(e,t,r)}static readHTML(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readHTML is deprecated"),fin.desktop.System.Clipboard.readHTML(e,t,r)}static readRTF(e,t,r){return i.Logger.deprecated("FSBL.System.Clipboard.readRTF is deprecated"),fin.desktop.System.Clipboard.readRTF(e,t,r)}}class l{static get Application(){return{getCurrent:()=>(i.Logger.deprecated("FSBL.System.Application is deprecated"),{restart:()=>{o.RouterClient.transmit("Application.restart",{})},getWindow:()=>fin.desktop.Window,addEventListener:(e,t,r,n)=>{fin.desktop.Window.addEventListener(e,t,r,n)},close:(e,t,r)=>{fin.desktop.Window.close(e,t,r)},getChildWindows:(e,t)=>{null==e||e([fin.desktop.Window])},getGroups:(e,t)=>{null==e||e([])},getManifest:(e,t)=>{l.getManifest(e)},getParentUuid:(e,t)=>{null==e||e("Finsemble")},getInfo:(e,t)=>{l.getVersion(e)},getTrayIconInfo:(e,t)=>{null==e||e({})},isRunning:(e,t)=>{null==e||e(!0)},registerUser:(e,t,r,n)=>{null==r||r()},removeEventListener:(e,t,r,n)=>{fin.desktop.Window.removeEventListener(e,t,r,n)},removeTrayIcon:(e,t)=>{fin.desktop.Window.removeTrayIcon(e,t)},run:(e,t)=>{},scheduleRestart:(e,t)=>{null==e||e()},setTrayIcon:(e,t,r,n)=>{fin.desktop.Window.setTrayIcon(e,t,r,n)},terminate:(e,t)=>{l.terminate()},wait:(e,t)=>{null==e||e()},window:{name:fin.desktop.Window.name},uuid:"Finsemble"})}}static isFreestanding(){return"undefined"==typeof fin}static get Window(){return l.isFreestanding()?a:s}static get Notification(){return{send:e=>{fin.desktop.Notification.send(e)}}}static get Clipboard(){return u}static getManifest(e){return new Promise((t=>{fin.desktop.System.getManifest((r=>{null==e||e(r),t(r)}))}))}static async getMousePosition(e){return new Promise(((t,r)=>{fin.desktop.System.getMousePosition((r=>{(r.left||0===r.left)&&(r.x=r.left),(r.top||0===r.top)&&(r.y=r.top),null==e||e(null,r),t(r)}),(t=>{null==e||e(t),r(t)}))}))}static async deleteAssets(e){return await fin.desktop.System.deleteAssets(e)}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((r=>{t(r),e(r)}))}))}static getMonitorInfo(e){return new Promise((t=>{fin.desktop.System.getMonitorInfo((r=>{t(r),e&&e(r)}))}))}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return i.Logger.deprecated("FSBL.system.getViewId() is deprecated. Use FSBL.system.getWebContentsId()"),fin.getWebContentsId()}static getWebContentsId(){return fin.getWebContentsId()}static hasBrowserView(){return i.Logger.deprecated("FSBL.system.hasBrowserView() is deprecated. Use FSBL.system.isTitlebarWindow()"),l.isTitlebarWindow()}static isTitlebarWindow(){return!l.isFreestanding()&&fin.isTitlebarWindow()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static setTrayIcon(e,t){fin.desktop.System.setTrayIcon(e,t)}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((r=>{t(r),e(r)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static getFEAInfo(e){return new Promise((t=>{fin.desktop.System.getFEAInfo((r=>{null==e||e(r),t(r)}))}))}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static notifyLoggerReady(){fin.desktop.System.notifyLoggerReady()}static updateCentralLoggerState(e){fin.desktop.System.updateCentralLoggerState(e)}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static terminate(){fin.desktop.System.terminate()}static restart(){fin.desktop.System.restart()}static getEnvironmentVariable(e,t){return new Promise((r=>{fin.desktop.System.getEnvironmentVariable(e,(e=>{null==t||t(e),r(e)}))}))}}t.System=l},84795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51848),i=r(2518),o=r(38144),s=r(38144),a=r(37331),u=new class{publishBootStatus(e,t,r,o){i.Logger.system.debug("publishBootStatus",e,t,r),n.RouterClient.publish((0,a.statusChannel)(e),{name:e,type:t,state:r,error:o})}waitForBootStage(e,t,r=Function.prototype){return new Promise(((a,u)=>{i.Logger.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=o.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&i.Logger.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=n.RouterClient.subscribe(s.STAGE_CHANNEL,((s,d)=>{if(i.Logger.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),s)i.Logger.system.error("SystemManagerClient.waitForBootStage subscribe error",s),r(s),u(s);else if(-1===l)s="illegal stage argument",i.Logger.system.debug("SystemManagerClient.waitForBootStage subscribe error",s,e),r(s),u(s);else{const s=o.ALL_BOOT_STAGES.indexOf(d.data.stage);i.Logger.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&s+1>=l?(i.Logger.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,r.name),r(),a(),n.RouterClient.unsubscribe(c)):"stageCompleted"===t&&s>=l?(i.Logger.system.debug("SystemManagerClient.waitForBootStage completed",e,c),r(),a(),n.RouterClient.unsubscribe(c)):i.Logger.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${s} stageIndex=${l} `,s,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((r,o)=>{i.Logger.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=n.RouterClient.subscribe((0,a.statusChannel)(e),((a,u)=>{i.Logger.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(i.Logger.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),o()):u.data.name===e&&"completed"===u.data.state&&(i.Logger.system.debug("SystemManagerClient.waitForStartup completed",e),t(),r(),n.RouterClient.unsubscribe(s))}))}))}publishCheckpointState(e,t,r){i.Logger.system.debug("publishCheckpoint",e,t,r,(0,a.checkpointChannel)(e,t)),n.RouterClient.publish((0,a.checkpointChannel)(e,t),{windowName:e,checkpointName:t,state:r})}showSystemLog(){i.Logger.system.debug("SystemManagerClient.showSystemLog"),n.RouterClient.transmit(s.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){i.Logger.system.debug("SystemManagerClient.systemLog",e,t),n.RouterClient.transmit(s.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=u},44343:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toast=void 0;const i=r(2518),o=r(91374),s=n(r(84795)),a=r(7860);class u{constructor(){this.alertOnceSinceStartUp={},this.alertCurrentCount={}}}t.toast=(e,t,r,n,l)=>{const c=(0,a.singleton)("Toast",u);let d=!1;const f=`toast.${r}`,h=(l=l||{}).duration||864e5;switch(t){case"ONCE-SINCE-STARTUP":f in c.alertOnceSinceStartUp?d=!1:(d=!0,c.alertOnceSinceStartUp[f]=!0);break;case"MAX-COUNT":{let e=0;const t=l.maxCount||1;f in c.alertCurrentCount&&(e=c.alertCurrentCount[f]),c.alertCurrentCount[f]=++e,e<=t&&(d=!0);break}default:d=!0}if(i.Logger.log("toast",e,d,t,r,n,l),d){const t=Object.assign(Object.assign({message:n,timeout:h},l),{devModeOnly:"devModeOnly"===e});s.default.systemLog({notification:!0},`Notification: ${n}`),o.System.Notification.send(t)}},t.default={toast:t.toast,alert:t.toast}},23099:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.promisify=t.identity=t.fastClone=t.isMouseOverDOMElement=t.isPointInBox=t.getDesktopBoundingBox=t.getWindowType=t.isWindows=t.camelCase=t.getMyWindowIdentifier=t.getWindowDescriptor=t.getFinWindow=t.crossDomain=t.isPercentage=t.clone=void 0;const i=r(91374),o=r(2518),s=r(10166),a=r(83823),u=n(r(27361)),l=n(r(78718)),c=n(r(18446)),d=n(r(28368));function f(e,t){return new Promise(((r,n)=>{const o=i.System.Window.getCurrent();if(null==e?void 0:e.windowName)try{const n=i.System.Window.wrap(e.windowName);null==t||t(n),r(n)}catch(r){null==t||t(null),n(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}else if(null==e?void 0:e.componentType){const i="LauncherService";if(void 0!==window[i]){const o=window[i].componentFinder(e);o?(r(o),null==t||t(o)):(n(`util.getFinWindow: Component ${e.componentType} not found.`),null==t||t(null))}else n("getFinWindow by componentType is currently only operable within LaunchService"),null==t||t(null)}else null==t||t(o),r(o)}))}function h(e,t){return new Promise(((r,n)=>{const i=setTimeout((()=>{clearTimeout(i),n(t)}),e)}))}t.clone=function e(t,r={}){if(null===t||"object"!=typeof t)return t;if(t.constructor==Date||t.constructor==RegExp||t.constructor==Function||t.constructor==String||t.constructor==Number||t.constructor==Boolean)return new t.constructor(t);r=r||new t.constructor;for(const n in t)r[n]=void 0===r[n]?e(t[n],null):r[n];return r},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const r=window.location.hostname===t.hostname,n=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=!(r&&i&&n);return o.Logger.system.debug(`Launcher crossDomain=${s} (${r}:${n}:${i})`),s},t.getFinWindow=f,t.getWindowDescriptor=function(e,t){return new Promise(((r,n)=>{f(e).then((e=>{e.getOptions((e=>{null==t||t(e),r(e)}))})).catch((e=>{console.warn(e),null==t||t(null),n(e)}))}))},t.getMyWindowIdentifier=e=>{const t=i.System.Window.getCurrent();return new Promise((r=>{t.getOptions((n=>{let i=null;const{customData:o}=n;o&&o.component&&(i=o.component.type);const s={windowName:t.name,componentType:i};null==e||e(s),r(s)}))}))},t.camelCase=function(...e){let t="";for(let r=0;r<e.length;r++)t=`${t} ${e[r]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.isWindows=async function(e){const t=(await i.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return null==e||e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow","Citrix"].includes(e.windowType))return o.Logger.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let r=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":r="NativeWindow";break;case"native":r="FinsembleNativeWindow";break;case"application":r="WebApplication";break;case"Web":r="WebWindow";break;case"StackedWindow":r="StackedWindow"}return e.compound&&(r="CompoundWindow"),r},t.getDesktopBoundingBox=async e=>{var t,r;const n="string"==typeof e?document.querySelector(e):e;n||o.Logger.system.error("getDesktopBoundingBox can't find element",e);const i=n?n.getBoundingClientRect():{top:0,left:0,width:0,height:0},{windowName:u}=s.Startup.getInstance().getStartupData(),{wrap:l}=await a.FinsembleWindow.getInstance({name:u}),c=await l.getBounds(),d=c.data;c.err&&o.Logger.system.error("getDesktopBoundingBox: finsembleWindow.getBounds() error",c.err);const f=null!==(t=null==d?void 0:d.top)&&void 0!==t?t:0,h=null!==(r=null==d?void 0:d.left)&&void 0!==r?r:0,p={top:f+i.top,left:h+i.left,width:i.width,height:i.height,right:0,bottom:0};return p.right=p.left+p.width,p.bottom=p.top+p.height,p},t.isPointInBox=(e,t)=>(t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top),t.isMouseOverDOMElement=async(e,r=Function.prototype)=>{const n=await(0,t.getDesktopBoundingBox)(e),o=await i.System.getMousePosition(),s=(0,t.isPointInBox)(o,n);return r(s),s},t.fastClone=e=>{if(!e)return e;if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){o.Logger.error("fastClone error, falling back to structured clone",e)}try{return structuredClone(e)}catch(e){o.Logger.error("fastClone error, structured clone failed",e)}},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const r=Array.prototype.slice.call(arguments);return new Promise(((n,i)=>{r.push(((e,t)=>e?i(e):n(t))),e.apply(t,r)}))}},t.timeoutPromise=h,t.wrapWithTimeout=function(e,t,r){return Promise.race([e,h(t,r)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===((0,u.default)(e,"windowIdentifier.windowType")||e.windowType)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const r=["left","right","top","bottom","width","height"],n=(0,l.default)(e,r),i=(0,l.default)(t,r);return(0,c.default)(n,i)},t.sleep=function(e,t=!1){return new Promise(((r,n)=>{t?setTimeout((()=>{try{n("timeout expired")}catch(e){}}),e):setTimeout(r,e)}))},t.isEqualIgnoringArrayOrder=(e,r)=>{const n=(0,t.fastClone)(e),i=(0,t.fastClone)(r);return(0,d.default)(n,i,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return(0,d.default)(e.sort(),t.sort())}))}},25478:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=r(1641),u=r(25495),l=r(2518),c=s(r(84795)),d=r(91374),f=o(r(26604)),h=r(44137),p=r(51848),g=r(51806),{SERVICE_INITIALIZING_CHANNEL:m,SERVICE_READY_CHANNEL:v,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:w,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=f,_={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},name:window.name};t.BaseService=class{constructor(e=_){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=_.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=_.startupDependencies.clients)):e.startupDependencies=_.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=_.shutdownDependencies.services):e.shutdownDependencies=_.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.Logger,this.RouterClient=p.RouterClient,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),h.Globals.finsembleServices?h.Globals.finsembleServices.push(this):h.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function r(e){l.Logger.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((r=>{t.customData=r.customData,e()}))}async function n(){await(new g.FSBLService).startApp(),p.RouterClient.addResponder(y(e.name),((t,r)=>{(e.status="ready")?null==r||r.sendQueryResponse(null):null==r||r.sendQueryResponse("service not ready")})),"routerService"!==t.name&&p.RouterClient.transmit(m,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const r=t.customData.debugServiceDelay||0;if(l.Logger.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(r))r>0&&l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${r} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${r}") for ${t.name}. Value must be an integer.`;l.Logger.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),c.default.systemLog({error:!0},e)}setTimeout(e,r)}function o(e){l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),l.Logger.console.log("Startup Dependencies for",t.name,t.startupDependencies),l.Logger.console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.Logger.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),p.RouterClient.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e,t.name).on("err",(e=>{l.Logger.system.error(e)}))}function s(e){const r=d.System.Window.getCurrent();r.isShowing((n=>{n&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(r.name,null,e):(l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.Logger.system.debug(`${this.name} starting`),new Promise((e=>{(0,a.series)([n,r,s,i,o],(t=>{t&&console.log("waitForDependencies async.series results",t),e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",p.RouterClient.transmit(v,{serviceName:this.name},{suppressWarnings:!0}),l.Logger.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),c.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.Logger.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.Logger.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.Logger.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(p.RouterClient.transmit(w,{waitForMe:!0,name:this.name}),(0,a.each)(this.listeners.onShutdown,(function(e,t){(0,a.asyncify)(e)(null,t)}),(function(t){t&&l.Logger.system.error(t),e.shutdownComplete()}))):(p.RouterClient.transmit(w,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.Logger.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),p.RouterClient.transmit(b,{name:this.name})}}},58755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLogMessage=void 0,t.formatLogMessage=e=>{let t,r=Object.assign(Object.assign({},e),{highlightFlag:[],parsedLogArgs:[],allLogArgs:"",previousRowTimeDelta:0,timeElapsedFromStartup:0}),n=[];try{t=JSON.parse(e.logData)}catch(r){t={Note:"*** LoggingService: error parsing data (see local console warning for data) ***"},console.warn(t,e.logData,r)}for(const e in t)if(t.hasOwnProperty(e)){r.parsedLogArgs.push(t[e]);const i=JSON.stringify(t[e]);n.push(i)}return r.allLogArgs=n.join(" ").replace(""," ").replace('" "'," "),delete r.logData,r}},51305:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(25478),o=r(2518),s=r(9381),a=r(51848),u=r(64324),l=r(44343),c=n(r(84795)),d=n(r(32785)),f=r(50981),h=r(26892),p=r(91374);class g extends i.BaseService{constructor(){super({name:"loggerService",startupDependencies:{},shutdownDependencies:{services:["workspaceService","windowService","linkerService","interopService","storageService","configService","dataStoreService","authenticationService","assimilationService"]}}),this.logToDiskLevels=[],this.onBaseServiceReady((async e=>{await this.initialize(),this.createRouterEndpoints(),o.Logger.start(),e()}))}async initialize(){const{err:e,data:t}=await u.ConfigUtilInstance.getInitialManifest();!e&&t&&(this.maybeSetLogLevelsFromManifest(t),this.maybeSetLogLevelsToDisk(t),this.maybeStartLoggingFromFEA(t)),this.getLogLevelsToThrowErrorsFor().then((()=>{p.System.notifyLoggerReady()}))}createRouterEndpoints(){a.RouterClient.addListener("CentralConsole-Show",(()=>{window.showConsole()})),a.RouterClient.addResponder("logger.service.unregister",((e,t)=>{e||!t?console.error(e):(d.default.unRegisterClient(t.data),t.sendQueryResponse(null,{status:"success"}))})),a.RouterClient.addResponder("logger.service.register",(async(e,t)=>{if(e||!t)console.error(e);else{const e=d.default.onClientRegistered(t.data);t.sendQueryResponse(null,e)}})),a.RouterClient.addListener("logger.service.logMessages",((e,t)=>{e&&console.error(e);const{data:r}=t;null==r||r.forEach((e=>{this.maybeLogToDisk(e)})),d.default.onNewMessage(r)})),a.RouterClient.addListener("Application.shutdown",(()=>{d.default.removeUnregisteredClientsFromPersistState()})),a.RouterClient.addListener("Application.restart",(()=>{d.default.removeUnregisteredClientsFromPersistState()})),a.RouterClient.addListener("finsemble.logger.client.finsemble-electron-adapter",((e,t)=>{p.System.updateCentralLoggerState(t.data)}))}maybeLogToDisk(e){const t=e.logType.toLowerCase();this.logToDiskLevels.includes(t)&&h.FEAGlobals.fin.desktop.System.logToDisk(t,"Central Logger",e)}maybeSetLogLevelsToDisk(e){var t,r,n,i,o,s,a,u;this.logToDiskLevels=null!==(u=null!==(n=null===(r=null===(t=e.finsemble)||void 0===t?void 0:t.logger)||void 0===r?void 0:r.logToDiskLevels)&&void 0!==n?n:null===(a=null===(s=null===(o=null===(i=e.finsemble)||void 0===i?void 0:i.system)||void 0===o?void 0:o.requiredServicesConfig)||void 0===s?void 0:s.loggerService)||void 0===a?void 0:a.logToDiskLevels)&&void 0!==u?u:[]}maybeSetLogLevelsFromManifest(e){var t,r,n,i,o,s,a,u;if(d.default.persistState.get("isPersisted"))return;const l=null!==(u=null!==(n=null===(r=null===(t=e.finsemble)||void 0===t?void 0:t.logger)||void 0===r?void 0:r.defaultClientLogLevels)&&void 0!==n?n:null===(a=null===(s=null===(o=null===(i=e.finsemble)||void 0===i?void 0:i.system)||void 0===o?void 0:o.requiredServicesConfig)||void 0===s?void 0:s.loggerService)||void 0===a?void 0:a.defaultClientLogLevels)&&void 0!==u?u:f.defaultLogLevels;d.default.persistState.set("initialClientStateDefault",l),d.default.emit("newInitialClientStateDefault");const c={console:l,system:l,perf:l,dev:l};let h=d.default.persistState.get("clientState");Object.keys(h).forEach((e=>{h[e]=Object.assign(Object.assign({},c),h[e])})),d.default.persistState.set("clientState",h),d.default.emit("newClientState"),d.default.persistState.set("isPersisted",!0)}maybeStartLoggingFromFEA(e){var t,r;if(!0===(null===(r=null===(t=e["finsemble-electron-adapter"])||void 0===t?void 0:t.logger)||void 0===r?void 0:r.transmitToCentralLogger)){const e="Finsemble Electron Adapter",t="finsembleElectronAdapter",r=e=>({category:"system",logClientName:t,logType:e.level,logData:e.logData,logTimestamp:e.time});p.System.addEventListener("log-fea",(e=>{Array.isArray(e)?d.default.onNewMessage(e.map((e=>r(e)))):d.default.onNewMessage([r(e)])}));const n=d.default.onClientRegistered({centralLoggerNamePrefix:"",clientChannel:"finsemble.logger.client.finsemble-electron-adapter",clientName:t,displayName:e,viewId:null,windowName:"System Manager"});p.System.updateCentralLoggerState(n)}}async getLogLevelsToThrowErrorsFor(){var e,t,r,n,i,a,u,f;await c.default.waitForStartup("configService");const{err:h,data:p}=await s.ConfigClient.getValue({field:"finsemble"});if(h)return;const g=null!==(u=null!==(r=null===(t=null===(e=null==p?void 0:p.servicesConfig)||void 0===e?void 0:e.logger)||void 0===t?void 0:t.showWarningForLogStates)&&void 0!==r?r:null===(a=null===(i=null===(n=null==p?void 0:p.system)||void 0===n?void 0:n.requiredServicesConfig)||void 0===i?void 0:i.loggerService)||void 0===a?void 0:a.showWarningForLogStates)&&void 0!==u?u:[],m=null!==(f=d.default.persistState.get("clientState"))&&void 0!==f?f:[];o.Logger.system.log("Checking for high logging level warning",g,m);const v=Object.values(m).some((e=>((e,t)=>e.some((e=>{var r;return!0===(null===(r=t.system)||void 0===r?void 0:r[e])})))(g,e)));if(v){const e="Warning: diagnostic logging detected, which can slow performance. Check that 'info', 'debug', `verbose` are off in the central logger.";(0,l.toast)("dev","ONCE-SINCE-STARTUP","Unnecessary-Logging-States-Error",e,{duration:5e3})}}}t.default=new g},4189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CtrlFSearch=void 0;const r=(e=[])=>{let t=0,r=!0,n=null;return{getActiveIndex:()=>t+1,values:e,length:e.length,setActiveIndex:e=>t=e,next:()=>("prev"===n&&(t+=2),n="next",r&&(r=!1),t===e.length?t=0:-1===t&&(t=e.length-1),{searchResultNumber:t+1,value:e[t++],done:!1}),previous:()=>("next"===n&&(t-=2),n="prev",r&&(r=!1,t=e.length-1),t===e.length&&(t=0),-1===t&&(t=e.length-1),{searchResultNumber:t+1,value:e[t--],done:!1})}};t.CtrlFSearch=class{constructor(){this.searchString="",this.iterator=r([])}performLogSearch(e,t){this.searchString=t;const n=[];if(""!==t)for(let r=0;r<e.length;r++)e[r].allLogArgs.toLowerCase().includes(t.toLowerCase())&&n.push(r);this.iterator=r(n)}performStringSearch(e,t){this.searchString=t;const n=[];if(""!==t)for(let r=0;r<e.length;r++)e[r].toLowerCase().includes(t.toLowerCase())&&n.push(r);this.iterator=r(n)}getIterator(){return this.iterator}}},32785:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.showFocusBTF=void 0;const a=r(51848),u=o(r(23099)),l=r(58755),c=r(4189),d=s(r(9381)),f=r(91374),h=s(r(80752)),p=s(r(84795)),g=r(44343),m=r(50981),v=r(50981),y=s(r(55733)),w=r(17187),b=s(r(23279)),S=s(r(23493)),_=s(r(66678)),C=r(93162),L=r(1641),E=200,k=1e5;t.showFocusBTF=e=>{e.restore(),e.show(),e.bringToFront((()=>{e.focus()}))};const A=(e,t)=>t.length>0&&-1!==e.allLogArgs.toLowerCase().indexOf(t.toLowerCase());let T=0,O=1/0,R=!1,I=[],x={},N=[],D=[],P=0,W=0;const F={console:v.defaultLogLevels,dev:v.defaultLogLevels,system:v.defaultLogLevels,perf:v.defaultLogLevels,clientChannel:"",showAdvancedViewFilters:!0,wrapLog:!0,showStackStraceInLog:!0,filter:{logic:"OR"},showTimeElapsedFromStartup:!1,clientListVisible:!0,colDefs:{}},j={console:v.defaultLogLevels,dev:v.defaultLogLevels,system:v.defaultLogLevels,perf:v.defaultLogLevels,clientChannel:"",showAdvancedViewFilters:!0,wrapLog:!0,showStackStraceInLog:!0,filter:{logic:"OR"},showTimeElapsedFromStartup:!1,clientListVisible:!0,colDefs:{}},M={Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1},B={Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1,LocalOnly:!1};class z extends w.EventEmitter{constructor(){super(),this.modifierKeys={ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this.windowVisibility="visible",this.activeView="logger",this.Search=new c.CtrlFSearch,this.showOnError=!1,this.showOnStartup=!1,this.activeRowIndex=0,this.rowTimediff=null,this.initialized=!1,this.shouldShowSearchBox=!1,this.broadCastNewMessageUpdateThrottled=(0,S.default)(this.broadCastNewMessageUpdate.bind(this),1e3),this.persistState=new m.State,this.activeConfigSearchMatch="",this.stringifiedManifest=[],this.currentMasterSize=1e4,this.setMaxListeners(100),this.bindCorrectContext(),this.registerGlobalHotkey(),this.setDefaults()}bindCorrectContext(){this.setFilter1=(0,b.default)(this.setFilter1,E),this.setFilter2=(0,b.default)(this.setFilter2,E),this.setFilter3=(0,b.default)(this.setFilter3,E),this.setFilter4=(0,b.default)(this.setFilter4,E),this.setLogSearchBoxString=this.setLogSearchBoxString.bind(this),this.setLogSearchBoxString=(0,b.default)(this.setLogSearchBoxString,0),this.setWindowHidden=this.setWindowHidden.bind(this),this.setWindowVisible=this.setWindowVisible.bind(this),this.emitResizeTimeout=this.emitResizeTimeout.bind(this),this.setConfigVisible=this.setConfigVisible.bind(this),this.setLoggerVisible=this.setLoggerVisible.bind(this),this.clearData=this.clearData.bind(this),this.toggleShowOnError=this.toggleShowOnError.bind(this),this.toggleShowOnStartup=this.toggleShowOnStartup.bind(this),this.configureLoggerForDefaults=this.configureLoggerForDefaults.bind(this),this.configureLoggerForErrors=this.configureLoggerForErrors.bind(this),this.configureLoggerForFieldCapture=this.configureLoggerForFieldCapture.bind(this)}initialize(){P=window.innerWidth,W=window.innerHeight,this.addHotkeys(),this.addWindowListeners()}addWindowListeners(){const e=f.System.Window.getCurrent();e.addEventListener("bounds-change-end",(e=>{this.processSizeChange(e.width,e.height)})),e.addEventListener("maximized",(()=>{this.processSizeChange(window.outerWidth,window.outerHeight)})),e.addEventListener("restored",(()=>{this.processSizeChange(window.outerWidth,window.outerHeight)})),e.addEventListener("shown",this.setWindowVisible),e.addEventListener("restored",this.setWindowVisible),e.addEventListener("hidden",this.setWindowHidden),e.addEventListener("minimized",this.setWindowHidden)}getRegisteredClientNames(){return I}getState(){return this.persistState.data}getRegisteredClients(){return x}getWindowWidth(){return P}getWindowHeight(){return W}async registerGlobalHotkey(){await p.default.waitForStartup("configService");const{data:e}=await d.default.getValue({field:"finsemble.servicesConfig.logger.hotkeyShowCentralLogger"});e&&(await p.default.waitForStartup("hotkeysService"),h.default.addGlobalHotkey(e,(()=>{window.showConsole()})))}addHotkeys(){const e=e=>{this.modifierKeys={ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}};window.addEventListener("blur",(()=>{this.modifierKeys={ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1}})),window.addEventListener("keydown",e),window.addEventListener("keyup",e),window.addEventListener("keydown",(e=>{if(e.ctrlKey&&e.altKey)switch(e.key){case"c":this.toggleClientListVisible();break;case"d":this.configureLoggerForDefaults();break;case"e":this.configureLoggerForErrors();break;case"s":this.configureLoggerForFieldCapture();break;case"x":this.clearData()}}))}getFileMode(){return R}getFirstMessageTime(){return O}broadCastNewMessageUpdate(){"hidden"!==this.windowVisibility&&this.emit("loggerNewMessages")}getMasterLog(){return N}getFilteredLog(){return D}getLogCounts(){return{master:N.length,display:D.length}}maybeOpenClient({windowName:e,viewId:r}){if(r||e){const n=f.System.Window.wrap(e);this.modifierKeys.altKey?(0,t.showFocusBTF)(n):f.System.showDeveloperTools(e,r)}}getRowTimeDiff(){return this.rowTimediff}setRowTimeDiff(e){this.rowTimediff=e,this.emit("rowTimeDiffChange")}getClientListVisible(){return this.persistState.get("clientListVisible")}triggerRowheightRecalculation(){this.emit("recalculateHeight")}triggerLogRerender(){this.emit("rerenderList")}toggleClientListVisible(){this.persistState.toggle("clientListVisible"),this.emit("clientListVisibleChange")}emitResizeTimeout(){setTimeout((()=>{this.emit("WindowResize"),this.emit("rerenderList")}),400)}getLogState(){return this.persistState.get("logState")}getClientState(e){return this.persistState.get(`clientState[${e}]`)}getShowClientState(e){return this.persistState.get(`showClientState[${e}]`)}getLogCategoriesAllowed(){return{perf:this.persistState.get("perfModeState"),dev:this.persistState.get("devModeState"),system:this.persistState.get("systemModeState")}}getAllShowClientState(){return this.persistState.get("showClientState")}getClientMode(){return this.persistState.get("currentCategory")}clearData(){N=[],D=[],this.emit("loggerNewMessages")}setTop(){this.emit("SetTop")}setBottom(){this.emit("SetBottom")}scrollToActiveRow(){this.emit("scrollToActiveRow")}setActiveRowIndex(e){this.activeRowIndex=e,this.emit("activeRowChanged")}setActiveConfigSearchMatch(e){this.activeConfigSearchMatch=e,this.emit("activeConfigSearchMatch")}getActiveConfigSearchMatch(){return this.activeConfigSearchMatch}getActiveRowIndex(){return this.activeRowIndex}getHideInactiveState(){return this.persistState.get("hideInactiveState")}toggleHideInactive(){this.persistState.toggle("hideInactiveState"),this.emit("newHideInactiveState")}getCurrentCategory(){return this.persistState.get("currentCategory")}toggleShowClient(e){this.persistState.toggle(`showClientState[${e}]`),this.filterData(),this.emit("newShowClientState"),this.broadCastNewMessageUpdate()}toggleShowAllClients(){let e=!0;for(const t in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(t)&&(e=e&&this.persistState.data.showClientState[t],!e))break;const t=!e;for(const e in this.persistState.data.showClientState)this.persistState.data.showClientState.hasOwnProperty(e)&&this.persistState.set(`showClientState[${e}]`,t);this.filterData(),this.emit("newShowClientState"),this.broadCastNewMessageUpdateThrottled()}getShowSearchBox(){return this.shouldShowSearchBox}showSearchBox(){this.shouldShowSearchBox=!0,this.emit("showSearchBoxChange")}hideSearchBox(){this.shouldShowSearchBox=!1,this.setLogSearchBoxString(""),this.emit("showSearchBoxChange")}getSearchBoxString(){return this.Search.searchString}getSearchMatches(){return this.Search.iterator}setLogSearchBoxString(e){this.Search.performLogSearch(D,e),this.emit("searchBoxTextChange")}async setConfigSearchBoxString(e){this.stringifiedManifest?(this.Search.performStringSearch(this.stringifiedManifest,e),this.emit("searchBoxTextChange")):(await this.getFullConfig(),this.Search.performStringSearch(this.stringifiedManifest,e),this.emit("searchBoxTextChange"))}setWindowVisible(){this.windowVisibility="visible",this.broadCastNewMessageUpdate(),this.emit("WindowVisibilityChange")}setWindowHidden(){this.windowVisibility="hidden",this.emit("WindowVisibilityChange")}getWindowVisibility(){return this.windowVisibility}setAllLogStateOn(){this.persistState.set("logState",{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0}),this.emit("newDisplayState")}setLogState(e){this.persistState.set("logState",Object.assign(this.persistState.data.logState,e)),this.emit("newDisplayState")}configureLoggerForDefaults(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!1),this.persistState.set("initialClientStateDefault.Debug",!1),this.persistState.set("initialClientStateDefault.Verbose",!1),this.setAllLogStateOn(),this.defaultShowClientAll(),this.filterData(),this.emit("newInitialClientStateDefault")}configureLoggerForErrors(){this.persistState.set("initialClientStateDefault.Error",!0),this.emit("newInitialClientStateDefault"),this.setLogState({Error:!0,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1}),this.defaultShowClientAll(),this.filterData()}configureLoggerForFieldCapture(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!0),this.persistState.set("initialClientStateDefault.Debug",!0),this.persistState.set("initialClientStateDefault.Verbose",!1),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll(),this.persistState.persist(),this.filterData(),setTimeout((()=>{alert("Logger is now configured for field capture. Please restart your application if needed, recreate problem, export the log, and send it to Finsemble Support with description of the problem. IMPORTANT: Once your log is exported, revert to the default logger settings; otherwise, you may see degraded performance due to the extra logging.")}),200)}configureLoggerForStartup(){this.persistState.set("initialClientStateDefault.Error",!0),this.persistState.set("initialClientStateDefault.Warn",!0),this.persistState.set("initialClientStateDefault.Log",!0),this.persistState.set("initialClientStateDefault.Info",!0),this.persistState.set("initialClientStateDefault.Debug",!0),this.setFilter1("Service Online"),this.emit("NewHighlightValues1"),this.setFilter2("not online"),this.emit("NewHighlightValues2"),this.setFilter3(""),this.emit("NewHighlightValues3"),this.setFilter4(""),this.emit("NewHighlightValues4"),this.setFilterLogic("OR"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}setFilteredLog(e){D=(0,_.default)(e)}chunk(e,t){const r=[];let n=0;for(;n<e.length;)r.push(e.slice(n,t+n)),n+=t;return r}saveToFile(){const e={registeredClientNames:I,registeredClients:x,persistState:this.persistState.data},t=JSON.stringify(e),r=new Blob([t],{type:"application/json"}),n=new y.default;n.file("log_state.json",r),N.length>5e4&&(0,g.toast)("dev","ALWAYS","system","Currently exporting a large log, this may take some time... (Check developer console for progress)");const i=this.chunk(N,1e3);this.emit("toggleOverlay","Creating log export file. Please wait...");for(let e=0;e<i.length;e++){const t=i[e];console.log("adding to zip",e,t);const r=JSON.stringify({partial_log:t}),o=new Blob([r],{type:"application/json"});n.file(`log${e}.json`,o)}const o=(new Date).toLocaleString();n.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}).then((e=>{this.emit("toggleOverlay"),(0,C.saveAs)(e,`logs-${o}.zip`)}))}setMasterLog(e){N=e}setRegisteredClientNames(e){I=e}setRegisteredClients(e){x=e}fileMode(){R=!0;const e=document.createElement("div");e.innerHTML='<input type="file">';const t=e.firstChild;t.addEventListener("change",(async()=>{var e,r;const n=null===(e=t.files)||void 0===e?void 0:e[0];if(!n.name.match(/\.(zip)$/)){const e="File not supported. Import must be from a .zip file generated by the Central Logger";return alert(e),void console.error(e)}for(const e in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(e)&&(!this.persistState.data.hideInactiveState||this.persistState.data.showClientState[e])){const t=Object.assign({},j);t.clientChannel=null===(r=this.persistState.data.clientState[e])||void 0===r?void 0:r.clientChannel,a.RouterClient.transmit(t.clientChannel,t),console.debug("disabledClientState",t.clientChannel,t)}const i=await y.default.loadAsync(n),o=Object.keys(i.files).length;if(!("log_state.json"in i.files))return void(0,g.toast)("dev","ALWAYS","system","Not a valid central logger zip file. Perhaps it was double zipped?");this.emit("toggleOverlay","Importing log file. Please wait..."),o>8&&(0,g.toast)("dev","ALWAYS","system",`Currently importing a large log (${o} files). This may take some time... (Check developer console for progress)`);const{outOfOrder:s,messages:u,persistState:l}=await(async e=>new Promise((t=>{const{filenames:r,outOfOrder:n}=(e=>{let t=!1;return{filenames:Object.keys(e.files).sort(((e,r)=>{const n=/\/log[0-9]*.json$/;if(n.test(e)){if(n.test(r)){const i=Number(e.substring(e.search(n)+4,e.length-5)),o=Number(r.substring(r.search(n)+4,r.length-5));return Number.isNaN(i)||Number.isNaN(o)?(t=!0,0):i-o}return-1}return 1})),outOfOrder:t}})(e),i=[];let o;(0,L.eachSeries)(r,(async t=>new Promise((async r=>{const n=e.files[t],s=await n.async("blob"),a=new FileReader;a.onload=()=>{const e=(e=>{try{return JSON.parse(e)}catch(e){return}})(a.result),{length:n}=a.result;if(console.log(`Processing logfile ${t} - ${n} bytes`),e&&"log_state.json"===t){const{registeredClientNames:t}=e;(e=>{I=null!=I?I:e,x={},I.forEach((e=>{x[e]={name:e,viewId:0,centralLoggerNamePrefix:"",displayName:e}}))})(t),({persistState:o}=e)}else if(e&&e.partial_log){const t=e.partial_log;t.sort(((e,t)=>e.logTimestamp-t.logTimestamp)),Array.prototype.push.apply(i,t)}r()},a.readAsText(s)}))),(()=>{t({outOfOrder:n,messages:i,persistState:o})}))})))(i);u.length?(s?(0,g.toast)("dev","ALWAYS","system","There was a problem sorting file names, logs may appear out of order"):(0,g.toast)("dev","ALWAYS","system","Log successfully imported!"),this.persistState.data=l,this.currentMasterSize=k,N=u,O=u[0].logTimestamp,this.filterData(),this.emit("newFirstMessageTime"),this.emit("FileMode"),this.emit("LoggerRegister"),this.emit("newFilterHighlights"),this.emit("newDisplayState"),this.emit("LoggerUnregister"),this.emit("newShowClientState"),this.emit("toggleOverlay")):(0,g.toast)("dev","ALWAYS","system","Failure to import log - message list is empty!")})),t.click()}async getFullConfig(e){const{data:t}=await d.default.getManifest(),r=JSON.stringify(t,null,4);this.stringifiedManifest=r.split(/\n/g),null==e||e(this.stringifiedManifest)}getActiveView(){return this.activeView}setLoggerVisible(){this.activeView="logger",this.emit("viewChange")}setConfigVisible(){this.activeView="config",this.emit("viewChange")}findIndexByTimestamp(e,t){for(var r=e.length-1;r>0&&!(e[r].logTimestamp<t);r--);return r}toggleShowOnStartup(){this.setShowOnStartup(!this.showOnStartup)}getShowOnStartup(){return this.showOnStartup}setShowOnStartup(e,t=!0){this.showOnStartup=e,this.emit("showOnStartup",this.showOnStartup),t&&d.default.setPreference({field:"finsemble.preferences.loggerService.showOnStartup",value:this.showOnStartup})}toggleShowOnError(){this.setShowOnError(!this.showOnError)}getShowOnError(){return this.showOnError}setShowOnError(e,t=!0){this.showOnError=e,this.emit("showOnError",this.showOnError),t&&d.default.setPreference({field:"finsemble.preferences.loggerService.showOnError",value:this.showOnError})}processSizeChange(e,t){P!==e&&(P=window.innerWidth,this.emit("WindowResize"),this.emit("newShowClientState")),W!==t&&(W=window.innerHeight,this.emit("WindowResize"),this.emit("newShowClientState"))}sortNewLogMessages(e){function t(e,t){let r=0;return e.logTimestamp<t.logTimestamp&&(r=-1),e.logTimestamp>t.logTimestamp&&(r=1),r}let r=this.findIndexByTimestamp(N,e),n=N.splice(r,N.length);n.sort(t),N=N.concat(n),this.shouldFilterData()?(r=this.findIndexByTimestamp(D,e),r!==D.length-1&&(n=D.splice(r,D.length),n.sort(t),D=D.concat(n))):D=(0,_.default)(N)}adjustCurrentMasterLogSize(e=0){var t;const r=["Info","Debug","Verbose"],n=null!==(t=this.persistState.get("clientState"))&&void 0!==t?t:[],i=Object.values(n).some((e=>((e,t)=>e.some((e=>{var r;return!0===(null===(r=t.system)||void 0===r?void 0:r[e])}))||e.some((e=>{var r;return!0===(null===(r=t.dev)||void 0===r?void 0:r[e])})))(r,e)));i&&(this.currentMasterSize=k);const o=N.length+e;o>this.currentMasterSize&&(N=N.slice(o-this.currentMasterSize))}onNewMessage(e){const t=D.length;if(R)return;let r,n=1/0;this.adjustCurrentMasterLogSize(e.length);for(let t=0;t<e.length;t++)this.showOnError&&"Error"===e[t].logType&&window.showConsole(),r=(0,l.formatLogMessage)(e[t]),T++<1e4&&r.logTimestamp<O&&(O=r.logTimestamp,this.emit("newFirstMessageTime")),r.logTimestamp<n&&(n=r.logTimestamp),r.timeElapsedFromStartup=Math.round(r.logTimestamp-O),N.push(r),this.shouldFilterData()&&this.filterData(r).length&&D.push(r);this.sortNewLogMessages(n),D.length>this.currentMasterSize?(D=D.slice(D.length-this.currentMasterSize),this.broadCastNewMessageUpdateThrottled()):t===D.length&&t!==this.currentMasterSize||this.broadCastNewMessageUpdateThrottled()}onClientRegistered(e){const{clientName:t,displayName:r,viewId:n,centralLoggerNamePrefix:i}=e,o=n?`${t}: view-${n}`:t;if(R){console.debug("Registration in FileMode");const t=Object.assign({},j);return t.clientChannel=e.clientChannel,t}{if(console.debug("LoggerStore.registerClient",o,e),I.includes(o)||(I.push(o),x[o]={name:t,viewId:n,centralLoggerNamePrefix:i,displayName:r}),o in this.persistState.data.showClientState||this.persistState.set(`showClientState[${o}]`,!0),!(o in this.persistState.data.clientState)){const t=u.clone(F);this.persistState.set(`clientState[${o}]`,t),this.persistState.set(`clientState[${o}].clientChannel`,e.clientChannel),this.persistState.set(`clientState[${o}].windowName`,e.windowName)}const s=this.persistState.data.clientState[o];return this.filterData(),this.emit("LoggerRegister"),this.emit("newClientState"),this.emit("newShowClientState"),s}}unRegisterClient(e){const t=e.viewId?`${e.clientName}: view-${e.viewId}`:e.clientName,{deleteFromPersistence:r}=e;for(let e=0;e<I.length;e++)I[e]===t&&(I.splice(e,1),e--,delete x[t]);r&&(delete this.persistState.data.clientState[t],delete this.persistState.data.showClientState[t],this.persistState.persist()),this.emit("LoggerUnregister")}setDefaults(){F.console=this.persistState.data.initialClientStateDefault,F.dev=this.persistState.data.initialClientStateDefault,F.system=this.persistState.data.initialClientStateDefault,F.perf=this.persistState.data.initialClientStateDefault,F.clientChannel="",F.showAdvancedViewFilters=this.persistState.data.showAdvancedViewFilters,F.wrapLog=this.persistState.data.wrapLog,F.showStackStraceInLog=this.persistState.data.showStackStraceInLog,F.filter=this.persistState.data.filter,F.showTimeElapsedFromStartup=this.persistState.data.showTimeElapsedFromStartup,F.clientListVisible=this.persistState.data.clientListVisible,F.colDefs=this.persistState.data.colDefs,j.console=M,j.dev=B,j.system=B,j.perf=B,j.clientChannel=""}removeUnregisteredClientsFromPersistState(){Object.keys(this.persistState.data.clientState).forEach((e=>{I.includes(e)||(delete this.persistState.data.clientState[e],delete this.persistState.data.showClientState[e])})),this.persistState.persist()}setFilter1(e){this.persistState.set("highlightString[0]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues1")}setFilter2(e){this.persistState.set("highlightString[1]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues2")}setFilter3(e){this.persistState.set("highlightString[2]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues3")}setFilter4(e){this.persistState.set("highlightString[3]",{str:e.toString()}),this.persistState.data.filterHighlights&&this.filterData(),this.emit("NewHighlightValues4")}getFilterStrings(e={removeEmpty:!1}){let t=this.persistState.get("highlightString");return t||(t=[]),t=t.map((e=>("string"==typeof e&&(e={str:e}),e))),e.removeEmpty?t.filter((e=>{const{str:t}=e;return""!==t})):t}toggleDisplayAll(){const{logState:e}=this.persistState.data;e.Error&&e.Warn&&e.Info&&e.Log&&e.Debug&&e.Verbose?this.persistState.set("logState",{Error:!1,Warn:!1,Info:!1,Log:!1,Debug:!1,Verbose:!1}):this.persistState.set("logState",{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0}),this.filterData(),this.emit("newDisplayState")}toggleDisplayErrors(){this.persistState.toggle("logState.Error"),this.filterData(),this.emit("newDisplayState")}toggleDisplayWarnings(){this.persistState.toggle("logState.Warn"),this.filterData(),this.emit("newDisplayState")}toggleDisplayInfo(){this.persistState.toggle("logState.Info"),this.filterData(),this.emit("newDisplayState")}toggleDisplayLogs(){this.persistState.toggle("logState.Log"),this.filterData(),this.emit("newDisplayState")}toggleDisplayDebug(){this.persistState.toggle("logState.Debug"),this.filterData(),this.emit("newDisplayState")}toggleDisplayVerbose(){this.persistState.toggle("logState.Verbose"),this.filterData(),this.emit("newDisplayState")}getDevModeState(){return this.persistState.get("devModeState")}getSystemModeState(){return this.persistState.get("systemModeState")}getPerfModeState(){return this.persistState.get("perfModeState")}devModeToggle(){this.persistState.toggle("devModeState"),this.filterData(),this.emit("ModeStateChange")}systemModeToggle(){this.persistState.toggle("systemModeState"),this.filterData(),this.emit("ModeStateChange")}perfModeToggle(){this.persistState.toggle("perfModeState"),this.filterData(),this.emit("ModeStateChange")}devMode(){this.persistState.set("currentCategory","dev"),this.emit("ChangeClientMode"),this.emit("newClientState")}systemMode(){this.persistState.set("currentCategory","system"),this.emit("ChangeClientMode"),this.emit("newClientState")}perfMode(){this.persistState.set("currentCategory","perf"),this.emit("ChangeClientMode"),this.emit("newClientState")}getFilterLogic(){return this.persistState.get("filter.logic")}setFilterLogic(e){this.persistState.set("filter.logic",e),this.emit("filterLogicChange"),this.filterData()}shouldFilterData(){const e=0===this.getFilterStrings({removeEmpty:!0}).length,t=this.getLogCategoriesAllowed(),r=this.getLogState(),n=this.getAllShowClientState(),i=Object.keys(r).every((e=>r[e])),o=Object.keys(t).every((e=>t[e])),s=Object.keys(n).every((e=>n[e]));return!(o&&s&&e&&i)}shouldNotFilterData(){return!this.shouldFilterData()}filterData(e){const t=void 0===e,r=void 0===e?N:[e],n=this.getFilterStrings({removeEmpty:!0}),i=0!==n.length,o=this.getAllShowClientState(),s=this.getLogCategoriesAllowed(),a=this.getLogState(),u=this.shouldNotFilterData(),l=Object.keys(o).every((e=>o[e]));if(u)return this.setFilteredLog(N),t&&this.broadCastNewMessageUpdate(),D;const c=this.getFilterLogic(),d=r.filter((e=>{if(!l&&!o[e.logClientName])return!1;const t=a[e.logType],r=s[e.category];return!(!t||!r)&&(!i||("AND"===c?((e,t)=>{for(let r=0;r<e.length;r++){let{str:n}=e[r];const i="-"===n.charAt(0);n=i?n:n.substr(1);const o=!n||A(t,n);if(!o&&!i)return!1;if(i&&o)return!1}return!0})(n,e):((e,t)=>{let r=!1;for(let n=0;n<e.length;n++){let{str:i}=e[n];const o="-"===i.charAt(0);i=o?i:i.substr(1);const s=!i||A(t,i);if(s&&o)return!1;s&&(r=!0)}return r})(n,e)))}));return t&&(this.setFilteredLog(d),this.broadCastNewMessageUpdate()),d}showClientAllCategory(e){for(const t in this.persistState.data.showClientState)if(this.persistState.data.showClientState.hasOwnProperty(t)&&(!this.persistState.data.hideInactiveState||this.persistState.data.showClientState[t])){const r=this.persistState.data.clientState[t];r[e]=Object.assign({},this.persistState.data.initialClientStateDefault),a.RouterClient.transmit(r.clientChannel,r)}this.emit("newClientState")}defaultShowClientAll(){this.showClientAllCategory("console"),this.showClientAllCategory("dev"),this.showClientAllCategory("system"),this.showClientAllCategory("perf"),this.emit("newClientState")}toggleClientStateAllCategories(e,t){this.persistState.toggle(`clientState[${e}].dev[${t}]`),this.persistState.toggle(`clientState[${e}].system[${t}]`),this.persistState.toggle(`clientState[${e}].perf[${t}]`)}toggleClientErrors(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Error"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientWarnings(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Warn"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientInfo(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Info"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientLogs(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Log"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientDebug(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Debug"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientVerbose(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"Verbose"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleClientLocalOnly(e){const t=this.persistState.data.clientState[e];this.toggleClientStateAllCategories(e,"LocalOnly"),a.RouterClient.transmit(t.clientChannel,t),this.emit("newClientState")}toggleInitialClientErrorsDefault(){this.persistState.toggle("initialClientStateDefault.Error"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientWarningsDefault(){this.persistState.toggle("initialClientStateDefault.Warn"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientInfoDefault(){this.persistState.toggle("initialClientStateDefault.Info"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientLogsDefault(){this.persistState.toggle("initialClientStateDefault.Log"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientDebugDefault(){this.persistState.toggle("initialClientStateDefault.Debug"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientVerboseDefault(){this.persistState.toggle("initialClientStateDefault.Verbose"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}toggleInitialClientLocalOnlyDefault(){this.persistState.toggle("initialClientStateDefault.LocalOnly"),this.emit("newInitialClientStateDefault"),this.defaultShowClientAll()}getInitialClientStateDefault(){return this.persistState.get("initialClientStateDefault")}}const U=new z;t.default=U},50981:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.State=t.defaultLogLevels=void 0;const i=n(r(23279)),o=n(r(27361)),s=n(r(36968));t.defaultLogLevels={Error:!0,Warn:!0,Log:!0,Info:!1,Debug:!1,Verbose:!1,LocalOnly:!1},t.State=class{constructor(){var e,r,n;this.data={logState:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0},clientState:{},showClientState:{},plainTextConsole:!0,filterHighlights:!0,highlightString:[{str:""},{str:""},{str:""},{str:""}],hideInactiveState:!1,currentCategory:"system",devModeState:!0,systemModeState:!0,perfModeState:!0,initialClientStateDefault:t.defaultLogLevels,showAdvancedViewFilters:!1,wrapLog:!1,showStackStraceInLog:!1,filter:{logic:"OR"},showTimeElapsedFromStartup:!0,colDefs:[{field:"timeElapsedFromStartup",name:"Time"},{field:"previousRowTimeDelta",name:"Row Delta"},{field:"category",name:"Category"}],visibleCols:["timeElapsedFromStartup"],clientListVisible:!0,isPersisted:!1};let o={};const s=localStorage.getItem("finsemble.loggerStore.mainkey");if(s)try{o=JSON.parse(s)}catch(e){o={}}this.data=Object.assign(Object.assign({},this.data),o),this.data=Object.assign(Object.assign({},this.data),{filterHighlights:!0,highlightString:null!==(e=this.data.highlightString)&&void 0!==e?e:[],filter:null!==(r=this.data.filter)&&void 0!==r?r:{logic:"OR"},clientListVisible:null===(n=this.data.clientListVisible)||void 0===n||n}),this.persist=(0,i.default)(this.persist.bind(this),500)}toggle(e){const t=this.get(e);this.set(e,!t)}get(e){return(0,o.default)(this.data,e)}set(e,t){(0,s.default)(this.data,e,t),this.persist()}persist(){try{this.data&&localStorage.setItem("finsemble.loggerStore.mainkey",JSON.stringify(this.data))}catch(e){console.error("Error saving logger state to local storage",e,'key="finsemble.loggerStore.mainkey"',"value=",this.data)}}}},87132:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(2518)),o=r(91374),s={},a={activeTransports:{},liveTransport:null,setTransports(){a.addTransport("SharedWorker",s.SharedWorkerTransport),a.addTransport("IPCBus",s.IPCTransport),a.addTransport("FinsembleTransport",s.FinsembleTransport)},addTransport(e,t){this.activeTransports[e]=t},getActiveTransports(e){const t=[],r=e=>{-1===t.indexOf(e)&&t.push(e)};return o.System.InterApplicationBus&&r("IPCBus"),r("FinsembleTransport"),SharedWorker&&r("SharedWorker"),r(e.sameDomainTransport),r(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,r,n,o)=>new Promise(((s,u)=>{const l=a.activeTransports[t];if(l)a.liveTransport=new l(e,r,n,o,(e=>{s(e)}));else{const e=`routerTransport.getTransport() Unknown router transport name: ${t}`;i.default.warn(e),u(e)}})),close(){a.liveTransport&&(a.liveTransport.close(),a.liveTransport=null)}};s.SharedWorkerTransport=function(e,t,r,n,o){let s;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=()=>"SharedWorker";const a=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.console.log(`SharedWorker Transport Initializing for ${r} using ${a}`),s=new SharedWorker(a,{name:"Finsemble",credentials:"include"}),s.port.onmessage=e=>{const r=e.data[0],n=e.data[1],o={transportID:this.identifier(),port:r};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",n),t(o,n)},s.onerror=e=>{i.default.console.error(`SharedWorkerTransport Transport Error ${JSON.stringify(e)}`)},s.port.start(),"RouterService"===r&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>s.port.close(),null==o||o(this)},s.IPCTransport=function(e,t,r,n,s){this.send=function(e,t){let r;1===arguments.length?(r=n,t=arguments[0]):(r=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",r,"Message",t),o.System.InterApplicationBus.publish(r,t,(()=>{}),(()=>{}))},this.identifier=()=>"IPCBus",i.default.console.log(`IPCBus Transport Initializing for ${r}`);const a=o.System.InterApplicationBus.subscribe("*",r,(e=>{const r={transportID:this.identifier(),name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(e=>i.default.console.error(`IPCBus Subscribe Failure: ${e}`)));this.close=()=>o.System.InterApplicationBus.unsubscribe(a),null==s||s(this)},s.FinsembleTransport=function(e,t,r,n,o){var s,a,u,l,c;const d=`${null!==(c=null!==(u=null===(a=null===(s=null==e?void 0:e.transportSettings)||void 0===s?void 0:s.FinsembleTransport)||void 0===a?void 0:a.serverAddress)&&void 0!==u?u:null===(l=null==e?void 0:e.transportSettings)||void 0===l?void 0:l.serverAddress)&&void 0!==c?c:"ws://127.0.0.1:3376"}/router`;let f;const h=e=>{const r={transportID:this.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",r,"Message",e),t(r,e.clientMessage)},p=()=>{i.default.console.error(`FinsembleTransport Connection Timeout for ${r}`),null==o||o(this)},g=()=>{i.default.console.log(`FinsembleTransport Transport Initializing for ${r} using ${d}`),d.startsWith("ws:")||d.startsWith("wss:")||i.default.system.error(`Illegal WebSocket address "${d}" (Missing ws:// or wss:// ?)`),f=new WebSocket(d);const e=setTimeout(p,3e3);f.addEventListener("open",(()=>{clearTimeout(e),i.default.console.log("FinsembleTransport connected to server"),f.addEventListener("message",(e=>{const t=JSON.parse(e.data);(r===t.message.client||"RouterService"===r&&"ROUTER_SERVICE"==t.dest)&&h(t.message)})),null==o||o(this)}))};this.send=function(e,t){let r,n;1===arguments.length?(r="ROUTER_SERVICE",n={clientMessage:t=arguments[0]}):(r="ROUTER_CLIENT",t=arguments[1],n={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",r,"NewMessage",n),f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({dest:r,message:n})),f.readyState===WebSocket.CONNECTING&&f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))})),f.readyState===WebSocket.CLOSED&&(g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))}))),f.readyState===WebSocket.CLOSING&&(f.onclose=()=>{g(),f.addEventListener("open",(()=>{f.send(JSON.stringify({dest:r,message:n}))}))})},this.identifier=()=>"FinsembleTransport",this.close=()=>f.close(),g()},t.default=a},38144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","pre-authentication","authentication","system-preuser","preuser","preuser2","preuser3","preuser4","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},37331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=void 0;const n=r(38144);t.statusChannel=function(e){return`${n.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${n.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},10600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95281:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(n=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",n.ResolverUnavailable="ResolverUnavailable",n.ResolverTimeout="ResolverTimeout",(r=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",r.AccessDenied="AccessDenied",r.CreationFailed="CreationFailed"},14414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22225:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},896:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(r=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",r.ContactList="fdc3.contactList",r.Country="fdc3.country",r.Instrument="fdc3.instrument",r.Organization="fdc3.organization",r.Portfolio="fdc3.portfolio",r.Position="fdc3.position"},80976:(e,t)=>{"use strict";function r(e,t,r=""){if(r)throw Error(`Invalid value for key "${r}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function n(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,n,i=""){if("any"===t)return e;if(null===t)return null===e?e:r(t,e);if(!1===t)return r(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:r(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let r=0;r<i;r++){const i=e[r];try{return o(t,i,n)}catch(e){}}return r(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,n))):r("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return r("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const r=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[r.key]=o(a,r.typ,n,r.key)})),Object.getOwnPropertyNames(i).forEach((r=>{Object.prototype.hasOwnProperty.call(e,r)||(s[r]=o(i[r],t,n,r))})),s}(n(t),t.additional,e):r(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?r("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:r(e,t,i)}(t,e)}function s(e,t){return o(e,t,n)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const h={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},63250:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10600),t),i(r(57746),t),i(r(24508),t),i(r(22225),t),i(r(74443),t),i(r(46888),t),i(r(95281),t),i(r(56911),t),i(r(27154),t),i(r(86414),t),i(r(14414),t),i(r(896),t),i(r(80976),t),i(r(59579),t)},59579:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(r=t.Intents||(t.Intents={})).StartCall="StartCall",r.StartChat="StartChat",r.ViewChart="ViewChart",r.ViewContact="ViewContact",r.ViewQuote="ViewQuote",r.ViewNews="ViewNews",r.ViewInstrument="ViewInstrument",r.ViewAnalysis="ViewAnalysis"},62043:(e,t,r)=>{"use strict";!function(){var t,n,i,o=0,s=[];for(n=0;n<256;n++)s[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||o+16>u.BUFFER_SIZE)&&(o=0,t=u.randomBytes(u.BUFFER_SIZE)),t.slice(o,o+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function u(){var e=a();return s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}u.BUFFER_SIZE=4096,u.bin=a,u.clearBuffer=function(){t=null,o=0},u.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||r(39061),e.exports=u,u.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,r=[];for(t=0;t<e;t++)r.push(Math.floor(256*Math.random()));return r}}()}()},39061:()=>{},1641:(e,t,r)=>{"use strict";function n(e,...t){return(...r)=>e(...t,...r)}function i(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}r.r(t),r.d(t,{all:()=>pe,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>rt,apply:()=>n,applyEach:()=>R,applyEachSeries:()=>N,asyncify:()=>d,auto:()=>W,autoInject:()=>z,cargo:()=>$,cargoQueue:()=>G,compose:()=>K,concat:()=>Q,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,default:()=>pt,detect:()=>re,detectLimit:()=>ne,detectSeries:()=>ie,dir:()=>se,doDuring:()=>ae,doUntil:()=>ue,doWhilst:()=>ae,during:()=>dt,each:()=>ce,eachLimit:()=>de,eachOf:()=>T,eachOfLimit:()=>E,eachOfSeries:()=>I,eachSeries:()=>fe,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>_e,find:()=>re,findLimit:()=>ne,findSeries:()=>ie,flatMap:()=>Q,flatMapLimit:()=>J,flatMapSeries:()=>X,foldl:()=>q,foldr:()=>Ue,forEach:()=>ce,forEachLimit:()=>de,forEachOf:()=>T,forEachOfLimit:()=>E,forEachOfSeries:()=>I,forEachSeries:()=>fe,forever:()=>Ce,groupBy:()=>Ee,groupByLimit:()=>Le,groupBySeries:()=>ke,inject:()=>q,log:()=>Ae,map:()=>O,mapLimit:()=>Y,mapSeries:()=>x,mapValues:()=>Oe,mapValuesLimit:()=>Te,mapValuesSeries:()=>Re,memoize:()=>Ie,nextTick:()=>xe,parallel:()=>De,parallelLimit:()=>Pe,priorityQueue:()=>Be,queue:()=>We,race:()=>ze,reduce:()=>q,reduceRight:()=>Ue,reflect:()=>He,reflectAll:()=>Ve,reject:()=>Ge,rejectLimit:()=>qe,rejectSeries:()=>Ze,retry:()=>Ye,retryable:()=>Qe,select:()=>be,selectLimit:()=>Se,selectSeries:()=>_e,seq:()=>Z,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>rt,sortBy:()=>nt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>ht,whilst:()=>dt,wrapSync:()=>d});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function u(e){setTimeout(e,0)}function l(e){return(t,...r)=>e((()=>t(...r)))}var c=l(o?queueMicrotask:s?setImmediate:a?process.nextTick:u);function d(e){return p(e)?function(...t){const r=t.pop();return f(e.apply(this,t),r)}:i((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return f(n,r);r(null,n)}))}function f(e,t){return e.then((e=>{h(t,null,e)}),(e=>{h(t,e&&e.message?e:new Error(e))}))}function h(e,t,r){try{e(t,r)}catch(e){c((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function g(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?d(e):e}function m(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function v(e){return function(t,...r){return m((function(n){var i=this;return e(t,((e,t)=>{g(e).apply(i,r.concat(t))}),n)}))}}function y(e,t,r,n){t=t||[];var i=[],o=0,s=g(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function w(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function S(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function _(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function C(e,t,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===b||i&&a<=0?(i=!0,n(null)):void l()}function d(e){o||(s=!1,i=!0,n(e))}l()}var L=e=>(t,r,n)=>{if(n=S(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,r,n);var i=function(e){if(w(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,n(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,_(l))}u=!1}c()},E=m((function(e,t,r,n){return L(t)(e,g(r),n)}),4);function k(e,t,r){r=S(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==b||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,_(a))}function A(e,t,r){return E(e,1/0,t,r)}var T=m((function(e,t,r){return(w(e)?k:A)(e,g(t),r)}),3),O=m((function(e,t,r){return y(T,e,t,r)}),3),R=v(O),I=m((function(e,t,r){return E(e,1,t,r)}),3),x=m((function(e,t,r){return y(I,e,t,r)}),3),N=v(x);const D=Symbol("promiseCallback");function P(){let e,t;function r(r,...n){if(r)return t(r);e(n.length>1?n:n[0])}return r[D]=new Promise(((r,n)=>{e=r,t=n})),r}function W(e,t,r){"number"!=typeof t&&(r=t,t=null),r=S(r||P());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var i={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var n=_(((t,...n)=>{if(o--,!1!==t)if(n.length<2&&([n]=n),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=n,a=!0,u=Object.create(null),s)return;r(t,l)}else i[e]=n,(u[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var l=g(t[t.length-1]);t.length>1?l(i,n):l(n)}}(e,t)))}function h(){if(!s){if(0===l.length&&0===o)return r(null,i);for(;l.length&&o<t;)l.shift()()}}function p(t){var r=[];return Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.indexOf(t)>=0&&r.push(n)})),r}return Object.keys(e).forEach((t=>{var r=e[t];if(!Array.isArray(r))return f(t,[r]),void c.push(t);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return f(t,r),void c.push(t);d[t]=i,n.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&f(t,r)}))}))})),function(){for(var e=0;c.length;)e++,p(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),r[D]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,j=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,M=/,/,B=/(=.+)?(\s*)$/;function z(e,t){var r={};return Object.keys(e).forEach((t=>{var n,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[t]=n.concat(n.length>0?a:i);else if(s)r[t]=i;else{if(n=function(e){const t=function(e){let t="",r=0,n=e.indexOf("*/");for(;r<e.length;)if("/"===e[r]&&"/"===e[r+1]){let t=e.indexOf("\n",r);r=-1===t?e.length:t}else if(-1!==n&&"/"===e[r]&&"*"===e[r+1]){let i=e.indexOf("*/",r);-1!==i?(r=i+2,n=e.indexOf("*/",r)):(t+=e[r],r++)}else t+=e[r],r++;return t}(e.toString());let r=t.match(F);if(r||(r=t.match(j)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=r;return n.replace(/\s/g,"").split(M).map((e=>e.replace(B,"").trim()))}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(a)}function a(e,t){var r=n.map((t=>e[t]));r.push(t),g(i)(...r)}})),W(r,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):H(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):H(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function H(e,t){e.length=1,e.head=e.tail=t}function V(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=g(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var l=!1;function d(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}v.started=!0;var a=v._createTaskItem(e,r?s:n||s);if(t?v._tasks.unshift(a):v._tasks.push(a),l||(l=!0,c((()=>{l=!1,v.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...r){i-=1;for(var n=0,s=e.length;n<s;n++){var a=e[n],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...r),null!=t&&u("error",t,a.data)}i<=v.concurrency-v.buffer&&u("unsaturated"),v.idle()&&u("drain"),v.process()}}function h(e){return!(0!==e.length||!v.idle()||(c((()=>u("drain"))),0))}const p=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,n){const i=(...n)=>{a(e,i),((e,n)=>{if(e)return r(e);t(n)})(...n)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,v={_tasks:new U,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*v._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),v._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){v._tasks.remove(e)},process(){if(!m){for(m=!0;!v.paused&&i<v.concurrency&&v._tasks.length;){var e=[],t=[],r=v._tasks.length;v.payload&&(r=Math.min(r,v.payload));for(var s=0;s<r;s++){var a=v._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===v._tasks.length&&u("empty"),i===v.concurrency&&u("saturated");var l=_(f(e));n(t,l)}m=!1}},length:()=>v._tasks.length,running:()=>i,workersList:()=>o,idle:()=>v._tasks.length+i===0,pause(){v.paused=!0},resume(){!1!==v.paused&&(v.paused=!1,c(v.process))}};return Object.defineProperties(v,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),v}function $(e,t){return V(e,1,t)}function G(e,t,r){return V(e,t,r)}var q=m((function(e,t,r,n){n=S(n);var i=g(r);return I(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);function Z(...e){var t=e.map(g);return function(...e){var r=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=P(),q(t,e,((e,t,n)=>{t.apply(r,e.concat(((e,...t)=>{n(e,t)})))}),((e,t)=>n(e,...t))),n[D]}}function K(...e){return Z(...e.reverse())}var Y=m((function(e,t,r,n){return y(L(t),e,r,n)}),4),J=m((function(e,t,r,n){var i=g(r);return Y(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4),Q=m((function(e,t,r){return J(e,1/0,t,r)}),3),X=m((function(e,t,r){return J(e,1,t,r)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(r,n,i,o)=>{var s,a=!1;const u=g(i);r(n,((r,n,i)=>{u(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,b)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var re=m((function(e,t,r){return te((e=>e),((e,t)=>t))(T,e,t,r)}),3),ne=m((function(e,t,r,n){return te((e=>e),((e,t)=>t))(L(t),e,r,n)}),4),ie=m((function(e,t,r){return te((e=>e),((e,t)=>t))(L(1),e,t,r)}),3);function oe(e){return(t,...r)=>g(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,r){r=_(r);var n,i=g(e),o=g(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function ue(e,t,r){const n=g(t);return ae(e,((...e)=>{const t=e.pop();n(...e,((e,r)=>t(e,!r)))}),r)}function le(e){return(t,r,n)=>e(t,n)}var ce=m((function(e,t,r){return T(e,le(g(t)),r)}),3),de=m((function(e,t,r,n){return L(t)(e,le(g(r)),n)}),4),fe=m((function(e,t,r){return de(e,1,t,r)}),3);function he(e){return p(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?c((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}var pe=m((function(e,t,r){return te((e=>!e),(e=>!e))(T,e,t,r)}),3),ge=m((function(e,t,r,n){return te((e=>!e),(e=>!e))(L(t),e,r,n)}),4),me=m((function(e,t,r){return te((e=>!e),(e=>!e))(I,e,t,r)}),3);function ve(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ye(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,r,n){return(w(t)?ve:ye)(e,t,g(r),n)}var be=m((function(e,t,r){return we(T,e,t,r)}),3),Se=m((function(e,t,r,n){return we(L(t),e,r,n)}),4),_e=m((function(e,t,r){return we(I,e,t,r)}),3),Ce=m((function(e,t){var r=_(t),n=g(he(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2),Le=m((function(e,t,r,n){var i=g(r);return Y(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4);function Ee(e,t,r){return Le(e,1/0,t,r)}function ke(e,t,r){return Le(e,1,t,r)}var Ae=oe("log"),Te=m((function(e,t,r,n){n=S(n);var i={},o=g(r);return L(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);function Oe(e,t,r){return Te(e,1/0,t,r)}function Re(e,t,r){return Te(e,1,t,r)}function Ie(e,t=(e=>e)){var r=Object.create(null),n=Object.create(null),o=g(e),s=i(((e,i)=>{var s=t(...e);s in r?c((()=>i(null,...r[s]))):s in n?n[s].push(i):(n[s]=[i],o(...e,((e,...t)=>{e||(r[s]=t);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=r,s.unmemoized=e,s}var xe=l(a?process.nextTick:s?setImmediate:u),Ne=m(((e,t,r)=>{var n=w(t)?[]:{};e(t,((e,t,r)=>{g(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function De(e,t){return Ne(T,e,t)}function Pe(e,t,r){return Ne(L(t),e,r)}function We(e,t){var r=g(e);return V(((e,t)=>{r(e[0],t)}),t,1)}class Fe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Me(this.heap[e],this.heap[t=je(e)]);){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Me(this.heap[t+1],this.heap[t])&&(t+=1),!Me(this.heap[e],this.heap[t]));){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let r=0;r<this.heap.length;r++)e(this.heap[r])||(this.heap[t]=this.heap[r],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function Me(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var r=We(e,t),{push:n,pushAsync:i}=r;function o(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return r._tasks=new Fe,r._createTaskItem=({data:e,priority:t},r)=>({data:e,priority:t,callback:r}),r.push=function(e,t=0,r){return n(o(e,t),r)},r.pushAsync=function(e,t=0,r){return i(o(e,t),r)},delete r.unshift,delete r.unshiftAsync,r}var ze=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)g(e[r])(t)}),2);function Ue(e,t,r,n){var i=[...e].reverse();return q(i,t,r,n)}function He(e){var t=g(e);return i((function(e,r){return e.push(((e,...t)=>{let n={};if(e&&(n.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),n.value=i}r(null,n)})),t.apply(this,e)}))}function Ve(e){var t;return Array.isArray(e)?t=e.map(He):(t={},Object.keys(e).forEach((r=>{t[r]=He.call(this,e[r])}))),t}function $e(e,t,r,n){const i=g(r);return we(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}var Ge=m((function(e,t,r){return $e(T,e,t,r)}),3),qe=m((function(e,t,r,n){return $e(L(t),e,r,n)}),4),Ze=m((function(e,t,r){return $e(I,e,t,r)}),3);function Ke(e){return function(){return e}}function Ye(e,t,r){var n={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(r=t||P(),t=e):(Je(n,e),r=r||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=g(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(e))?setTimeout(s,n.intervalFunc(o-1)):r(e,...t))}))}return s(),r[D]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Qe(e,t){t||(t=e,e=null);let r=e&&e.arity||t.length;p(t)&&(r+=1);var n=g(t);return i(((t,i)=>{function o(e){n(...t,e)}return(t.length<r-1||null==i)&&(t.push(i),i=P()),e?Ye(e,o,i):Ye(o,i),i[D]}))}function Xe(e,t){return Ne(I,e,t)}var et=m((function(e,t,r){return te(Boolean,(e=>e))(T,e,t,r)}),3),tt=m((function(e,t,r,n){return te(Boolean,(e=>e))(L(t),e,r,n)}),4),rt=m((function(e,t,r){return te(Boolean,(e=>e))(I,e,t,r)}),3),nt=m((function(e,t,r){var n=g(t);return O(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);function it(e,t,r){var n=g(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),t),n(...i)}))}function ot(e,t,r,n){var i=g(r);return Y(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,n)}function st(e,t,r){return ot(e,1/0,t,r)}function at(e,t,r){return ot(e,1,t,r)}function ut(e,t,r,n){arguments.length<=3&&"function"==typeof t&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=S(n||P());var i=g(r);return T(e,((e,r,n)=>{i(t,e,r,n)}),(e=>n(e,t))),n[D]}var lt=m((function(e,t){var r,n=null;return fe(e,((e,t)=>{g(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=m((function(e,t,r){r=_(r);var n=g(t),i=g(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3);function ft(e,t,r){const n=g(e);return dt((e=>n(((t,r)=>e(t,!r)))),t,r)}var ht=m((function(e,t){if(t=S(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){g(e[r++])(...t,_(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));const pt={apply:n,applyEach:R,applyEachSeries:N,asyncify:d,auto:W,autoInject:z,cargo:$,cargoQueue:G,compose:K,concat:Q,concatLimit:J,concatSeries:X,constant:ee,detect:re,detectLimit:ne,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:T,eachOfLimit:E,eachOfSeries:I,eachSeries:fe,ensureAsync:he,every:pe,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:_e,forever:Ce,groupBy:Ee,groupByLimit:Le,groupBySeries:ke,log:Ae,map:O,mapLimit:Y,mapSeries:x,mapValues:Oe,mapValuesLimit:Te,mapValuesSeries:Re,memoize:Ie,nextTick:xe,parallel:De,parallelLimit:Pe,priorityQueue:Be,queue:We,race:ze,reduce:q,reduceRight:Ue,reflect:He,reflectAll:Ve,reject:Ge,rejectLimit:qe,rejectSeries:Ze,retry:Ye,retryable:Qe,seq:Z,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:rt,sortBy:nt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:ht,whilst:dt,all:pe,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:rt,find:re,findLimit:ne,findSeries:ie,flatMap:Q,flatMapLimit:J,flatMapSeries:X,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:T,forEachOfSeries:I,forEachOfLimit:E,inject:q,foldl:q,foldr:Ue,select:be,selectLimit:Se,selectSeries:_e,wrapSync:d,during:dt,doDuring:ae}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(51305)})();
|
|
3
3
|
//# sourceMappingURL=loggerService.js.map
|