iobroker.javascript 9.0.5 → 9.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,8 +26,9 @@ Executes Javascript, Typescript Scripts.
26
26
  <!--
27
27
  ### **WORK IN PROGRESS**
28
28
  -->
29
- ### 9.0.5 (2025-06-17)
29
+ ### 9.0.6 (2025-06-18)
30
30
  * (@GermanBluefox) Speed-up loading of GUI
31
+ * (@GermanBluefox) Migrating old blocks to new format
31
32
 
32
33
  ### 9.0.4 (2025-06-16)
33
34
  * (@GermanBluefox) Corrected script editor for Polish language
@@ -1,4 +1,4 @@
1
- import{c as tr,j as k}from"./createSvgIcon-BQT-7-GS.js";import{i as Z}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as j,c as an,C as nr}from"./index-DnqHzUyv.js";import{i as W,h as sr}from"./index-CWSymef2.js";import{_ as rr}from"./preload-helper-Dp1pzeXC.js";import{C as ar,t as ir}from"./index-Dm1jc4t6.js";import or from"./ScriptEditorVanillaMonaco-NQqW_Tkm.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";const cr=tr(k.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark");function R(s,e,t,n,r){if(typeof e=="function"?s!==e||!0:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(s,t),t}function o(s,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(s):n?n.value:e.get(s)}let Tn=function(){const{crypto:s}=globalThis;if(s!=null&&s.randomUUID)return Tn=s.randomUUID.bind(s),s.randomUUID();const e=new Uint8Array(1),t=s?()=>s.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^t()&15>>+n/4).toString(16))};function It(s){return typeof s=="object"&&s!==null&&("name"in s&&s.name==="AbortError"||"message"in s&&String(s.message).includes("FetchRequestCanceledException"))}const Rt=s=>{if(s instanceof Error)return s;if(typeof s=="object"&&s!==null){try{if(Object.prototype.toString.call(s)==="[object Error]"){const e=new Error(s.message,s.cause?{cause:s.cause}:{});return s.stack&&(e.stack=s.stack),s.cause&&!e.cause&&(e.cause=s.cause),s.name&&(e.name=s.name),e}}catch{}try{return new Error(JSON.stringify(s))}catch{}}return new Error(s)};class v extends Error{}class J extends v{constructor(e,t,n,r){super(`${J.makeMessage(e,t,n)}`),this.status=e,this.headers=r,this.requestID=r==null?void 0:r.get("x-request-id"),this.error=t;const a=t;this.code=a==null?void 0:a.code,this.param=a==null?void 0:a.param,this.type=a==null?void 0:a.type}static makeMessage(e,t,n){const r=t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||"(no status code or body)"}static generate(e,t,n,r){if(!e||!r)return new ut({message:n,cause:Rt(t)});const a=t==null?void 0:t.error;return e===400?new Mn(e,a,n,r):e===401?new Nn(e,a,n,r):e===403?new jn(e,a,n,r):e===404?new Fn(e,a,n,r):e===409?new Ln(e,a,n,r):e===422?new Dn(e,a,n,r):e===429?new Bn(e,a,n,r):e>=500?new Un(e,a,n,r):new J(e,a,n,r)}}class z extends J{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class ut extends J{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}}class Lt extends ut{constructor({message:e}={}){super({message:e??"Request timed out."})}}class Mn extends J{}class Nn extends J{}class jn extends J{}class Fn extends J{}class Ln extends J{}class Dn extends J{}class Bn extends J{}class Un extends J{}class Wn extends v{constructor(){super("Could not parse response content as the length limit was reached")}}class qn extends v{constructor(){super("Could not parse response content as the request was rejected by the content filter")}}const lr=/^[a-z][a-z0-9+.-]*:/i,ur=s=>lr.test(s);let V=s=>(V=Array.isArray,V(s)),on=V;function dr(s){return typeof s!="object"?{}:s??{}}function hr(s){if(!s)return!0;for(const e in s)return!1;return!0}function fr(s,e){return Object.prototype.hasOwnProperty.call(s,e)}function _t(s){return s!=null&&typeof s=="object"&&!Array.isArray(s)}const mr=(s,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new v(`${s} must be an integer`);if(e<0)throw new v(`${s} must be a positive integer`);return e},pr=s=>{try{return JSON.parse(s)}catch{return}},Fe=s=>new Promise(e=>setTimeout(e,s)),ye="5.5.0",gr=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function _r(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const yr=()=>{var t;const s=_r();if(s==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":ln(Deno.build.os),"X-Stainless-Arch":cn(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((t=Deno.version)==null?void 0:t.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(s==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":ln(globalThis.process.platform??"unknown"),"X-Stainless-Arch":cn(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const e=wr();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function wr(){if(typeof navigator>"u"||!navigator)return null;const s=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:e,pattern:t}of s){const n=t.exec(navigator.userAgent);if(n){const r=n[1]||0,a=n[2]||0,i=n[3]||0;return{browser:e,version:`${r}.${a}.${i}`}}}return null}const cn=s=>s==="x32"?"x32":s==="x86_64"||s==="x64"?"x64":s==="arm"?"arm":s==="aarch64"||s==="arm64"?"arm64":s?`other:${s}`:"unknown",ln=s=>(s=s.toLowerCase(),s.includes("ios")?"iOS":s==="android"?"Android":s==="darwin"?"MacOS":s==="win32"?"Windows":s==="freebsd"?"FreeBSD":s==="openbsd"?"OpenBSD":s==="linux"?"Linux":s?`Other:${s}`:"Unknown");let un;const br=()=>un??(un=yr());function xr(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Jn(...s){const e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...s)}function Xn(s){let e=Symbol.asyncIterator in s?s[Symbol.asyncIterator]():s[Symbol.iterator]();return Jn({start(){},async pull(t){const{done:n,value:r}=await e.next();n?t.close():t.enqueue(r)},async cancel(){var t;await((t=e.return)==null?void 0:t.call(e))}})}function Hn(s){if(s[Symbol.asyncIterator])return s;const e=s.getReader();return{async next(){try{const t=await e.read();return t!=null&&t.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){const t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Sr(s){var n,r;if(s===null||typeof s!="object")return;if(s[Symbol.asyncIterator]){await((r=(n=s[Symbol.asyncIterator]()).return)==null?void 0:r.call(n));return}const e=s.getReader(),t=e.cancel();e.releaseLock(),await t}const Ar=({headers:s,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),Vn="RFC3986",Kn=s=>String(s),dn={RFC1738:s=>String(s).replace(/%20/g,"+"),RFC3986:Kn},Cr="RFC1738";let $t=(s,e)=>($t=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),$t(s,e));const ee=(()=>{const s=[];for(let e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s})(),yt=1024,vr=(s,e,t,n,r)=>{if(s.length===0)return s;let a=s;if(typeof s=="symbol"?a=Symbol.prototype.toString.call(s):typeof s!="string"&&(a=String(s)),t==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});let i="";for(let c=0;c<a.length;c+=yt){const l=a.length>=yt?a.slice(c,c+yt):a,d=[];for(let y=0;y<l.length;++y){let u=l.charCodeAt(y);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||r===Cr&&(u===40||u===41)){d[d.length]=l.charAt(y);continue}if(u<128){d[d.length]=ee[u];continue}if(u<2048){d[d.length]=ee[192|u>>6]+ee[128|u&63];continue}if(u<55296||u>=57344){d[d.length]=ee[224|u>>12]+ee[128|u>>6&63]+ee[128|u&63];continue}y+=1,u=65536+((u&1023)<<10|l.charCodeAt(y)&1023),d[d.length]=ee[240|u>>18]+ee[128|u>>12&63]+ee[128|u>>6&63]+ee[128|u&63]}i+=d.join("")}return i};function Ir(s){return!s||typeof s!="object"?!1:!!(s.constructor&&s.constructor.isBuffer&&s.constructor.isBuffer(s))}function hn(s,e){if(V(s)){const t=[];for(let n=0;n<s.length;n+=1)t.push(e(s[n]));return t}return e(s)}const Gn={brackets(s){return String(s)+"[]"},comma:"comma",indices(s,e){return String(s)+"["+e+"]"},repeat(s){return String(s)}},Qn=function(s,e){Array.prototype.push.apply(s,V(e)?e:[e])};let fn;const B={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:vr,encodeValuesOnly:!1,format:Vn,formatter:Kn,indices:!1,serializeDate(s){return(fn??(fn=Function.prototype.call.bind(Date.prototype.toISOString)))(s)},skipNulls:!1,strictNullHandling:!1};function Rr(s){return typeof s=="string"||typeof s=="number"||typeof s=="boolean"||typeof s=="symbol"||typeof s=="bigint"}const wt={};function zn(s,e,t,n,r,a,i,c,l,d,y,u,g,h,b,w,C,E){let m=s,_=E,p=0,A=!1;for(;(_=_.get(wt))!==void 0&&!A;){const P=_.get(s);if(p+=1,typeof P<"u"){if(P===p)throw new RangeError("Cyclic object value");A=!0}typeof _.get(wt)>"u"&&(p=0)}if(typeof d=="function"?m=d(e,m):m instanceof Date?m=g==null?void 0:g(m):t==="comma"&&V(m)&&(m=hn(m,function(P){return P instanceof Date?g==null?void 0:g(P):P})),m===null){if(a)return l&&!w?l(e,B.encoder,C,"key",h):e;m=""}if(Rr(m)||Ir(m)){if(l){const P=w?e:l(e,B.encoder,C,"key",h);return[(b==null?void 0:b(P))+"="+(b==null?void 0:b(l(m,B.encoder,C,"value",h)))]}return[(b==null?void 0:b(e))+"="+(b==null?void 0:b(String(m)))]}const O=[];if(typeof m>"u")return O;let I;if(t==="comma"&&V(m))w&&l&&(m=hn(m,l)),I=[{value:m.length>0?m.join(",")||null:void 0}];else if(V(d))I=d;else{const P=Object.keys(m);I=y?P.sort(y):P}const F=c?String(e).replace(/\./g,"%2E"):String(e),x=n&&V(m)&&m.length===1?F+"[]":F;if(r&&V(m)&&m.length===0)return x+"[]";for(let P=0;P<I.length;++P){const M=I[P],se=typeof M=="object"&&typeof M.value<"u"?M.value:m[M];if(i&&se===null)continue;const me=u&&c?M.replace(/\./g,"%2E"):M,N=V(m)?typeof t=="function"?t(x,me):x:x+(u?"."+me:"["+me+"]");E.set(s,p);const ie=new WeakMap;ie.set(wt,E),Qn(O,zn(se,N,t,n,r,a,i,c,t==="comma"&&w&&V(m)?null:l,d,y,u,g,h,b,w,C,ie))}return O}function $r(s=B){if(typeof s.allowEmptyArrays<"u"&&typeof s.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof s.encodeDotInKeys<"u"&&typeof s.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(s.encoder!==null&&typeof s.encoder<"u"&&typeof s.encoder!="function")throw new TypeError("Encoder has to be a function.");const e=s.charset||B.charset;if(typeof s.charset<"u"&&s.charset!=="utf-8"&&s.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=Vn;if(typeof s.format<"u"){if(!$t(dn,s.format))throw new TypeError("Unknown format option provided.");t=s.format}const n=dn[t];let r=B.filter;(typeof s.filter=="function"||V(s.filter))&&(r=s.filter);let a;if(s.arrayFormat&&s.arrayFormat in Gn?a=s.arrayFormat:"indices"in s?a=s.indices?"indices":"repeat":a=B.arrayFormat,"commaRoundTrip"in s&&typeof s.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const i=typeof s.allowDots>"u"?s.encodeDotInKeys?!0:B.allowDots:!!s.allowDots;return{addQueryPrefix:typeof s.addQueryPrefix=="boolean"?s.addQueryPrefix:B.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof s.allowEmptyArrays=="boolean"?!!s.allowEmptyArrays:B.allowEmptyArrays,arrayFormat:a,charset:e,charsetSentinel:typeof s.charsetSentinel=="boolean"?s.charsetSentinel:B.charsetSentinel,commaRoundTrip:!!s.commaRoundTrip,delimiter:typeof s.delimiter>"u"?B.delimiter:s.delimiter,encode:typeof s.encode=="boolean"?s.encode:B.encode,encodeDotInKeys:typeof s.encodeDotInKeys=="boolean"?s.encodeDotInKeys:B.encodeDotInKeys,encoder:typeof s.encoder=="function"?s.encoder:B.encoder,encodeValuesOnly:typeof s.encodeValuesOnly=="boolean"?s.encodeValuesOnly:B.encodeValuesOnly,filter:r,format:t,formatter:n,serializeDate:typeof s.serializeDate=="function"?s.serializeDate:B.serializeDate,skipNulls:typeof s.skipNulls=="boolean"?s.skipNulls:B.skipNulls,sort:typeof s.sort=="function"?s.sort:null,strictNullHandling:typeof s.strictNullHandling=="boolean"?s.strictNullHandling:B.strictNullHandling}}function Or(s,e={}){let t=s;const n=$r(e);let r,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):V(n.filter)&&(a=n.filter,r=a);const i=[];if(typeof t!="object"||t===null)return"";const c=Gn[n.arrayFormat],l=c==="comma"&&n.commaRoundTrip;r||(r=Object.keys(t)),n.sort&&r.sort(n.sort);const d=new WeakMap;for(let g=0;g<r.length;++g){const h=r[g];n.skipNulls&&t[h]===null||Qn(i,zn(t[h],h,c,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}const y=i.join(n.delimiter);let u=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?u+="utf8=%26%2310003%3B&":u+="utf8=%E2%9C%93&"),y.length>0?u+y:""}function kr(s){let e=0;for(const r of s)e+=r.length;const t=new Uint8Array(e);let n=0;for(const r of s)t.set(r,n),n+=r.length;return t}let mn;function Dt(s){let e;return(mn??(e=new globalThis.TextEncoder,mn=e.encode.bind(e)))(s)}let pn;function gn(s){let e;return(pn??(e=new globalThis.TextDecoder,pn=e.decode.bind(e)))(s)}var K,G;class dt{constructor(){K.set(this,void 0),G.set(this,void 0),R(this,K,new Uint8Array),R(this,G,null)}decode(e){if(e==null)return[];const t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Dt(e):e;R(this,K,kr([o(this,K,"f"),t]));const n=[];let r;for(;(r=Er(o(this,K,"f"),o(this,G,"f")))!=null;){if(r.carriage&&o(this,G,"f")==null){R(this,G,r.index);continue}if(o(this,G,"f")!=null&&(r.index!==o(this,G,"f")+1||r.carriage)){n.push(gn(o(this,K,"f").subarray(0,o(this,G,"f")-1))),R(this,K,o(this,K,"f").subarray(o(this,G,"f"))),R(this,G,null);continue}const a=o(this,G,"f")!==null?r.preceding-1:r.preceding,i=gn(o(this,K,"f").subarray(0,a));n.push(i),R(this,K,o(this,K,"f").subarray(r.index)),R(this,G,null)}return n}flush(){return o(this,K,"f").length?this.decode(`
1
+ import{c as tr,j as k}from"./createSvgIcon-BQT-7-GS.js";import{i as Z}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as j,c as an,C as nr}from"./index-DnqHzUyv.js";import{i as W,h as sr}from"./index-Cek-i92T.js";import{_ as rr}from"./preload-helper-Dp1pzeXC.js";import{C as ar,t as ir}from"./index-Dm1jc4t6.js";import or from"./ScriptEditorVanillaMonaco-DEgxOslR.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";const cr=tr(k.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark");function R(s,e,t,n,r){if(typeof e=="function"?s!==e||!0:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(s,t),t}function o(s,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(s):n?n.value:e.get(s)}let Tn=function(){const{crypto:s}=globalThis;if(s!=null&&s.randomUUID)return Tn=s.randomUUID.bind(s),s.randomUUID();const e=new Uint8Array(1),t=s?()=>s.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^t()&15>>+n/4).toString(16))};function It(s){return typeof s=="object"&&s!==null&&("name"in s&&s.name==="AbortError"||"message"in s&&String(s.message).includes("FetchRequestCanceledException"))}const Rt=s=>{if(s instanceof Error)return s;if(typeof s=="object"&&s!==null){try{if(Object.prototype.toString.call(s)==="[object Error]"){const e=new Error(s.message,s.cause?{cause:s.cause}:{});return s.stack&&(e.stack=s.stack),s.cause&&!e.cause&&(e.cause=s.cause),s.name&&(e.name=s.name),e}}catch{}try{return new Error(JSON.stringify(s))}catch{}}return new Error(s)};class v extends Error{}class J extends v{constructor(e,t,n,r){super(`${J.makeMessage(e,t,n)}`),this.status=e,this.headers=r,this.requestID=r==null?void 0:r.get("x-request-id"),this.error=t;const a=t;this.code=a==null?void 0:a.code,this.param=a==null?void 0:a.param,this.type=a==null?void 0:a.type}static makeMessage(e,t,n){const r=t!=null&&t.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||"(no status code or body)"}static generate(e,t,n,r){if(!e||!r)return new ut({message:n,cause:Rt(t)});const a=t==null?void 0:t.error;return e===400?new Mn(e,a,n,r):e===401?new Nn(e,a,n,r):e===403?new jn(e,a,n,r):e===404?new Fn(e,a,n,r):e===409?new Ln(e,a,n,r):e===422?new Dn(e,a,n,r):e===429?new Bn(e,a,n,r):e>=500?new Un(e,a,n,r):new J(e,a,n,r)}}class z extends J{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class ut extends J{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}}class Lt extends ut{constructor({message:e}={}){super({message:e??"Request timed out."})}}class Mn extends J{}class Nn extends J{}class jn extends J{}class Fn extends J{}class Ln extends J{}class Dn extends J{}class Bn extends J{}class Un extends J{}class Wn extends v{constructor(){super("Could not parse response content as the length limit was reached")}}class qn extends v{constructor(){super("Could not parse response content as the request was rejected by the content filter")}}const lr=/^[a-z][a-z0-9+.-]*:/i,ur=s=>lr.test(s);let V=s=>(V=Array.isArray,V(s)),on=V;function dr(s){return typeof s!="object"?{}:s??{}}function hr(s){if(!s)return!0;for(const e in s)return!1;return!0}function fr(s,e){return Object.prototype.hasOwnProperty.call(s,e)}function _t(s){return s!=null&&typeof s=="object"&&!Array.isArray(s)}const mr=(s,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new v(`${s} must be an integer`);if(e<0)throw new v(`${s} must be a positive integer`);return e},pr=s=>{try{return JSON.parse(s)}catch{return}},Fe=s=>new Promise(e=>setTimeout(e,s)),ye="5.5.1",gr=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function _r(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const yr=()=>{var t;const s=_r();if(s==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":ln(Deno.build.os),"X-Stainless-Arch":cn(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((t=Deno.version)==null?void 0:t.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(s==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":ln(globalThis.process.platform??"unknown"),"X-Stainless-Arch":cn(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const e=wr();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ye,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function wr(){if(typeof navigator>"u"||!navigator)return null;const s=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:e,pattern:t}of s){const n=t.exec(navigator.userAgent);if(n){const r=n[1]||0,a=n[2]||0,i=n[3]||0;return{browser:e,version:`${r}.${a}.${i}`}}}return null}const cn=s=>s==="x32"?"x32":s==="x86_64"||s==="x64"?"x64":s==="arm"?"arm":s==="aarch64"||s==="arm64"?"arm64":s?`other:${s}`:"unknown",ln=s=>(s=s.toLowerCase(),s.includes("ios")?"iOS":s==="android"?"Android":s==="darwin"?"MacOS":s==="win32"?"Windows":s==="freebsd"?"FreeBSD":s==="openbsd"?"OpenBSD":s==="linux"?"Linux":s?`Other:${s}`:"Unknown");let un;const br=()=>un??(un=yr());function xr(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Jn(...s){const e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...s)}function Xn(s){let e=Symbol.asyncIterator in s?s[Symbol.asyncIterator]():s[Symbol.iterator]();return Jn({start(){},async pull(t){const{done:n,value:r}=await e.next();n?t.close():t.enqueue(r)},async cancel(){var t;await((t=e.return)==null?void 0:t.call(e))}})}function Hn(s){if(s[Symbol.asyncIterator])return s;const e=s.getReader();return{async next(){try{const t=await e.read();return t!=null&&t.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){const t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Sr(s){var n,r;if(s===null||typeof s!="object")return;if(s[Symbol.asyncIterator]){await((r=(n=s[Symbol.asyncIterator]()).return)==null?void 0:r.call(n));return}const e=s.getReader(),t=e.cancel();e.releaseLock(),await t}const Ar=({headers:s,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),Vn="RFC3986",Kn=s=>String(s),dn={RFC1738:s=>String(s).replace(/%20/g,"+"),RFC3986:Kn},Cr="RFC1738";let $t=(s,e)=>($t=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),$t(s,e));const ee=(()=>{const s=[];for(let e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s})(),yt=1024,vr=(s,e,t,n,r)=>{if(s.length===0)return s;let a=s;if(typeof s=="symbol"?a=Symbol.prototype.toString.call(s):typeof s!="string"&&(a=String(s)),t==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});let i="";for(let c=0;c<a.length;c+=yt){const l=a.length>=yt?a.slice(c,c+yt):a,d=[];for(let y=0;y<l.length;++y){let u=l.charCodeAt(y);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||r===Cr&&(u===40||u===41)){d[d.length]=l.charAt(y);continue}if(u<128){d[d.length]=ee[u];continue}if(u<2048){d[d.length]=ee[192|u>>6]+ee[128|u&63];continue}if(u<55296||u>=57344){d[d.length]=ee[224|u>>12]+ee[128|u>>6&63]+ee[128|u&63];continue}y+=1,u=65536+((u&1023)<<10|l.charCodeAt(y)&1023),d[d.length]=ee[240|u>>18]+ee[128|u>>12&63]+ee[128|u>>6&63]+ee[128|u&63]}i+=d.join("")}return i};function Ir(s){return!s||typeof s!="object"?!1:!!(s.constructor&&s.constructor.isBuffer&&s.constructor.isBuffer(s))}function hn(s,e){if(V(s)){const t=[];for(let n=0;n<s.length;n+=1)t.push(e(s[n]));return t}return e(s)}const Gn={brackets(s){return String(s)+"[]"},comma:"comma",indices(s,e){return String(s)+"["+e+"]"},repeat(s){return String(s)}},Qn=function(s,e){Array.prototype.push.apply(s,V(e)?e:[e])};let fn;const B={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:vr,encodeValuesOnly:!1,format:Vn,formatter:Kn,indices:!1,serializeDate(s){return(fn??(fn=Function.prototype.call.bind(Date.prototype.toISOString)))(s)},skipNulls:!1,strictNullHandling:!1};function Rr(s){return typeof s=="string"||typeof s=="number"||typeof s=="boolean"||typeof s=="symbol"||typeof s=="bigint"}const wt={};function zn(s,e,t,n,r,a,i,c,l,d,y,u,g,h,b,w,C,E){let m=s,_=E,p=0,A=!1;for(;(_=_.get(wt))!==void 0&&!A;){const P=_.get(s);if(p+=1,typeof P<"u"){if(P===p)throw new RangeError("Cyclic object value");A=!0}typeof _.get(wt)>"u"&&(p=0)}if(typeof d=="function"?m=d(e,m):m instanceof Date?m=g==null?void 0:g(m):t==="comma"&&V(m)&&(m=hn(m,function(P){return P instanceof Date?g==null?void 0:g(P):P})),m===null){if(a)return l&&!w?l(e,B.encoder,C,"key",h):e;m=""}if(Rr(m)||Ir(m)){if(l){const P=w?e:l(e,B.encoder,C,"key",h);return[(b==null?void 0:b(P))+"="+(b==null?void 0:b(l(m,B.encoder,C,"value",h)))]}return[(b==null?void 0:b(e))+"="+(b==null?void 0:b(String(m)))]}const O=[];if(typeof m>"u")return O;let I;if(t==="comma"&&V(m))w&&l&&(m=hn(m,l)),I=[{value:m.length>0?m.join(",")||null:void 0}];else if(V(d))I=d;else{const P=Object.keys(m);I=y?P.sort(y):P}const F=c?String(e).replace(/\./g,"%2E"):String(e),x=n&&V(m)&&m.length===1?F+"[]":F;if(r&&V(m)&&m.length===0)return x+"[]";for(let P=0;P<I.length;++P){const M=I[P],se=typeof M=="object"&&typeof M.value<"u"?M.value:m[M];if(i&&se===null)continue;const me=u&&c?M.replace(/\./g,"%2E"):M,N=V(m)?typeof t=="function"?t(x,me):x:x+(u?"."+me:"["+me+"]");E.set(s,p);const ie=new WeakMap;ie.set(wt,E),Qn(O,zn(se,N,t,n,r,a,i,c,t==="comma"&&w&&V(m)?null:l,d,y,u,g,h,b,w,C,ie))}return O}function $r(s=B){if(typeof s.allowEmptyArrays<"u"&&typeof s.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof s.encodeDotInKeys<"u"&&typeof s.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(s.encoder!==null&&typeof s.encoder<"u"&&typeof s.encoder!="function")throw new TypeError("Encoder has to be a function.");const e=s.charset||B.charset;if(typeof s.charset<"u"&&s.charset!=="utf-8"&&s.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=Vn;if(typeof s.format<"u"){if(!$t(dn,s.format))throw new TypeError("Unknown format option provided.");t=s.format}const n=dn[t];let r=B.filter;(typeof s.filter=="function"||V(s.filter))&&(r=s.filter);let a;if(s.arrayFormat&&s.arrayFormat in Gn?a=s.arrayFormat:"indices"in s?a=s.indices?"indices":"repeat":a=B.arrayFormat,"commaRoundTrip"in s&&typeof s.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const i=typeof s.allowDots>"u"?s.encodeDotInKeys?!0:B.allowDots:!!s.allowDots;return{addQueryPrefix:typeof s.addQueryPrefix=="boolean"?s.addQueryPrefix:B.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof s.allowEmptyArrays=="boolean"?!!s.allowEmptyArrays:B.allowEmptyArrays,arrayFormat:a,charset:e,charsetSentinel:typeof s.charsetSentinel=="boolean"?s.charsetSentinel:B.charsetSentinel,commaRoundTrip:!!s.commaRoundTrip,delimiter:typeof s.delimiter>"u"?B.delimiter:s.delimiter,encode:typeof s.encode=="boolean"?s.encode:B.encode,encodeDotInKeys:typeof s.encodeDotInKeys=="boolean"?s.encodeDotInKeys:B.encodeDotInKeys,encoder:typeof s.encoder=="function"?s.encoder:B.encoder,encodeValuesOnly:typeof s.encodeValuesOnly=="boolean"?s.encodeValuesOnly:B.encodeValuesOnly,filter:r,format:t,formatter:n,serializeDate:typeof s.serializeDate=="function"?s.serializeDate:B.serializeDate,skipNulls:typeof s.skipNulls=="boolean"?s.skipNulls:B.skipNulls,sort:typeof s.sort=="function"?s.sort:null,strictNullHandling:typeof s.strictNullHandling=="boolean"?s.strictNullHandling:B.strictNullHandling}}function Or(s,e={}){let t=s;const n=$r(e);let r,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):V(n.filter)&&(a=n.filter,r=a);const i=[];if(typeof t!="object"||t===null)return"";const c=Gn[n.arrayFormat],l=c==="comma"&&n.commaRoundTrip;r||(r=Object.keys(t)),n.sort&&r.sort(n.sort);const d=new WeakMap;for(let g=0;g<r.length;++g){const h=r[g];n.skipNulls&&t[h]===null||Qn(i,zn(t[h],h,c,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}const y=i.join(n.delimiter);let u=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?u+="utf8=%26%2310003%3B&":u+="utf8=%E2%9C%93&"),y.length>0?u+y:""}function kr(s){let e=0;for(const r of s)e+=r.length;const t=new Uint8Array(e);let n=0;for(const r of s)t.set(r,n),n+=r.length;return t}let mn;function Dt(s){let e;return(mn??(e=new globalThis.TextEncoder,mn=e.encode.bind(e)))(s)}let pn;function gn(s){let e;return(pn??(e=new globalThis.TextDecoder,pn=e.decode.bind(e)))(s)}var K,G;class dt{constructor(){K.set(this,void 0),G.set(this,void 0),R(this,K,new Uint8Array),R(this,G,null)}decode(e){if(e==null)return[];const t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Dt(e):e;R(this,K,kr([o(this,K,"f"),t]));const n=[];let r;for(;(r=Er(o(this,K,"f"),o(this,G,"f")))!=null;){if(r.carriage&&o(this,G,"f")==null){R(this,G,r.index);continue}if(o(this,G,"f")!=null&&(r.index!==o(this,G,"f")+1||r.carriage)){n.push(gn(o(this,K,"f").subarray(0,o(this,G,"f")-1))),R(this,K,o(this,K,"f").subarray(o(this,G,"f"))),R(this,G,null);continue}const a=o(this,G,"f")!==null?r.preceding-1:r.preceding,i=gn(o(this,K,"f").subarray(0,a));n.push(i),R(this,K,o(this,K,"f").subarray(r.index)),R(this,G,null)}return n}flush(){return o(this,K,"f").length?this.decode(`
2
2
  `):[]}}K=new WeakMap,G=new WeakMap;dt.NEWLINE_CHARS=new Set([`
3
3
  `,"\r"]);dt.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Er(s,e){for(let r=e??0;r<s.length;r++){if(s[r]===10)return{preceding:r,index:r+1,carriage:!1};if(s[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function Pr(s){for(let n=0;n<s.length-1;n++){if(s[n]===10&&s[n+1]===10||s[n]===13&&s[n+1]===13)return n+2;if(s[n]===13&&s[n+1]===10&&n+3<s.length&&s[n+2]===13&&s[n+3]===10)return n+4}return-1}class ne{constructor(e,t){this.iterator=e,this.controller=t}static fromSSEResponse(e,t){let n=!1;async function*r(){if(n)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let a=!1;try{for await(const i of Tr(e,t))if(!a){if(i.data.startsWith("[DONE]")){a=!0;continue}if(i.event===null||i.event.startsWith("response.")||i.event.startsWith("transcript.")){let c;try{c=JSON.parse(i.data)}catch(l){throw console.error("Could not parse message into JSON:",i.data),console.error("From chunk:",i.raw),l}if(c&&c.error)throw new J(void 0,c.error,void 0,e.headers);yield c}else{let c;try{c=JSON.parse(i.data)}catch(l){throw console.error("Could not parse message into JSON:",i.data),console.error("From chunk:",i.raw),l}if(i.event=="error")throw new J(void 0,c.error,c.message,void 0);yield{event:i.event,data:c}}}a=!0}catch(i){if(It(i))return;throw i}finally{a||t.abort()}}return new ne(r,t)}static fromReadableStream(e,t){let n=!1;async function*r(){const i=new dt,c=Hn(e);for await(const l of c)for(const d of i.decode(l))yield d;for(const l of i.flush())yield l}async function*a(){if(n)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let i=!1;try{for await(const c of r())i||c&&(yield JSON.parse(c));i=!0}catch(c){if(It(c))return;throw c}finally{i||t.abort()}}return new ne(a,t)}[Symbol.asyncIterator](){return this.iterator()}tee(){const e=[],t=[],n=this.iterator(),r=a=>({next:()=>{if(a.length===0){const i=n.next();e.push(i),t.push(i)}return a.shift()}});return[new ne(()=>r(e),this.controller),new ne(()=>r(t),this.controller)]}toReadableStream(){const e=this;let t;return Jn({async start(){t=e[Symbol.asyncIterator]()},async pull(n){try{const{value:r,done:a}=await t.next();if(a)return n.close();const i=Dt(JSON.stringify(r)+`
4
4
  `);n.enqueue(i)}catch(r){n.error(r)}},async cancel(){var n;await((n=t.return)==null?void 0:n.call(t))}})}}async function*Tr(s,e){if(!s.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new v("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new v("Attempted to iterate over a response with no body");const t=new Nr,n=new dt,r=Hn(s.body);for await(const a of Mr(r))for(const i of n.decode(a)){const c=t.decode(i);c&&(yield c)}for(const a of n.flush()){const i=t.decode(a);i&&(yield i)}}async function*Mr(s){let e=new Uint8Array;for await(const t of s){if(t==null)continue;const n=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?Dt(t):t;let r=new Uint8Array(e.length+n.length);r.set(e),r.set(n,e.length),e=r;let a;for(;(a=Pr(e))!==-1;)yield e.slice(0,a),e=e.slice(a)}e.length>0&&(yield e)}class Nr{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;const a={event:this.event,data:this.data.join(`
@@ -1,2 +1,2 @@
1
- import{j as e}from"./createSvgIcon-BQT-7-GS.js";import{R as i}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as r,I as n}from"./index-DnqHzUyv.js";import{i as a}from"./index-CWSymef2.js";import l from"./ScriptEditorVanillaMonaco-NQqW_Tkm.js";import{I as c}from"./Save-BKC3BS3x.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";const o={textArea:{width:"calc(100% - 10px)",resize:"none"},dialog:{height:"95%"},fullHeight:{height:"100%",overflow:"hidden"},args:s=>({color:s.palette.mode==="dark"?"white":"black",height:30,width:"100%",fontSize:16}),argsTitle:s=>({color:s.palette.mode==="dark"?"white":"black",fontWeight:"bold"})};class k extends i.Component{constructor(t){super(t),this.state={changed:!1,source:!t.source&&t.isReturn?`
1
+ import{j as e}from"./createSvgIcon-BQT-7-GS.js";import{R as i}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as r,I as n}from"./index-DnqHzUyv.js";import{i as a}from"./index-Cek-i92T.js";import l from"./ScriptEditorVanillaMonaco-DEgxOslR.js";import{I as c}from"./Save-BKC3BS3x.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";const o={textArea:{width:"calc(100% - 10px)",resize:"none"},dialog:{height:"95%"},fullHeight:{height:"100%",overflow:"hidden"},args:s=>({color:s.palette.mode==="dark"?"white":"black",height:30,width:"100%",fontSize:16}),argsTitle:s=>({color:s.palette.mode==="dark"?"white":"black",fontWeight:"bold"})};class k extends i.Component{constructor(t){super(t),this.state={changed:!1,source:!t.source&&t.isReturn?`
2
2
  return false`:t.source}}componentDidMount(){setTimeout(()=>{var t;try{(t=window.document.getElementById("source-text-area"))==null||t.focus()}catch{}},100)}handleCancel(){this.props.onClose(!1)}handleOk(){(!this.props.isReturn||this.state.source.includes("return "))&&this.props.onClose(this.state.source)}onChange(t){this.setState({changed:!0,source:t})}render(){return e.jsxs(r.Dialog,{onClose:()=>!1,maxWidth:"lg",sx:{"& .MuiDialog-paper":o.dialog},fullWidth:!0,open:!0,"aria-labelledby":"source-dialog-title",children:[e.jsx(r.DialogTitle,{id:"source-dialog-title",children:a.I18n.t("Function editor")}),e.jsxs(r.DialogContent,{style:o.fullHeight,children:[this.props.args&&e.jsxs(r.Box,{sx:o.args,children:[e.jsx(r.Box,{component:"span",sx:o.argsTitle,children:a.I18n.t("function (")}),this.props.args,e.jsx(r.Box,{component:"span",sx:o.argsTitle,children:")"})]},"arguments"),e.jsx(l,{triggerPrettier:1,adapterName:this.props.adapterName,runningInstances:this.props.runningInstances,style:{...o.textArea,height:this.props.args?"calc(100% - 30px)":"100%"},name:"blockly",socket:this.props.socket,readOnly:!1,checkJs:!1,changed:this.state.changed,code:this.state.source,isDark:this.props.themeType==="dark",onChange:t=>this.onChange(t),language:"javascript"},"scriptEditor")]}),e.jsxs(r.DialogActions,{children:[e.jsx(r.Button,{variant:"contained",onClick:()=>this.handleOk(),color:"primary",startIcon:e.jsx(c,{}),children:a.I18n.t("Save")}),e.jsx(r.Button,{color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:e.jsx(n,{}),children:a.I18n.t("Cancel")})]})]})}}export{k as default};
@@ -1 +1 @@
1
- import{j as n}from"./createSvgIcon-BQT-7-GS.js";import{R as S}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as p,o as b,aA as C}from"./index-DnqHzUyv.js";import{i as f}from"./index-CWSymef2.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";function v(w){return/^script\.js\.global\./.test(w)}let O=0;function E(w){const t=/\x1b\[[0-9;]*m/g;return w.replace(t,"")}class R extends S.Component{monacoDiv=null;editor=null;monaco=window.monaco;insert="";originalCode;runningInstancesStr;monacoCounter=0;location;breakpoints;lastSearch="";typings={};decorations=[];triggerPrettier;constructor(t){super(t),this.state={name:"current",isDark:t.isDark||!1,language:t.language||"javascript",readOnly:t.readOnly||!1,alive:!0,check:!1,searchText:this.props.searchText||"",typingsLoaded:!1,showError:null},this.triggerPrettier=t.triggerPrettier,this.runningInstancesStr=JSON.stringify(this.props.runningInstances),this.originalCode=t.code||"",this.monacoDiv=S.createRef()}waitForMonaco(t){var e,s,o,r,l,a,h,g;let i=!!((r=(o=(s=(e=this.monaco)==null?void 0:e.languages)==null?void 0:s.typescript)==null?void 0:o.typescriptDefaults)!=null&&r.getCompilerOptions);if(!i||!this.props.runningInstances){if(this.monaco=window.monaco,i=!!((g=(h=(a=(l=this.monaco)==null?void 0:l.languages)==null?void 0:a.typescript)==null?void 0:h.typescriptDefaults)!=null&&g.getCompilerOptions),this.monacoCounter++,!i&&this.monacoCounter<20){console.log("wait for monaco loaded"),setTimeout(()=>this.waitForMonaco(t),200);return}this.monacoCounter>=20&&console.error("Cannot load monaco!")}else t&&t()}loadTypings(t){if(!this.editor)return;t||=this.props.runningInstances;const i=t&&Object.keys(t).find(e=>t==null?void 0:t[e]);i&&this.props.socket.sendTo(i.replace("system.adapter.",""),"loadTypings",null).then(e=>{this.setState({alive:!0,check:!0,typingsLoaded:!0}),this.setTypeCheck(!0),e.typings?(this.typings=e.typings,this.setEditorTypings(this.state.name)):console.error(`failed to load typings: ${e.error}`)})}componentDidMount(){var e,s,o,r,l,a,h,g,y,k,d,u;let t=!!((r=(o=(s=(e=this.monaco)==null?void 0:e.languages)==null?void 0:s.typescript)==null?void 0:o.typescriptDefaults)!=null&&r.getCompilerOptions);if((!t||!this.props.runningInstances)&&(this.monaco=window.monaco,t=!!((g=(h=(a=(l=this.monaco)==null?void 0:l.languages)==null?void 0:a.typescript)==null?void 0:h.typescriptDefaults)!=null&&g.getCompilerOptions),!t)){console.log("wait for monaco loaded..."),this.waitForMonaco(()=>this.componentDidMount());return}if(!this.editor&&t&&this.monaco){console.log("Init editor"),(k=(y=this.props).onRegisterSelect)==null||k.call(y,()=>{var m;if(this.editor){const D=this.editor.getSelection();if(D)return(m=this.editor.getModel())==null?void 0:m.getValueInRange(D)}});const c=this.monaco.languages.typescript.typescriptDefaults.getCompilerOptions();c.allowJs=!0,c.checkJs=this.props.checkJs!==!1,c.noLib=!0,c.lib=[],c.useUnknownInCatchVariables=!1,c.moduleResolution=this.monaco.languages.typescript.ModuleResolutionKind.NodeJs,c.target=this.monaco.languages.typescript.ScriptTarget.ESNext,c.module=this.monaco.languages.typescript.ModuleKind.ESNext,c.allowNonTsExtensions=!0,this.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(c),this.setTypeCheck(!1),(d=this.monacoDiv)!=null&&d.current&&(this.editor=this.monaco.editor.create((u=this.monacoDiv)==null?void 0:u.current,{lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,glyphMargin:!!this.props.breakpoints,colorDecorators:!0}),this.editor.onDidChangeModelContent(()=>this.onChange()),this.loadTypings(),this.props.onForceSave&&this.editor.addCommand(this.monaco.KeyMod.CtrlCmd|this.monaco.KeyCode.KeyS,()=>this.props.onForceSave&&this.props.onForceSave()),setTimeout(()=>{this.highlightText(this.state.searchText),this.location=this.props.location||void 0,this.breakpoints=this.props.breakpoints,this.showDecorators()}))}const i={selectOnLineNumbers:!0,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:this.state.readOnly,language:this.state.language,isDark:this.state.isDark};this.setEditorOptions(i),this.editor&&(this.editor.focus(),this.editor.setValue(this.originalCode),this.props.onToggleBreakpoint?this.editor.onMouseDown(c=>{var D;const m=c.target;this.props.onToggleBreakpoint&&((D=m.detail)==null?void 0:D.glyphMarginLeft)!==void 0&&m.position&&this.props.onToggleBreakpoint(m.position.lineNumber-1)}):this.editor.onMouseDown(()=>{}))}setEditorOptions(t){var i;t&&(t.language&&this.setEditorLanguage(t.language),this.editor&&(t.readOnly!==void 0&&this.editor.updateOptions({readOnly:t.readOnly}),t.lineWrap!==void 0&&this.editor.updateOptions({wordWrap:t.lineWrap?"on":"off"})),t.typeCheck!==void 0&&this.setTypeCheck(t.typeCheck),t.isDark!==void 0&&((i=this.monaco)==null||i.editor.setTheme(t.isDark?"vs-dark":"vs")))}componentWillUnmount(){var t,i;this.editor&&((i=(t=this.props).onRegisterSelect)==null||i.call(t,null),this.editor.dispose(),this.editor=null)}async doPrettier(){var e,s,o,r;const t=this.props.runningInstances&&Object.keys(this.props.runningInstances).find(l=>{var a;return(a=this.props.runningInstances)==null?void 0:a[l]});if(!t){window.alert(f.I18n.t("No script adapter instance found to format the code"));return}const i=await this.props.socket.sendTo(t.replace("system.adapter.",""),"prettier",{code:(e=this.editor)==null?void 0:e.getValue(),type:this.state.language});i.error?this.setState({showError:{title:f.I18n.t("Error formatting code"),message:E(i.error)}}):i.code&&((s=this.editor)==null||s.setValue(i.code),(r=(o=this.props).onChange)==null||r.call(o,i.code),this.showDecorators())}setEditorLanguage(t){var e;if(!this.editor)return;const i=this.editor.getModel();if(i){const s=i.getValue(),o=i.uri.path,r=typeof o=="string"&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):"index",l=t==="javascript"?"js":t==="typescript"?"ts":t;i.dispose();const a=t==="javascript"||t==="typescript"?"typescript":t,h=(e=this.monaco)==null?void 0:e.editor.createModel(s,a,this.monaco.Uri.from({scheme:window.location.protocol.replace(":",""),path:`${r}${O++}.${l}`}));h&&this.editor.setModel(h)}}setTypeCheck(t){var e,s;const i={noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive};(e=this.monaco)==null||e.languages.typescript.typescriptDefaults.setDiagnosticsOptions(i),(s=this.monaco)==null||s.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive})}setEditorTypings(t=""){var o,r,l,a,h,g,y,k;const i=v(t),e=`${t}.d.ts`,s=[];for(const d of Object.keys(this.typings))i&&(d==="global.d.ts"||d.startsWith("script.js.global")&&d!==e)||s.push({filePath:d,content:this.typings[d]});if((a=(l=(r=(o=this.monaco)==null?void 0:o.languages)==null?void 0:r.typescript)==null?void 0:l.typescriptDefaults)!=null&&a.setExtraLibs)this.monaco.languages.typescript.typescriptDefaults.setExtraLibs(s);else if((k=(y=(g=(h=this.monaco)==null?void 0:h.languages)==null?void 0:g.typescript)==null?void 0:y.typescriptDefaults)!=null&&k.addExtraLib){const d=this.monaco.languages.typescript.typescriptDefaults.getExtraLibs();s.forEach(u=>{!d[u.filePath]&&this.monaco&&this.monaco.languages.typescript.typescriptDefaults.addExtraLib(u.content,u.filePath)})}}insertTextIntoEditor(t){if(!this.editor||!this.monaco)return;const i=this.editor.getSelection();if(i){const e=new this.monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editor.executeEdits("",[{range:e,text:t,forceMoveMarkers:!0}])}this.editor.focus()}highlightText(t){var e;if(!this.editor||!this.monaco)return;const i=t?(e=this.editor.getModel())==null?void 0:e.findMatches(t,!0,!1,!1,null,!0):void 0;if(i!=null&&i.length)i.forEach(s=>{var o;return(o=this.editor)==null?void 0:o.setSelection(s.range)}),this.editor.revealLine(i[0].range.startLineNumber);else{const s=this.editor.getPosition();if(s){const o=s.lineNumber,r=s.column;this.editor.setSelection(new this.monaco.Range(o,r,o,r))}}}showDecorators(){var i;const t=[];if(this.location&&this.monaco&&(t.push({range:new this.monaco.Range(this.location.lineNumber+1,(this.location.columnNumber||0)+1,this.location.lineNumber+1,1e3),options:{isWholeLine:!1,className:this.props.isDark?"monacoCurrentLineDark":"monacoCurrentLine"}}),t.push({range:new this.monaco.Range(this.location.lineNumber+1,0,this.location.lineNumber+1,0),options:{isWholeLine:!0,className:this.props.isDark?"monacoCurrentFullLineDark":"monacoCurrentFullLine"}})),(i=this.breakpoints)==null||i.forEach(e=>{this.monaco&&t.push({range:new this.monaco.Range(e.location.lineNumber+1,0,e.location.lineNumber+1,100),options:{isWholeLine:!0,glyphMarginClassName:this.props.isDark?"monacoBreakPointDark":"monacoBreakPoint"}})}),this.editor){const e=this.editor.getModel();e&&(this.decorations=e.deltaDecorations(this.decorations,t))}}initNewScript(t,i){var e;this.setState({name:t}),this.originalCode=i||"",(e=this.editor)==null||e.setValue(i||""),this.highlightText(this.lastSearch),this.showDecorators(),this.setEditorTypings(t)}scrollToLineIfNeeded(t){if(this.editor){const i=this.editor.getVisibleRanges();(!i||!i[0]||i[0].startLineNumber>t||t>i[0].endLineNumber)&&this.editor.revealLineInCenter(t)}}UNSAFE_componentWillReceiveProps(t){const i={};this.state.name!==t.name&&this.initNewScript(t.name,t.code),JSON.stringify(t.runningInstances)!==this.runningInstancesStr&&(this.runningInstancesStr=JSON.stringify(t.runningInstances),this.state.typingsLoaded||this.loadTypings(t.runningInstances)),this.editor&&!t.changed&&(t.code!==this.originalCode||t.code!==this.editor.getValue())&&(this.originalCode=t.code||"",this.editor.setValue(this.originalCode),this.showDecorators(),this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),t.searchText!==this.lastSearch&&(this.lastSearch=t.searchText||"",this.highlightText(this.lastSearch)),JSON.stringify(t.location)!==JSON.stringify(this.location)&&JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.location=t.location||void 0,this.breakpoints=t.breakpoints,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)):JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.breakpoints=t.breakpoints,this.showDecorators()):JSON.stringify(t.location)!==JSON.stringify(this.location)&&(this.location=t.location||void 0,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),this.state.language!==(t.language||"javascript")?(this.setState({language:t.language||"javascript"}),i.language=t.language||"javascript"):this.state.readOnly!==(t.readOnly||!1)?(this.setState({readOnly:t.readOnly||!1}),i.readOnly=t.readOnly):this.state.isDark!==(t.isDark||!1)&&(this.setState({isDark:t.isDark||!1}),i.isDark=t.isDark),this.setEditorOptions(i),this.insert!==t.insert&&(this.insert=t.insert||"",this.insert&&(console.log(`Insert text: ${this.insert}`),setTimeout(e=>{this.insertTextIntoEditor(e),setTimeout(()=>this.props.onInserted&&this.props.onInserted(),100)},100,this.insert)))}onChange(){var t,i;!this.props.readOnly&&this.editor&&((i=(t=this.props).onChange)==null||i.call(t,this.editor.getValue()))}renderErrorDialog(){return this.state.showError?this.state.showError.full?n.jsxs(p.Dialog,{open:!0,maxWidth:"md",onClose:()=>this.setState({showError:null}),children:[n.jsx(p.DialogTitle,{children:this.state.showError.title||f.I18n.t("Error")}),n.jsx(p.DialogContent,{children:n.jsx("pre",{children:n.jsx("code",{children:this.state.showError.message})})}),n.jsx(p.DialogActions,{children:n.jsxs(p.Button,{variant:"contained",startIcon:n.jsx(b,{}),onClick:()=>this.setState({showError:null}),children:[f.I18n.t("Close")," "]})})]}):n.jsx(p.Snackbar,{open:!0,autoHideDuration:5e3,onClose:()=>this.setState({showError:null}),message:this.state.showError.title,action:n.jsxs(S.Fragment,{children:[n.jsx(p.Button,{color:"secondary",size:"small",onClick:()=>this.setState({showError:{...this.state.showError,full:!0}}),children:f.I18n.t("More")}),n.jsx(p.IconButton,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({showError:null}),children:n.jsx(b,{fontSize:"small"})})]})}):null}render(){var t,i,e;return!((e=(i=(t=this.monaco)==null?void 0:t.languages)==null?void 0:i.typescript)!=null&&e.typescriptDefaults)||!this.props.runningInstances?(setTimeout(()=>{this.monaco=window.monaco,this.forceUpdate()},200),null):(this.props.triggerPrettier!==this.triggerPrettier&&(this.triggerPrettier=this.props.triggerPrettier,setTimeout(()=>this.doPrettier().catch(s=>console.error("Error formatting code:",s)),50)),n.jsxs("div",{ref:this.monacoDiv,style:{...this.props.style,width:"100%",height:"100%",overflow:"hidden",position:"relative"},children:[this.renderErrorDialog(),!this.state.check&&n.jsx(p.Fab,{size:"small",title:f.I18n.t("Check is not active, because javascript adapter is disabled"),style:{bottom:10,right:10,opacity:.5,position:"absolute",zIndex:1,background:"red",color:"white"},color:"secondary",children:n.jsx(C,{})})]}))}}export{R as default};
1
+ import{j as n}from"./createSvgIcon-BQT-7-GS.js";import{R as S}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as p,o as b,aA as C}from"./index-DnqHzUyv.js";import{i as f}from"./index-Cek-i92T.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";function v(w){return/^script\.js\.global\./.test(w)}let O=0;function E(w){const t=/\x1b\[[0-9;]*m/g;return w.replace(t,"")}class R extends S.Component{monacoDiv=null;editor=null;monaco=window.monaco;insert="";originalCode;runningInstancesStr;monacoCounter=0;location;breakpoints;lastSearch="";typings={};decorations=[];triggerPrettier;constructor(t){super(t),this.state={name:"current",isDark:t.isDark||!1,language:t.language||"javascript",readOnly:t.readOnly||!1,alive:!0,check:!1,searchText:this.props.searchText||"",typingsLoaded:!1,showError:null},this.triggerPrettier=t.triggerPrettier,this.runningInstancesStr=JSON.stringify(this.props.runningInstances),this.originalCode=t.code||"",this.monacoDiv=S.createRef()}waitForMonaco(t){var e,s,o,r,l,a,h,g;let i=!!((r=(o=(s=(e=this.monaco)==null?void 0:e.languages)==null?void 0:s.typescript)==null?void 0:o.typescriptDefaults)!=null&&r.getCompilerOptions);if(!i||!this.props.runningInstances){if(this.monaco=window.monaco,i=!!((g=(h=(a=(l=this.monaco)==null?void 0:l.languages)==null?void 0:a.typescript)==null?void 0:h.typescriptDefaults)!=null&&g.getCompilerOptions),this.monacoCounter++,!i&&this.monacoCounter<20){console.log("wait for monaco loaded"),setTimeout(()=>this.waitForMonaco(t),200);return}this.monacoCounter>=20&&console.error("Cannot load monaco!")}else t&&t()}loadTypings(t){if(!this.editor)return;t||=this.props.runningInstances;const i=t&&Object.keys(t).find(e=>t==null?void 0:t[e]);i&&this.props.socket.sendTo(i.replace("system.adapter.",""),"loadTypings",null).then(e=>{this.setState({alive:!0,check:!0,typingsLoaded:!0}),this.setTypeCheck(!0),e.typings?(this.typings=e.typings,this.setEditorTypings(this.state.name)):console.error(`failed to load typings: ${e.error}`)})}componentDidMount(){var e,s,o,r,l,a,h,g,y,k,d,u;let t=!!((r=(o=(s=(e=this.monaco)==null?void 0:e.languages)==null?void 0:s.typescript)==null?void 0:o.typescriptDefaults)!=null&&r.getCompilerOptions);if((!t||!this.props.runningInstances)&&(this.monaco=window.monaco,t=!!((g=(h=(a=(l=this.monaco)==null?void 0:l.languages)==null?void 0:a.typescript)==null?void 0:h.typescriptDefaults)!=null&&g.getCompilerOptions),!t)){console.log("wait for monaco loaded..."),this.waitForMonaco(()=>this.componentDidMount());return}if(!this.editor&&t&&this.monaco){console.log("Init editor"),(k=(y=this.props).onRegisterSelect)==null||k.call(y,()=>{var m;if(this.editor){const D=this.editor.getSelection();if(D)return(m=this.editor.getModel())==null?void 0:m.getValueInRange(D)}});const c=this.monaco.languages.typescript.typescriptDefaults.getCompilerOptions();c.allowJs=!0,c.checkJs=this.props.checkJs!==!1,c.noLib=!0,c.lib=[],c.useUnknownInCatchVariables=!1,c.moduleResolution=this.monaco.languages.typescript.ModuleResolutionKind.NodeJs,c.target=this.monaco.languages.typescript.ScriptTarget.ESNext,c.module=this.monaco.languages.typescript.ModuleKind.ESNext,c.allowNonTsExtensions=!0,this.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(c),this.setTypeCheck(!1),(d=this.monacoDiv)!=null&&d.current&&(this.editor=this.monaco.editor.create((u=this.monacoDiv)==null?void 0:u.current,{lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,glyphMargin:!!this.props.breakpoints,colorDecorators:!0}),this.editor.onDidChangeModelContent(()=>this.onChange()),this.loadTypings(),this.props.onForceSave&&this.editor.addCommand(this.monaco.KeyMod.CtrlCmd|this.monaco.KeyCode.KeyS,()=>this.props.onForceSave&&this.props.onForceSave()),setTimeout(()=>{this.highlightText(this.state.searchText),this.location=this.props.location||void 0,this.breakpoints=this.props.breakpoints,this.showDecorators()}))}const i={selectOnLineNumbers:!0,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:this.state.readOnly,language:this.state.language,isDark:this.state.isDark};this.setEditorOptions(i),this.editor&&(this.editor.focus(),this.editor.setValue(this.originalCode),this.props.onToggleBreakpoint?this.editor.onMouseDown(c=>{var D;const m=c.target;this.props.onToggleBreakpoint&&((D=m.detail)==null?void 0:D.glyphMarginLeft)!==void 0&&m.position&&this.props.onToggleBreakpoint(m.position.lineNumber-1)}):this.editor.onMouseDown(()=>{}))}setEditorOptions(t){var i;t&&(t.language&&this.setEditorLanguage(t.language),this.editor&&(t.readOnly!==void 0&&this.editor.updateOptions({readOnly:t.readOnly}),t.lineWrap!==void 0&&this.editor.updateOptions({wordWrap:t.lineWrap?"on":"off"})),t.typeCheck!==void 0&&this.setTypeCheck(t.typeCheck),t.isDark!==void 0&&((i=this.monaco)==null||i.editor.setTheme(t.isDark?"vs-dark":"vs")))}componentWillUnmount(){var t,i;this.editor&&((i=(t=this.props).onRegisterSelect)==null||i.call(t,null),this.editor.dispose(),this.editor=null)}async doPrettier(){var e,s,o,r;const t=this.props.runningInstances&&Object.keys(this.props.runningInstances).find(l=>{var a;return(a=this.props.runningInstances)==null?void 0:a[l]});if(!t){window.alert(f.I18n.t("No script adapter instance found to format the code"));return}const i=await this.props.socket.sendTo(t.replace("system.adapter.",""),"prettier",{code:(e=this.editor)==null?void 0:e.getValue(),type:this.state.language});i.error?this.setState({showError:{title:f.I18n.t("Error formatting code"),message:E(i.error)}}):i.code&&((s=this.editor)==null||s.setValue(i.code),(r=(o=this.props).onChange)==null||r.call(o,i.code),this.showDecorators())}setEditorLanguage(t){var e;if(!this.editor)return;const i=this.editor.getModel();if(i){const s=i.getValue(),o=i.uri.path,r=typeof o=="string"&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):"index",l=t==="javascript"?"js":t==="typescript"?"ts":t;i.dispose();const a=t==="javascript"||t==="typescript"?"typescript":t,h=(e=this.monaco)==null?void 0:e.editor.createModel(s,a,this.monaco.Uri.from({scheme:window.location.protocol.replace(":",""),path:`${r}${O++}.${l}`}));h&&this.editor.setModel(h)}}setTypeCheck(t){var e,s;const i={noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive};(e=this.monaco)==null||e.languages.typescript.typescriptDefaults.setDiagnosticsOptions(i),(s=this.monaco)==null||s.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive})}setEditorTypings(t=""){var o,r,l,a,h,g,y,k;const i=v(t),e=`${t}.d.ts`,s=[];for(const d of Object.keys(this.typings))i&&(d==="global.d.ts"||d.startsWith("script.js.global")&&d!==e)||s.push({filePath:d,content:this.typings[d]});if((a=(l=(r=(o=this.monaco)==null?void 0:o.languages)==null?void 0:r.typescript)==null?void 0:l.typescriptDefaults)!=null&&a.setExtraLibs)this.monaco.languages.typescript.typescriptDefaults.setExtraLibs(s);else if((k=(y=(g=(h=this.monaco)==null?void 0:h.languages)==null?void 0:g.typescript)==null?void 0:y.typescriptDefaults)!=null&&k.addExtraLib){const d=this.monaco.languages.typescript.typescriptDefaults.getExtraLibs();s.forEach(u=>{!d[u.filePath]&&this.monaco&&this.monaco.languages.typescript.typescriptDefaults.addExtraLib(u.content,u.filePath)})}}insertTextIntoEditor(t){if(!this.editor||!this.monaco)return;const i=this.editor.getSelection();if(i){const e=new this.monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editor.executeEdits("",[{range:e,text:t,forceMoveMarkers:!0}])}this.editor.focus()}highlightText(t){var e;if(!this.editor||!this.monaco)return;const i=t?(e=this.editor.getModel())==null?void 0:e.findMatches(t,!0,!1,!1,null,!0):void 0;if(i!=null&&i.length)i.forEach(s=>{var o;return(o=this.editor)==null?void 0:o.setSelection(s.range)}),this.editor.revealLine(i[0].range.startLineNumber);else{const s=this.editor.getPosition();if(s){const o=s.lineNumber,r=s.column;this.editor.setSelection(new this.monaco.Range(o,r,o,r))}}}showDecorators(){var i;const t=[];if(this.location&&this.monaco&&(t.push({range:new this.monaco.Range(this.location.lineNumber+1,(this.location.columnNumber||0)+1,this.location.lineNumber+1,1e3),options:{isWholeLine:!1,className:this.props.isDark?"monacoCurrentLineDark":"monacoCurrentLine"}}),t.push({range:new this.monaco.Range(this.location.lineNumber+1,0,this.location.lineNumber+1,0),options:{isWholeLine:!0,className:this.props.isDark?"monacoCurrentFullLineDark":"monacoCurrentFullLine"}})),(i=this.breakpoints)==null||i.forEach(e=>{this.monaco&&t.push({range:new this.monaco.Range(e.location.lineNumber+1,0,e.location.lineNumber+1,100),options:{isWholeLine:!0,glyphMarginClassName:this.props.isDark?"monacoBreakPointDark":"monacoBreakPoint"}})}),this.editor){const e=this.editor.getModel();e&&(this.decorations=e.deltaDecorations(this.decorations,t))}}initNewScript(t,i){var e;this.setState({name:t}),this.originalCode=i||"",(e=this.editor)==null||e.setValue(i||""),this.highlightText(this.lastSearch),this.showDecorators(),this.setEditorTypings(t)}scrollToLineIfNeeded(t){if(this.editor){const i=this.editor.getVisibleRanges();(!i||!i[0]||i[0].startLineNumber>t||t>i[0].endLineNumber)&&this.editor.revealLineInCenter(t)}}UNSAFE_componentWillReceiveProps(t){const i={};this.state.name!==t.name&&this.initNewScript(t.name,t.code),JSON.stringify(t.runningInstances)!==this.runningInstancesStr&&(this.runningInstancesStr=JSON.stringify(t.runningInstances),this.state.typingsLoaded||this.loadTypings(t.runningInstances)),this.editor&&!t.changed&&(t.code!==this.originalCode||t.code!==this.editor.getValue())&&(this.originalCode=t.code||"",this.editor.setValue(this.originalCode),this.showDecorators(),this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),t.searchText!==this.lastSearch&&(this.lastSearch=t.searchText||"",this.highlightText(this.lastSearch)),JSON.stringify(t.location)!==JSON.stringify(this.location)&&JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.location=t.location||void 0,this.breakpoints=t.breakpoints,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)):JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.breakpoints=t.breakpoints,this.showDecorators()):JSON.stringify(t.location)!==JSON.stringify(this.location)&&(this.location=t.location||void 0,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),this.state.language!==(t.language||"javascript")?(this.setState({language:t.language||"javascript"}),i.language=t.language||"javascript"):this.state.readOnly!==(t.readOnly||!1)?(this.setState({readOnly:t.readOnly||!1}),i.readOnly=t.readOnly):this.state.isDark!==(t.isDark||!1)&&(this.setState({isDark:t.isDark||!1}),i.isDark=t.isDark),this.setEditorOptions(i),this.insert!==t.insert&&(this.insert=t.insert||"",this.insert&&(console.log(`Insert text: ${this.insert}`),setTimeout(e=>{this.insertTextIntoEditor(e),setTimeout(()=>this.props.onInserted&&this.props.onInserted(),100)},100,this.insert)))}onChange(){var t,i;!this.props.readOnly&&this.editor&&((i=(t=this.props).onChange)==null||i.call(t,this.editor.getValue()))}renderErrorDialog(){return this.state.showError?this.state.showError.full?n.jsxs(p.Dialog,{open:!0,maxWidth:"md",onClose:()=>this.setState({showError:null}),children:[n.jsx(p.DialogTitle,{children:this.state.showError.title||f.I18n.t("Error")}),n.jsx(p.DialogContent,{children:n.jsx("pre",{children:n.jsx("code",{children:this.state.showError.message})})}),n.jsx(p.DialogActions,{children:n.jsxs(p.Button,{variant:"contained",startIcon:n.jsx(b,{}),onClick:()=>this.setState({showError:null}),children:[f.I18n.t("Close")," "]})})]}):n.jsx(p.Snackbar,{open:!0,autoHideDuration:5e3,onClose:()=>this.setState({showError:null}),message:this.state.showError.title,action:n.jsxs(S.Fragment,{children:[n.jsx(p.Button,{color:"secondary",size:"small",onClick:()=>this.setState({showError:{...this.state.showError,full:!0}}),children:f.I18n.t("More")}),n.jsx(p.IconButton,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({showError:null}),children:n.jsx(b,{fontSize:"small"})})]})}):null}render(){var t,i,e;return!((e=(i=(t=this.monaco)==null?void 0:t.languages)==null?void 0:i.typescript)!=null&&e.typescriptDefaults)||!this.props.runningInstances?(setTimeout(()=>{this.monaco=window.monaco,this.forceUpdate()},200),null):(this.props.triggerPrettier!==this.triggerPrettier&&(this.triggerPrettier=this.props.triggerPrettier,setTimeout(()=>this.doPrettier().catch(s=>console.error("Error formatting code:",s)),50)),n.jsxs("div",{ref:this.monacoDiv,style:{...this.props.style,width:"100%",height:"100%",overflow:"hidden",position:"relative"},children:[this.renderErrorDialog(),!this.state.check&&n.jsx(p.Fab,{size:"small",title:f.I18n.t("Check is not active, because javascript adapter is disabled"),style:{bottom:10,right:10,opacity:.5,position:"absolute",zIndex:1,background:"red",color:"white"},color:"secondary",children:n.jsx(C,{})})]}))}}export{R as default};
@@ -1,4 +1,4 @@
1
- import{j as M}from"./createSvgIcon-BQT-7-GS.js";import{R as dt,i as Rt}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as Oe,m as Ft,z as Nt,g as Lt}from"./index-CWSymef2.js";import{i as G,x as Vt,y as zt,l as qt,U as It,e as Wt,q as Kt,o as $t,E as Jt,d as Ut,M as Ht,ax as Gt,ay as Yt,az as Qt,a3 as Zt}from"./index-DnqHzUyv.js";import Xt from"./ScriptEditorVanillaMonaco-NQqW_Tkm.js";import{g as ea}from"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";const ta={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class aa extends dt.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ta.editorDiv,children:M.jsx(Xt,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const At=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${At}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:At,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ra(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class _t extends dt.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=dt.createRef()}static generateLine(v){return M.jsxs(G.Box,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ra(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(G.Box,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>_t.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(G.Box,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:Oe.I18n.t("Log outputs")},"logList")}onCopy(){Oe.Utils.copyToClipboard(this.props.console.join(`
1
+ import{j as M}from"./createSvgIcon-BQT-7-GS.js";import{R as dt,i as Rt}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as Oe,m as Ft,z as Nt,g as Lt}from"./index-Cek-i92T.js";import{i as G,x as Vt,y as zt,l as qt,U as It,e as Wt,q as Kt,o as $t,E as Jt,d as Ut,M as Ht,ax as Gt,ay as Yt,az as Qt,a3 as Zt}from"./index-DnqHzUyv.js";import Xt from"./ScriptEditorVanillaMonaco-DEgxOslR.js";import{g as ea}from"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import"./inheritsLoose--KnFDOw1.js";import"./preload-helper-Dp1pzeXC.js";const ta={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class aa extends dt.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ta.editorDiv,children:M.jsx(Xt,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const At=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${At}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:At,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ra(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class _t extends dt.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=dt.createRef()}static generateLine(v){return M.jsxs(G.Box,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ra(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(G.Box,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>_t.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(G.Box,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:Oe.I18n.t("Log outputs")},"logList")}onCopy(){Oe.Utils.copyToClipboard(this.props.console.join(`
2
2
  `))}scrollToBottom(){var v,g;(g=(v=this.messagesEnd)==null?void 0:v.current)==null||g.scrollIntoView({behavior:"smooth"})}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}render(){const v=this.props.console;return M.jsxs("div",{style:Ke.logBox,children:[M.jsxs("div",{style:Ke.toolbox,children:[M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?"secondary":void 0,size:"medium",children:M.jsx(Vt,{})}),v!=null&&v.length?M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.props.onClearAllLogs(),size:"medium",children:M.jsx(zt,{})}):null,v!=null&&v.length?M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.onCopy(),size:"medium",children:M.jsx(qt,{})}):null]},"toolbox"),this.renderLogList(v)]})}}var wt={exports:{}},na=wt.exports;(function(X,v){(function(g,a){X.exports=a(Rt)})(na,function(g){return function(a){var t={};function e(s){if(t[s])return t[s].exports;var c=t[s]={i:s,l:!1,exports:{}};return a[s].call(c.exports,c,c.exports,e),c.l=!0,c.exports}return e.m=a,e.c=t,e.d=function(s,c,d){e.o(s,c)||Object.defineProperty(s,c,{enumerable:!0,get:d})},e.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},e.t=function(s,c){if(1&c&&(s=e(s)),8&c||4&c&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(e.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&c&&typeof s!="string")for(var p in s)e.d(d,p,function(f){return s[f]}.bind(null,p));return d},e.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return e.d(c,"a",c),c},e.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},e.p="",e(e.s=48)}([function(a,t){a.exports=g},function(a,t){var e=a.exports={version:"2.6.12"};typeof __e=="number"&&(__e=e)},function(a,t,e){var s=e(26)("wks"),c=e(17),d=e(3).Symbol,p=typeof d=="function";(a.exports=function(f){return s[f]||(s[f]=p&&d[f]||(p?d:c)("Symbol."+f))}).store=s},function(a,t){var e=a.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=e)},function(a,t,e){a.exports=!e(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(a,t){var e={}.hasOwnProperty;a.exports=function(s,c){return e.call(s,c)}},function(a,t,e){var s=e(7),c=e(16);a.exports=e(4)?function(d,p,f){return s.f(d,p,c(1,f))}:function(d,p,f){return d[p]=f,d}},function(a,t,e){var s=e(10),c=e(35),d=e(23),p=Object.defineProperty;t.f=e(4)?Object.defineProperty:function(f,h,E){if(s(f),h=d(h,!0),s(E),c)try{return p(f,h,E)}catch{}if("get"in E||"set"in E)throw TypeError("Accessors not supported!");return"value"in E&&(f[h]=E.value),f}},function(a,t){a.exports=function(e){try{return!!e()}catch{return!0}}},function(a,t,e){var s=e(40),c=e(22);a.exports=function(d){return s(c(d))}},function(a,t,e){var s=e(11);a.exports=function(c){if(!s(c))throw TypeError(c+" is not an object!");return c}},function(a,t){a.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}},function(a,t){a.exports={}},function(a,t,e){var s=e(39),c=e(27);a.exports=Object.keys||function(d){return s(d,c)}},function(a,t){a.exports=!0},function(a,t,e){var s=e(3),c=e(1),d=e(53),p=e(6),f=e(5),h=function(E,b,w){var I,D,H,L=E&h.F,ee=E&h.G,r=E&h.S,B=E&h.P,V=E&h.B,z=E&h.W,q=ee?c:c[b]||(c[b]={}),k=q.prototype,A=ee?s:r?s[b]:(s[b]||{}).prototype;for(I in ee&&(w=b),w)(D=!L&&A&&A[I]!==void 0)&&f(q,I)||(H=D?A[I]:w[I],q[I]=ee&&typeof A[I]!="function"?w[I]:V&&D?d(H,s):z&&A[I]==H?function(T){var W=function(S,te,J){if(this instanceof T){switch(arguments.length){case 0:return new T;case 1:return new T(S);case 2:return new T(S,te)}return new T(S,te,J)}return T.apply(this,arguments)};return W.prototype=T.prototype,W}(H):B&&typeof H=="function"?d(Function.call,H):H,B&&((q.virtual||(q.virtual={}))[I]=H,E&h.R&&k&&!k[I]&&p(k,I,H)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,a.exports=h},function(a,t){a.exports=function(e,s){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:s}}},function(a,t){var e=0,s=Math.random();a.exports=function(c){return"Symbol(".concat(c===void 0?"":c,")_",(++e+s).toString(36))}},function(a,t,e){var s=e(22);a.exports=function(c){return Object(s(c))}},function(a,t){t.f={}.propertyIsEnumerable},function(a,t,e){var s=e(52)(!0);e(34)(String,"String",function(c){this._t=String(c),this._i=0},function(){var c,d=this._t,p=this._i;return p>=d.length?{value:void 0,done:!0}:(c=s(d,p),this._i+=c.length,{value:c,done:!1})})},function(a,t){var e=Math.ceil,s=Math.floor;a.exports=function(c){return isNaN(c=+c)?0:(c>0?s:e)(c)}},function(a,t){a.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},function(a,t,e){var s=e(11);a.exports=function(c,d){if(!s(c))return c;var p,f;if(d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c))||typeof(p=c.valueOf)=="function"&&!s(f=p.call(c))||!d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c)))return f;throw TypeError("Can't convert object to primitive value")}},function(a,t){var e={}.toString;a.exports=function(s){return e.call(s).slice(8,-1)}},function(a,t,e){var s=e(26)("keys"),c=e(17);a.exports=function(d){return s[d]||(s[d]=c(d))}},function(a,t,e){var s=e(1),c=e(3),d=c["__core-js_shared__"]||(c["__core-js_shared__"]={});(a.exports=function(p,f){return d[p]||(d[p]=f!==void 0?f:{})})("versions",[]).push({version:s.version,mode:e(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(a,t){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,t,e){var s=e(7).f,c=e(5),d=e(2)("toStringTag");a.exports=function(p,f,h){p&&!c(p=h?p:p.prototype,d)&&s(p,d,{configurable:!0,value:f})}},function(a,t,e){e(62);for(var s=e(3),c=e(6),d=e(12),p=e(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;h<f.length;h++){var E=f[h],b=s[E],w=b&&b.prototype;w&&!w[p]&&c(w,p,E),d[E]=d.Array}},function(a,t,e){t.f=e(2)},function(a,t,e){var s=e(3),c=e(1),d=e(14),p=e(30),f=e(7).f;a.exports=function(h){var E=c.Symbol||(c.Symbol=d?{}:s.Symbol||{});h.charAt(0)=="_"||h in E||f(E,h,{value:p.f(h)})}},function(a,t){t.f=Object.getOwnPropertySymbols},function(a,t){a.exports=function(e,s,c){return Math.min(Math.max(e,s),c)}},function(a,t,e){var s=e(14),c=e(15),d=e(37),p=e(6),f=e(12),h=e(55),E=e(28),b=e(61),w=e(2)("iterator"),I=!([].keys&&"next"in[].keys()),D=function(){return this};a.exports=function(H,L,ee,r,B,V,z){h(ee,L,r);var q,k,A,T=function(U){if(!I&&U in J)return J[U];switch(U){case"keys":case"values":return function(){return new ee(this,U)}}return function(){return new ee(this,U)}},W=L+" Iterator",S=B=="values",te=!1,J=H.prototype,C=J[w]||J["@@iterator"]||B&&J[B],Q=C||T(B),he=B?S?T("entries"):Q:void 0,ue=L=="Array"&&J.entries||C;if(ue&&(A=b(ue.call(new H)))!==Object.prototype&&A.next&&(E(A,W,!0),s||typeof A[w]=="function"||p(A,w,D)),S&&C&&C.name!=="values"&&(te=!0,Q=function(){return C.call(this)}),s&&!z||!I&&!te&&J[w]||p(J,w,Q),f[L]=Q,f[W]=D,B)if(q={values:S?Q:T("values"),keys:V?Q:T("keys"),entries:he},z)for(k in q)k in J||d(J,k,q[k]);else c(c.P+c.F*(I||te),L,q);return q}},function(a,t,e){a.exports=!e(4)&&!e(8)(function(){return Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a!=7})},function(a,t,e){var s=e(11),c=e(3).document,d=s(c)&&s(c.createElement);a.exports=function(p){return d?c.createElement(p):{}}},function(a,t,e){a.exports=e(6)},function(a,t,e){var s=e(10),c=e(56),d=e(27),p=e(25)("IE_PROTO"),f=function(){},h=function(){var E,b=e(36)("iframe"),w=d.length;for(b.style.display="none",e(60).appendChild(b),b.src="javascript:",(E=b.contentWindow.document).open(),E.write("<script>document.F=Object<\/script>"),E.close(),h=E.F;w--;)delete h.prototype[d[w]];return h()};a.exports=Object.create||function(E,b){var w;return E!==null?(f.prototype=s(E),w=new f,f.prototype=null,w[p]=E):w=h(),b===void 0?w:c(w,b)}},function(a,t,e){var s=e(5),c=e(9),d=e(57)(!1),p=e(25)("IE_PROTO");a.exports=function(f,h){var E,b=c(f),w=0,I=[];for(E in b)E!=p&&s(b,E)&&I.push(E);for(;h.length>w;)s(b,E=h[w++])&&(~d(I,E)||I.push(E));return I}},function(a,t,e){var s=e(24);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return s(c)=="String"?c.split(""):Object(c)}},function(a,t,e){var s=e(39),c=e(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(d){return s(d,c)}},function(a,t,e){var s=e(24),c=e(2)("toStringTag"),d=s(function(){return arguments}())=="Arguments";a.exports=function(p){var f,h,E;return p===void 0?"Undefined":p===null?"Null":typeof(h=function(b,w){try{return b[w]}catch{}}(f=Object(p),c))=="string"?h:d?s(f):(E=s(f))=="Object"&&typeof f.callee=="function"?"Arguments":E}},function(a,t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch{typeof window=="object"&&(e=window)}a.exports=e},function(a,t){var e=/-?\d+(\.\d+)?%?/g;a.exports=function(s){return s.match(e)}},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var s=D(e(49)),c=D(e(76)),d=D(e(81)),p=D(e(89)),f=D(e(93)),h=function(k){if(k&&k.__esModule)return k;var A={};if(k!=null)for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(A[T]=k[T]);return A.default=k,A}(e(94)),E=D(e(132)),b=D(e(133)),w=D(e(138)),I=e(139);function D(k){return k&&k.__esModule?k:{default:k}}var H=h.default,L=(0,p.default)(H),ee=(0,w.default)(b.default,I.rgb2yuv,function(k){var A,T=(0,d.default)(k,3),W=T[0],S=T[1],te=T[2];return[(A=W,A<.25?1:A<.5?.9-A:1.1-A),S,te]},I.yuv2rgb,E.default),r=function(k){return function(A){return{className:[A.className,k.className].filter(Boolean).join(" "),style:(0,c.default)({},A.style||{},k.style||{})}}},B=function(k,A){var T=(0,p.default)(A);for(var W in k)T.indexOf(W)===-1&&T.push(W);return T.reduce(function(S,te){return S[te]=function(J,C){if(J===void 0)return C;if(C===void 0)return J;var Q=J===void 0?"undefined":(0,s.default)(J),he=C===void 0?"undefined":(0,s.default)(C);switch(Q){case"string":switch(he){case"string":return[C,J].filter(Boolean).join(" ");case"object":return r({className:J,style:C});case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return r({className:J})(C.apply(void 0,[ue].concat(ce)))}}case"object":switch(he){case"string":return r({className:C,style:J});case"object":return(0,c.default)({},C,J);case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return r({style:J})(C.apply(void 0,[ue].concat(ce)))}}case"function":switch(he){case"string":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[r(ue)({className:C})].concat(ce))};case"object":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[r(ue)({style:C})].concat(ce))};case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[C.apply(void 0,[ue].concat(ce))].concat(ce))}}}}(k[te],A[te]),S},{})},V=function(k,A){for(var T=arguments.length,W=Array(T>2?T-2:0),S=2;S<T;S++)W[S-2]=arguments[S];if(A===null)return k;Array.isArray(A)||(A=[A]);var te=A.map(function(C){return k[C]}).filter(Boolean),J=te.reduce(function(C,Q){return typeof Q=="string"?C.className=[C.className,Q].filter(Boolean).join(" "):(Q===void 0?"undefined":(0,s.default)(Q))==="object"?C.style=(0,c.default)({},C.style,Q):typeof Q=="function"&&(C=(0,c.default)({},C,Q.apply(void 0,[C].concat(W)))),C},{className:"",style:{}});return J.className||delete J.className,(0,p.default)(J.style).length===0&&delete J.style,J},z=t.invertTheme=function(k){return(0,p.default)(k).reduce(function(A,T){return A[T]=/^base/.test(T)?ee(k[T]):T==="scheme"?k[T]+":inverted":k[T],A},{})},q=(t.createStyling=(0,f.default)(function(k){for(var A=arguments.length,T=Array(A>3?A-3:0),W=3;W<A;W++)T[W-3]=arguments[W];var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=S.defaultBase16,C=J===void 0?H:J,Q=S.base16Themes,he=Q===void 0?null:Q,ue=q(te,he);ue&&(te=(0,c.default)({},ue,te));var U=L.reduce(function(ge,Me){return ge[Me]=te[Me]||C[Me],ge},{}),ce=(0,p.default)(te).reduce(function(ge,Me){return L.indexOf(Me)===-1&&(ge[Me]=te[Me]),ge},{}),Z=k(U),me=B(ce,Z);return(0,f.default)(V,2).apply(void 0,[me].concat(T))},3),t.getBase16Theme=function(k,A){if(k&&k.extend&&(k=k.extend),typeof k=="string"){var T=k.split(":"),W=(0,d.default)(T,2),S=W[0],te=W[1];k=(A||{})[S]||h[S],te==="inverted"&&(k=z(k))}return k&&k.hasOwnProperty("base00")?k:void 0})},function(a,t,e){var s,c=typeof Reflect=="object"?Reflect:null,d=c&&typeof c.apply=="function"?c.apply:function(r,B,V){return Function.prototype.apply.call(r,B,V)};s=c&&typeof c.ownKeys=="function"?c.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var p=Number.isNaN||function(r){return r!=r};function f(){f.init.call(this)}a.exports=f,a.exports.once=function(r,B){return new Promise(function(V,z){function q(){k!==void 0&&r.removeListener("error",k),V([].slice.call(arguments))}var k;B!=="error"&&(k=function(A){r.removeListener(B,q),z(A)},r.once("error",k)),r.once(B,q)})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var h=10;function E(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function b(r){return r._maxListeners===void 0?f.defaultMaxListeners:r._maxListeners}function w(r,B,V,z){var q,k,A,T;if(E(V),(k=r._events)===void 0?(k=r._events=Object.create(null),r._eventsCount=0):(k.newListener!==void 0&&(r.emit("newListener",B,V.listener?V.listener:V),k=r._events),A=k[B]),A===void 0)A=k[B]=V,++r._eventsCount;else if(typeof A=="function"?A=k[B]=z?[V,A]:[A,V]:z?A.unshift(V):A.push(V),(q=b(r))>0&&A.length>q&&!A.warned){A.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=r,W.type=B,W.count=A.length,T=W,console&&console.warn&&console.warn(T)}return r}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function D(r,B,V){var z={fired:!1,wrapFn:void 0,target:r,type:B,listener:V},q=I.bind(z);return q.listener=V,z.wrapFn=q,q}function H(r,B,V){var z=r._events;if(z===void 0)return[];var q=z[B];return q===void 0?[]:typeof q=="function"?V?[q.listener||q]:[q]:V?function(k){for(var A=new Array(k.length),T=0;T<A.length;++T)A[T]=k[T].listener||k[T];return A}(q):ee(q,q.length)}function L(r){var B=this._events;if(B!==void 0){var V=B[r];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}function ee(r,B){for(var V=new Array(B),z=0;z<B;++z)V[z]=r[z];return V}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");h=r}}),f.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},f.prototype.getMaxListeners=function(){return b(this)},f.prototype.emit=function(r){for(var B=[],V=1;V<arguments.length;V++)B.push(arguments[V]);var z=r==="error",q=this._events;if(q!==void 0)z=z&&q.error===void 0;else if(!z)return!1;if(z){var k;if(B.length>0&&(k=B[0]),k instanceof Error)throw k;var A=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw A.context=k,A}var T=q[r];if(T===void 0)return!1;if(typeof T=="function")d(T,this,B);else{var W=T.length,S=ee(T,W);for(V=0;V<W;++V)d(S[V],this,B)}return!0},f.prototype.addListener=function(r,B){return w(this,r,B,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(r,B){return w(this,r,B,!0)},f.prototype.once=function(r,B){return E(B),this.on(r,D(this,r,B)),this},f.prototype.prependOnceListener=function(r,B){return E(B),this.prependListener(r,D(this,r,B)),this},f.prototype.removeListener=function(r,B){var V,z,q,k,A;if(E(B),(z=this._events)===void 0)return this;if((V=z[r])===void 0)return this;if(V===B||V.listener===B)--this._eventsCount==0?this._events=Object.create(null):(delete z[r],z.removeListener&&this.emit("removeListener",r,V.listener||B));else if(typeof V!="function"){for(q=-1,k=V.length-1;k>=0;k--)if(V[k]===B||V[k].listener===B){A=V[k].listener,q=k;break}if(q<0)return this;q===0?V.shift():function(T,W){for(;W+1<T.length;W++)T[W]=T[W+1];T.pop()}(V,q),V.length===1&&(z[r]=V[0]),z.removeListener!==void 0&&this.emit("removeListener",r,A||B)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(r){var B,V,z;if((V=this._events)===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete V[r]),this;if(arguments.length===0){var q,k=Object.keys(V);for(z=0;z<k.length;++z)(q=k[z])!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(B=V[r])=="function")this.removeListener(r,B);else if(B!==void 0)for(z=B.length-1;z>=0;z--)this.removeListener(r,B[z]);return this},f.prototype.listeners=function(r){return H(this,r,!0)},f.prototype.rawListeners=function(r){return H(this,r,!1)},f.listenerCount=function(r,B){return typeof r.listenerCount=="function"?r.listenerCount(B):L.call(r,B)},f.prototype.listenerCount=L,f.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(a,t,e){a.exports.Dispatcher=e(140)},function(a,t,e){a.exports=e(142)},function(a,t,e){t.__esModule=!0;var s=p(e(50)),c=p(e(65)),d=typeof c.default=="function"&&typeof s.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":typeof f};function p(f){return f&&f.__esModule?f:{default:f}}t.default=typeof c.default=="function"&&d(s.default)==="symbol"?function(f){return f===void 0?"undefined":d(f)}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":f===void 0?"undefined":d(f)}},function(a,t,e){a.exports={default:e(51),__esModule:!0}},function(a,t,e){e(20),e(29),a.exports=e(30).f("iterator")},function(a,t,e){var s=e(21),c=e(22);a.exports=function(d){return function(p,f){var h,E,b=String(c(p)),w=s(f),I=b.length;return w<0||w>=I?d?"":void 0:(h=b.charCodeAt(w))<55296||h>56319||w+1===I||(E=b.charCodeAt(w+1))<56320||E>57343?d?b.charAt(w):h:d?b.slice(w,w+2):E-56320+(h-55296<<10)+65536}}},function(a,t,e){var s=e(54);a.exports=function(c,d,p){if(s(c),d===void 0)return c;switch(p){case 1:return function(f){return c.call(d,f)};case 2:return function(f,h){return c.call(d,f,h)};case 3:return function(f,h,E){return c.call(d,f,h,E)}}return function(){return c.apply(d,arguments)}}},function(a,t){a.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}},function(a,t,e){var s=e(38),c=e(16),d=e(28),p={};e(6)(p,e(2)("iterator"),function(){return this}),a.exports=function(f,h,E){f.prototype=s(p,{next:c(1,E)}),d(f,h+" Iterator")}},function(a,t,e){var s=e(7),c=e(10),d=e(13);a.exports=e(4)?Object.defineProperties:function(p,f){c(p);for(var h,E=d(f),b=E.length,w=0;b>w;)s.f(p,h=E[w++],f[h]);return p}},function(a,t,e){var s=e(9),c=e(58),d=e(59);a.exports=function(p){return function(f,h,E){var b,w=s(f),I=c(w.length),D=d(E,I);if(p&&h!=h){for(;I>D;)if((b=w[D++])!=b)return!0}else for(;I>D;D++)if((p||D in w)&&w[D]===h)return p||D||0;return!p&&-1}}},function(a,t,e){var s=e(21),c=Math.min;a.exports=function(d){return d>0?c(s(d),9007199254740991):0}},function(a,t,e){var s=e(21),c=Math.max,d=Math.min;a.exports=function(p,f){return(p=s(p))<0?c(p+f,0):d(p,f)}},function(a,t,e){var s=e(3).document;a.exports=s&&s.documentElement},function(a,t,e){var s=e(5),c=e(18),d=e(25)("IE_PROTO"),p=Object.prototype;a.exports=Object.getPrototypeOf||function(f){return f=c(f),s(f,d)?f[d]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?p:null}},function(a,t,e){var s=e(63),c=e(64),d=e(12),p=e(9);a.exports=e(34)(Array,"Array",function(f,h){this._t=p(f),this._i=0,this._k=h},function(){var f=this._t,h=this._k,E=this._i++;return!f||E>=f.length?(this._t=void 0,c(1)):c(0,h=="keys"?E:h=="values"?f[E]:[E,f[E]])},"values"),d.Arguments=d.Array,s("keys"),s("values"),s("entries")},function(a,t){a.exports=function(){}},function(a,t){a.exports=function(e,s){return{value:s,done:!!e}}},function(a,t,e){a.exports={default:e(66),__esModule:!0}},function(a,t,e){e(67),e(73),e(74),e(75),a.exports=e(1).Symbol},function(a,t,e){var s=e(3),c=e(5),d=e(4),p=e(15),f=e(37),h=e(68).KEY,E=e(8),b=e(26),w=e(28),I=e(17),D=e(2),H=e(30),L=e(31),ee=e(69),r=e(70),B=e(10),V=e(11),z=e(18),q=e(9),k=e(23),A=e(16),T=e(38),W=e(71),S=e(72),te=e(32),J=e(7),C=e(13),Q=S.f,he=J.f,ue=W.f,U=s.Symbol,ce=s.JSON,Z=ce&&ce.stringify,me=D("_hidden"),ge=D("toPrimitive"),Me={}.propertyIsEnumerable,Ee=b("symbol-registry"),Ce=b("symbols"),be=b("op-symbols"),ye=Object.prototype,Be=typeof U=="function"&&!!te.f,Ue=s.QObject,Ze=!Ue||!Ue.prototype||!Ue.prototype.findChild,Xe=d&&E(function(){return T(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!=7})?function(j,N,R){var K=Q(ye,N);K&&delete ye[N],he(j,N,R),K&&j!==ye&&he(ye,N,K)}:he,et=function(j){var N=Ce[j]=T(U.prototype);return N._k=j,N},tt=Be&&typeof U.iterator=="symbol"?function(j){return typeof j=="symbol"}:function(j){return j instanceof U},He=function(j,N,R){return j===ye&&He(be,N,R),B(j),N=k(N,!0),B(R),c(Ce,N)?(R.enumerable?(c(j,me)&&j[me][N]&&(j[me][N]=!1),R=T(R,{enumerable:A(0,!1)})):(c(j,me)||he(j,me,A(1,{})),j[me][N]=!0),Xe(j,N,R)):he(j,N,R)},nt=function(j,N){B(j);for(var R,K=ee(N=q(N)),ne=0,ae=K.length;ae>ne;)He(j,R=K[ne++],N[R]);return j},st=function(j){var N=Me.call(this,j=k(j,!0));return!(this===ye&&c(Ce,j)&&!c(be,j))&&(!(N||!c(this,j)||!c(Ce,j)||c(this,me)&&this[me][j])||N)},at=function(j,N){if(j=q(j),N=k(N,!0),j!==ye||!c(Ce,N)||c(be,N)){var R=Q(j,N);return!R||!c(Ce,N)||c(j,me)&&j[me][N]||(R.enumerable=!0),R}},ot=function(j){for(var N,R=ue(q(j)),K=[],ne=0;R.length>ne;)c(Ce,N=R[ne++])||N==me||N==h||K.push(N);return K},Ge=function(j){for(var N,R=j===ye,K=ue(R?be:q(j)),ne=[],ae=0;K.length>ae;)!c(Ce,N=K[ae++])||R&&!c(ye,N)||ne.push(Ce[N]);return ne};Be||(f((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var j=I(arguments.length>0?arguments[0]:void 0),N=function(R){this===ye&&N.call(be,R),c(this,me)&&c(this[me],j)&&(this[me][j]=!1),Xe(this,j,A(1,R))};return d&&Ze&&Xe(ye,j,{configurable:!0,set:N}),et(j)}).prototype,"toString",function(){return this._k}),S.f=at,J.f=He,e(41).f=W.f=ot,e(19).f=st,te.f=Ge,d&&!e(14)&&f(ye,"propertyIsEnumerable",st,!0),H.f=function(j){return et(D(j))}),p(p.G+p.W+p.F*!Be,{Symbol:U});for(var Ve="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ie=0;Ve.length>Ie;)D(Ve[Ie++]);for(var rt=C(D.store),F=0;rt.length>F;)L(rt[F++]);p(p.S+p.F*!Be,"Symbol",{for:function(j){return c(Ee,j+="")?Ee[j]:Ee[j]=U(j)},keyFor:function(j){if(!tt(j))throw TypeError(j+" is not a symbol!");for(var N in Ee)if(Ee[N]===j)return N},useSetter:function(){Ze=!0},useSimple:function(){Ze=!1}}),p(p.S+p.F*!Be,"Object",{create:function(j,N){return N===void 0?T(j):nt(T(j),N)},defineProperty:He,defineProperties:nt,getOwnPropertyDescriptor:at,getOwnPropertyNames:ot,getOwnPropertySymbols:Ge});var x=E(function(){te.f(1)});p(p.S+p.F*x,"Object",{getOwnPropertySymbols:function(j){return te.f(z(j))}}),ce&&p(p.S+p.F*(!Be||E(function(){var j=U();return Z([j])!="[null]"||Z({a:j})!="{}"||Z(Object(j))!="{}"})),"JSON",{stringify:function(j){for(var N,R,K=[j],ne=1;arguments.length>ne;)K.push(arguments[ne++]);if(R=N=K[1],(V(N)||j!==void 0)&&!tt(j))return r(N)||(N=function(ae,pe){if(typeof R=="function"&&(pe=R.call(this,ae,pe)),!tt(pe))return pe}),K[1]=N,Z.apply(ce,K)}}),U.prototype[ge]||e(6)(U.prototype,ge,U.prototype.valueOf),w(U,"Symbol"),w(Math,"Math",!0),w(s.JSON,"JSON",!0)},function(a,t,e){var s=e(17)("meta"),c=e(11),d=e(5),p=e(7).f,f=0,h=Object.isExtensible||function(){return!0},E=!e(8)(function(){return h(Object.preventExtensions({}))}),b=function(I){p(I,s,{value:{i:"O"+ ++f,w:{}}})},w=a.exports={KEY:s,NEED:!1,fastKey:function(I,D){if(!c(I))return typeof I=="symbol"?I:(typeof I=="string"?"S":"P")+I;if(!d(I,s)){if(!h(I))return"F";if(!D)return"E";b(I)}return I[s].i},getWeak:function(I,D){if(!d(I,s)){if(!h(I))return!0;if(!D)return!1;b(I)}return I[s].w},onFreeze:function(I){return E&&w.NEED&&h(I)&&!d(I,s)&&b(I),I}}},function(a,t,e){var s=e(13),c=e(32),d=e(19);a.exports=function(p){var f=s(p),h=c.f;if(h)for(var E,b=h(p),w=d.f,I=0;b.length>I;)w.call(p,E=b[I++])&&f.push(E);return f}},function(a,t,e){var s=e(24);a.exports=Array.isArray||function(c){return s(c)=="Array"}},function(a,t,e){var s=e(9),c=e(41).f,d={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];a.exports.f=function(f){return p&&d.call(f)=="[object Window]"?function(h){try{return c(h)}catch{return p.slice()}}(f):c(s(f))}},function(a,t,e){var s=e(19),c=e(16),d=e(9),p=e(23),f=e(5),h=e(35),E=Object.getOwnPropertyDescriptor;t.f=e(4)?E:function(b,w){if(b=d(b),w=p(w,!0),h)try{return E(b,w)}catch{}if(f(b,w))return c(!s.f.call(b,w),b[w])}},function(a,t){},function(a,t,e){e(31)("asyncIterator")},function(a,t,e){e(31)("observable")},function(a,t,e){t.__esModule=!0;var s,c=e(77),d=(s=c)&&s.__esModule?s:{default:s};t.default=d.default||function(p){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var E in h)Object.prototype.hasOwnProperty.call(h,E)&&(p[E]=h[E])}return p}},function(a,t,e){a.exports={default:e(78),__esModule:!0}},function(a,t,e){e(79),a.exports=e(1).Object.assign},function(a,t,e){var s=e(15);s(s.S+s.F,"Object",{assign:e(80)})},function(a,t,e){var s=e(4),c=e(13),d=e(32),p=e(19),f=e(18),h=e(40),E=Object.assign;a.exports=!E||e(8)(function(){var b={},w={},I=Symbol(),D="abcdefghijklmnopqrst";return b[I]=7,D.split("").forEach(function(H){w[H]=H}),E({},b)[I]!=7||Object.keys(E({},w)).join("")!=D})?function(b,w){for(var I=f(b),D=arguments.length,H=1,L=d.f,ee=p.f;D>H;)for(var r,B=h(arguments[H++]),V=L?c(B).concat(L(B)):c(B),z=V.length,q=0;z>q;)r=V[q++],s&&!ee.call(B,r)||(I[r]=B[r]);return I}:E},function(a,t,e){t.__esModule=!0;var s=d(e(82)),c=d(e(85));function d(p){return p&&p.__esModule?p:{default:p}}t.default=function(p,f){if(Array.isArray(p))return p;if((0,s.default)(Object(p)))return function(h,E){var b=[],w=!0,I=!1,D=void 0;try{for(var H,L=(0,c.default)(h);!(w=(H=L.next()).done)&&(b.push(H.value),!E||b.length!==E);w=!0);}catch(ee){I=!0,D=ee}finally{try{!w&&L.return&&L.return()}finally{if(I)throw D}}return b}(p,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(a,t,e){a.exports={default:e(83),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(84)},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).isIterable=function(p){var f=Object(p);return f[c]!==void 0||"@@iterator"in f||d.hasOwnProperty(s(f))}},function(a,t,e){a.exports={default:e(86),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(87)},function(a,t,e){var s=e(10),c=e(88);a.exports=e(1).getIterator=function(d){var p=c(d);if(typeof p!="function")throw TypeError(d+" is not iterable!");return s(p.call(d))}},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).getIteratorMethod=function(p){if(p!=null)return p[c]||p["@@iterator"]||d[s(p)]}},function(a,t,e){a.exports={default:e(90),__esModule:!0}},function(a,t,e){e(91),a.exports=e(1).Object.keys},function(a,t,e){var s=e(18),c=e(13);e(92)("keys",function(){return function(d){return c(s(d))}})},function(a,t,e){var s=e(15),c=e(1),d=e(8);a.exports=function(p,f){var h=(c.Object||{})[p]||Object[p],E={};E[p]=f(h),s(s.S+s.F*d(function(){h(1)}),"Object",E)}},function(a,t,e){(function(s){var c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],d=/^\s+|\s+$/g,p=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,h=/,? & /,E=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,w=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,D=/^(?:0|[1-9]\d*)$/,H=parseInt,L=typeof s=="object"&&s&&s.Object===Object&&s,ee=typeof self=="object"&&self&&self.Object===Object&&self,r=L||ee||Function("return this")();function B(F,x,j){switch(j.length){case 0:return F.call(x);case 1:return F.call(x,j[0]);case 2:return F.call(x,j[0],j[1]);case 3:return F.call(x,j[0],j[1],j[2])}return F.apply(x,j)}function V(F,x){return!!(F&&F.length)&&function(j,N,R){if(N!=N)return function(ae,pe,xe,je){for(var Ae=ae.length,ve=xe+-1;++ve<Ae;)if(pe(ae[ve],ve,ae))return ve;return-1}(j,z,R);for(var K=R-1,ne=j.length;++K<ne;)if(j[K]===N)return K;return-1}(F,x,0)>-1}function z(F){return F!=F}function q(F,x){for(var j=F.length,N=0;j--;)F[j]===x&&N++;return N}function k(F,x){for(var j=-1,N=F.length,R=0,K=[];++j<N;){var ne=F[j];ne!==x&&ne!=="__lodash_placeholder__"||(F[j]="__lodash_placeholder__",K[R++]=j)}return K}var A,T,W,S=Function.prototype,te=Object.prototype,J=r["__core-js_shared__"],C=(A=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",Q=S.toString,he=te.hasOwnProperty,ue=te.toString,U=RegExp("^"+Q.call(he).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=Object.create,Z=Math.max,me=Math.min,ge=(T=et(Object,"defineProperty"),(W=et.name)&&W.length>2?T:void 0);function Me(F){return Ve(F)?ce(F):{}}function Ee(F){return!(!Ve(F)||function(x){return!!C&&C in x}(F))&&(function(x){var j=Ve(x)?ue.call(x):"";return j=="[object Function]"||j=="[object GeneratorFunction]"}(F)||function(x){var j=!1;if(x!=null&&typeof x.toString!="function")try{j=!!(x+"")}catch{}return j}(F)?U:w).test(function(x){if(x!=null){try{return Q.call(x)}catch{}try{return x+""}catch{}}return""}(F))}function Ce(F,x,j,N){for(var R=-1,K=F.length,ne=j.length,ae=-1,pe=x.length,xe=Z(K-ne,0),je=Array(pe+xe),Ae=!N;++ae<pe;)je[ae]=x[ae];for(;++R<ne;)(Ae||R<K)&&(je[j[R]]=F[R]);for(;xe--;)je[ae++]=F[R++];return je}function be(F,x,j,N){for(var R=-1,K=F.length,ne=-1,ae=j.length,pe=-1,xe=x.length,je=Z(K-ae,0),Ae=Array(je+xe),ve=!N;++R<je;)Ae[R]=F[R];for(var Te=R;++pe<xe;)Ae[Te+pe]=x[pe];for(;++ne<ae;)(ve||R<K)&&(Ae[Te+j[ne]]=F[R++]);return Ae}function ye(F){return function(){var x=arguments;switch(x.length){case 0:return new F;case 1:return new F(x[0]);case 2:return new F(x[0],x[1]);case 3:return new F(x[0],x[1],x[2]);case 4:return new F(x[0],x[1],x[2],x[3]);case 5:return new F(x[0],x[1],x[2],x[3],x[4]);case 6:return new F(x[0],x[1],x[2],x[3],x[4],x[5]);case 7:return new F(x[0],x[1],x[2],x[3],x[4],x[5],x[6])}var j=Me(F.prototype),N=F.apply(j,x);return Ve(N)?N:j}}function Be(F,x,j,N,R,K,ne,ae,pe,xe){var je=128&x,Ae=1&x,ve=2&x,Te=24&x,De=512&x,$e=ve?void 0:ye(F);return function ze(){for(var ke=arguments.length,oe=Array(ke),Fe=ke;Fe--;)oe[Fe]=arguments[Fe];if(Te)var Pe=Xe(ze),Je=q(oe,Pe);if(N&&(oe=Ce(oe,N,R,Te)),K&&(oe=be(oe,K,ne,Te)),ke-=Je,Te&&ke<xe){var qe=k(oe,Pe);return Ue(F,x,Be,ze.placeholder,j,oe,qe,ae,pe,xe-ke)}var Re=Ae?j:this,We=ve?Re[F]:F;return ke=oe.length,ae?oe=st(oe,ae):De&&ke>1&&oe.reverse(),je&&pe<ke&&(oe.length=pe),this&&this!==r&&this instanceof ze&&(We=$e||ye(We)),We.apply(Re,oe)}}function Ue(F,x,j,N,R,K,ne,ae,pe,xe){var je=8&x;x|=je?32:64,4&(x&=~(je?64:32))||(x&=-4);var Ae=j(F,x,R,je?K:void 0,je?ne:void 0,je?void 0:K,je?void 0:ne,ae,pe,xe);return Ae.placeholder=N,at(Ae,F,x)}function Ze(F,x,j,N,R,K,ne,ae){var pe=2&x;if(!pe&&typeof F!="function")throw new TypeError("Expected a function");var xe=N?N.length:0;if(xe||(x&=-97,N=R=void 0),ne=ne===void 0?ne:Z(rt(ne),0),ae=ae===void 0?ae:rt(ae),xe-=R?R.length:0,64&x){var je=N,Ae=R;N=R=void 0}var ve=[F,x,j,N,R,je,Ae,K,ne,ae];if(F=ve[0],x=ve[1],j=ve[2],N=ve[3],R=ve[4],!(ae=ve[9]=ve[9]==null?pe?0:F.length:Z(ve[9]-xe,0))&&24&x&&(x&=-25),x&&x!=1)Te=x==8||x==16?function(De,$e,ze){var ke=ye(De);return function oe(){for(var Fe=arguments.length,Pe=Array(Fe),Je=Fe,qe=Xe(oe);Je--;)Pe[Je]=arguments[Je];var Re=Fe<3&&Pe[0]!==qe&&Pe[Fe-1]!==qe?[]:k(Pe,qe);if((Fe-=Re.length)<ze)return Ue(De,$e,Be,oe.placeholder,void 0,Pe,Re,void 0,void 0,ze-Fe);var We=this&&this!==r&&this instanceof oe?ke:De;return B(We,this,Pe)}}(F,x,ae):x!=32&&x!=33||R.length?Be.apply(void 0,ve):function(De,$e,ze,ke){var oe=1&$e,Fe=ye(De);return function Pe(){for(var Je=-1,qe=arguments.length,Re=-1,We=ke.length,it=Array(We+qe),ft=this&&this!==r&&this instanceof Pe?Fe:De;++Re<We;)it[Re]=ke[Re];for(;qe--;)it[Re++]=arguments[++Je];return B(ft,oe?ze:this,it)}}(F,x,j,N);else var Te=function(De,$e,ze){var ke=1&$e,oe=ye(De);return function Fe(){var Pe=this&&this!==r&&this instanceof Fe?oe:De;return Pe.apply(ke?ze:this,arguments)}}(F,x,j);return at(Te,F,x)}function Xe(F){return F.placeholder}function et(F,x){var j=function(N,R){return N==null?void 0:N[R]}(F,x);return Ee(j)?j:void 0}function tt(F){var x=F.match(f);return x?x[1].split(h):[]}function He(F,x){var j=x.length,N=j-1;return x[N]=(j>1?"& ":"")+x[N],x=x.join(j>2?", ":" "),F.replace(p,`{
3
3
  /* [wrapped with `+x+`] */
4
4
  `)}function nt(F,x){return!!(x=x??9007199254740991)&&(typeof F=="number"||D.test(F))&&F>-1&&F%1==0&&F<x}function st(F,x){for(var j=F.length,N=me(x.length,j),R=function(ne,ae){var pe=-1,xe=ne.length;for(ae||(ae=Array(xe));++pe<xe;)ae[pe]=ne[pe];return ae}(F);N--;){var K=x[N];F[N]=nt(K,j)?R[K]:void 0}return F}var at=ge?function(F,x,j){var N,R=x+"";return ge(F,"toString",{configurable:!0,enumerable:!1,value:(N=He(R,ot(tt(R),j)),function(){return N})})}:function(F){return F};function ot(F,x){return function(j,N){for(var R=-1,K=j?j.length:0;++R<K&&N(j[R],R,j)!==!1;);}(c,function(j){var N="_."+j[0];x&j[1]&&!V(F,N)&&F.push(N)}),F.sort()}function Ge(F,x,j){var N=Ze(F,8,void 0,void 0,void 0,void 0,void 0,x=j?void 0:x);return N.placeholder=Ge.placeholder,N}function Ve(F){var x=typeof F;return!!F&&(x=="object"||x=="function")}function Ie(F){return F?(F=function(x){if(typeof x=="number")return x;if(function(R){return typeof R=="symbol"||function(K){return!!K&&typeof K=="object"}(R)&&ue.call(R)=="[object Symbol]"}(x))return NaN;if(Ve(x)){var j=typeof x.valueOf=="function"?x.valueOf():x;x=Ve(j)?j+"":j}if(typeof x!="string")return x===0?x:+x;x=x.replace(d,"");var N=b.test(x);return N||I.test(x)?H(x.slice(2),N?2:8):E.test(x)?NaN:+x}(F))===1/0||F===-1/0?17976931348623157e292*(F<0?-1:1):F==F?F:0:F===0?F:0}function rt(F){var x=Ie(F),j=x%1;return x==x?j?x-j:x:0}Ge.placeholder={},a.exports=Ge}).call(this,e(43))},function(a,t,e){function s(be){return be&&be.__esModule?be.default:be}t.__esModule=!0;var c=e(95);t.threezerotwofour=s(c);var d=e(96);t.apathy=s(d);var p=e(97);t.ashes=s(p);var f=e(98);t.atelierDune=s(f);var h=e(99);t.atelierForest=s(h);var E=e(100);t.atelierHeath=s(E);var b=e(101);t.atelierLakeside=s(b);var w=e(102);t.atelierSeaside=s(w);var I=e(103);t.bespin=s(I);var D=e(104);t.brewer=s(D);var H=e(105);t.bright=s(H);var L=e(106);t.chalk=s(L);var ee=e(107);t.codeschool=s(ee);var r=e(108);t.colors=s(r);var B=e(109);t.default=s(B);var V=e(110);t.eighties=s(V);var z=e(111);t.embers=s(z);var q=e(112);t.flat=s(q);var k=e(113);t.google=s(k);var A=e(114);t.grayscale=s(A);var T=e(115);t.greenscreen=s(T);var W=e(116);t.harmonic=s(W);var S=e(117);t.hopscotch=s(S);var te=e(118);t.isotope=s(te);var J=e(119);t.marrakesh=s(J);var C=e(120);t.mocha=s(C);var Q=e(121);t.monokai=s(Q);var he=e(122);t.ocean=s(he);var ue=e(123);t.paraiso=s(ue);var U=e(124);t.pop=s(U);var ce=e(125);t.railscasts=s(ce);var Z=e(126);t.shapeshifter=s(Z);var me=e(127);t.solarized=s(me);var ge=e(128);t.summerfruit=s(ge);var Me=e(129);t.tomorrow=s(Me);var Ee=e(130);t.tube=s(Ee);var Ce=e(131);t.twilight=s(Ce)},function(a,t,e){t.__esModule=!0,t.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},a.exports=t.default},function(a,t,e){var s=e(33);function c(d){var p=Math.round(s(d,0,255)).toString(16);return p.length==1?"0"+p:p}a.exports=function(d){var p=d.length===4?c(255*d[3]):"";return"#"+c(d[0])+c(d[1])+c(d[2])+p}},function(a,t,e){var s=e(134),c=e(135),d=e(136),p=e(137),f={"#":c,hsl:function(E){var b=s(E),w=p(b);return b.length===4&&w.push(b[3]),w},rgb:d};function h(E){for(var b in f)if(E.indexOf(b)===0)return f[b](E)}h.rgb=d,h.hsl=s,h.hex=c,a.exports=h},function(a,t,e){var s=e(44),c=e(33);function d(p,f){switch(p=parseFloat(p),f){case 0:return c(p,0,360);case 1:case 2:return c(p,0,100);case 3:return c(p,0,1)}}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){e.length!==4&&e.length!==5||(e=function(d){for(var p="#",f=1;f<d.length;f++){var h=d.charAt(f);p+=h+h}return p}(e));var s=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];if(e.length===9){var c=parseFloat((parseInt(e.substring(7,9),16)/255).toFixed(2));s.push(c)}return s}},function(a,t,e){var s=e(44),c=e(33);function d(p,f){return f<3?p.indexOf("%")!=-1?Math.round(255*c(parseInt(p,10),0,100)/100):c(parseInt(p,10),0,255):c(parseFloat(p),0,1)}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){var s,c,d,p,f,h=e[0]/360,E=e[1]/100,b=e[2]/100;if(E==0)return[f=255*b,f,f];s=2*b-(c=b<.5?b*(1+E):b+E-b*E),p=[0,0,0];for(var w=0;w<3;w++)(d=h+1/3*-(w-1))<0&&d++,d>1&&d--,f=6*d<1?s+6*(c-s)*d:2*d<1?c:3*d<2?s+(c-s)*(2/3-d)*6:s,p[w]=255*f;return p}},function(a,t,e){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s,d=typeof self=="object"&&self&&self.Object===Object&&self,p=c||d||Function("return this")();function f(k,A,T){switch(T.length){case 0:return k.call(A);case 1:return k.call(A,T[0]);case 2:return k.call(A,T[0],T[1]);case 3:return k.call(A,T[0],T[1],T[2])}return k.apply(A,T)}function h(k,A){for(var T=-1,W=A.length,S=k.length;++T<W;)k[S+T]=A[T];return k}var E=Object.prototype,b=E.hasOwnProperty,w=E.toString,I=p.Symbol,D=E.propertyIsEnumerable,H=I?I.isConcatSpreadable:void 0,L=Math.max;function ee(k){return r(k)||function(A){return function(T){return function(W){return!!W&&typeof W=="object"}(T)&&function(W){return W!=null&&function(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=9007199254740991}(W.length)&&!function(S){var te=function(J){var C=typeof J;return!!J&&(C=="object"||C=="function")}(S)?w.call(S):"";return te=="[object Function]"||te=="[object GeneratorFunction]"}(W)}(T)}(A)&&b.call(A,"callee")&&(!D.call(A,"callee")||w.call(A)=="[object Arguments]")}(k)||!!(H&&k&&k[H])}var r=Array.isArray,B,V,z,q=(V=function(k){var A=(k=function(S,te,J,C,Q){var he=-1,ue=S.length;for(J||(J=ee),Q||(Q=[]);++he<ue;){var U=S[he];J(U)?h(Q,U):Q[Q.length]=U}return Q}(k)).length,T=A;for(B;T--;)if(typeof k[T]!="function")throw new TypeError("Expected a function");return function(){for(var W=0,S=A?k[W].apply(this,arguments):arguments[0];++W<A;)S=k[W].call(this,S);return S}},z=L(z===void 0?V.length-1:z,0),function(){for(var k=arguments,A=-1,T=L(k.length-z,0),W=Array(T);++A<T;)W[A]=k[z+A];A=-1;for(var S=Array(z+1);++A<z;)S[A]=k[A];return S[z]=W,f(V,this,S)});a.exports=q}).call(this,e(43))},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.yuv2rgb=function(s){var c,d,p,f=s[0],h=s[1],E=s[2];return c=1*f+0*h+1.13983*E,d=1*f+-.39465*h+-.5806*E,p=1*f+2.02311*h+0*E,c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),p=Math.min(Math.max(0,p),1),[255*c,255*d,255*p]},t.rgb2yuv=function(s){var c=s[0]/255,d=s[1]/255,p=s[2]/255;return[.299*c+.587*d+.114*p,-.14713*c+-.28886*d+.436*p,.615*c+-.51499*d+-.10001*p]}},function(a,t,e){function s(p,f,h){return f in p?Object.defineProperty(p,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[f]=h,p}var c=e(141),d=function(){function p(){s(this,"_callbacks",void 0),s(this,"_isDispatching",void 0),s(this,"_isHandled",void 0),s(this,"_isPending",void 0),s(this,"_lastID",void 0),s(this,"_pendingPayload",void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var f=p.prototype;return f.register=function(h){var E="ID_"+this._lastID++;return this._callbacks[E]=h,E},f.unregister=function(h){this._callbacks[h]||c(!1),delete this._callbacks[h]},f.waitFor=function(h){this._isDispatching||c(!1);for(var E=0;E<h.length;E++){var b=h[E];this._isPending[b]?this._isHandled[b]||c(!1):(this._callbacks[b]||c(!1),this._invokeCallback(b))}},f.dispatch=function(h){this._isDispatching&&c(!1),this._startDispatching(h);try{for(var E in this._callbacks)this._isPending[E]||this._invokeCallback(E)}finally{this._stopDispatching()}},f.isDispatching=function(){return this._isDispatching},f._invokeCallback=function(h){this._isPending[h]=!0,this._callbacks[h](this._pendingPayload),this._isHandled[h]=!0},f._startDispatching=function(h){for(var E in this._callbacks)this._isPending[E]=!1,this._isHandled[E]=!1;this._pendingPayload=h,this._isDispatching=!0},f._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},p}();a.exports=d},function(a,t,e){a.exports=function(s,c){for(var d=arguments.length,p=new Array(d>2?d-2:0),f=2;f<d;f++)p[f-2]=arguments[f];if(!s){var h;if(c===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var E=0;(h=new Error(c.replace(/%s/g,function(){return String(p[E++])}))).name="Invariant Violation"}throw h.framesToPop=1,h}}},function(a,t,e){function s(l,u,n){return u in l?Object.defineProperty(l,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[u]=n,l}function c(l,u){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);u&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(l,i).enumerable})),n.push.apply(n,o)}return n}function d(l){for(var u=1;u<arguments.length;u++){var n=arguments[u]!=null?arguments[u]:{};u%2?c(Object(n),!0).forEach(function(o){s(l,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(o){Object.defineProperty(l,o,Object.getOwnPropertyDescriptor(n,o))})}return l}function p(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}function f(l,u){for(var n=0;n<u.length;n++){var o=u[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(l,o.key,o)}}function h(l,u,n){return u&&f(l.prototype,u),n&&f(l,n),l}function E(l,u){return(E=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n})(l,u)}function b(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(u&&u.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),u&&E(l,u)}function w(l){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(l)}function I(l){return(I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(l)}function D(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function H(l,u){return!u||I(u)!=="object"&&typeof u!="function"?D(l):u}function L(l){var u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,o=w(l);if(u){var i=w(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return H(this,n)}}e.r(t);var ee=e(0),r=e.n(ee);function B(){var l=this.constructor.getDerivedStateFromProps(this.props,this.state);l!=null&&this.setState(l)}function V(l){this.setState(function(u){var n=this.constructor.getDerivedStateFromProps(l,u);return n??null}.bind(this))}function z(l,u){try{var n=this.props,o=this.state;this.props=l,this.state=u,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function q(l){var u=l.prototype;if(!u||!u.isReactComponent)throw new Error("Can only polyfill class components");if(typeof l.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function")return l;var n=null,o=null,i=null;if(typeof u.componentWillMount=="function"?n="componentWillMount":typeof u.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof u.componentWillReceiveProps=="function"?o="componentWillReceiveProps":typeof u.UNSAFE_componentWillReceiveProps=="function"&&(o="UNSAFE_componentWillReceiveProps"),typeof u.componentWillUpdate=="function"?i="componentWillUpdate":typeof u.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||o!==null||i!==null){var y=l.displayName||l.name,O=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.